ruby-changes:43301
From: nobu <ko1@a...>
Date: Sat, 11 Jun 2016 11:24:43 +0900 (JST)
Subject: [ruby-changes:43301] nobu:r55375 (trunk): iso_8859.h: SHARP_s
nobu 2016-06-11 11:24:38 +0900 (Sat, 11 Jun 2016) New Revision: 55375 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55375 Log: iso_8859.h: SHARP_s * enc/iso_8859.h (SHARP_s): name frequently used codepoint. Added files: trunk/enc/iso_8859.h Modified files: trunk/ChangeLog trunk/enc/depend trunk/enc/iso_8859_1.c trunk/enc/iso_8859_10.c trunk/enc/iso_8859_13.c trunk/enc/iso_8859_14.c trunk/enc/iso_8859_15.c trunk/enc/iso_8859_16.c trunk/enc/iso_8859_2.c trunk/enc/iso_8859_3.c trunk/enc/iso_8859_4.c trunk/enc/iso_8859_9.c trunk/enc/utf_16be.c trunk/enc/utf_16le.c trunk/enc/utf_32be.c trunk/enc/utf_32le.c Index: ChangeLog =================================================================== --- ChangeLog (revision 55374) +++ ChangeLog (revision 55375) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sat Jun 11 11:24:36 2016 Nobuyoshi Nakada <nobu@r...> + + * enc/iso_8859.h (SHARP_s): name frequently used codepoint. + Sat Jun 11 09:58:45 2016 Martin Duerst <duerst@i...> * enc/iso_8859_1.c: Revert to older version of code. Index: enc/iso_8859_1.c =================================================================== --- enc/iso_8859_1.c (revision 55374) +++ enc/iso_8859_1.c (revision 55375) @@ -28,6 +28,7 @@ https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_1.c#L28 */ #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(OnigCaseFoldT https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_1.c#L126 && (*(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(OnigCaseFoldT https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_1.c#L140 && (*(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(OnigCaseFoldT https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_1.c#L153 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, con https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_1.c#L207 { 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, https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_1.c#L227 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 https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_1.c#L267 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'; Index: enc/iso_8859_2.c =================================================================== --- enc/iso_8859_2.c (revision 55374) +++ enc/iso_8859_2.c (revision 55375) @@ -28,6 +28,7 @@ https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_2.c#L28 */ #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, https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_2.c#L111 { 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, https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_2.c#L130 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; } Index: enc/iso_8859_3.c =================================================================== --- enc/iso_8859_3.c (revision 55374) +++ enc/iso_8859_3.c (revision 55375) @@ -28,6 +28,7 @@ https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_3.c#L28 */ #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, https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_3.c#L111 { 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, https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_3.c#L130 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; } Index: enc/utf_32be.c =================================================================== --- enc/utf_32be.c (revision 55374) +++ enc/utf_32be.c (revision 55375) @@ -28,6 +28,7 @@ https://github.com/ruby/ruby/blob/trunk/enc/utf_32be.c#L28 */ #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(OnigCaseFoldTyp https://github.com/ruby/ruby/blob/trunk/enc/utf_32be.c#L127 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; } Index: enc/iso_8859_4.c =================================================================== --- enc/iso_8859_4.c (revision 55374) +++ enc/iso_8859_4.c (revision 55375) @@ -28,6 +28,7 @@ https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_4.c#L28 */ #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, https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_4.c#L111 { 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, https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_4.c#L130 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; } Index: enc/utf_16be.c =================================================================== --- enc/utf_16be.c (revision 55374) +++ enc/utf_16be.c (revision 55375) @@ -28,6 +28,7 @@ https://github.com/ruby/ruby/blob/trunk/enc/utf_16be.c#L28 */ #include "regenc.h" +#include "iso_8859.h" #if 0 static const int EncLen_UTF16[] = { @@ -183,7 +184,7 @@ utf16be_is_mbc_ambiguous(OnigCaseFoldTyp https://github.com/ruby/ruby/blob/trunk/enc/utf_16be.c#L184 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; } Index: enc/depend =================================================================== --- enc/depend (revision 55374) +++ enc/depend (revision 55375) @@ -272,12 +272,14 @@ enc/gbk.$(OBJEXT): oniguruma.h https://github.com/ruby/ruby/blob/trunk/enc/depend#L272 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 https://github.com/ruby/ruby/blob/trunk/enc/depend#L292 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 https://github.com/ruby/ruby/blob/trunk/enc/depend#L365 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 https://github.com/ruby/ruby/blob/trunk/enc/depend#L619 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 Index: enc/iso_8859_9.c =================================================================== --- enc/iso_8859_9.c (revision 55374) +++ enc/iso_8859_9.c (revision 55375) @@ -28,6 +28,7 @@ https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_9.c#L28 */ #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, https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_9.c#L111 { 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, https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_9.c#L130 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; } Index: enc/utf_32le.c =================================================================== --- enc/utf_32le.c (revision 55374) +++ enc/utf_32le.c (revision 55375) @@ -28,6 +28,7 @@ https://github.com/ruby/ruby/blob/trunk/enc/utf_32le.c#L28 */ #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(OnigCaseFoldTyp https://github.com/ruby/ruby/blob/trunk/enc/utf_32le.c#L127 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; } Index: enc/utf_16le.c =================================================================== --- enc/utf_16le.c (revision 55374) +++ enc/utf_16le.c (revision 55375) @@ -28,6 +28,7 @@ https://github.com/ruby/ruby/blob/trunk/enc/utf_16le.c#L28 */ #include "regenc.h" +#include "iso_8859.h" #if 0 static const int EncLen_UTF16[] = { @@ -177,7 +178,7 @@ utf16le_is_mbc_ambiguous(OnigCaseFoldTyp https://github.com/ruby/ruby/blob/trunk/enc/utf_16le.c#L178 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; } Index: enc/iso_8859.h =================================================================== --- enc/iso_8859.h (revision 0) +++ enc/iso_8859.h (revision 55375) @@ -0,0 +1 @@ +#define SHARP_s 0xdf Property changes on: enc/iso_8859.h ___________________________________________________________________ Added: svn:eol-style + LF Index: enc/iso_8859_10.c =================================================================== --- enc/iso_8859_10.c (revision 55374) +++ enc/iso_8859_10.c (revision 55375) @@ -28,6 +28,7 @@ https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_10.c#L28 */ #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, https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_10.c#L111 { 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, https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_10.c#L130 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; } Index: enc/iso_8859_13.c =================================================================== --- enc/iso_8859_13.c (revision 55374) +++ enc/iso_8859_13.c (revision 55375) @@ -28,6 +28,7 @@ https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_13.c#L28 */ #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, https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_13.c#L111 { 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, https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_13.c#L130 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; } Index: enc/iso_8859_14.c =================================================================== --- enc/iso_8859_14.c (revision 55374) +++ enc/iso_8859_14.c (revision 55375) @@ -28,6 +28,7 @@ https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_14.c#L28 */ #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, https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_14.c#L111 { 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, https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_14.c#L131 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; } Index: enc/iso_8859_15.c =================================================================== --- enc/iso_8859_15.c (revision 55374) +++ enc/iso_8859_15.c (revision 55375) @@ -28,6 +28,7 @@ https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_15.c#L28 */ #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, https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_15.c#L111 { 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, https://github.com/ruby/ruby/blob/trunk/enc/iso_8859_15.c#L131 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; } Index: enc/iso_8859_16.c =================================================================== --- enc/iso_8859_16.c (revision 55374) +++ enc/iso_8859_16 (... truncated) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/