summaryrefslogtreecommitdiff
path: root/src/utf8.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-08-06 19:01:50 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-08-06 19:01:50 +0200
commit135c50090630219710f17c941d0b666f4c9b781a (patch)
treed1826d06007eada060d3337dcd4c15f7261d5a9a /src/utf8.c
parent7b5e329d3262d9ecde45a41826f1d103758599e8 (diff)
parentac077032be00edc79afc21983f50bc1cdf9af907 (diff)
Updated version 6.5.0 from 'upstream/6.5.0'
with Debian dir 0e7974378beb3a0e210f76683af960dea205a2e9
Diffstat (limited to 'src/utf8.c')
-rw-r--r--src/utf8.c41
1 files changed, 3 insertions, 38 deletions
diff --git a/src/utf8.c b/src/utf8.c
index 219b7ea..1ad9653 100644
--- a/src/utf8.c
+++ b/src/utf8.c
@@ -90,6 +90,7 @@ is_valid_mbc_string(const UChar* p, const UChar* end)
return TRUE;
}
+#if 0
static int
is_mbc_newline(const UChar* p, const UChar* end)
{
@@ -114,6 +115,7 @@ is_mbc_newline(const UChar* p, const UChar* end)
return 0;
}
+#endif
static OnigCodePoint
mbc_to_code(const UChar* p, const UChar* end)
@@ -246,43 +248,6 @@ mbc_case_fold(OnigCaseFoldType flag, const UChar** pp,
}
}
-#if 0
-static int
-is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
-{
- const UChar* p = *pp;
-
- if (ONIGENC_IS_MBC_ASCII(p)) {
- (*pp)++;
- return ONIGENC_IS_ASCII_CODE_CASE_AMBIG(*p);
- }
- else {
- (*pp) += enclen(ONIG_ENCODING_UTF8, p);
-
- if (*p == 0xc3) {
- int c = *(p + 1);
- if (c >= 0x80) {
- if (c <= (UChar )0x9e) { /* upper */
- if (c == (UChar )0x97) return FALSE;
- return TRUE;
- }
- else if (c >= (UChar )0xa0 && c <= (UChar )0xbe) { /* lower */
- if (c == (UChar )'\267') return FALSE;
- return TRUE;
- }
- else if (c == (UChar )0x9f &&
- (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
- return TRUE;
- }
- }
- }
- }
-
- return FALSE;
-}
-#endif
-
-
static int
get_ctype_code_range(OnigCtype ctype, OnigCodePoint *sb_out,
const OnigCodePoint* ranges[])
@@ -317,7 +282,7 @@ OnigEncodingType OnigEncodingUTF8 = {
"UTF-8", /* name */
6, /* max byte length */
1, /* min byte length */
- is_mbc_newline,
+ onigenc_is_mbc_newline_0x0a,
mbc_to_code,
code_to_mbclen,
code_to_mbc,