summaryrefslogtreecommitdiff
path: root/enc/gb18030.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-15 13:36:18 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-15 13:36:18 +0000
commitedc61cf4c19c089d210c7774994ee6d57bff65ad (patch)
treee7ed05f4840d0eb293ad4420c212debca496a2b0 /enc/gb18030.c
parentd2a377d747c707bed4c2fb880fe4147807801e08 (diff)
* encoding.c (ENC_REGISTER): use &OnigEncoding*.
(ENCINDEX_UTF_8): renamed from ENCINDEX_UTF8. (rb_enc_init): use ENC_REGISTER. * include/ruby/oniguruma.h (OnigEncodingUTF8, ONIG_ENCODING_UTF8): removed. * enc/*.c: remove use of &encoding_*; use enc argument instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enc/gb18030.c')
-rw-r--r--enc/gb18030.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/enc/gb18030.c b/enc/gb18030.c
index e3b72f2..100c2bb 100644
--- a/enc/gb18030.c
+++ b/enc/gb18030.c
@@ -30,8 +30,6 @@
#include "regenc.h"
-OnigEncodingDeclare(GB18030);
-
#if 1
#define DEBUG_GB18030(arg)
#else
@@ -80,20 +78,20 @@ gb18030_mbc_enc_len(const UChar* p, const UChar* end, OnigEncoding enc)
static OnigCodePoint
gb18030_mbc_to_code(const UChar* p, const UChar* end, OnigEncoding enc)
{
- return onigenc_mbn_mbc_to_code(&OnigEncodingName(GB18030), p, end);
+ return onigenc_mbn_mbc_to_code(enc, p, end);
}
static int
gb18030_code_to_mbc(OnigCodePoint code, UChar *buf, OnigEncoding enc)
{
- return onigenc_mb4_code_to_mbc(&OnigEncodingName(GB18030), code, buf);
+ return onigenc_mb4_code_to_mbc(enc, code, buf);
}
static int
gb18030_mbc_case_fold(OnigCaseFoldType flag, const UChar** pp, const UChar* end,
UChar* lower, OnigEncoding enc)
{
- return onigenc_mbn_mbc_case_fold(&OnigEncodingName(GB18030), flag,
+ return onigenc_mbn_mbc_case_fold(enc, flag,
pp, end, lower);
}
@@ -102,14 +100,14 @@ static int
gb18030_is_mbc_ambiguous(OnigCaseFoldType flag,
const UChar** pp, const UChar* end, OnigEncoding enc)
{
- return onigenc_mbn_is_mbc_ambiguous(&OnigEncodingName(GB18030), flag, pp, end);
+ return onigenc_mbn_is_mbc_ambiguous(enc, flag, pp, end);
}
#endif
static int
gb18030_is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
{
- return onigenc_mb4_is_code_ctype(&OnigEncodingName(GB18030), code, ctype);
+ return onigenc_mb4_is_code_ctype(enc, code, ctype);
}
enum state {