summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-11 02:24:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-11 02:24:38 +0000
commit2d2b6460f48f82bdf7bee6a396293e2dc942e1a9 (patch)
treee6f0a380dc82137befc25919aef78ddf6a66c127
parent9fa8b80550d2af9309d2f493138c21969711bf60 (diff)
iso_8859.h: SHARP_s
* enc/iso_8859.h (SHARP_s): name frequently used codepoint. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--enc/depend14
-rw-r--r--enc/iso_8859.h1
-rw-r--r--enc/iso_8859_1.c13
-rw-r--r--enc/iso_8859_10.c5
-rw-r--r--enc/iso_8859_13.c5
-rw-r--r--enc/iso_8859_14.c5
-rw-r--r--enc/iso_8859_15.c5
-rw-r--r--enc/iso_8859_16.c5
-rw-r--r--enc/iso_8859_2.c5
-rw-r--r--enc/iso_8859_3.c5
-rw-r--r--enc/iso_8859_4.c5
-rw-r--r--enc/iso_8859_9.c5
-rw-r--r--enc/utf_16be.c3
-rw-r--r--enc/utf_16le.c3
-rw-r--r--enc/utf_32be.c3
-rw-r--r--enc/utf_32le.c3
17 files changed, 61 insertions, 28 deletions
diff --git a/ChangeLog b/ChangeLog
index 922a704fce1..acf0d73a0c0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sat Jun 11 11:24:36 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * enc/iso_8859.h (SHARP_s): name frequently used codepoint.
+
Sat Jun 11 09:58:45 2016 Martin Duerst <duerst@it.aoyama.ac.jp>
* enc/iso_8859_1.c: Revert to older version of code.
diff --git a/enc/depend b/enc/depend
index 97374a5faf7..48a7cb0128f 100644
--- a/enc/depend
+++ b/enc/depend
@@ -272,12 +272,14 @@ enc/gbk.$(OBJEXT): oniguruma.h
enc/iso_8859_1.$(OBJEXT): $(top_srcdir)/regenc.h
enc/iso_8859_1.$(OBJEXT): config.h
enc/iso_8859_1.$(OBJEXT): defines.h
+enc/iso_8859_1.$(OBJEXT): enc/iso_8859.h
enc/iso_8859_1.$(OBJEXT): enc/iso_8859_1.c
enc/iso_8859_1.$(OBJEXT): missing.h
enc/iso_8859_1.$(OBJEXT): oniguruma.h
enc/iso_8859_10.$(OBJEXT): $(top_srcdir)/regenc.h
enc/iso_8859_10.$(OBJEXT): config.h
enc/iso_8859_10.$(OBJEXT): defines.h
+enc/iso_8859_10.$(OBJEXT): enc/iso_8859.h
enc/iso_8859_10.$(OBJEXT): enc/iso_8859_10.c
enc/iso_8859_10.$(OBJEXT): missing.h
enc/iso_8859_10.$(OBJEXT): oniguruma.h
@@ -290,42 +292,49 @@ enc/iso_8859_11.$(OBJEXT): oniguruma.h
enc/iso_8859_13.$(OBJEXT): $(top_srcdir)/regenc.h
enc/iso_8859_13.$(OBJEXT): config.h
enc/iso_8859_13.$(OBJEXT): defines.h
+enc/iso_8859_13.$(OBJEXT): enc/iso_8859.h
enc/iso_8859_13.$(OBJEXT): enc/iso_8859_13.c
enc/iso_8859_13.$(OBJEXT): missing.h
enc/iso_8859_13.$(OBJEXT): oniguruma.h
enc/iso_8859_14.$(OBJEXT): $(top_srcdir)/regenc.h
enc/iso_8859_14.$(OBJEXT): config.h
enc/iso_8859_14.$(OBJEXT): defines.h
+enc/iso_8859_14.$(OBJEXT): enc/iso_8859.h
enc/iso_8859_14.$(OBJEXT): enc/iso_8859_14.c
enc/iso_8859_14.$(OBJEXT): missing.h
enc/iso_8859_14.$(OBJEXT): oniguruma.h
enc/iso_8859_15.$(OBJEXT): $(top_srcdir)/regenc.h
enc/iso_8859_15.$(OBJEXT): config.h
enc/iso_8859_15.$(OBJEXT): defines.h
+enc/iso_8859_15.$(OBJEXT): enc/iso_8859.h
enc/iso_8859_15.$(OBJEXT): enc/iso_8859_15.c
enc/iso_8859_15.$(OBJEXT): missing.h
enc/iso_8859_15.$(OBJEXT): oniguruma.h
enc/iso_8859_16.$(OBJEXT): $(top_srcdir)/regenc.h
enc/iso_8859_16.$(OBJEXT): config.h
enc/iso_8859_16.$(OBJEXT): defines.h
+enc/iso_8859_16.$(OBJEXT): enc/iso_8859.h
enc/iso_8859_16.$(OBJEXT): enc/iso_8859_16.c
enc/iso_8859_16.$(OBJEXT): missing.h
enc/iso_8859_16.$(OBJEXT): oniguruma.h
enc/iso_8859_2.$(OBJEXT): $(top_srcdir)/regenc.h
enc/iso_8859_2.$(OBJEXT): config.h
enc/iso_8859_2.$(OBJEXT): defines.h
+enc/iso_8859_2.$(OBJEXT): enc/iso_8859.h
enc/iso_8859_2.$(OBJEXT): enc/iso_8859_2.c
enc/iso_8859_2.$(OBJEXT): missing.h
enc/iso_8859_2.$(OBJEXT): oniguruma.h
enc/iso_8859_3.$(OBJEXT): $(top_srcdir)/regenc.h
enc/iso_8859_3.$(OBJEXT): config.h
enc/iso_8859_3.$(OBJEXT): defines.h
+enc/iso_8859_3.$(OBJEXT): enc/iso_8859.h
enc/iso_8859_3.$(OBJEXT): enc/iso_8859_3.c
enc/iso_8859_3.$(OBJEXT): missing.h
enc/iso_8859_3.$(OBJEXT): oniguruma.h
enc/iso_8859_4.$(OBJEXT): $(top_srcdir)/regenc.h
enc/iso_8859_4.$(OBJEXT): config.h
enc/iso_8859_4.$(OBJEXT): defines.h
+enc/iso_8859_4.$(OBJEXT): enc/iso_8859.h
enc/iso_8859_4.$(OBJEXT): enc/iso_8859_4.c
enc/iso_8859_4.$(OBJEXT): missing.h
enc/iso_8859_4.$(OBJEXT): oniguruma.h
@@ -356,6 +365,7 @@ enc/iso_8859_8.$(OBJEXT): oniguruma.h
enc/iso_8859_9.$(OBJEXT): $(top_srcdir)/regenc.h
enc/iso_8859_9.$(OBJEXT): config.h
enc/iso_8859_9.$(OBJEXT): defines.h
+enc/iso_8859_9.$(OBJEXT): enc/iso_8859.h
enc/iso_8859_9.$(OBJEXT): enc/iso_8859_9.c
enc/iso_8859_9.$(OBJEXT): missing.h
enc/iso_8859_9.$(OBJEXT): oniguruma.h
@@ -609,24 +619,28 @@ enc/us_ascii.$(OBJEXT): oniguruma.h
enc/utf_16be.$(OBJEXT): $(top_srcdir)/regenc.h
enc/utf_16be.$(OBJEXT): config.h
enc/utf_16be.$(OBJEXT): defines.h
+enc/utf_16be.$(OBJEXT): enc/iso_8859.h
enc/utf_16be.$(OBJEXT): enc/utf_16be.c
enc/utf_16be.$(OBJEXT): missing.h
enc/utf_16be.$(OBJEXT): oniguruma.h
enc/utf_16le.$(OBJEXT): $(top_srcdir)/regenc.h
enc/utf_16le.$(OBJEXT): config.h
enc/utf_16le.$(OBJEXT): defines.h
+enc/utf_16le.$(OBJEXT): enc/iso_8859.h
enc/utf_16le.$(OBJEXT): enc/utf_16le.c
enc/utf_16le.$(OBJEXT): missing.h
enc/utf_16le.$(OBJEXT): oniguruma.h
enc/utf_32be.$(OBJEXT): $(top_srcdir)/regenc.h
enc/utf_32be.$(OBJEXT): config.h
enc/utf_32be.$(OBJEXT): defines.h
+enc/utf_32be.$(OBJEXT): enc/iso_8859.h
enc/utf_32be.$(OBJEXT): enc/utf_32be.c
enc/utf_32be.$(OBJEXT): missing.h
enc/utf_32be.$(OBJEXT): oniguruma.h
enc/utf_32le.$(OBJEXT): $(top_srcdir)/regenc.h
enc/utf_32le.$(OBJEXT): config.h
enc/utf_32le.$(OBJEXT): defines.h
+enc/utf_32le.$(OBJEXT): enc/iso_8859.h
enc/utf_32le.$(OBJEXT): enc/utf_32le.c
enc/utf_32le.$(OBJEXT): missing.h
enc/utf_32le.$(OBJEXT): oniguruma.h
diff --git a/enc/iso_8859.h b/enc/iso_8859.h
new file mode 100644
index 00000000000..0ec14686616
--- /dev/null
+++ b/enc/iso_8859.h
@@ -0,0 +1 @@
+#define SHARP_s 0xdf
diff --git a/enc/iso_8859_1.c b/enc/iso_8859_1.c
index 0c8c095b7c0..634dd15ee3c 100644
--- a/enc/iso_8859_1.c
+++ b/enc/iso_8859_1.c
@@ -28,6 +28,7 @@
*/
#include "regenc.h"
+#include "iso_8859.h"
#define ENC_IS_ISO_8859_1_CTYPE(code,ctype) \
((EncISO_8859_1_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
@@ -125,7 +126,7 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
&& (*(p+1) == 0x53 || *(p+1) == 0x73)) { /* SS */
items[1].byte_len = 2;
items[1].code_len = 1;
- items[1].code[0] = (OnigCodePoint )0xdf;
+ items[1].code[0] = (OnigCodePoint )SHARP_s;
return 2;
}
else
@@ -139,7 +140,7 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
&& (*(p+1) == 0x73 || *(p+1) == 0x53)) { /* ss */
items[1].byte_len = 2;
items[1].code_len = 1;
- items[1].code[0] = (OnigCodePoint )0xdf;
+ items[1].code[0] = (OnigCodePoint )SHARP_s;
return 2;
}
else
@@ -152,7 +153,7 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
return 1;
}
else if (0xd0 <= *p && *p <= 0xdf) {
- if (*p == 0xdf) {
+ if (*p == SHARP_s) {
items[0].byte_len = 1;
items[0].code_len = 2;
items[0].code[0] = (OnigCodePoint )'s';
@@ -206,7 +207,7 @@ mbc_case_fold(OnigCaseFoldType flag, const UChar** pp, const UChar* end ARG_UNUS
{
const UChar* p = *pp;
- if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
*lower++ = 's';
*lower = 's';
(*pp)++;
@@ -226,7 +227,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag,
int v;
const UChar* p = *pp;
- if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
(*pp)++;
return TRUE;
}
@@ -266,7 +267,7 @@ case_map (OnigCaseFoldType* flagP, const OnigUChar** pp,
while (*pp<end && to<to_end) {
code = *(*pp)++;
- if (code==0xdf) { /* sharp s */
+ if (code==SHARP_s) {
if (flags&ONIGENC_CASE_UPCASE) {
flags |= ONIGENC_CASE_MODIFIED;
*to++ = 'S';
diff --git a/enc/iso_8859_10.c b/enc/iso_8859_10.c
index 014e1d2c7a6..4bebcb5dd1e 100644
--- a/enc/iso_8859_10.c
+++ b/enc/iso_8859_10.c
@@ -28,6 +28,7 @@
*/
#include "regenc.h"
+#include "iso_8859.h"
#define ENC_ISO_8859_10_TO_LOWER_CASE(c) EncISO_8859_10_ToLowerCaseTable[c]
#define ENC_IS_ISO_8859_10_CTYPE(code,ctype) \
@@ -110,7 +111,7 @@ mbc_case_fold(OnigCaseFoldType flag,
{
const UChar* p = *pp;
- if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
*lower++ = 's';
*lower = 's';
(*pp)++;
@@ -129,7 +130,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
int v;
const UChar* p = *pp;
- if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
(*pp)++;
return TRUE;
}
diff --git a/enc/iso_8859_13.c b/enc/iso_8859_13.c
index 492f7b2b539..9c7bdc6f6fd 100644
--- a/enc/iso_8859_13.c
+++ b/enc/iso_8859_13.c
@@ -28,6 +28,7 @@
*/
#include "regenc.h"
+#include "iso_8859.h"
#define ENC_ISO_8859_13_TO_LOWER_CASE(c) EncISO_8859_13_ToLowerCaseTable[c]
#define ENC_IS_ISO_8859_13_CTYPE(code,ctype) \
@@ -110,7 +111,7 @@ mbc_case_fold(OnigCaseFoldType flag,
{
const UChar* p = *pp;
- if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
*lower++ = 's';
*lower = 's';
(*pp)++;
@@ -129,7 +130,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
int v;
const UChar* p = *pp;
- if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
(*pp)++;
return TRUE;
}
diff --git a/enc/iso_8859_14.c b/enc/iso_8859_14.c
index 70b326742d7..bfe374b6080 100644
--- a/enc/iso_8859_14.c
+++ b/enc/iso_8859_14.c
@@ -28,6 +28,7 @@
*/
#include "regenc.h"
+#include "iso_8859.h"
#define ENC_ISO_8859_14_TO_LOWER_CASE(c) EncISO_8859_14_ToLowerCaseTable[c]
#define ENC_IS_ISO_8859_14_CTYPE(code,ctype) \
@@ -110,7 +111,7 @@ mbc_case_fold(OnigCaseFoldType flag,
{
const UChar* p = *pp;
- if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
*lower++ = 's';
*lower = 's';
(*pp)++;
@@ -130,7 +131,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag,
int v;
const UChar* p = *pp;
- if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
(*pp)++;
return TRUE;
}
diff --git a/enc/iso_8859_15.c b/enc/iso_8859_15.c
index c36429c4be1..75adcafbd27 100644
--- a/enc/iso_8859_15.c
+++ b/enc/iso_8859_15.c
@@ -28,6 +28,7 @@
*/
#include "regenc.h"
+#include "iso_8859.h"
#define ENC_ISO_8859_15_TO_LOWER_CASE(c) EncISO_8859_15_ToLowerCaseTable[c]
#define ENC_IS_ISO_8859_15_CTYPE(code,ctype) \
@@ -110,7 +111,7 @@ mbc_case_fold(OnigCaseFoldType flag,
{
const UChar* p = *pp;
- if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
*lower++ = 's';
*lower = 's';
(*pp)++;
@@ -130,7 +131,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag,
int v;
const UChar* p = *pp;
- if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
(*pp)++;
return TRUE;
}
diff --git a/enc/iso_8859_16.c b/enc/iso_8859_16.c
index e5af1e8765b..7e04403872f 100644
--- a/enc/iso_8859_16.c
+++ b/enc/iso_8859_16.c
@@ -28,6 +28,7 @@
*/
#include "regenc.h"
+#include "iso_8859.h"
#define ENC_ISO_8859_16_TO_LOWER_CASE(c) EncISO_8859_16_ToLowerCaseTable[c]
#define ENC_IS_ISO_8859_16_CTYPE(code,ctype) \
@@ -110,7 +111,7 @@ mbc_case_fold(OnigCaseFoldType flag,
{
const UChar* p = *pp;
- if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
*lower++ = 's';
*lower = 's';
(*pp)++;
@@ -129,7 +130,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
int v;
const UChar* p = *pp;
- if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
(*pp)++;
return TRUE;
}
diff --git a/enc/iso_8859_2.c b/enc/iso_8859_2.c
index 77e7fd6a676..4322754da26 100644
--- a/enc/iso_8859_2.c
+++ b/enc/iso_8859_2.c
@@ -28,6 +28,7 @@
*/
#include "regenc.h"
+#include "iso_8859.h"
#define ENC_ISO_8859_2_TO_LOWER_CASE(c) EncISO_8859_2_ToLowerCaseTable[c]
#define ENC_IS_ISO_8859_2_CTYPE(code,ctype) \
@@ -110,7 +111,7 @@ mbc_case_fold(OnigCaseFoldType flag,
{
const UChar* p = *pp;
- if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
*lower++ = 's';
*lower = 's';
(*pp)++;
@@ -129,7 +130,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
int v;
const UChar* p = *pp;
- if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
(*pp)++;
return TRUE;
}
diff --git a/enc/iso_8859_3.c b/enc/iso_8859_3.c
index 83e3fac1a10..e6dee1042a1 100644
--- a/enc/iso_8859_3.c
+++ b/enc/iso_8859_3.c
@@ -28,6 +28,7 @@
*/
#include "regenc.h"
+#include "iso_8859.h"
#define ENC_ISO_8859_3_TO_LOWER_CASE(c) EncISO_8859_3_ToLowerCaseTable[c]
#define ENC_IS_ISO_8859_3_CTYPE(code,ctype) \
@@ -110,7 +111,7 @@ mbc_case_fold(OnigCaseFoldType flag,
{
const UChar* p = *pp;
- if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
*lower++ = 's';
*lower = 's';
(*pp)++;
@@ -129,7 +130,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
int v;
const UChar* p = *pp;
- if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
(*pp)++;
return TRUE;
}
diff --git a/enc/iso_8859_4.c b/enc/iso_8859_4.c
index b3d0b7f3131..30041d1b623 100644
--- a/enc/iso_8859_4.c
+++ b/enc/iso_8859_4.c
@@ -28,6 +28,7 @@
*/
#include "regenc.h"
+#include "iso_8859.h"
#define ENC_ISO_8859_4_TO_LOWER_CASE(c) EncISO_8859_4_ToLowerCaseTable[c]
#define ENC_IS_ISO_8859_4_CTYPE(code,ctype) \
@@ -110,7 +111,7 @@ mbc_case_fold(OnigCaseFoldType flag,
{
const UChar* p = *pp;
- if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
*lower++ = 's';
*lower = 's';
(*pp)++;
@@ -129,7 +130,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
int v;
const UChar* p = *pp;
- if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
(*pp)++;
return TRUE;
}
diff --git a/enc/iso_8859_9.c b/enc/iso_8859_9.c
index 6303c857325..9beb4f68e6f 100644
--- a/enc/iso_8859_9.c
+++ b/enc/iso_8859_9.c
@@ -28,6 +28,7 @@
*/
#include "regenc.h"
+#include "iso_8859.h"
#define ENC_ISO_8859_9_TO_LOWER_CASE(c) EncISO_8859_9_ToLowerCaseTable[c]
#define ENC_IS_ISO_8859_9_CTYPE(code,ctype) \
@@ -110,7 +111,7 @@ mbc_case_fold(OnigCaseFoldType flag,
{
const UChar* p = *pp;
- if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
*lower++ = 's';
*lower = 's';
(*pp)++;
@@ -129,7 +130,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
int v;
const UChar* p = *pp;
- if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
(*pp)++;
return TRUE;
}
diff --git a/enc/utf_16be.c b/enc/utf_16be.c
index 6bf7d80ae2b..526774ffbb8 100644
--- a/enc/utf_16be.c
+++ b/enc/utf_16be.c
@@ -28,6 +28,7 @@
*/
#include "regenc.h"
+#include "iso_8859.h"
#if 0
static const int EncLen_UTF16[] = {
@@ -183,7 +184,7 @@ utf16be_is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* e
int c, v;
p++;
- if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
return TRUE;
}
diff --git a/enc/utf_16le.c b/enc/utf_16le.c
index a4bb6f7931c..78186e62797 100644
--- a/enc/utf_16le.c
+++ b/enc/utf_16le.c
@@ -28,6 +28,7 @@
*/
#include "regenc.h"
+#include "iso_8859.h"
#if 0
static const int EncLen_UTF16[] = {
@@ -177,7 +178,7 @@ utf16le_is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp,
if (*(p+1) == 0) {
int c, v;
- if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
return TRUE;
}
diff --git a/enc/utf_32be.c b/enc/utf_32be.c
index b37e961e179..059a33fea63 100644
--- a/enc/utf_32be.c
+++ b/enc/utf_32be.c
@@ -28,6 +28,7 @@
*/
#include "regenc.h"
+#include "iso_8859.h"
static int
utf32be_mbc_enc_len(const UChar* p ARG_UNUSED, const OnigUChar* e ARG_UNUSED,
@@ -126,7 +127,7 @@ utf32be_is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* e
int c, v;
p += 3;
- if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
return TRUE;
}
diff --git a/enc/utf_32le.c b/enc/utf_32le.c
index 901e5444183..27d8239d683 100644
--- a/enc/utf_32le.c
+++ b/enc/utf_32le.c
@@ -28,6 +28,7 @@
*/
#include "regenc.h"
+#include "iso_8859.h"
static int
utf32le_mbc_enc_len(const UChar* p ARG_UNUSED, const OnigUChar* e ARG_UNUSED,
@@ -126,7 +127,7 @@ utf32le_is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* e
if (*(p+1) == 0 && *(p+2) == 0 && *(p+3) == 0) {
int c, v;
- if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
return TRUE;
}