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

* 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
This commit is contained in:
duerst 2016-07-24 07:33:15 +00:00
parent 250139662e
commit 6ed393ad89
45 changed files with 17 additions and 143 deletions

View file

@ -1,3 +1,12 @@
Sun Jul 24 16:33:13 2016 Martin Duerst <duerst@it.aoyama.ac.jp>
* 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].
Sun Jul 24 12:53:42 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org>
* doc/maintainers.rdoc: xmlrpc is bundled gem from Ruby 2.4.

View file

@ -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")

View file

@ -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 */
};

View file

@ -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

View file

@ -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")

View file

@ -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

View file

@ -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")

View file

@ -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")

View file

@ -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 */
};

View file

@ -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

View file

@ -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")

View file

@ -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")

View file

@ -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")

View file

@ -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")

View file

@ -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")

View file

@ -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")

View file

@ -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")

View file

@ -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")

View file

@ -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")

View file

@ -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")

View file

@ -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")

View file

@ -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")

View file

@ -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")

View file

@ -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")

View file

@ -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")

View file

@ -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")

View file

@ -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 */
};

View file

@ -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

View file

@ -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

View file

@ -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")

View file

@ -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")

View file

@ -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 */
};

View file

@ -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")

View file

@ -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")

View file

@ -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")

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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")

View file

@ -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")

View file

@ -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")

View file

@ -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

View file

@ -128,20 +128,15 @@ typedef unsigned int OnigCaseFoldType; /* case fold flag */
ONIG_EXTERN OnigCaseFoldType OnigDefaultCaseFoldFlag;
#define ONIG_CASE_MAPPING
#ifdef ONIG_CASE_MAPPING
/* bits for actual code point count; 3 bits is more than enough, currently only 2 used */
#define OnigCodePointMaskWidth 3
#define OnigCodePointMask ((1<<OnigCodePointMaskWidth)-1)
#define OnigCodePointCount(n) ((n)&OnigCodePointMask)
#define OnigCaseFoldFlags(n) ((n)&~OnigCodePointMask)
#endif /* ONIG_CASE_MAPPING */
/* #define ONIGENC_CASE_FOLD_HIRAGANA_KATAKANA (1<<1) */ /* no longer usable with these values! */
/* #define ONIGENC_CASE_FOLD_KATAKANA_WIDTH (1<<2) */ /* no longer usable with these values! */
#ifdef ONIG_CASE_MAPPING
/* bits for index into table with separate titlecase mappings */
/* 10 bits provide 1024 values */
#define OnigSpecialIndexShift 3
@ -155,15 +150,12 @@ ONIG_EXTERN OnigCaseFoldType OnigDefaultCaseFoldFlag;
#define ONIGENC_CASE_DOWN_SPECIAL (1<<17) /* has special downcase mapping */
#define ONIGENC_CASE_MODIFIED (1<<18) /* data has been modified */
#define ONIGENC_CASE_FOLD (1<<19) /* has/needs case folding */
#endif /* ONIG_CASE_MAPPING */
#define ONIGENC_CASE_FOLD_TURKISH_AZERI (1<<20) /* needs mapping specific to Turkic languages; better not change original value! */
#ifdef ONIG_CASE_MAPPING
#define ONIGENC_CASE_FOLD_LITHUANIAN (1<<21) /* needs Lithuanian-specific mapping */
#define ONIGENC_CASE_ASCII_ONLY (1<<22) /* only modify ASCII range */
#define ONIGENC_CASE_IS_TITLECASE (1<<23) /* character itself is already titlecase */
#endif /* ONIG_CASE_MAPPING */
#define INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR (1<<30) /* better not change original value! */
@ -216,9 +208,7 @@ typedef struct OnigEncodingTypeST {
int (*is_allowed_reverse_match)(const OnigUChar* p, const OnigUChar* end, const struct OnigEncodingTypeST* enc);
int ruby_encoding_index;
unsigned int flags;
#ifdef ONIG_CASE_MAPPING
int (*case_map)(OnigCaseFoldType* flagP, const OnigUChar** pp, const OnigUChar* end, OnigUChar* to, OnigUChar* to_end, const struct OnigEncodingTypeST* enc);
#endif /* ONIG_CASE_MAPPING */
} OnigEncodingType;
typedef const OnigEncodingType* OnigEncoding;
@ -229,13 +219,11 @@ ONIG_EXTERN const OnigEncodingType OnigEncodingASCII;
#define ONIG_ENCODING_UNDEF ((OnigEncoding )0)
#ifdef ONIG_CASE_MAPPING
/* this declaration needs to be here because it is used in string.c */
ONIG_EXTERN int onigenc_ascii_only_case_map P_((OnigCaseFoldType* flagP,
const OnigUChar** pp, const OnigUChar* end,
OnigUChar* to, OnigUChar* to_end,
const struct OnigEncodingTypeST* enc));
#endif /* ONIG_CASE_MAPPING */
/* this declaration needs to be here because it is used in string.c */
ONIG_EXTERN int onigenc_ascii_only_case_map P_((OnigCaseFoldType* flagP,
const OnigUChar** pp, const OnigUChar* end,
OnigUChar* to, OnigUChar* to_end,
const struct OnigEncodingTypeST* enc));
/* work size */

View file

@ -958,7 +958,6 @@ onigenc_property_list_init(int (*f)(void))
return r;
}
#ifdef ONIG_CASE_MAPPING
extern int
onigenc_ascii_only_case_map (OnigCaseFoldType* flagP, const OnigUChar** pp, const OnigUChar* end,
OnigUChar* to, OnigUChar* to_end, const struct OnigEncodingTypeST* enc)
@ -1010,4 +1009,3 @@ onigenc_single_byte_ascii_only_case_map (OnigCaseFoldType* flagP, const OnigUCha
*flagP = flags;
return (int)(to-to_start);
}
#endif /* ONIG_CASE_MAPPING */

View file

@ -131,10 +131,7 @@ ONIG_EXTERN int onigenc_apply_all_case_fold_with_map P_((int map_size, const Oni
ONIG_EXTERN int onigenc_get_case_fold_codes_by_str_with_map P_((int map_size, const OnigPairCaseFoldCodes map[], int ess_tsett_flag, OnigCaseFoldType flag, const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]));
CONSTFUNC(ONIG_EXTERN int onigenc_not_support_get_ctype_code_range P_((OnigCtype ctype, OnigCodePoint* sb_out, const OnigCodePoint* ranges[], OnigEncoding enc)));
PUREFUNC(ONIG_EXTERN int onigenc_is_mbc_newline_0x0a P_((const UChar* p, const UChar* end, OnigEncoding enc)));
#ifdef ONIG_CASE_MAPPING
ONIG_EXTERN int onigenc_single_byte_ascii_only_case_map P_((OnigCaseFoldType* flagP, const OnigUChar** pp, const OnigUChar* end, OnigUChar* to, OnigUChar* to_end, const struct OnigEncodingTypeST* enc));
#endif /* ONIG_CASE_MAPPING */
ONIG_EXTERN int onigenc_single_byte_ascii_only_case_map P_((OnigCaseFoldType* flagP, const OnigUChar** pp, const OnigUChar* end, OnigUChar* to, OnigUChar* to_end, const struct OnigEncodingTypeST* enc));
/* methods for single byte encoding */
@ -160,9 +157,7 @@ CONSTFUNC(ONIG_EXTERN int onigenc_mb4_code_to_mbclen P_((OnigCodePoint code, Oni
ONIG_EXTERN int onigenc_mb4_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, UChar *buf));
ONIG_EXTERN int onigenc_mb4_is_code_ctype P_((OnigEncoding enc, OnigCodePoint code, unsigned int ctype));
#ifdef ONIG_CASE_MAPPING
ONIG_EXTERN int onigenc_unicode_case_map P_((OnigCaseFoldType* flagP, const OnigUChar** pp, const OnigUChar* end, OnigUChar* to, OnigUChar* to_end, const struct OnigEncodingTypeST* enc));
#endif /* ONIG_CASE_MAPPING */
ONIG_EXTERN int onigenc_unicode_case_map P_((OnigCaseFoldType* flagP, const OnigUChar** pp, const OnigUChar* end, OnigUChar* to, OnigUChar* to_end, const struct OnigEncodingTypeST* enc));
/* in enc/unicode.c */