diff options
Diffstat (limited to 'ext/mbstring/oniguruma/enc/gb18030.c')
-rw-r--r-- | ext/mbstring/oniguruma/enc/gb18030.c | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/ext/mbstring/oniguruma/enc/gb18030.c b/ext/mbstring/oniguruma/enc/gb18030.c index 01995ea094..6bbd109eab 100644 --- a/ext/mbstring/oniguruma/enc/gb18030.c +++ b/ext/mbstring/oniguruma/enc/gb18030.c @@ -2,8 +2,8 @@ gb18030.c - Oniguruma (regular expression library) **********************************************************************/ /*- - * Copyright (c) 2005 KUBO Takehiro <kubo AT jiubao DOT org> - * K.Kosako <sndgk393 AT ybb DOT ne DOT jp> + * Copyright (c) 2005-2007 KUBO Takehiro <kubo AT jiubao DOT org> + * K.Kosako <sndgk393 AT ybb DOT ne DOT jp> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -88,18 +88,21 @@ gb18030_code_to_mbc(OnigCodePoint code, UChar *buf) } static int -gb18030_mbc_to_normalize(OnigAmbigType flag, const UChar** pp, const UChar* end, - UChar* lower) +gb18030_mbc_case_fold(OnigCaseFoldType flag, const UChar** pp, const UChar* end, + UChar* lower) { - return onigenc_mbn_mbc_to_normalize(ONIG_ENCODING_GB18030, flag, - pp, end, lower); + return onigenc_mbn_mbc_case_fold(ONIG_ENCODING_GB18030, flag, + pp, end, lower); } +#if 0 static int -gb18030_is_mbc_ambiguous(OnigAmbigType flag, const UChar** pp, const UChar* end) +gb18030_is_mbc_ambiguous(OnigCaseFoldType flag, + const UChar** pp, const UChar* end) { return onigenc_mbn_is_mbc_ambiguous(ONIG_ENCODING_GB18030, flag, pp, end); } +#endif static int gb18030_is_code_ctype(OnigCodePoint code, unsigned int ctype) @@ -467,7 +470,7 @@ gb18030_left_adjust_char_head(const UChar* start, const UChar* s) } static int -gb18030_is_allowed_reverse_match(const UChar* s, const UChar* end) +gb18030_is_allowed_reverse_match(const UChar* s, const UChar* end ARG_UNUSED) { return GB18030_MAP[*s] == C1 ? TRUE : FALSE; } @@ -477,23 +480,14 @@ OnigEncodingType OnigEncodingGB18030 = { "GB18030", /* name */ 4, /* max enc length */ 1, /* min enc length */ - ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE, - { - (OnigCodePoint )'\\' /* esc */ - , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */ - , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */ - , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */ - , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */ - , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */ - }, onigenc_is_mbc_newline_0x0a, gb18030_mbc_to_code, onigenc_mb4_code_to_mbclen, gb18030_code_to_mbc, - gb18030_mbc_to_normalize, - gb18030_is_mbc_ambiguous, - onigenc_ascii_get_all_pair_ambig_codes, - onigenc_nothing_get_all_comp_ambig_codes, + gb18030_mbc_case_fold, + onigenc_ascii_apply_all_case_fold, + onigenc_ascii_get_case_fold_codes_by_str, + onigenc_minimum_property_name_to_ctype, gb18030_is_code_ctype, onigenc_not_support_get_ctype_code_range, gb18030_left_adjust_char_head, |