diff options
Diffstat (limited to 'ext/mbstring/oniguruma/enc/big5.c')
-rw-r--r-- | ext/mbstring/oniguruma/enc/big5.c | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/ext/mbstring/oniguruma/enc/big5.c b/ext/mbstring/oniguruma/enc/big5.c index 86792666a4..ca1e01b463 100644 --- a/ext/mbstring/oniguruma/enc/big5.c +++ b/ext/mbstring/oniguruma/enc/big5.c @@ -2,7 +2,7 @@ big5.c - Oniguruma (regular expression library) **********************************************************************/ /*- - * Copyright (c) 2002-2005 K.Kosako <sndgk393 AT ybb DOT ne DOT jp> + * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -67,18 +67,21 @@ big5_code_to_mbc(OnigCodePoint code, UChar *buf) } static int -big5_mbc_to_normalize(OnigAmbigType flag, const UChar** pp, const UChar* end, - UChar* lower) +big5_mbc_case_fold(OnigCaseFoldType flag, const UChar** pp, const UChar* end, + UChar* lower) { - return onigenc_mbn_mbc_to_normalize(ONIG_ENCODING_BIG5, flag, - pp, end, lower); + return onigenc_mbn_mbc_case_fold(ONIG_ENCODING_BIG5, flag, + pp, end, lower); } +#if 0 static int -big5_is_mbc_ambiguous(OnigAmbigType flag, const UChar** pp, const UChar* end) +big5_is_mbc_ambiguous(OnigCaseFoldType flag, + const UChar** pp, const UChar* end) { return onigenc_mbn_is_mbc_ambiguous(ONIG_ENCODING_BIG5, flag, pp, end); } +#endif static int big5_is_code_ctype(OnigCodePoint code, unsigned int ctype) @@ -125,14 +128,14 @@ big5_left_adjust_char_head(const UChar* start, const UChar* s) } } } - len = enc_len(ONIG_ENCODING_BIG5, p); + len = enclen(ONIG_ENCODING_BIG5, p); if (p + len > s) return (UChar* )p; p += len; return (UChar* )(p + ((s - p) & ~1)); } static int -big5_is_allowed_reverse_match(const UChar* s, const UChar* end) +big5_is_allowed_reverse_match(const UChar* s, const UChar* end ARG_UNUSED) { const UChar c = *s; @@ -144,23 +147,14 @@ OnigEncodingType OnigEncodingBIG5 = { "Big5", /* name */ 2, /* 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, big5_mbc_to_code, onigenc_mb2_code_to_mbclen, big5_code_to_mbc, - big5_mbc_to_normalize, - big5_is_mbc_ambiguous, - onigenc_ascii_get_all_pair_ambig_codes, - onigenc_nothing_get_all_comp_ambig_codes, + big5_mbc_case_fold, + onigenc_ascii_apply_all_case_fold, + onigenc_ascii_get_case_fold_codes_by_str, + onigenc_minimum_property_name_to_ctype, big5_is_code_ctype, onigenc_not_support_get_ctype_code_range, big5_left_adjust_char_head, |