aboutsummaryrefslogtreecommitdiffstats
path: root/enc
diff options
context:
space:
mode:
authorduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-07-24 07:33:15 +0000
committerduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-07-24 07:33:15 +0000
commita8b5c9cc013b1009d8fd5367025c519db7f31fce (patch)
treeb64cb46fa0d9dad2f4f3aa3e4dd3136139243bd5 /enc
parent4066f7d305f1c88c7fc189fe1d50eed268cd9801 (diff)
downloadruby-a8b5c9cc013b1009d8fd5367025c519db7f31fce.tar.gz
* regenc.h/c, include/ruby/oniguruma.h, enc/ascii.c, big5.c, cp949.c,
emacs_mule.c, euc_jp.c, euc_kr.c, euc_tw.c, gb18030.c, gbk.c, iso_8859_1|2|3|4|5|6|7|8|9|10|11|13|14|15|16.c, koi8_r.c, koi8_u.c, shift_jis.c, unicode.c, us_ascii.c, utf_16|32be|le.c, utf_8.c, windows_1250|51|52|53|54|57.c, windows_31j.c, unicode.c: Remove conditional compilation macro ONIG_CASE_MAPPING. [Feature #12386]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enc')
-rw-r--r--enc/ascii.c2
-rw-r--r--enc/big5.c6
-rw-r--r--enc/cp949.c2
-rw-r--r--enc/emacs_mule.c2
-rw-r--r--enc/euc_jp.c2
-rw-r--r--enc/euc_kr.c2
-rw-r--r--enc/euc_tw.c2
-rw-r--r--enc/gb18030.c2
-rw-r--r--enc/gbk.c2
-rw-r--r--enc/iso_8859_1.c4
-rw-r--r--enc/iso_8859_10.c4
-rw-r--r--enc/iso_8859_11.c2
-rw-r--r--enc/iso_8859_13.c4
-rw-r--r--enc/iso_8859_14.c4
-rw-r--r--enc/iso_8859_15.c5
-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_6.c2
-rw-r--r--enc/iso_8859_7.c4
-rw-r--r--enc/iso_8859_8.c2
-rw-r--r--enc/iso_8859_9.c4
-rw-r--r--enc/koi8_r.c2
-rw-r--r--enc/koi8_u.c2
-rw-r--r--enc/shift_jis.c2
-rw-r--r--enc/unicode.c8
-rw-r--r--enc/us_ascii.c2
-rw-r--r--enc/utf_16be.c2
-rw-r--r--enc/utf_16le.c2
-rw-r--r--enc/utf_32be.c2
-rw-r--r--enc/utf_32le.c2
-rw-r--r--enc/utf_8.c2
-rw-r--r--enc/windows_1250.c2
-rw-r--r--enc/windows_1251.c2
-rw-r--r--enc/windows_1252.c5
-rw-r--r--enc/windows_1253.c2
-rw-r--r--enc/windows_1254.c2
-rw-r--r--enc/windows_1257.c2
-rw-r--r--enc/windows_31j.c2
41 files changed, 1 insertions, 117 deletions
diff --git a/enc/ascii.c b/enc/ascii.c
index 18e69234dd..d34cc20582 100644
--- a/enc/ascii.c
+++ b/enc/ascii.c
@@ -53,9 +53,7 @@ OnigEncodingDefine(ascii, ASCII) = {
onigenc_always_true_is_allowed_reverse_match,
ENCINDEX_ASCII,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
onigenc_single_byte_ascii_only_case_map,
-#endif /* ONIG_CASE_MAPPING */
};
ENC_ALIAS("BINARY", "ASCII-8BIT")
ENC_REPLICATE("IBM437", "ASCII-8BIT")
diff --git a/enc/big5.c b/enc/big5.c
index 16e97db02a..fc2bcadcc1 100644
--- a/enc/big5.c
+++ b/enc/big5.c
@@ -302,9 +302,7 @@ OnigEncodingDefine(big5, BIG5) = {
big5_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
onigenc_ascii_only_case_map,
-#endif /* ONIG_CASE_MAPPING */
};
/*
@@ -339,9 +337,7 @@ OnigEncodingDefine(big5_hkscs, BIG5_HKSCS) = {
big5_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
onigenc_ascii_only_case_map,
-#endif /* ONIG_CASE_MAPPING */
};
ENC_ALIAS("Big5-HKSCS:2008", "Big5-HKSCS")
@@ -376,7 +372,5 @@ OnigEncodingDefine(big5_uao, BIG5_UAO) = {
big5_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
onigenc_ascii_only_case_map,
-#endif /* ONIG_CASE_MAPPING */
};
diff --git a/enc/cp949.c b/enc/cp949.c
index 2f37f73ad2..f832cd5758 100644
--- a/enc/cp949.c
+++ b/enc/cp949.c
@@ -213,9 +213,7 @@ OnigEncodingDefine(cp949, CP949) = {
cp949_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
onigenc_ascii_only_case_map,
-#endif /* ONIG_CASE_MAPPING */
};
/*
* Name: CP949
diff --git a/enc/emacs_mule.c b/enc/emacs_mule.c
index 7f1e20bbd6..a53f243dfe 100644
--- a/enc/emacs_mule.c
+++ b/enc/emacs_mule.c
@@ -336,9 +336,7 @@ OnigEncodingDefine(emacs_mule, Emacs_Mule) = {
onigenc_always_true_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
onigenc_ascii_only_case_map,
-#endif /* ONIG_CASE_MAPPING */
};
ENC_REPLICATE("stateless-ISO-2022-JP", "Emacs-Mule")
diff --git a/enc/euc_jp.c b/enc/euc_jp.c
index cf9dda7af9..f9604b8d6e 100644
--- a/enc/euc_jp.c
+++ b/enc/euc_jp.c
@@ -578,9 +578,7 @@ OnigEncodingDefine(euc_jp, EUC_JP) = {
is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
onigenc_ascii_only_case_map,
-#endif /* ONIG_CASE_MAPPING */
};
/*
* Name: EUC-JP
diff --git a/enc/euc_kr.c b/enc/euc_kr.c
index fbe70230bc..eb17f476e9 100644
--- a/enc/euc_kr.c
+++ b/enc/euc_kr.c
@@ -190,8 +190,6 @@ OnigEncodingDefine(euc_kr, EUC_KR) = {
euckr_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
onigenc_ascii_only_case_map,
-#endif /* ONIG_CASE_MAPPING */
};
ENC_ALIAS("eucKR", "EUC-KR")
diff --git a/enc/euc_tw.c b/enc/euc_tw.c
index d9a7eb2695..e7d5187c4a 100644
--- a/enc/euc_tw.c
+++ b/enc/euc_tw.c
@@ -223,8 +223,6 @@ OnigEncodingDefine(euc_tw, EUC_TW) = {
euctw_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
onigenc_ascii_only_case_map,
-#endif /* ONIG_CASE_MAPPING */
};
ENC_ALIAS("eucTW", "EUC-TW")
diff --git a/enc/gb18030.c b/enc/gb18030.c
index ed06845ee5..8a00332991 100644
--- a/enc/gb18030.c
+++ b/enc/gb18030.c
@@ -599,8 +599,6 @@ OnigEncodingDefine(gb18030, GB18030) = {
gb18030_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
onigenc_ascii_only_case_map,
-#endif /* ONIG_CASE_MAPPING */
};
diff --git a/enc/gbk.c b/enc/gbk.c
index 5f443812a9..d3bb1a5864 100644
--- a/enc/gbk.c
+++ b/enc/gbk.c
@@ -213,9 +213,7 @@ OnigEncodingDefine(gbk, GBK) = {
gbk_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
onigenc_ascii_only_case_map,
-#endif /* ONIG_CASE_MAPPING */
};
/*
* Name: GBK
diff --git a/enc/iso_8859_1.c b/enc/iso_8859_1.c
index 9be16d3978..2440c9f5a1 100644
--- a/enc/iso_8859_1.c
+++ b/enc/iso_8859_1.c
@@ -255,7 +255,6 @@ is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSE
return FALSE;
}
-#ifdef ONIG_CASE_MAPPING
static int
case_map (OnigCaseFoldType* flagP, const OnigUChar** pp,
const OnigUChar* end, OnigUChar* to, OnigUChar* to_end,
@@ -297,7 +296,6 @@ case_map (OnigCaseFoldType* flagP, const OnigUChar** pp,
*flagP = flags;
return (int)(to-to_start);
}
-#endif /* ONIG_CASE_MAPPING */
OnigEncodingDefine(iso_8859_1, ISO_8859_1) = {
onigenc_single_byte_mbc_enc_len,
@@ -318,8 +316,6 @@ OnigEncodingDefine(iso_8859_1, ISO_8859_1) = {
onigenc_always_true_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
case_map,
-#endif /* ONIG_CASE_MAPPING */
};
ENC_ALIAS("ISO8859-1", "ISO-8859-1")
diff --git a/enc/iso_8859_10.c b/enc/iso_8859_10.c
index d302c78023..e06f15f9d0 100644
--- a/enc/iso_8859_10.c
+++ b/enc/iso_8859_10.c
@@ -224,7 +224,6 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
flag, p, end, items);
}
-#ifdef ONIG_CASE_MAPPING
static int
case_map (OnigCaseFoldType* flagP, const OnigUChar** pp,
const OnigUChar* end, OnigUChar* to, OnigUChar* to_end,
@@ -269,7 +268,6 @@ case_map (OnigCaseFoldType* flagP, const OnigUChar** pp,
*flagP = flags;
return (int)(to-to_start);
}
-#endif /* ONIG_CASE_MAPPING */
OnigEncodingDefine(iso_8859_10, ISO_8859_10) = {
onigenc_single_byte_mbc_enc_len,
@@ -290,8 +288,6 @@ OnigEncodingDefine(iso_8859_10, ISO_8859_10) = {
onigenc_always_true_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
case_map,
-#endif /* ONIG_CASE_MAPPING */
};
ENC_ALIAS("ISO8859-10", "ISO-8859-10")
diff --git a/enc/iso_8859_11.c b/enc/iso_8859_11.c
index 730bed2958..a5522da2e3 100644
--- a/enc/iso_8859_11.c
+++ b/enc/iso_8859_11.c
@@ -95,9 +95,7 @@ OnigEncodingDefine(iso_8859_11, ISO_8859_11) = {
onigenc_always_true_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
onigenc_single_byte_ascii_only_case_map,
-#endif /* ONIG_CASE_MAPPING */
};
ENC_ALIAS("ISO8859-11", "ISO-8859-11")
diff --git a/enc/iso_8859_13.c b/enc/iso_8859_13.c
index 4ba4c2b10f..6e49e16dfb 100644
--- a/enc/iso_8859_13.c
+++ b/enc/iso_8859_13.c
@@ -217,7 +217,6 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
flag, p, end, items);
}
-#ifdef ONIG_CASE_MAPPING
static int
case_map (OnigCaseFoldType* flagP, const OnigUChar** pp,
const OnigUChar* end, OnigUChar* to, OnigUChar* to_end,
@@ -264,7 +263,6 @@ case_map (OnigCaseFoldType* flagP, const OnigUChar** pp,
*flagP = flags;
return (int)(to-to_start);
}
-#endif /* ONIG_CASE_MAPPING */
OnigEncodingDefine(iso_8859_13, ISO_8859_13) = {
onigenc_single_byte_mbc_enc_len,
@@ -285,8 +283,6 @@ OnigEncodingDefine(iso_8859_13, ISO_8859_13) = {
onigenc_always_true_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
case_map,
-#endif /* ONIG_CASE_MAPPING */
};
ENC_ALIAS("ISO8859-13", "ISO-8859-13")
diff --git a/enc/iso_8859_14.c b/enc/iso_8859_14.c
index 3d172e0ba4..22df367dd9 100644
--- a/enc/iso_8859_14.c
+++ b/enc/iso_8859_14.c
@@ -226,7 +226,6 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
flag, p, end, items);
}
-#ifdef ONIG_CASE_MAPPING
static int
case_map (OnigCaseFoldType* flagP, const OnigUChar** pp,
const OnigUChar* end, OnigUChar* to, OnigUChar* to_end,
@@ -281,7 +280,6 @@ case_map (OnigCaseFoldType* flagP, const OnigUChar** pp,
*flagP = flags;
return (int)(to-to_start);
}
-#endif /* ONIG_CASE_MAPPING */
OnigEncodingDefine(iso_8859_14, ISO_8859_14) = {
onigenc_single_byte_mbc_enc_len,
@@ -302,8 +300,6 @@ OnigEncodingDefine(iso_8859_14, ISO_8859_14) = {
onigenc_always_true_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
case_map,
-#endif /* ONIG_CASE_MAPPING */
};
ENC_ALIAS("ISO8859-14", "ISO-8859-14")
diff --git a/enc/iso_8859_15.c b/enc/iso_8859_15.c
index 4e6f76ed2b..06b00b90b3 100644
--- a/enc/iso_8859_15.c
+++ b/enc/iso_8859_15.c
@@ -220,7 +220,6 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
flag, p, end, items);
}
-#ifdef ONIG_CASE_MAPPING
static int
case_map (OnigCaseFoldType* flagP, const OnigUChar** pp,
const OnigUChar* end, OnigUChar* to, OnigUChar* to_end,
@@ -271,8 +270,6 @@ case_map (OnigCaseFoldType* flagP, const OnigUChar** pp,
*flagP = flags;
return (int)(to-to_start);
}
-#endif /* ONIG_CASE_MAPPING */
-
OnigEncodingDefine(iso_8859_15, ISO_8859_15) = {
onigenc_single_byte_mbc_enc_len,
@@ -293,8 +290,6 @@ OnigEncodingDefine(iso_8859_15, ISO_8859_15) = {
onigenc_always_true_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
case_map,
-#endif /* ONIG_CASE_MAPPING */
};
ENC_ALIAS("ISO8859-15", "ISO-8859-15")
diff --git a/enc/iso_8859_16.c b/enc/iso_8859_16.c
index 8527b00cf2..c8695e65f7 100644
--- a/enc/iso_8859_16.c
+++ b/enc/iso_8859_16.c
@@ -222,7 +222,6 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
flag, p, end, items);
}
-#ifdef ONIG_CASE_MAPPING
static int
case_map (OnigCaseFoldType* flagP, const OnigUChar** pp,
const OnigUChar* end, OnigUChar* to, OnigUChar* to_end,
@@ -276,7 +275,6 @@ case_map (OnigCaseFoldType* flagP, const OnigUChar** pp,
*flagP = flags;
return (int)(to-to_start);
}
-#endif /* ONIG_CASE_MAPPING */
OnigEncodingDefine(iso_8859_16, ISO_8859_16) = {
onigenc_single_byte_mbc_enc_len,
@@ -297,8 +295,6 @@ OnigEncodingDefine(iso_8859_16, ISO_8859_16) = {
onigenc_always_true_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
case_map,
-#endif /* ONIG_CASE_MAPPING */
};
ENC_ALIAS("ISO8859-16", "ISO-8859-16")
diff --git a/enc/iso_8859_2.c b/enc/iso_8859_2.c
index 4322754da2..f0a74ee7e8 100644
--- a/enc/iso_8859_2.c
+++ b/enc/iso_8859_2.c
@@ -239,8 +239,6 @@ OnigEncodingDefine(iso_8859_2, ISO_8859_2) = {
onigenc_always_true_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
onigenc_single_byte_ascii_only_case_map,
-#endif /* ONIG_CASE_MAPPING */
};
ENC_ALIAS("ISO8859-2", "ISO-8859-2")
diff --git a/enc/iso_8859_3.c b/enc/iso_8859_3.c
index a37a3cf0a7..365d9a77de 100644
--- a/enc/iso_8859_3.c
+++ b/enc/iso_8859_3.c
@@ -220,7 +220,6 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
flag, p, end, items);
}
-#ifdef ONIG_CASE_MAPPING
#define DOTLESS_i (0xB9)
#define I_WITH_DOT_ABOVE (0xA9)
static int
@@ -276,7 +275,6 @@ case_map (OnigCaseFoldType* flagP, const OnigUChar** pp,
*flagP = flags;
return (int)(to-to_start);
}
-#endif /* ONIG_CASE_MAPPING */
OnigEncodingDefine(iso_8859_3, ISO_8859_3) = {
onigenc_single_byte_mbc_enc_len,
@@ -297,8 +295,6 @@ OnigEncodingDefine(iso_8859_3, ISO_8859_3) = {
onigenc_always_true_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
case_map,
-#endif /* ONIG_CASE_MAPPING */
};
ENC_ALIAS("ISO8859-3", "ISO-8859-3")
diff --git a/enc/iso_8859_4.c b/enc/iso_8859_4.c
index 753f2470df..6d27300e22 100644
--- a/enc/iso_8859_4.c
+++ b/enc/iso_8859_4.c
@@ -223,7 +223,6 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
flag, p, end, items);
}
-#ifdef ONIG_CASE_MAPPING
static int
case_map(OnigCaseFoldType* flagP, const OnigUChar** pp,
const OnigUChar* end, OnigUChar* to, OnigUChar* to_end,
@@ -272,7 +271,6 @@ case_map(OnigCaseFoldType* flagP, const OnigUChar** pp,
*flagP = flags;
return (int)(to-to_start);
}
-#endif /* ONIG_CASE_MAPPING */
OnigEncodingDefine(iso_8859_4, ISO_8859_4) = {
onigenc_single_byte_mbc_enc_len,
@@ -293,8 +291,6 @@ OnigEncodingDefine(iso_8859_4, ISO_8859_4) = {
onigenc_always_true_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
case_map,
-#endif /* ONIG_CASE_MAPPING */
};
ENC_ALIAS("ISO8859-4", "ISO-8859-4")
diff --git a/enc/iso_8859_5.c b/enc/iso_8859_5.c
index a4e860db14..5d67639f5e 100644
--- a/enc/iso_8859_5.c
+++ b/enc/iso_8859_5.c
@@ -209,7 +209,6 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
flag, p, end, items);
}
-#ifdef ONIG_CASE_MAPPING
static int
case_map (OnigCaseFoldType* flagP, const OnigUChar** pp,
const OnigUChar* end, OnigUChar* to, OnigUChar* to_end,
@@ -241,7 +240,6 @@ case_map (OnigCaseFoldType* flagP, const OnigUChar** pp,
*flagP = flags;
return (int)(to-to_start);
}
-#endif /* ONIG_CASE_MAPPING */
OnigEncodingDefine(iso_8859_5, ISO_8859_5) = {
onigenc_single_byte_mbc_enc_len,
@@ -262,8 +260,6 @@ OnigEncodingDefine(iso_8859_5, ISO_8859_5) = {
onigenc_always_true_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
case_map,
-#endif /* ONIG_CASE_MAPPING */
};
ENC_ALIAS("ISO8859-5", "ISO-8859-5")
diff --git a/enc/iso_8859_6.c b/enc/iso_8859_6.c
index d0f5f0ac7f..64dc5aceac 100644
--- a/enc/iso_8859_6.c
+++ b/enc/iso_8859_6.c
@@ -95,9 +95,7 @@ OnigEncodingDefine(iso_8859_6, ISO_8859_6) = {
onigenc_always_true_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
onigenc_single_byte_ascii_only_case_map,
-#endif /* ONIG_CASE_MAPPING */
};
ENC_ALIAS("ISO8859-6", "ISO-8859-6")
diff --git a/enc/iso_8859_7.c b/enc/iso_8859_7.c
index aae9cb0c76..475fecc19c 100644
--- a/enc/iso_8859_7.c
+++ b/enc/iso_8859_7.c
@@ -205,7 +205,6 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
flag, p, end, items);
}
-#ifdef ONIG_CASE_MAPPING
static int
case_map (OnigCaseFoldType* flagP, const OnigUChar** pp,
const OnigUChar* end, OnigUChar* to, OnigUChar* to_end,
@@ -260,7 +259,6 @@ case_map (OnigCaseFoldType* flagP, const OnigUChar** pp,
*flagP = flags;
return (int)(to-to_start);
}
-#endif /* ONIG_CASE_MAPPING */
OnigEncodingDefine(iso_8859_7, ISO_8859_7) = {
onigenc_single_byte_mbc_enc_len,
@@ -281,8 +279,6 @@ OnigEncodingDefine(iso_8859_7, ISO_8859_7) = {
onigenc_always_true_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
case_map,
-#endif /* ONIG_CASE_MAPPING */
};
ENC_ALIAS("ISO8859-7", "ISO-8859-7")
diff --git a/enc/iso_8859_8.c b/enc/iso_8859_8.c
index 9821eec07c..4777762849 100644
--- a/enc/iso_8859_8.c
+++ b/enc/iso_8859_8.c
@@ -95,9 +95,7 @@ OnigEncodingDefine(iso_8859_8, ISO_8859_8) = {
onigenc_always_true_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
onigenc_single_byte_ascii_only_case_map,
-#endif /* ONIG_CASE_MAPPING */
};
ENC_ALIAS("ISO8859-8", "ISO-8859-8")
diff --git a/enc/iso_8859_9.c b/enc/iso_8859_9.c
index 5b80ebe0fe..064a04d480 100644
--- a/enc/iso_8859_9.c
+++ b/enc/iso_8859_9.c
@@ -213,7 +213,6 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
flag, p, end, items);
}
-#ifdef ONIG_CASE_MAPPING
#define DOTLESS_i (0xFD)
#define I_WITH_DOT_ABOVE (0xDD)
static int
@@ -265,7 +264,6 @@ case_map (OnigCaseFoldType* flagP, const OnigUChar** pp,
*flagP = flags;
return (int)(to-to_start);
}
-#endif /* ONIG_CASE_MAPPING */
OnigEncodingDefine(iso_8859_9, ISO_8859_9) = {
onigenc_single_byte_mbc_enc_len,
@@ -286,8 +284,6 @@ OnigEncodingDefine(iso_8859_9, ISO_8859_9) = {
onigenc_always_true_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
case_map,
-#endif /* ONIG_CASE_MAPPING */
};
ENC_ALIAS("ISO8859-9", "ISO-8859-9")
diff --git a/enc/koi8_r.c b/enc/koi8_r.c
index 68813b4781..a3c05cd27b 100644
--- a/enc/koi8_r.c
+++ b/enc/koi8_r.c
@@ -216,9 +216,7 @@ OnigEncodingDefine(koi8_r, KOI8_R) = {
onigenc_always_true_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
onigenc_single_byte_ascii_only_case_map,
-#endif /* ONIG_CASE_MAPPING */
};
ENC_ALIAS("CP878", "KOI8-R")
diff --git a/enc/koi8_u.c b/enc/koi8_u.c
index 8f5b132958..f97d74d3f0 100644
--- a/enc/koi8_u.c
+++ b/enc/koi8_u.c
@@ -220,7 +220,5 @@ OnigEncodingDefine(koi8_u, KOI8_U) = {
onigenc_always_true_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
onigenc_single_byte_ascii_only_case_map,
-#endif /* ONIG_CASE_MAPPING */
};
diff --git a/enc/shift_jis.c b/enc/shift_jis.c
index ab180d5f10..c1552bfd13 100644
--- a/enc/shift_jis.c
+++ b/enc/shift_jis.c
@@ -565,9 +565,7 @@ OnigEncodingDefine(shift_jis, Shift_JIS) = {
is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
onigenc_ascii_only_case_map,
-#endif /* ONIG_CASE_MAPPING */
};
/*
* Name: Shift_JIS
diff --git a/enc/unicode.c b/enc/unicode.c
index ab91bca829..e72b2e64b2 100644
--- a/enc/unicode.c
+++ b/enc/unicode.c
@@ -137,7 +137,6 @@ code3_equal(const OnigCodePoint *x, const OnigCodePoint *y)
return 1;
}
-#ifdef ONIG_CASE_MAPPING
/* macros related to ONIGENC_CASE flags */
/* defined here because not used in other files */
#define ONIGENC_CASE_SPECIALS (ONIGENC_CASE_TITLECASE|ONIGENC_CASE_IS_TITLECASE|ONIGENC_CASE_UP_SPECIAL|ONIGENC_CASE_DOWN_SPECIAL)
@@ -162,11 +161,9 @@ code3_equal(const OnigCodePoint *x, const OnigCodePoint *y)
#define IT ONIGENC_CASE_IS_TITLECASE
#define I(n) OnigSpecialIndexEncode(n)
#define L(n) SpecialsLengthEncode(n)
-#endif /* ONIG_CASE_MAPPING */
#include "casefold.h"
-#ifdef ONIG_CASE_MAPPING
#undef U
#undef D
#undef F
@@ -176,7 +173,6 @@ code3_equal(const OnigCodePoint *x, const OnigCodePoint *y)
#undef IT
#undef I
#undef L
-#endif /* ONIG_CASE_MAPPING */
#include "name2ctype.h"
@@ -655,8 +651,6 @@ onigenc_unicode_get_case_fold_codes_by_str(OnigEncoding enc,
return n;
}
-#ifdef ONIG_CASE_MAPPING
-
/* length in bytes for three characters in UTF-32; e.g. needed for ffi (U+FB03) */
#define CASE_MAPPING_SLACK 12
#define MODIFIED (flags |= ONIGENC_CASE_MODIFIED)
@@ -799,8 +793,6 @@ onigenc_unicode_case_map(OnigCaseFoldType* flagP,
return (int)(to-to_start);
}
-#endif /* ONIG_CASE_MAPPING */
-
#if 0
const char onigenc_unicode_version_string[] =
#ifdef ONIG_UNICODE_VERSION_STRING
diff --git a/enc/us_ascii.c b/enc/us_ascii.c
index 15b7beee04..cf835e6538 100644
--- a/enc/us_ascii.c
+++ b/enc/us_ascii.c
@@ -31,9 +31,7 @@ OnigEncodingDefine(us_ascii, US_ASCII) = {
onigenc_always_true_is_allowed_reverse_match,
ENCINDEX_US_ASCII,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
onigenc_single_byte_ascii_only_case_map,
-#endif /* ONIG_CASE_MAPPING */
};
ENC_ALIAS("ASCII", "US-ASCII")
ENC_ALIAS("ANSI_X3.4-1968", "US-ASCII")
diff --git a/enc/utf_16be.c b/enc/utf_16be.c
index 526774ffbb..e8b97983bf 100644
--- a/enc/utf_16be.c
+++ b/enc/utf_16be.c
@@ -251,8 +251,6 @@ OnigEncodingDefine(utf_16be, UTF_16BE) = {
onigenc_always_false_is_allowed_reverse_match,
0,
ONIGENC_FLAG_UNICODE,
-#ifdef ONIG_CASE_MAPPING
onigenc_unicode_case_map,
-#endif /* ONIG_CASE_MAPPING */
};
ENC_ALIAS("UCS-2BE", "UTF-16BE")
diff --git a/enc/utf_16le.c b/enc/utf_16le.c
index 78186e6279..67ec2ad178 100644
--- a/enc/utf_16le.c
+++ b/enc/utf_16le.c
@@ -244,7 +244,5 @@ OnigEncodingDefine(utf_16le, UTF_16LE) = {
onigenc_always_false_is_allowed_reverse_match,
0,
ONIGENC_FLAG_UNICODE,
-#ifdef ONIG_CASE_MAPPING
onigenc_unicode_case_map,
-#endif /* ONIG_CASE_MAPPING */
};
diff --git a/enc/utf_32be.c b/enc/utf_32be.c
index 059a33fea6..a57b854674 100644
--- a/enc/utf_32be.c
+++ b/enc/utf_32be.c
@@ -189,9 +189,7 @@ OnigEncodingDefine(utf_32be, UTF_32BE) = {
onigenc_always_false_is_allowed_reverse_match,
0,
ONIGENC_FLAG_UNICODE,
-#ifdef ONIG_CASE_MAPPING
onigenc_unicode_case_map,
-#endif /* ONIG_CASE_MAPPING */
};
ENC_ALIAS("UCS-4BE", "UTF-32BE")
diff --git a/enc/utf_32le.c b/enc/utf_32le.c
index 27d8239d68..c48089d6ed 100644
--- a/enc/utf_32le.c
+++ b/enc/utf_32le.c
@@ -189,8 +189,6 @@ OnigEncodingDefine(utf_32le, UTF_32LE) = {
onigenc_always_false_is_allowed_reverse_match,
0,
ONIGENC_FLAG_UNICODE,
-#ifdef ONIG_CASE_MAPPING
onigenc_unicode_case_map,
-#endif /* ONIG_CASE_MAPPING */
};
ENC_ALIAS("UCS-4LE", "UTF-32LE")
diff --git a/enc/utf_8.c b/enc/utf_8.c
index 5766d04d57..862b13fd9b 100644
--- a/enc/utf_8.c
+++ b/enc/utf_8.c
@@ -430,9 +430,7 @@ OnigEncodingDefine(utf_8, UTF_8) = {
onigenc_always_true_is_allowed_reverse_match,
ENCINDEX_UTF_8,
ONIGENC_FLAG_UNICODE,
-#ifdef ONIG_CASE_MAPPING
onigenc_unicode_case_map,
-#endif /* ONIG_CASE_MAPPING */
};
ENC_ALIAS("CP65001", "UTF-8")
diff --git a/enc/windows_1250.c b/enc/windows_1250.c
index 18152b51b3..aed293b4ed 100644
--- a/enc/windows_1250.c
+++ b/enc/windows_1250.c
@@ -208,9 +208,7 @@ OnigEncodingDefine(windows_1250, Windows_1250) = {
onigenc_always_true_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
onigenc_single_byte_ascii_only_case_map,
-#endif /* ONIG_CASE_MAPPING */
};
/*
* Name: windows-1250
diff --git a/enc/windows_1251.c b/enc/windows_1251.c
index 7d5732c3b8..b9675cfd8e 100644
--- a/enc/windows_1251.c
+++ b/enc/windows_1251.c
@@ -199,9 +199,7 @@ OnigEncodingDefine(windows_1251, Windows_1251) = {
onigenc_always_true_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
onigenc_single_byte_ascii_only_case_map,
-#endif /* ONIG_CASE_MAPPING */
};
/*
* Name: windows-1251
diff --git a/enc/windows_1252.c b/enc/windows_1252.c
index afe9161ebe..4427f8e31e 100644
--- a/enc/windows_1252.c
+++ b/enc/windows_1252.c
@@ -180,7 +180,7 @@ cp1252_get_case_fold_codes_by_str(OnigCaseFoldType flag,
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
flag, p, end, items);
}
-#ifdef ONIG_CASE_MAPPING
+
static int
case_map(OnigCaseFoldType* flagP, const OnigUChar** pp,
const OnigUChar* end, OnigUChar* to, OnigUChar* to_end,
@@ -227,7 +227,6 @@ case_map(OnigCaseFoldType* flagP, const OnigUChar** pp,
*flagP = flags;
return (int)(to-to_start);
}
-#endif /* ONIG_CASE_MAPPING */
OnigEncodingDefine(windows_1252, Windows_1252) = {
onigenc_single_byte_mbc_enc_len,
@@ -248,9 +247,7 @@ OnigEncodingDefine(windows_1252, Windows_1252) = {
onigenc_always_true_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
case_map,
-#endif /* ONIG_CASE_MAPPING */
};
/*
* Name: windows-1252
diff --git a/enc/windows_1253.c b/enc/windows_1253.c
index 4b139d1028..cd2987f588 100644
--- a/enc/windows_1253.c
+++ b/enc/windows_1253.c
@@ -233,8 +233,6 @@ OnigEncodingDefine(windows_1253, Windows_1253) = {
onigenc_always_true_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
onigenc_single_byte_ascii_only_case_map,
-#endif /* ONIG_CASE_MAPPING */
};
ENC_ALIAS("CP1253", "Windows-1253")
diff --git a/enc/windows_1254.c b/enc/windows_1254.c
index e1806f0a6c..466041974d 100644
--- a/enc/windows_1254.c
+++ b/enc/windows_1254.c
@@ -240,8 +240,6 @@ OnigEncodingDefine(windows_1254, Windown_1254) = {
onigenc_always_true_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
onigenc_single_byte_ascii_only_case_map,
-#endif /* ONIG_CASE_MAPPING */
};
ENC_ALIAS("CP1254", "Windows-1254")
diff --git a/enc/windows_1257.c b/enc/windows_1257.c
index 7025a144b7..557d4c00d7 100644
--- a/enc/windows_1257.c
+++ b/enc/windows_1257.c
@@ -244,9 +244,7 @@ OnigEncodingDefine(windows_1257, Windows_1257) = {
onigenc_always_true_is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
onigenc_single_byte_ascii_only_case_map,
-#endif /* ONIG_CASE_MAPPING */
};
ENC_ALIAS("CP1257", "Windows-1257")
diff --git a/enc/windows_31j.c b/enc/windows_31j.c
index e4ce906126..71836c1f13 100644
--- a/enc/windows_31j.c
+++ b/enc/windows_31j.c
@@ -50,9 +50,7 @@ OnigEncodingDefine(windows_31j, Windows_31J) = {
is_allowed_reverse_match,
0,
ONIGENC_FLAG_NONE,
-#ifdef ONIG_CASE_MAPPING
onigenc_ascii_only_case_map,
-#endif /* ONIG_CASE_MAPPING */
};
/*
* Name: Windows-31J