1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* enc/iso8859_{1..16}.c: adjust for ruby.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2007-12-19 17:50:30 +00:00
parent d874dde282
commit c677977267
16 changed files with 102 additions and 52 deletions

View file

@ -1,3 +1,7 @@
Thu Dec 20 02:50:28 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* enc/iso8859_{1..16}.c: adjust for ruby.
Thu Dec 20 02:28:29 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> Thu Dec 20 02:28:29 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* enc/iso8859_{1..16}.c: imported from Onigiruma 5.9.0. * enc/iso8859_{1..16}.c: imported from Onigiruma 5.9.0.

View file

@ -103,7 +103,8 @@ static const OnigPairCaseFoldCodes CaseFoldMap[] = {
static int static int
apply_all_case_fold(OnigCaseFoldType flag, apply_all_case_fold(OnigCaseFoldType flag,
OnigApplyAllCaseFoldFunc f, void* arg) OnigApplyAllCaseFoldFunc f, void* arg,
OnigEncoding enc)
{ {
return onigenc_apply_all_case_fold_with_map( return onigenc_apply_all_case_fold_with_map(
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
@ -111,8 +112,10 @@ apply_all_case_fold(OnigCaseFoldType flag,
} }
static int static int
get_case_fold_codes_by_str(OnigCaseFoldType flag, const OnigUChar* p, get_case_fold_codes_by_str(OnigCaseFoldType flag,
const OnigUChar* end, OnigCaseFoldCodeItem items[]) const OnigUChar* p, const OnigUChar* end,
OnigCaseFoldCodeItem items[],
OnigEncoding enc)
{ {
if (0x41 <= *p && *p <= 0x5a) { if (0x41 <= *p && *p <= 0x5a) {
items[0].byte_len = 1; items[0].byte_len = 1;
@ -199,7 +202,7 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag, const OnigUChar* p,
static int static int
mbc_case_fold(OnigCaseFoldType flag, const UChar** pp, const UChar* end, mbc_case_fold(OnigCaseFoldType flag, const UChar** pp, const UChar* end,
UChar* lower) UChar* lower, OnigEncoding enc)
{ {
const UChar* p = *pp; const UChar* p = *pp;
@ -243,7 +246,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag,
#endif #endif
static int static int
is_code_ctype(OnigCodePoint code, unsigned int ctype) is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
{ {
if (code < 256) if (code < 256)
return ENC_IS_ISO_8859_1_CTYPE(code, ctype); return ENC_IS_ISO_8859_1_CTYPE(code, ctype);

View file

@ -105,7 +105,8 @@ static const unsigned short EncISO_8859_10_CtypeTable[256] = {
static int static int
iso_8859_10_mbc_case_fold(OnigCaseFoldType flag, iso_8859_10_mbc_case_fold(OnigCaseFoldType flag,
const UChar** pp, const UChar* end, UChar* lower) const UChar** pp, const UChar* end, UChar* lower,
OnigEncoding enc)
{ {
const UChar* p = *pp; const UChar* p = *pp;
@ -145,7 +146,7 @@ iso_8859_10_is_mbc_ambiguous(OnigCaseFoldType flag,
#endif #endif
static int static int
iso_8859_10_is_code_ctype(OnigCodePoint code, unsigned int ctype) iso_8859_10_is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
{ {
if (code < 256) if (code < 256)
return ENC_IS_ISO_8859_10_CTYPE(code, ctype); return ENC_IS_ISO_8859_10_CTYPE(code, ctype);
@ -204,7 +205,8 @@ static const OnigPairCaseFoldCodes CaseFoldMap[] = {
static int static int
iso_8859_10_apply_all_case_fold(OnigCaseFoldType flag, iso_8859_10_apply_all_case_fold(OnigCaseFoldType flag,
OnigApplyAllCaseFoldFunc f, void* arg) OnigApplyAllCaseFoldFunc f, void* arg,
OnigEncoding enc)
{ {
return onigenc_apply_all_case_fold_with_map( return onigenc_apply_all_case_fold_with_map(
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
@ -213,7 +215,9 @@ iso_8859_10_apply_all_case_fold(OnigCaseFoldType flag,
static int static int
iso_8859_10_get_case_fold_codes_by_str(OnigCaseFoldType flag, iso_8859_10_get_case_fold_codes_by_str(OnigCaseFoldType flag,
const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) const OnigUChar* p, const OnigUChar* end,
OnigCaseFoldCodeItem items[],
OnigEncoding enc)
{ {
return onigenc_get_case_fold_codes_by_str_with_map( return onigenc_get_case_fold_codes_by_str_with_map(
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,

View file

@ -68,7 +68,7 @@ static const unsigned short EncISO_8859_11_CtypeTable[256] = {
}; };
static int static int
iso_8859_11_is_code_ctype(OnigCodePoint code, unsigned int ctype) iso_8859_11_is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
{ {
if (code < 256) if (code < 256)
return ENC_IS_ISO_8859_11_CTYPE(code, ctype); return ENC_IS_ISO_8859_11_CTYPE(code, ctype);

View file

@ -105,7 +105,8 @@ static const unsigned short EncISO_8859_13_CtypeTable[256] = {
static int static int
iso_8859_13_mbc_case_fold(OnigCaseFoldType flag, iso_8859_13_mbc_case_fold(OnigCaseFoldType flag,
const UChar** pp, const UChar* end, UChar* lower) const UChar** pp, const UChar* end, UChar* lower,
OnigEncoding enc)
{ {
const UChar* p = *pp; const UChar* p = *pp;
@ -149,7 +150,7 @@ iso_8859_13_is_mbc_ambiguous(OnigCaseFoldType flag,
#endif #endif
static int static int
iso_8859_13_is_code_ctype(OnigCodePoint code, unsigned int ctype) iso_8859_13_is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
{ {
if (code < 256) if (code < 256)
return ENC_IS_ISO_8859_13_CTYPE(code, ctype); return ENC_IS_ISO_8859_13_CTYPE(code, ctype);
@ -193,7 +194,8 @@ static const OnigPairCaseFoldCodes CaseFoldMap[] = {
static int static int
iso_8859_13_apply_all_case_fold(OnigCaseFoldType flag, iso_8859_13_apply_all_case_fold(OnigCaseFoldType flag,
OnigApplyAllCaseFoldFunc f, void* arg) OnigApplyAllCaseFoldFunc f, void* arg,
OnigEncoding enc)
{ {
return onigenc_apply_all_case_fold_with_map( return onigenc_apply_all_case_fold_with_map(
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
@ -202,7 +204,9 @@ iso_8859_13_apply_all_case_fold(OnigCaseFoldType flag,
static int static int
iso_8859_13_get_case_fold_codes_by_str(OnigCaseFoldType flag, iso_8859_13_get_case_fold_codes_by_str(OnigCaseFoldType flag,
const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) const OnigUChar* p, const OnigUChar* end,
OnigCaseFoldCodeItem items[],
OnigEncoding enc)
{ {
return onigenc_get_case_fold_codes_by_str_with_map( return onigenc_get_case_fold_codes_by_str_with_map(
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,

View file

@ -105,7 +105,8 @@ static const unsigned short EncISO_8859_14_CtypeTable[256] = {
static int static int
iso_8859_14_mbc_case_fold(OnigCaseFoldType flag, iso_8859_14_mbc_case_fold(OnigCaseFoldType flag,
const UChar** pp, const UChar* end, UChar* lower) const UChar** pp, const UChar* end, UChar* lower,
OnigEncoding enc)
{ {
const UChar* p = *pp; const UChar* p = *pp;
@ -145,7 +146,7 @@ iso_8859_14_is_mbc_ambiguous(OnigCaseFoldType flag,
#endif #endif
static int static int
iso_8859_14_is_code_ctype(OnigCodePoint code, unsigned int ctype) iso_8859_14_is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
{ {
if (code < 256) if (code < 256)
return ENC_IS_ISO_8859_14_CTYPE(code, ctype); return ENC_IS_ISO_8859_14_CTYPE(code, ctype);
@ -205,7 +206,8 @@ static const OnigPairCaseFoldCodes CaseFoldMap[] = {
static int static int
iso_8859_14_apply_all_case_fold(OnigCaseFoldType flag, iso_8859_14_apply_all_case_fold(OnigCaseFoldType flag,
OnigApplyAllCaseFoldFunc f, void* arg) OnigApplyAllCaseFoldFunc f, void* arg,
OnigEncoding enc)
{ {
return onigenc_apply_all_case_fold_with_map( return onigenc_apply_all_case_fold_with_map(
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
@ -214,7 +216,9 @@ iso_8859_14_apply_all_case_fold(OnigCaseFoldType flag,
static int static int
iso_8859_14_get_case_fold_codes_by_str(OnigCaseFoldType flag, iso_8859_14_get_case_fold_codes_by_str(OnigCaseFoldType flag,
const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) const OnigUChar* p, const OnigUChar* end,
OnigCaseFoldCodeItem items[],
OnigEncoding enc)
{ {
return onigenc_get_case_fold_codes_by_str_with_map( return onigenc_get_case_fold_codes_by_str_with_map(
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,

View file

@ -105,7 +105,8 @@ static const unsigned short EncISO_8859_15_CtypeTable[256] = {
static int static int
iso_8859_15_mbc_case_fold(OnigCaseFoldType flag, iso_8859_15_mbc_case_fold(OnigCaseFoldType flag,
const UChar** pp, const UChar* end, UChar* lower) const UChar** pp, const UChar* end, UChar* lower,
OnigEncoding enc)
{ {
const UChar* p = *pp; const UChar* p = *pp;
@ -149,7 +150,7 @@ iso_8859_15_is_mbc_ambiguous(OnigCaseFoldType flag,
#endif #endif
static int static int
iso_8859_15_is_code_ctype(OnigCodePoint code, unsigned int ctype) iso_8859_15_is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
{ {
if (code < 256) if (code < 256)
return ENC_IS_ISO_8859_15_CTYPE(code, ctype); return ENC_IS_ISO_8859_15_CTYPE(code, ctype);
@ -199,7 +200,8 @@ static const OnigPairCaseFoldCodes CaseFoldMap[] = {
static int static int
iso_8859_15_apply_all_case_fold(OnigCaseFoldType flag, iso_8859_15_apply_all_case_fold(OnigCaseFoldType flag,
OnigApplyAllCaseFoldFunc f, void* arg) OnigApplyAllCaseFoldFunc f, void* arg,
OnigEncoding enc)
{ {
return onigenc_apply_all_case_fold_with_map( return onigenc_apply_all_case_fold_with_map(
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
@ -208,7 +210,9 @@ iso_8859_15_apply_all_case_fold(OnigCaseFoldType flag,
static int static int
iso_8859_15_get_case_fold_codes_by_str(OnigCaseFoldType flag, iso_8859_15_get_case_fold_codes_by_str(OnigCaseFoldType flag,
const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) const OnigUChar* p, const OnigUChar* end,
OnigCaseFoldCodeItem items[],
OnigEncoding enc)
{ {
return onigenc_get_case_fold_codes_by_str_with_map( return onigenc_get_case_fold_codes_by_str_with_map(
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,

View file

@ -105,7 +105,8 @@ static const unsigned short EncISO_8859_16_CtypeTable[256] = {
static int static int
iso_8859_16_mbc_case_fold(OnigCaseFoldType flag, iso_8859_16_mbc_case_fold(OnigCaseFoldType flag,
const UChar** pp, const UChar* end, UChar* lower) const UChar** pp, const UChar* end, UChar* lower,
OnigEncoding enc)
{ {
const UChar* p = *pp; const UChar* p = *pp;
@ -145,7 +146,7 @@ iso_8859_16_is_mbc_ambiguous(OnigCaseFoldType flag,
#endif #endif
static int static int
iso_8859_16_is_code_ctype(OnigCodePoint code, unsigned int ctype) iso_8859_16_is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
{ {
if (code < 256) if (code < 256)
return ENC_IS_ISO_8859_16_CTYPE(code, ctype); return ENC_IS_ISO_8859_16_CTYPE(code, ctype);
@ -202,7 +203,8 @@ static const OnigPairCaseFoldCodes CaseFoldMap[] = {
static int static int
iso_8859_16_apply_all_case_fold(OnigCaseFoldType flag, iso_8859_16_apply_all_case_fold(OnigCaseFoldType flag,
OnigApplyAllCaseFoldFunc f, void* arg) OnigApplyAllCaseFoldFunc f, void* arg,
OnigEncoding enc)
{ {
return onigenc_apply_all_case_fold_with_map( return onigenc_apply_all_case_fold_with_map(
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
@ -211,7 +213,9 @@ iso_8859_16_apply_all_case_fold(OnigCaseFoldType flag,
static int static int
iso_8859_16_get_case_fold_codes_by_str(OnigCaseFoldType flag, iso_8859_16_get_case_fold_codes_by_str(OnigCaseFoldType flag,
const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) const OnigUChar* p, const OnigUChar* end,
OnigCaseFoldCodeItem items[],
OnigEncoding enc)
{ {
return onigenc_get_case_fold_codes_by_str_with_map( return onigenc_get_case_fold_codes_by_str_with_map(
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,

View file

@ -105,7 +105,8 @@ static const unsigned short EncISO_8859_2_CtypeTable[256] = {
static int static int
mbc_case_fold(OnigCaseFoldType flag, mbc_case_fold(OnigCaseFoldType flag,
const UChar** pp, const UChar* end, UChar* lower) const UChar** pp, const UChar* end, UChar* lower,
OnigEncoding enc)
{ {
const UChar* p = *pp; const UChar* p = *pp;
@ -190,7 +191,8 @@ static const OnigPairCaseFoldCodes CaseFoldMap[] = {
static int static int
apply_all_case_fold(OnigCaseFoldType flag, apply_all_case_fold(OnigCaseFoldType flag,
OnigApplyAllCaseFoldFunc f, void* arg) OnigApplyAllCaseFoldFunc f, void* arg,
OnigEncoding enc)
{ {
return onigenc_apply_all_case_fold_with_map( return onigenc_apply_all_case_fold_with_map(
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
@ -199,7 +201,9 @@ apply_all_case_fold(OnigCaseFoldType flag,
static int static int
get_case_fold_codes_by_str(OnigCaseFoldType flag, get_case_fold_codes_by_str(OnigCaseFoldType flag,
const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) const OnigUChar* p, const OnigUChar* end,
OnigCaseFoldCodeItem items[],
OnigEncoding enc)
{ {
return onigenc_get_case_fold_codes_by_str_with_map( return onigenc_get_case_fold_codes_by_str_with_map(
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
@ -207,7 +211,7 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
} }
static int static int
is_code_ctype(OnigCodePoint code, unsigned int ctype) is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
{ {
if (code < 256) if (code < 256)
return ENC_IS_ISO_8859_2_CTYPE(code, ctype); return ENC_IS_ISO_8859_2_CTYPE(code, ctype);

View file

@ -105,7 +105,8 @@ static const unsigned short EncISO_8859_3_CtypeTable[256] = {
static int static int
mbc_case_fold(OnigCaseFoldType flag, mbc_case_fold(OnigCaseFoldType flag,
const UChar** pp, const UChar* end, UChar* lower) const UChar** pp, const UChar* end, UChar* lower,
OnigEncoding enc)
{ {
const UChar* p = *pp; const UChar* p = *pp;
@ -148,7 +149,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
#endif #endif
static int static int
is_code_ctype(OnigCodePoint code, unsigned int ctype) is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
{ {
if (code < 256) if (code < 256)
return ENC_IS_ISO_8859_3_CTYPE(code, ctype); return ENC_IS_ISO_8859_3_CTYPE(code, ctype);
@ -199,7 +200,8 @@ static const OnigPairCaseFoldCodes CaseFoldMap[] = {
static int static int
apply_all_case_fold(OnigCaseFoldType flag, apply_all_case_fold(OnigCaseFoldType flag,
OnigApplyAllCaseFoldFunc f, void* arg) OnigApplyAllCaseFoldFunc f, void* arg,
OnigEncoding enc)
{ {
return onigenc_apply_all_case_fold_with_map( return onigenc_apply_all_case_fold_with_map(
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
@ -208,7 +210,9 @@ apply_all_case_fold(OnigCaseFoldType flag,
static int static int
get_case_fold_codes_by_str(OnigCaseFoldType flag, get_case_fold_codes_by_str(OnigCaseFoldType flag,
const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) const OnigUChar* p, const OnigUChar* end,
OnigCaseFoldCodeItem items[],
OnigEncoding enc)
{ {
return onigenc_get_case_fold_codes_by_str_with_map( return onigenc_get_case_fold_codes_by_str_with_map(
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,

View file

@ -105,7 +105,8 @@ static const unsigned short EncISO_8859_4_CtypeTable[256] = {
static int static int
mbc_case_fold(OnigCaseFoldType flag, mbc_case_fold(OnigCaseFoldType flag,
const UChar** pp, const UChar* end, UChar* lower) const UChar** pp, const UChar* end, UChar* lower,
OnigEncoding enc)
{ {
const UChar* p = *pp; const UChar* p = *pp;
@ -147,7 +148,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
#endif #endif
static int static int
is_code_ctype(OnigCodePoint code, unsigned int ctype) is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
{ {
if (code < 256) if (code < 256)
return ENC_IS_ISO_8859_4_CTYPE(code, ctype); return ENC_IS_ISO_8859_4_CTYPE(code, ctype);
@ -201,7 +202,8 @@ static const OnigPairCaseFoldCodes CaseFoldMap[] = {
static int static int
apply_all_case_fold(OnigCaseFoldType flag, apply_all_case_fold(OnigCaseFoldType flag,
OnigApplyAllCaseFoldFunc f, void* arg) OnigApplyAllCaseFoldFunc f, void* arg,
OnigEncoding enc)
{ {
return onigenc_apply_all_case_fold_with_map( return onigenc_apply_all_case_fold_with_map(
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
@ -210,7 +212,9 @@ apply_all_case_fold(OnigCaseFoldType flag,
static int static int
get_case_fold_codes_by_str(OnigCaseFoldType flag, get_case_fold_codes_by_str(OnigCaseFoldType flag,
const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) const OnigUChar* p, const OnigUChar* end,
OnigCaseFoldCodeItem items[],
OnigEncoding enc)
{ {
return onigenc_get_case_fold_codes_by_str_with_map( return onigenc_get_case_fold_codes_by_str_with_map(
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,

View file

@ -105,7 +105,8 @@ static const unsigned short EncISO_8859_5_CtypeTable[256] = {
static int static int
mbc_case_fold(OnigCaseFoldType flag, mbc_case_fold(OnigCaseFoldType flag,
const UChar** pp, const UChar* end, UChar* lower) const UChar** pp, const UChar* end, UChar* lower,
OnigEncoding enc)
{ {
const UChar* p = *pp; const UChar* p = *pp;
@ -128,7 +129,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
#endif #endif
static int static int
is_code_ctype(OnigCodePoint code, unsigned int ctype) is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
{ {
if (code < 256) if (code < 256)
return ENC_IS_ISO_8859_5_CTYPE(code, ctype); return ENC_IS_ISO_8859_5_CTYPE(code, ctype);
@ -189,7 +190,8 @@ static const OnigPairCaseFoldCodes CaseFoldMap[] = {
static int static int
apply_all_case_fold(OnigCaseFoldType flag, apply_all_case_fold(OnigCaseFoldType flag,
OnigApplyAllCaseFoldFunc f, void* arg) OnigApplyAllCaseFoldFunc f, void* arg,
OnigEncoding enc)
{ {
return onigenc_apply_all_case_fold_with_map( return onigenc_apply_all_case_fold_with_map(
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0, sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
@ -199,7 +201,8 @@ apply_all_case_fold(OnigCaseFoldType flag,
static int static int
get_case_fold_codes_by_str(OnigCaseFoldType flag, get_case_fold_codes_by_str(OnigCaseFoldType flag,
const OnigUChar* p, const OnigUChar* end, const OnigUChar* p, const OnigUChar* end,
OnigCaseFoldCodeItem items[]) OnigCaseFoldCodeItem items[],
OnigEncoding enc)
{ {
return onigenc_get_case_fold_codes_by_str_with_map( return onigenc_get_case_fold_codes_by_str_with_map(
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0, sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,

View file

@ -68,7 +68,7 @@ static const unsigned short EncISO_8859_6_CtypeTable[256] = {
}; };
static int static int
is_code_ctype(OnigCodePoint code, unsigned int ctype) is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
{ {
if (code < 256) if (code < 256)
return ENC_IS_ISO_8859_6_CTYPE(code, ctype); return ENC_IS_ISO_8859_6_CTYPE(code, ctype);

View file

@ -105,7 +105,8 @@ static const unsigned short EncISO_8859_7_CtypeTable[256] = {
static int static int
mbc_case_fold(OnigCaseFoldType flag, mbc_case_fold(OnigCaseFoldType flag,
const UChar** pp, const UChar* end, UChar* lower) const UChar** pp, const UChar* end, UChar* lower,
OnigEncoding enc)
{ {
const UChar* p = *pp; const UChar* p = *pp;
@ -136,7 +137,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag,
#endif #endif
static int static int
is_code_ctype(OnigCodePoint code, unsigned int ctype) is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
{ {
if (code < 256) if (code < 256)
return ENC_IS_ISO_8859_7_CTYPE(code, ctype); return ENC_IS_ISO_8859_7_CTYPE(code, ctype);
@ -185,7 +186,8 @@ static const OnigPairCaseFoldCodes CaseFoldMap[] = {
static int static int
apply_all_case_fold(OnigCaseFoldType flag, apply_all_case_fold(OnigCaseFoldType flag,
OnigApplyAllCaseFoldFunc f, void* arg) OnigApplyAllCaseFoldFunc f, void* arg,
OnigEncoding enc)
{ {
return onigenc_apply_all_case_fold_with_map( return onigenc_apply_all_case_fold_with_map(
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0, sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
@ -194,7 +196,9 @@ apply_all_case_fold(OnigCaseFoldType flag,
static int static int
get_case_fold_codes_by_str(OnigCaseFoldType flag, get_case_fold_codes_by_str(OnigCaseFoldType flag,
const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) const OnigUChar* p, const OnigUChar* end,
OnigCaseFoldCodeItem items[],
OnigEncoding enc)
{ {
return onigenc_get_case_fold_codes_by_str_with_map( return onigenc_get_case_fold_codes_by_str_with_map(
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0, sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,

View file

@ -68,7 +68,7 @@ static const unsigned short EncISO_8859_8_CtypeTable[256] = {
}; };
static int static int
iso_8859_8_is_code_ctype(OnigCodePoint code, unsigned int ctype) iso_8859_8_is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
{ {
if (code < 256) if (code < 256)
return ENC_IS_ISO_8859_8_CTYPE(code, ctype); return ENC_IS_ISO_8859_8_CTYPE(code, ctype);

View file

@ -105,7 +105,8 @@ static const unsigned short EncISO_8859_9_CtypeTable[256] = {
static int static int
iso_8859_9_mbc_case_fold(OnigCaseFoldType flag, iso_8859_9_mbc_case_fold(OnigCaseFoldType flag,
const UChar** pp, const UChar* end, UChar* lower) const UChar** pp, const UChar* end, UChar* lower,
OnigEncoding enc)
{ {
const UChar* p = *pp; const UChar* p = *pp;
@ -149,7 +150,7 @@ iso_8859_9_is_mbc_ambiguous(OnigCaseFoldType flag,
#endif #endif
static int static int
iso_8859_9_is_code_ctype(OnigCodePoint code, unsigned int ctype) iso_8859_9_is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
{ {
if (code < 256) if (code < 256)
return ENC_IS_ISO_8859_9_CTYPE(code, ctype); return ENC_IS_ISO_8859_9_CTYPE(code, ctype);
@ -193,7 +194,8 @@ static const OnigPairCaseFoldCodes CaseFoldMap[] = {
static int static int
iso_8859_9_apply_all_case_fold(OnigCaseFoldType flag, iso_8859_9_apply_all_case_fold(OnigCaseFoldType flag,
OnigApplyAllCaseFoldFunc f, void* arg) OnigApplyAllCaseFoldFunc f, void* arg,
OnigEncoding enc)
{ {
return onigenc_apply_all_case_fold_with_map( return onigenc_apply_all_case_fold_with_map(
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
@ -202,7 +204,9 @@ iso_8859_9_apply_all_case_fold(OnigCaseFoldType flag,
static int static int
iso_8859_9_get_case_fold_codes_by_str(OnigCaseFoldType flag, iso_8859_9_get_case_fold_codes_by_str(OnigCaseFoldType flag,
const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) const OnigUChar* p, const OnigUChar* end,
OnigCaseFoldCodeItem items[],
OnigEncoding enc)
{ {
return onigenc_get_case_fold_codes_by_str_with_map( return onigenc_get_case_fold_codes_by_str_with_map(
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,