summaryrefslogtreecommitdiff
path: root/enc
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-15 16:18:41 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-15 16:18:41 +0000
commitd2a5354255bab4d74c710ee8ff21f43998f33095 (patch)
tree1ec7bb66dc38e3d46bc69892fa6d18184386ec72 /enc
parentd198d64e0464c141f70c49880bf511ac3dcd1162 (diff)
* reg*.c: Merge Onigmo 5.15.0 38a870960aa7370051a3544
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enc')
-rw-r--r--enc/big5.c6
-rw-r--r--enc/euc_jp.c7
-rw-r--r--enc/iso_8859_1.c2
-rw-r--r--enc/iso_8859_10.c4
-rw-r--r--enc/iso_8859_13.c4
-rw-r--r--enc/iso_8859_14.c4
-rw-r--r--enc/iso_8859_15.c4
-rw-r--r--enc/iso_8859_16.c4
-rw-r--r--enc/iso_8859_2.c2
-rw-r--r--enc/iso_8859_3.c4
-rw-r--r--enc/iso_8859_4.c4
-rw-r--r--enc/iso_8859_5.c4
-rw-r--r--enc/iso_8859_7.c4
-rw-r--r--enc/iso_8859_9.c4
-rw-r--r--enc/koi8_r.c4
-rw-r--r--enc/koi8_u.c4
-rw-r--r--enc/shift_jis.c7
-rw-r--r--enc/unicode.c1
-rw-r--r--enc/us_ascii.c6
-rw-r--r--enc/utf_16_32.h2
-rw-r--r--enc/utf_16be.c4
-rw-r--r--enc/utf_16le.c4
-rw-r--r--enc/utf_8.c4
-rw-r--r--enc/windows_1251.c4
24 files changed, 43 insertions, 54 deletions
diff --git a/enc/big5.c b/enc/big5.c
index 9d7738d..27315c4 100644
--- a/enc/big5.c
+++ b/enc/big5.c
@@ -167,19 +167,19 @@ big5_mbc_enc_len0(const UChar* p, const UChar* e, int tridx, const int tbl[])
static int
big5_mbc_enc_len(const UChar* p, const UChar* e, OnigEncoding enc ARG_UNUSED)
{
- return big5_mbc_enc_len0(p, e, 0, EncLen_BIG5);
+ return big5_mbc_enc_len0(p, e, 0, EncLen_BIG5);
}
static int
big5_hkscs_mbc_enc_len(const UChar* p, const UChar* e, OnigEncoding enc ARG_UNUSED)
{
- return big5_mbc_enc_len0(p, e, 2, EncLen_BIG5_HKSCS);
+ return big5_mbc_enc_len0(p, e, 2, EncLen_BIG5_HKSCS);
}
static int
big5_uao_mbc_enc_len(const UChar* p, const UChar* e, OnigEncoding enc ARG_UNUSED)
{
- return big5_mbc_enc_len0(p, e, 2, EncLen_BIG5_UAO);
+ return big5_mbc_enc_len0(p, e, 2, EncLen_BIG5_UAO);
}
static OnigCodePoint
diff --git a/enc/euc_jp.c b/enc/euc_jp.c
index 8ee24bf..61bb8ba 100644
--- a/enc/euc_jp.c
+++ b/enc/euc_jp.c
@@ -293,7 +293,7 @@ apply_all_case_fold(OnigCaseFoldType flag,
OnigApplyAllCaseFoldFunc f, void* arg, OnigEncoding enc)
{
return onigenc_apply_all_case_fold_with_map(
- sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
+ numberof(CaseFoldMap), CaseFoldMap, 0,
flag, f, arg);
}
@@ -504,13 +504,14 @@ static int
property_name_to_ctype(OnigEncoding enc, UChar* p, UChar* end)
{
UChar *s = p, *e = end;
- const struct enc_property *prop = onig_jis_property((const char *)s, (unsigned int)(e-s));
+ const struct enc_property *prop =
+ onig_jis_property((const char* )s, (unsigned int )(e - s));
if (!prop) {
return onigenc_minimum_property_name_to_ctype(enc, s, e);
}
- return (int)prop->ctype;
+ return (int )prop->ctype;
}
static int
diff --git a/enc/iso_8859_1.c b/enc/iso_8859_1.c
index 92dc14f..088b427 100644
--- a/enc/iso_8859_1.c
+++ b/enc/iso_8859_1.c
@@ -29,8 +29,6 @@
#include "regenc.h"
-#define numberof(array) (int)(sizeof(array) / sizeof((array)[0]))
-
#define ENC_IS_ISO_8859_1_CTYPE(code,ctype) \
((EncISO_8859_1_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
diff --git a/enc/iso_8859_10.c b/enc/iso_8859_10.c
index ec20a15..ab71a5a 100644
--- a/enc/iso_8859_10.c
+++ b/enc/iso_8859_10.c
@@ -208,7 +208,7 @@ apply_all_case_fold(OnigCaseFoldType flag,
OnigEncoding enc ARG_UNUSED)
{
return onigenc_apply_all_case_fold_with_map(
- sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ numberof(CaseFoldMap), CaseFoldMap, 1,
flag, f, arg);
}
@@ -219,7 +219,7 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
OnigEncoding enc ARG_UNUSED)
{
return onigenc_get_case_fold_codes_by_str_with_map(
- sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ numberof(CaseFoldMap), CaseFoldMap, 1,
flag, p, end, items);
}
diff --git a/enc/iso_8859_13.c b/enc/iso_8859_13.c
index 4d7b328..11b3dda 100644
--- a/enc/iso_8859_13.c
+++ b/enc/iso_8859_13.c
@@ -197,7 +197,7 @@ apply_all_case_fold(OnigCaseFoldType flag,
OnigEncoding enc ARG_UNUSED)
{
return onigenc_apply_all_case_fold_with_map(
- sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ numberof(CaseFoldMap), CaseFoldMap, 1,
flag, f, arg);
}
@@ -208,7 +208,7 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
OnigEncoding enc ARG_UNUSED)
{
return onigenc_get_case_fold_codes_by_str_with_map(
- sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ numberof(CaseFoldMap), CaseFoldMap, 1,
flag, p, end, items);
}
diff --git a/enc/iso_8859_14.c b/enc/iso_8859_14.c
index 1271c8a..2939e89 100644
--- a/enc/iso_8859_14.c
+++ b/enc/iso_8859_14.c
@@ -210,7 +210,7 @@ apply_all_case_fold(OnigCaseFoldType flag,
OnigEncoding enc ARG_UNUSED)
{
return onigenc_apply_all_case_fold_with_map(
- sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ numberof(CaseFoldMap), CaseFoldMap, 1,
flag, f, arg);
}
@@ -221,7 +221,7 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
OnigEncoding enc ARG_UNUSED)
{
return onigenc_get_case_fold_codes_by_str_with_map(
- sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ numberof(CaseFoldMap), CaseFoldMap, 1,
flag, p, end, items);
}
diff --git a/enc/iso_8859_15.c b/enc/iso_8859_15.c
index 451033e..fdb7ca1 100644
--- a/enc/iso_8859_15.c
+++ b/enc/iso_8859_15.c
@@ -204,7 +204,7 @@ apply_all_case_fold(OnigCaseFoldType flag,
OnigEncoding enc ARG_UNUSED)
{
return onigenc_apply_all_case_fold_with_map(
- sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ numberof(CaseFoldMap), CaseFoldMap, 1,
flag, f, arg);
}
@@ -215,7 +215,7 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
OnigEncoding enc ARG_UNUSED)
{
return onigenc_get_case_fold_codes_by_str_with_map(
- sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ numberof(CaseFoldMap), CaseFoldMap, 1,
flag, p, end, items);
}
diff --git a/enc/iso_8859_16.c b/enc/iso_8859_16.c
index 5234cf0..5e53f3b 100644
--- a/enc/iso_8859_16.c
+++ b/enc/iso_8859_16.c
@@ -206,7 +206,7 @@ apply_all_case_fold(OnigCaseFoldType flag,
OnigEncoding enc ARG_UNUSED)
{
return onigenc_apply_all_case_fold_with_map(
- sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ numberof(CaseFoldMap), CaseFoldMap, 1,
flag, f, arg);
}
@@ -217,7 +217,7 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
OnigEncoding enc ARG_UNUSED)
{
return onigenc_get_case_fold_codes_by_str_with_map(
- sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ numberof(CaseFoldMap), CaseFoldMap, 1,
flag, p, end, items);
}
diff --git a/enc/iso_8859_2.c b/enc/iso_8859_2.c
index f4cb910..94613e6 100644
--- a/enc/iso_8859_2.c
+++ b/enc/iso_8859_2.c
@@ -29,8 +29,6 @@
#include "regenc.h"
-#define numberof(array) (int)(sizeof(array) / sizeof((array)[0]))
-
#define ENC_ISO_8859_2_TO_LOWER_CASE(c) EncISO_8859_2_ToLowerCaseTable[c]
#define ENC_IS_ISO_8859_2_CTYPE(code,ctype) \
((EncISO_8859_2_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
diff --git a/enc/iso_8859_3.c b/enc/iso_8859_3.c
index 8557257..863a575 100644
--- a/enc/iso_8859_3.c
+++ b/enc/iso_8859_3.c
@@ -204,7 +204,7 @@ apply_all_case_fold(OnigCaseFoldType flag,
OnigEncoding enc ARG_UNUSED)
{
return onigenc_apply_all_case_fold_with_map(
- sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ numberof(CaseFoldMap), CaseFoldMap, 1,
flag, f, arg);
}
@@ -215,7 +215,7 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
OnigEncoding enc ARG_UNUSED)
{
return onigenc_get_case_fold_codes_by_str_with_map(
- sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ numberof(CaseFoldMap), CaseFoldMap, 1,
flag, p, end, items);
}
diff --git a/enc/iso_8859_4.c b/enc/iso_8859_4.c
index 771a2cf..48b999e 100644
--- a/enc/iso_8859_4.c
+++ b/enc/iso_8859_4.c
@@ -206,7 +206,7 @@ apply_all_case_fold(OnigCaseFoldType flag,
OnigEncoding enc ARG_UNUSED)
{
return onigenc_apply_all_case_fold_with_map(
- sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ numberof(CaseFoldMap), CaseFoldMap, 1,
flag, f, arg);
}
@@ -217,7 +217,7 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
OnigEncoding enc ARG_UNUSED)
{
return onigenc_get_case_fold_codes_by_str_with_map(
- sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ numberof(CaseFoldMap), CaseFoldMap, 1,
flag, p, end, items);
}
diff --git a/enc/iso_8859_5.c b/enc/iso_8859_5.c
index 4ee27b1..e71a488 100644
--- a/enc/iso_8859_5.c
+++ b/enc/iso_8859_5.c
@@ -194,7 +194,7 @@ apply_all_case_fold(OnigCaseFoldType flag,
OnigEncoding enc ARG_UNUSED)
{
return onigenc_apply_all_case_fold_with_map(
- sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
+ numberof(CaseFoldMap), CaseFoldMap, 0,
flag, f, arg);
}
@@ -205,7 +205,7 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
OnigEncoding enc ARG_UNUSED)
{
return onigenc_get_case_fold_codes_by_str_with_map(
- sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
+ numberof(CaseFoldMap), CaseFoldMap, 0,
flag, p, end, items);
}
diff --git a/enc/iso_8859_7.c b/enc/iso_8859_7.c
index aa82f88..8d07cb6 100644
--- a/enc/iso_8859_7.c
+++ b/enc/iso_8859_7.c
@@ -190,7 +190,7 @@ apply_all_case_fold(OnigCaseFoldType flag,
OnigEncoding enc ARG_UNUSED)
{
return onigenc_apply_all_case_fold_with_map(
- sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
+ numberof(CaseFoldMap), CaseFoldMap, 0,
flag, f, arg);
}
@@ -201,7 +201,7 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
OnigEncoding enc ARG_UNUSED)
{
return onigenc_get_case_fold_codes_by_str_with_map(
- sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
+ numberof(CaseFoldMap), CaseFoldMap, 0,
flag, p, end, items);
}
diff --git a/enc/iso_8859_9.c b/enc/iso_8859_9.c
index 0adafa3..211ba3b 100644
--- a/enc/iso_8859_9.c
+++ b/enc/iso_8859_9.c
@@ -197,7 +197,7 @@ apply_all_case_fold(OnigCaseFoldType flag,
OnigEncoding enc ARG_UNUSED)
{
return onigenc_apply_all_case_fold_with_map(
- sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ numberof(CaseFoldMap), CaseFoldMap, 1,
flag, f, arg);
}
@@ -208,7 +208,7 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
OnigEncoding enc ARG_UNUSED)
{
return onigenc_get_case_fold_codes_by_str_with_map(
- sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ numberof(CaseFoldMap), CaseFoldMap, 1,
flag, p, end, items);
}
diff --git a/enc/koi8_r.c b/enc/koi8_r.c
index 8ec4874..85fa722 100644
--- a/enc/koi8_r.c
+++ b/enc/koi8_r.c
@@ -183,7 +183,7 @@ koi8_r_apply_all_case_fold(OnigCaseFoldType flag,
void* arg, OnigEncoding enc ARG_UNUSED)
{
return onigenc_apply_all_case_fold_with_map(
- sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
+ numberof(CaseFoldMap), CaseFoldMap, 0,
flag, f, arg);
}
@@ -193,7 +193,7 @@ koi8_r_get_case_fold_codes_by_str(OnigCaseFoldType flag,
OnigCaseFoldCodeItem items[], OnigEncoding enc ARG_UNUSED)
{
return onigenc_get_case_fold_codes_by_str_with_map(
- sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
+ numberof(CaseFoldMap), CaseFoldMap, 0,
flag, p, end, items);
}
diff --git a/enc/koi8_u.c b/enc/koi8_u.c
index 0e51b6e..0ae449c 100644
--- a/enc/koi8_u.c
+++ b/enc/koi8_u.c
@@ -187,7 +187,7 @@ koi8_u_apply_all_case_fold(OnigCaseFoldType flag,
void* arg, OnigEncoding enc ARG_UNUSED)
{
return onigenc_apply_all_case_fold_with_map(
- sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
+ numberof(CaseFoldMap), CaseFoldMap, 0,
flag, f, arg);
}
@@ -197,7 +197,7 @@ koi8_u_get_case_fold_codes_by_str(OnigCaseFoldType flag,
OnigCaseFoldCodeItem items[], OnigEncoding enc ARG_UNUSED)
{
return onigenc_get_case_fold_codes_by_str_with_map(
- sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
+ numberof(CaseFoldMap), CaseFoldMap, 0,
flag, p, end, items);
}
diff --git a/enc/shift_jis.c b/enc/shift_jis.c
index 530415b..cbd3f02 100644
--- a/enc/shift_jis.c
+++ b/enc/shift_jis.c
@@ -278,7 +278,7 @@ apply_all_case_fold(OnigCaseFoldType flag,
OnigApplyAllCaseFoldFunc f, void* arg, OnigEncoding enc)
{
return onigenc_apply_all_case_fold_with_map(
- sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
+ numberof(CaseFoldMap), CaseFoldMap, 0,
flag, f, arg);
}
@@ -493,13 +493,14 @@ static int
property_name_to_ctype(OnigEncoding enc, UChar* p, UChar* end)
{
UChar *s = p, *e = end;
- const struct enc_property *prop = onig_jis_property((const char *)s, (unsigned int)(e-s));
+ const struct enc_property *prop =
+ onig_jis_property((const char* )s, (unsigned int )(e - s));
if (!prop) {
return onigenc_minimum_property_name_to_ctype(enc, s, e);
}
- return (int)prop->ctype;
+ return (int )prop->ctype;
}
static int
diff --git a/enc/unicode.c b/enc/unicode.c
index 2575762..f0ef898 100644
--- a/enc/unicode.c
+++ b/enc/unicode.c
@@ -141,7 +141,6 @@ code3_equal(const OnigCodePoint *x, const OnigCodePoint *y)
#include "enc/unicode/name2ctype.h"
-#define numberof(array) (int)(sizeof(array) / sizeof((array)[0]))
#define CODE_RANGES_NUM numberof(CodeRanges)
extern int
diff --git a/enc/us_ascii.c b/enc/us_ascii.c
index 1b47778..18d0685 100644
--- a/enc/us_ascii.c
+++ b/enc/us_ascii.c
@@ -3,9 +3,9 @@
static int
us_ascii_mbc_enc_len(const UChar* p, const UChar* e, OnigEncoding enc)
{
- if (*p & 0x80)
- return ONIGENC_CONSTRUCT_MBCLEN_INVALID();
- return ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(1);
+ if (*p & 0x80)
+ return ONIGENC_CONSTRUCT_MBCLEN_INVALID();
+ return ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(1);
}
OnigEncodingDefine(us_ascii, US_ASCII) = {
diff --git a/enc/utf_16_32.h b/enc/utf_16_32.h
index da58d1b..b232767 100644
--- a/enc/utf_16_32.h
+++ b/enc/utf_16_32.h
@@ -1,5 +1,5 @@
#include "regenc.h"
/* dummy for unsupported, statefull encoding */
-#define ENC_DUMMY_UNICODE(name) ENC_REPLICATE(name, name "BE")
+#define ENC_DUMMY_UNICODE(name) ENC_DUMMY(name)
ENC_DUMMY_UNICODE("UTF-16");
ENC_DUMMY_UNICODE("UTF-32");
diff --git a/enc/utf_16be.c b/enc/utf_16be.c
index 3af8359..a61ae00 100644
--- a/enc/utf_16be.c
+++ b/enc/utf_16be.c
@@ -29,10 +29,6 @@
#include "regenc.h"
-#define UTF16_IS_SURROGATE_FIRST(c) (((c) & 0xfc) == 0xd8)
-#define UTF16_IS_SURROGATE_SECOND(c) (((c) & 0xfc) == 0xdc)
-#define UTF16_IS_SURROGATE(c) (((c) & 0xf8) == 0xd8)
-
#if 0
static const int EncLen_UTF16[] = {
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
diff --git a/enc/utf_16le.c b/enc/utf_16le.c
index 453c771..7d176e7 100644
--- a/enc/utf_16le.c
+++ b/enc/utf_16le.c
@@ -29,10 +29,6 @@
#include "regenc.h"
-#define UTF16_IS_SURROGATE_FIRST(c) (((c) & 0xfc) == 0xd8)
-#define UTF16_IS_SURROGATE_SECOND(c) (((c) & 0xfc) == 0xdc)
-#define UTF16_IS_SURROGATE(c) (((c) & 0xf8) == 0xd8)
-
#if 0
static const int EncLen_UTF16[] = {
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
diff --git a/enc/utf_8.c b/enc/utf_8.c
index dae1f3a..b8f38e9 100644
--- a/enc/utf_8.c
+++ b/enc/utf_8.c
@@ -367,7 +367,7 @@ code_to_mbc(OnigCodePoint code, UChar *buf, OnigEncoding enc ARG_UNUSED)
static int
mbc_case_fold(OnigCaseFoldType flag, const UChar** pp,
- const UChar* end, UChar* fold, OnigEncoding enc)
+ const UChar* end, UChar* fold, OnigEncoding enc)
{
const UChar* p = *pp;
@@ -395,7 +395,7 @@ mbc_case_fold(OnigCaseFoldType flag, const UChar** pp,
static int
get_ctype_code_range(OnigCtype ctype, OnigCodePoint *sb_out,
- const OnigCodePoint* ranges[], OnigEncoding enc ARG_UNUSED)
+ const OnigCodePoint* ranges[], OnigEncoding enc ARG_UNUSED)
{
*sb_out = 0x80;
return onigenc_unicode_ctype_code_range(ctype, ranges);
diff --git a/enc/windows_1251.c b/enc/windows_1251.c
index 7306096..191d631 100644
--- a/enc/windows_1251.c
+++ b/enc/windows_1251.c
@@ -167,7 +167,7 @@ cp1251_apply_all_case_fold(OnigCaseFoldType flag,
OnigApplyAllCaseFoldFunc f, void* arg, OnigEncoding enc ARG_UNUSED)
{
return onigenc_apply_all_case_fold_with_map(
- sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
+ numberof(CaseFoldMap), CaseFoldMap, 0,
flag, f, arg);
}
@@ -176,7 +176,7 @@ cp1251_get_case_fold_codes_by_str(OnigCaseFoldType flag,
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,
+ numberof(CaseFoldMap), CaseFoldMap, 0,
flag, p, end, items);
}