* enc/iso_8859_1.c: Revert to older version of code.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
duerst 2016-06-11 00:58:49 +00:00
parent 02f7ad6237
commit 9fa8b80550
2 changed files with 10 additions and 5 deletions

View File

@ -1,3 +1,7 @@
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.
Sat Jun 11 09:46:17 2016 Martin Duerst <duerst@it.aoyama.ac.jp> Sat Jun 11 09:46:17 2016 Martin Duerst <duerst@it.aoyama.ac.jp>
* enc/iso_8859_1.c: Implement non-ASCII case mapping. * enc/iso_8859_1.c: Implement non-ASCII case mapping.

View File

@ -260,7 +260,7 @@ case_map (OnigCaseFoldType* flagP, const OnigUChar** pp,
const OnigUChar* end, OnigUChar* to, OnigUChar* to_end, const OnigUChar* end, OnigUChar* to, OnigUChar* to_end,
const struct OnigEncodingTypeST* enc) const struct OnigEncodingTypeST* enc)
{ {
OnigCodePoint code, lower; OnigCodePoint code;
OnigUChar *to_start = to; OnigUChar *to_start = to;
OnigCaseFoldType flags = *flagP; OnigCaseFoldType flags = *flagP;
@ -278,10 +278,11 @@ case_map (OnigCaseFoldType* flagP, const OnigUChar** pp,
code = 's'; code = 's';
} }
} }
else if ((lower=ONIGENC_ISO_8859_1_TO_LOWER_CASE(code)) != code) else if (code==0xAA || code==0xBA) ;
&& (flags&ONIGENC_CASE_UPCASE)) { else if ((EncISO_8859_1_CtypeTable[code] & BIT_CTYPE_UPPER)
flags |= ONIGENC_CASE_MODIFIED; && (flags & (ONIGENC_CASE_DOWNCASE|ONIGENC_CASE_FOLD))) {
code = lower; flags |= ONIGENC_CASE_MODIFIED;
code += 0x20;
} }
else if ((EncISO_8859_1_CtypeTable[code]&BIT_CTYPE_LOWER) else if ((EncISO_8859_1_CtypeTable[code]&BIT_CTYPE_LOWER)
&& (flags&ONIGENC_CASE_UPCASE)) { && (flags&ONIGENC_CASE_UPCASE)) {