mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* enc/*: add ARG_UNUSED.
* enc/koi8_u.c: added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
904572d2e5
commit
0a640a9386
24 changed files with 101 additions and 90 deletions
|
@ -1,3 +1,9 @@
|
|||
Tue Jan 15 23:52:51 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* enc/*: add ARG_UNUSED.
|
||||
|
||||
* enc/koi8_u.c: added.
|
||||
|
||||
Tue Jan 15 23:00:08 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* enc/utf_{16,32}{be,le}.c: remove some ARG_UNUSED. replace struct
|
||||
|
|
|
@ -49,7 +49,7 @@ static const int EncLen_BIG5[] = {
|
|||
};
|
||||
|
||||
static int
|
||||
big5_mbc_enc_len(const UChar* p, const UChar* e, OnigEncoding enc)
|
||||
big5_mbc_enc_len(const UChar* p, const UChar* end ARG_UNUSED, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return EncLen_BIG5[*p];
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ big5_left_adjust_char_head(const UChar* start, const UChar* s, OnigEncoding enc)
|
|||
}
|
||||
|
||||
static int
|
||||
big5_is_allowed_reverse_match(const UChar* s, const UChar* end ARG_UNUSED, OnigEncoding enc)
|
||||
big5_is_allowed_reverse_match(const UChar* s, const UChar* end ARG_UNUSED, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
const UChar c = *s;
|
||||
|
||||
|
|
10
enc/euc_jp.c
10
enc/euc_jp.c
|
@ -115,7 +115,7 @@ static const signed char trans[][0x100] = {
|
|||
#undef F
|
||||
|
||||
static int
|
||||
mbc_enc_len(const UChar* p, const UChar* e, OnigEncoding enc)
|
||||
mbc_enc_len(const UChar* p, const UChar* e, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
int firstbyte = *p++;
|
||||
state_t s;
|
||||
|
@ -151,7 +151,7 @@ mbc_to_code(const UChar* p, const UChar* end, OnigEncoding enc)
|
|||
}
|
||||
|
||||
static int
|
||||
code_to_mbclen(OnigCodePoint code, OnigEncoding enc)
|
||||
code_to_mbclen(OnigCodePoint code, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
if (ONIGENC_IS_CODE_ASCII(code)) return 1;
|
||||
else if (code > 0xffffff) return 0;
|
||||
|
@ -241,7 +241,7 @@ left_adjust_char_head(const UChar* start, const UChar* s, OnigEncoding enc)
|
|||
}
|
||||
|
||||
static int
|
||||
is_allowed_reverse_match(const UChar* s, const UChar* end, OnigEncoding enc)
|
||||
is_allowed_reverse_match(const UChar* s, const UChar* end, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
const UChar c = *s;
|
||||
if (c <= 0x7e || c == 0x8e || c == 0x8f)
|
||||
|
@ -297,7 +297,7 @@ property_name_to_ctype(OnigEncoding enc, UChar* p, UChar* end)
|
|||
}
|
||||
|
||||
static int
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
if (ctype <= ONIGENC_MAX_STD_CTYPE) {
|
||||
if (code < 128)
|
||||
|
@ -323,7 +323,7 @@ is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
|
|||
|
||||
static int
|
||||
get_ctype_code_range(OnigCtype ctype, OnigCodePoint* sb_out,
|
||||
const OnigCodePoint* ranges[], OnigEncoding enc)
|
||||
const OnigCodePoint* ranges[], OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
if (ctype <= ONIGENC_MAX_STD_CTYPE) {
|
||||
return ONIG_NO_SUPPORT_CONFIG;
|
||||
|
|
|
@ -49,7 +49,7 @@ static const int EncLen_EUCKR[] = {
|
|||
};
|
||||
|
||||
static int
|
||||
euckr_mbc_enc_len(const UChar* p, const UChar* e, OnigEncoding enc)
|
||||
euckr_mbc_enc_len(const UChar* p, const UChar* end ARG_UNUSED, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return EncLen_EUCKR[*p];
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ euckr_left_adjust_char_head(const UChar* start, const UChar* s, OnigEncoding enc
|
|||
}
|
||||
|
||||
static int
|
||||
euckr_is_allowed_reverse_match(const UChar* s, const UChar* end ARG_UNUSED, OnigEncoding enc)
|
||||
euckr_is_allowed_reverse_match(const UChar* s, const UChar* end ARG_UNUSED, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
const UChar c = *s;
|
||||
if (c <= 0x7e) return TRUE;
|
||||
|
|
|
@ -49,13 +49,13 @@ static const int EncLen_EUCTW[] = {
|
|||
};
|
||||
|
||||
static int
|
||||
euctw_mbc_enc_len(const UChar* p, const UChar* end, OnigEncoding enc)
|
||||
euctw_mbc_enc_len(const UChar* p, const UChar* end ARG_UNUSED, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return EncLen_EUCTW[*p];
|
||||
}
|
||||
|
||||
static OnigCodePoint
|
||||
euctw_mbc_to_code(const UChar* p, const UChar* end, OnigEncoding enc)
|
||||
euctw_mbc_to_code(const UChar* p, const UChar* end, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return onigenc_mbn_mbc_to_code(enc, p, end);
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ euctw_left_adjust_char_head(const UChar* start, const UChar* s, OnigEncoding enc
|
|||
}
|
||||
|
||||
static int
|
||||
euctw_is_allowed_reverse_match(const UChar* s, const UChar* end ARG_UNUSED, OnigEncoding enc)
|
||||
euctw_is_allowed_reverse_match(const UChar* s, const UChar* end ARG_UNUSED, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
const UChar c = *s;
|
||||
if (c <= 0x7e) return TRUE;
|
||||
|
|
|
@ -63,7 +63,7 @@ static const char GB18030_MAP[] = {
|
|||
};
|
||||
|
||||
static int
|
||||
gb18030_mbc_enc_len(const UChar* p, const UChar* end, OnigEncoding enc)
|
||||
gb18030_mbc_enc_len(const UChar* p, const UChar* end ARG_UNUSED, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
if (GB18030_MAP[*p] != CM)
|
||||
return 1;
|
||||
|
@ -470,7 +470,7 @@ gb18030_left_adjust_char_head(const UChar* start, const UChar* s, OnigEncoding e
|
|||
}
|
||||
|
||||
static int
|
||||
gb18030_is_allowed_reverse_match(const UChar* s, const UChar* end ARG_UNUSED, OnigEncoding enc)
|
||||
gb18030_is_allowed_reverse_match(const UChar* s, const UChar* end ARG_UNUSED, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return GB18030_MAP[*s] == C1 ? TRUE : FALSE;
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ static const OnigPairCaseFoldCodes CaseFoldMap[] = {
|
|||
static int
|
||||
apply_all_case_fold(OnigCaseFoldType flag,
|
||||
OnigApplyAllCaseFoldFunc f, void* arg,
|
||||
OnigEncoding enc)
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return onigenc_apply_all_case_fold_with_map(
|
||||
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
|
||||
|
@ -115,7 +115,7 @@ static int
|
|||
get_case_fold_codes_by_str(OnigCaseFoldType flag,
|
||||
const OnigUChar* p, const OnigUChar* end,
|
||||
OnigCaseFoldCodeItem items[],
|
||||
OnigEncoding enc)
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
if (0x41 <= *p && *p <= 0x5a) {
|
||||
items[0].byte_len = 1;
|
||||
|
@ -201,8 +201,8 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
|
|||
}
|
||||
|
||||
static int
|
||||
mbc_case_fold(OnigCaseFoldType flag, const UChar** pp, const UChar* end,
|
||||
UChar* lower, OnigEncoding enc)
|
||||
mbc_case_fold(OnigCaseFoldType flag, const UChar** pp, const UChar* end ARG_UNUSED,
|
||||
UChar* lower, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
const UChar* p = *pp;
|
||||
|
||||
|
@ -246,7 +246,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag,
|
|||
#endif
|
||||
|
||||
static int
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
if (code < 256)
|
||||
return ENC_IS_ISO_8859_1_CTYPE(code, ctype);
|
||||
|
|
|
@ -105,8 +105,8 @@ static const unsigned short EncISO_8859_10_CtypeTable[256] = {
|
|||
|
||||
static int
|
||||
mbc_case_fold(OnigCaseFoldType flag,
|
||||
const UChar** pp, const UChar* end, UChar* lower,
|
||||
OnigEncoding enc)
|
||||
const UChar** pp, const UChar* end ARG_UNUSED,
|
||||
UChar* lower, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
const UChar* p = *pp;
|
||||
|
||||
|
@ -145,7 +145,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
|
|||
#endif
|
||||
|
||||
static int
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
if (code < 256)
|
||||
return ENC_IS_ISO_8859_10_CTYPE(code, ctype);
|
||||
|
@ -205,7 +205,7 @@ static const OnigPairCaseFoldCodes CaseFoldMap[] = {
|
|||
static int
|
||||
apply_all_case_fold(OnigCaseFoldType flag,
|
||||
OnigApplyAllCaseFoldFunc f, void* arg,
|
||||
OnigEncoding enc)
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return onigenc_apply_all_case_fold_with_map(
|
||||
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
|
||||
|
@ -216,7 +216,7 @@ static int
|
|||
get_case_fold_codes_by_str(OnigCaseFoldType flag,
|
||||
const OnigUChar* p, const OnigUChar* end,
|
||||
OnigCaseFoldCodeItem items[],
|
||||
OnigEncoding enc)
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return onigenc_get_case_fold_codes_by_str_with_map(
|
||||
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
|
||||
|
|
|
@ -68,7 +68,7 @@ static const unsigned short EncISO_8859_11_CtypeTable[256] = {
|
|||
};
|
||||
|
||||
static int
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
if (code < 256)
|
||||
return ENC_IS_ISO_8859_11_CTYPE(code, ctype);
|
||||
|
|
|
@ -105,8 +105,8 @@ static const unsigned short EncISO_8859_13_CtypeTable[256] = {
|
|||
|
||||
static int
|
||||
mbc_case_fold(OnigCaseFoldType flag,
|
||||
const UChar** pp, const UChar* end, UChar* lower,
|
||||
OnigEncoding enc)
|
||||
const UChar** pp, const UChar* end ARG_UNUSED,
|
||||
UChar* lower, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
const UChar* p = *pp;
|
||||
|
||||
|
@ -149,7 +149,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
|
|||
#endif
|
||||
|
||||
static int
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
if (code < 256)
|
||||
return ENC_IS_ISO_8859_13_CTYPE(code, ctype);
|
||||
|
@ -194,7 +194,7 @@ static const OnigPairCaseFoldCodes CaseFoldMap[] = {
|
|||
static int
|
||||
apply_all_case_fold(OnigCaseFoldType flag,
|
||||
OnigApplyAllCaseFoldFunc f, void* arg,
|
||||
OnigEncoding enc)
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return onigenc_apply_all_case_fold_with_map(
|
||||
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
|
||||
|
@ -205,7 +205,7 @@ static int
|
|||
get_case_fold_codes_by_str(OnigCaseFoldType flag,
|
||||
const OnigUChar* p, const OnigUChar* end,
|
||||
OnigCaseFoldCodeItem items[],
|
||||
OnigEncoding enc)
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return onigenc_get_case_fold_codes_by_str_with_map(
|
||||
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
|
||||
|
|
|
@ -105,8 +105,8 @@ static const unsigned short EncISO_8859_14_CtypeTable[256] = {
|
|||
|
||||
static int
|
||||
mbc_case_fold(OnigCaseFoldType flag,
|
||||
const UChar** pp, const UChar* end, UChar* lower,
|
||||
OnigEncoding enc)
|
||||
const UChar** pp, const UChar* end ARG_UNUSED,
|
||||
UChar* lower, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
const UChar* p = *pp;
|
||||
|
||||
|
@ -146,7 +146,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag,
|
|||
#endif
|
||||
|
||||
static int
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
if (code < 256)
|
||||
return ENC_IS_ISO_8859_14_CTYPE(code, ctype);
|
||||
|
@ -207,7 +207,7 @@ static const OnigPairCaseFoldCodes CaseFoldMap[] = {
|
|||
static int
|
||||
apply_all_case_fold(OnigCaseFoldType flag,
|
||||
OnigApplyAllCaseFoldFunc f, void* arg,
|
||||
OnigEncoding enc)
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return onigenc_apply_all_case_fold_with_map(
|
||||
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
|
||||
|
@ -218,7 +218,7 @@ static int
|
|||
get_case_fold_codes_by_str(OnigCaseFoldType flag,
|
||||
const OnigUChar* p, const OnigUChar* end,
|
||||
OnigCaseFoldCodeItem items[],
|
||||
OnigEncoding enc)
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return onigenc_get_case_fold_codes_by_str_with_map(
|
||||
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
|
||||
|
|
|
@ -105,8 +105,8 @@ static const unsigned short EncISO_8859_15_CtypeTable[256] = {
|
|||
|
||||
static int
|
||||
mbc_case_fold(OnigCaseFoldType flag,
|
||||
const UChar** pp, const UChar* end, UChar* lower,
|
||||
OnigEncoding enc)
|
||||
const UChar** pp, const UChar* end ARG_UNUSED,
|
||||
UChar* lower, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
const UChar* p = *pp;
|
||||
|
||||
|
@ -150,7 +150,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag,
|
|||
#endif
|
||||
|
||||
static int
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
if (code < 256)
|
||||
return ENC_IS_ISO_8859_15_CTYPE(code, ctype);
|
||||
|
@ -201,7 +201,7 @@ static const OnigPairCaseFoldCodes CaseFoldMap[] = {
|
|||
static int
|
||||
apply_all_case_fold(OnigCaseFoldType flag,
|
||||
OnigApplyAllCaseFoldFunc f, void* arg,
|
||||
OnigEncoding enc)
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return onigenc_apply_all_case_fold_with_map(
|
||||
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
|
||||
|
@ -212,7 +212,7 @@ static int
|
|||
get_case_fold_codes_by_str(OnigCaseFoldType flag,
|
||||
const OnigUChar* p, const OnigUChar* end,
|
||||
OnigCaseFoldCodeItem items[],
|
||||
OnigEncoding enc)
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return onigenc_get_case_fold_codes_by_str_with_map(
|
||||
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
|
||||
|
|
|
@ -105,8 +105,8 @@ static const unsigned short EncISO_8859_16_CtypeTable[256] = {
|
|||
|
||||
static int
|
||||
mbc_case_fold(OnigCaseFoldType flag,
|
||||
const UChar** pp, const UChar* end, UChar* lower,
|
||||
OnigEncoding enc)
|
||||
const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower,
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
const UChar* p = *pp;
|
||||
|
||||
|
@ -145,7 +145,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
|
|||
#endif
|
||||
|
||||
static int
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
if (code < 256)
|
||||
return ENC_IS_ISO_8859_16_CTYPE(code, ctype);
|
||||
|
@ -203,7 +203,7 @@ static const OnigPairCaseFoldCodes CaseFoldMap[] = {
|
|||
static int
|
||||
apply_all_case_fold(OnigCaseFoldType flag,
|
||||
OnigApplyAllCaseFoldFunc f, void* arg,
|
||||
OnigEncoding enc)
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return onigenc_apply_all_case_fold_with_map(
|
||||
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
|
||||
|
@ -214,7 +214,7 @@ static int
|
|||
get_case_fold_codes_by_str(OnigCaseFoldType flag,
|
||||
const OnigUChar* p, const OnigUChar* end,
|
||||
OnigCaseFoldCodeItem items[],
|
||||
OnigEncoding enc)
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return onigenc_get_case_fold_codes_by_str_with_map(
|
||||
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
|
||||
|
|
|
@ -105,8 +105,8 @@ static const unsigned short EncISO_8859_2_CtypeTable[256] = {
|
|||
|
||||
static int
|
||||
mbc_case_fold(OnigCaseFoldType flag,
|
||||
const UChar** pp, const UChar* end, UChar* lower,
|
||||
OnigEncoding enc)
|
||||
const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower,
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
const UChar* p = *pp;
|
||||
|
||||
|
@ -192,7 +192,7 @@ static const OnigPairCaseFoldCodes CaseFoldMap[] = {
|
|||
static int
|
||||
apply_all_case_fold(OnigCaseFoldType flag,
|
||||
OnigApplyAllCaseFoldFunc f, void* arg,
|
||||
OnigEncoding enc)
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return onigenc_apply_all_case_fold_with_map(
|
||||
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
|
||||
|
@ -203,7 +203,7 @@ static int
|
|||
get_case_fold_codes_by_str(OnigCaseFoldType flag,
|
||||
const OnigUChar* p, const OnigUChar* end,
|
||||
OnigCaseFoldCodeItem items[],
|
||||
OnigEncoding enc)
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return onigenc_get_case_fold_codes_by_str_with_map(
|
||||
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
|
||||
|
@ -211,7 +211,7 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
|
|||
}
|
||||
|
||||
static int
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
if (code < 256)
|
||||
return ENC_IS_ISO_8859_2_CTYPE(code, ctype);
|
||||
|
|
|
@ -105,8 +105,8 @@ static const unsigned short EncISO_8859_3_CtypeTable[256] = {
|
|||
|
||||
static int
|
||||
mbc_case_fold(OnigCaseFoldType flag,
|
||||
const UChar** pp, const UChar* end, UChar* lower,
|
||||
OnigEncoding enc)
|
||||
const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower,
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
const UChar* p = *pp;
|
||||
|
||||
|
@ -149,7 +149,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
|
|||
#endif
|
||||
|
||||
static int
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
if (code < 256)
|
||||
return ENC_IS_ISO_8859_3_CTYPE(code, ctype);
|
||||
|
@ -201,7 +201,7 @@ static const OnigPairCaseFoldCodes CaseFoldMap[] = {
|
|||
static int
|
||||
apply_all_case_fold(OnigCaseFoldType flag,
|
||||
OnigApplyAllCaseFoldFunc f, void* arg,
|
||||
OnigEncoding enc)
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return onigenc_apply_all_case_fold_with_map(
|
||||
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
|
||||
|
@ -212,7 +212,7 @@ static int
|
|||
get_case_fold_codes_by_str(OnigCaseFoldType flag,
|
||||
const OnigUChar* p, const OnigUChar* end,
|
||||
OnigCaseFoldCodeItem items[],
|
||||
OnigEncoding enc)
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return onigenc_get_case_fold_codes_by_str_with_map(
|
||||
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
|
||||
|
|
|
@ -105,8 +105,8 @@ static const unsigned short EncISO_8859_4_CtypeTable[256] = {
|
|||
|
||||
static int
|
||||
mbc_case_fold(OnigCaseFoldType flag,
|
||||
const UChar** pp, const UChar* end, UChar* lower,
|
||||
OnigEncoding enc)
|
||||
const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower,
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
const UChar* p = *pp;
|
||||
|
||||
|
@ -148,7 +148,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
|
|||
#endif
|
||||
|
||||
static int
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
if (code < 256)
|
||||
return ENC_IS_ISO_8859_4_CTYPE(code, ctype);
|
||||
|
@ -203,7 +203,7 @@ static const OnigPairCaseFoldCodes CaseFoldMap[] = {
|
|||
static int
|
||||
apply_all_case_fold(OnigCaseFoldType flag,
|
||||
OnigApplyAllCaseFoldFunc f, void* arg,
|
||||
OnigEncoding enc)
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return onigenc_apply_all_case_fold_with_map(
|
||||
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
|
||||
|
@ -214,7 +214,7 @@ static int
|
|||
get_case_fold_codes_by_str(OnigCaseFoldType flag,
|
||||
const OnigUChar* p, const OnigUChar* end,
|
||||
OnigCaseFoldCodeItem items[],
|
||||
OnigEncoding enc)
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return onigenc_get_case_fold_codes_by_str_with_map(
|
||||
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
|
||||
|
|
|
@ -105,8 +105,8 @@ static const unsigned short EncISO_8859_5_CtypeTable[256] = {
|
|||
|
||||
static int
|
||||
mbc_case_fold(OnigCaseFoldType flag,
|
||||
const UChar** pp, const UChar* end, UChar* lower,
|
||||
OnigEncoding enc)
|
||||
const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower,
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
const UChar* p = *pp;
|
||||
|
||||
|
@ -129,7 +129,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
|
|||
#endif
|
||||
|
||||
static int
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
if (code < 256)
|
||||
return ENC_IS_ISO_8859_5_CTYPE(code, ctype);
|
||||
|
@ -191,7 +191,7 @@ static const OnigPairCaseFoldCodes CaseFoldMap[] = {
|
|||
static int
|
||||
apply_all_case_fold(OnigCaseFoldType flag,
|
||||
OnigApplyAllCaseFoldFunc f, void* arg,
|
||||
OnigEncoding enc)
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return onigenc_apply_all_case_fold_with_map(
|
||||
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
|
||||
|
@ -202,7 +202,7 @@ static int
|
|||
get_case_fold_codes_by_str(OnigCaseFoldType flag,
|
||||
const OnigUChar* p, const OnigUChar* end,
|
||||
OnigCaseFoldCodeItem items[],
|
||||
OnigEncoding enc)
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return onigenc_get_case_fold_codes_by_str_with_map(
|
||||
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
|
||||
|
|
|
@ -68,7 +68,7 @@ static const unsigned short EncISO_8859_6_CtypeTable[256] = {
|
|||
};
|
||||
|
||||
static int
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
if (code < 256)
|
||||
return ENC_IS_ISO_8859_6_CTYPE(code, ctype);
|
||||
|
|
|
@ -105,8 +105,8 @@ static const unsigned short EncISO_8859_7_CtypeTable[256] = {
|
|||
|
||||
static int
|
||||
mbc_case_fold(OnigCaseFoldType flag,
|
||||
const UChar** pp, const UChar* end, UChar* lower,
|
||||
OnigEncoding enc)
|
||||
const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower,
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
const UChar* p = *pp;
|
||||
|
||||
|
@ -137,7 +137,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag,
|
|||
#endif
|
||||
|
||||
static int
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
if (code < 256)
|
||||
return ENC_IS_ISO_8859_7_CTYPE(code, ctype);
|
||||
|
@ -187,7 +187,7 @@ static const OnigPairCaseFoldCodes CaseFoldMap[] = {
|
|||
static int
|
||||
apply_all_case_fold(OnigCaseFoldType flag,
|
||||
OnigApplyAllCaseFoldFunc f, void* arg,
|
||||
OnigEncoding enc)
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return onigenc_apply_all_case_fold_with_map(
|
||||
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
|
||||
|
@ -198,7 +198,7 @@ static int
|
|||
get_case_fold_codes_by_str(OnigCaseFoldType flag,
|
||||
const OnigUChar* p, const OnigUChar* end,
|
||||
OnigCaseFoldCodeItem items[],
|
||||
OnigEncoding enc)
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return onigenc_get_case_fold_codes_by_str_with_map(
|
||||
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
|
||||
|
|
|
@ -68,7 +68,7 @@ static const unsigned short EncISO_8859_8_CtypeTable[256] = {
|
|||
};
|
||||
|
||||
static int
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
if (code < 256)
|
||||
return ENC_IS_ISO_8859_8_CTYPE(code, ctype);
|
||||
|
|
|
@ -105,8 +105,8 @@ static const unsigned short EncISO_8859_9_CtypeTable[256] = {
|
|||
|
||||
static int
|
||||
mbc_case_fold(OnigCaseFoldType flag,
|
||||
const UChar** pp, const UChar* end, UChar* lower,
|
||||
OnigEncoding enc)
|
||||
const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower,
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
const UChar* p = *pp;
|
||||
|
||||
|
@ -149,7 +149,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
|
|||
#endif
|
||||
|
||||
static int
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
|
||||
is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
if (code < 256)
|
||||
return ENC_IS_ISO_8859_9_CTYPE(code, ctype);
|
||||
|
@ -194,7 +194,7 @@ static const OnigPairCaseFoldCodes CaseFoldMap[] = {
|
|||
static int
|
||||
apply_all_case_fold(OnigCaseFoldType flag,
|
||||
OnigApplyAllCaseFoldFunc f, void* arg,
|
||||
OnigEncoding enc)
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return onigenc_apply_all_case_fold_with_map(
|
||||
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
|
||||
|
@ -205,7 +205,7 @@ static int
|
|||
get_case_fold_codes_by_str(OnigCaseFoldType flag,
|
||||
const OnigUChar* p, const OnigUChar* end,
|
||||
OnigCaseFoldCodeItem items[],
|
||||
OnigEncoding enc)
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return onigenc_get_case_fold_codes_by_str_with_map(
|
||||
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
|
||||
|
|
15
enc/koi8_r.c
15
enc/koi8_r.c
|
@ -105,7 +105,8 @@ static const unsigned short EncKOI8_R_CtypeTable[256] = {
|
|||
|
||||
static int
|
||||
koi8_r_mbc_case_fold(OnigCaseFoldType flag ARG_UNUSED,
|
||||
const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower, OnigEncoding enc)
|
||||
const UChar** pp, const UChar* end ARG_UNUSED,
|
||||
UChar* lower, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
const UChar* p = *pp;
|
||||
|
||||
|
@ -116,7 +117,8 @@ koi8_r_mbc_case_fold(OnigCaseFoldType flag ARG_UNUSED,
|
|||
|
||||
#if 0
|
||||
static int
|
||||
koi8_r_is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end, OnigEncoding enc)
|
||||
koi8_r_is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp,
|
||||
const UChar* end, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
int v;
|
||||
const UChar* p = *pp;
|
||||
|
@ -128,7 +130,8 @@ koi8_r_is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* en
|
|||
#endif
|
||||
|
||||
static int
|
||||
koi8_r_is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
|
||||
koi8_r_is_code_ctype(OnigCodePoint code, unsigned int ctype,
|
||||
OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
if (code < 256)
|
||||
return ENC_IS_KOI8_R_CTYPE(code, ctype);
|
||||
|
@ -176,7 +179,8 @@ static const OnigPairCaseFoldCodes CaseFoldMap[] = {
|
|||
|
||||
static int
|
||||
koi8_r_apply_all_case_fold(OnigCaseFoldType flag,
|
||||
OnigApplyAllCaseFoldFunc f, void* arg, OnigEncoding enc)
|
||||
OnigApplyAllCaseFoldFunc f,
|
||||
void* arg, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return onigenc_apply_all_case_fold_with_map(
|
||||
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
|
||||
|
@ -185,7 +189,8 @@ koi8_r_apply_all_case_fold(OnigCaseFoldType flag,
|
|||
|
||||
static int
|
||||
koi8_r_get_case_fold_codes_by_str(OnigCaseFoldType flag,
|
||||
const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[], OnigEncoding enc)
|
||||
const OnigUChar* p, const OnigUChar* end,
|
||||
OnigCaseFoldCodeItem items[], OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return onigenc_get_case_fold_codes_by_str_with_map(
|
||||
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
|
||||
|
|
|
@ -115,7 +115,7 @@ static const signed char trans[][0x100] = {
|
|||
#undef F
|
||||
|
||||
static int
|
||||
mbc_enc_len(const UChar* p, const UChar* e, OnigEncoding enc)
|
||||
mbc_enc_len(const UChar* p, const UChar* e, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
int firstbyte = *p++;
|
||||
state_t s;
|
||||
|
@ -129,7 +129,7 @@ mbc_enc_len(const UChar* p, const UChar* e, OnigEncoding enc)
|
|||
}
|
||||
|
||||
static int
|
||||
code_to_mbclen(OnigCodePoint code, OnigEncoding enc)
|
||||
code_to_mbclen(OnigCodePoint code, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
if (code < 256) {
|
||||
if (EncLen_SJIS[(int )code] == 1)
|
||||
|
@ -252,7 +252,7 @@ left_adjust_char_head(const UChar* start, const UChar* s, OnigEncoding enc)
|
|||
}
|
||||
|
||||
static int
|
||||
is_allowed_reverse_match(const UChar* s, const UChar* end, OnigEncoding enc)
|
||||
is_allowed_reverse_match(const UChar* s, const UChar* end, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
const UChar c = *s;
|
||||
return (SJIS_ISMB_TRAIL(c) ? FALSE : TRUE);
|
||||
|
@ -332,7 +332,7 @@ is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
|
|||
|
||||
static int
|
||||
get_ctype_code_range(OnigCtype ctype, OnigCodePoint* sb_out,
|
||||
const OnigCodePoint* ranges[], OnigEncoding enc)
|
||||
const OnigCodePoint* ranges[], OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
if (ctype <= ONIGENC_MAX_STD_CTYPE) {
|
||||
return ONIG_NO_SUPPORT_CONFIG;
|
||||
|
|
|
@ -106,7 +106,7 @@ static const unsigned short EncCP1251_CtypeTable[256] = {
|
|||
|
||||
static int
|
||||
cp1251_mbc_case_fold(OnigCaseFoldType flag ARG_UNUSED,
|
||||
const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower, OnigEncoding enc)
|
||||
const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
const UChar* p = *pp;
|
||||
|
||||
|
@ -116,7 +116,7 @@ cp1251_mbc_case_fold(OnigCaseFoldType flag ARG_UNUSED,
|
|||
}
|
||||
|
||||
static int
|
||||
cp1251_is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
|
||||
cp1251_is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
if (code < 256)
|
||||
return ENC_IS_CP1251_CTYPE(code, ctype);
|
||||
|
@ -164,7 +164,7 @@ static const OnigPairCaseFoldCodes CaseFoldMap[] = {
|
|||
|
||||
static int
|
||||
cp1251_apply_all_case_fold(OnigCaseFoldType flag,
|
||||
OnigApplyAllCaseFoldFunc f, void* arg, OnigEncoding enc)
|
||||
OnigApplyAllCaseFoldFunc f, void* arg, OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return onigenc_apply_all_case_fold_with_map(
|
||||
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
|
||||
|
@ -173,7 +173,7 @@ cp1251_apply_all_case_fold(OnigCaseFoldType flag,
|
|||
|
||||
static int
|
||||
cp1251_get_case_fold_codes_by_str(OnigCaseFoldType flag,
|
||||
const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[], OnigEncoding enc)
|
||||
const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[], OnigEncoding enc ARG_UNUSED)
|
||||
{
|
||||
return onigenc_get_case_fold_codes_by_str_with_map(
|
||||
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
|
||||
|
|
Loading…
Reference in a new issue