ruby-changes:43581
From: duerst <ko1@a...>
Date: Wed, 13 Jul 2016 14:15:32 +0900 (JST)
Subject: [ruby-changes:43581] duerst:r55654 (trunk): * enc/windows_1254.c: Adjust variable/macro names.
duerst 2016-07-13 14:15:28 +0900 (Wed, 13 Jul 2016) New Revision: 55654 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55654 Log: * enc/windows_1254.c: Adjust variable/macro names. Modified files: trunk/ChangeLog trunk/enc/windows_1254.c Index: enc/windows_1254.c =================================================================== --- enc/windows_1254.c (revision 55653) +++ enc/windows_1254.c (revision 55654) @@ -38,11 +38,11 @@ https://github.com/ruby/ruby/blob/trunk/enc/windows_1254.c#L38 #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) \ - ((EncISO_8859_9_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0) +#define ENC_CP1254_TO_LOWER_CASE(c) EncCP1254_ToLowerCaseTable[c] +#define ENC_IS_CP1254_CTYPE(code,ctype) \ + ((EncCP1254_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0) -static const UChar EncISO_8859_9_ToLowerCaseTable[256] = { +static const UChar EncCP1254_ToLowerCaseTable[256] = { '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', @@ -77,7 +77,7 @@ static const UChar EncISO_8859_9_ToLower https://github.com/ruby/ruby/blob/trunk/enc/windows_1254.c#L77 '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377' }; -static const unsigned short EncISO_8859_9_CtypeTable[256] = { +static const unsigned short EncCP1254_CtypeTable[256] = { 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, @@ -126,7 +126,7 @@ mbc_case_fold(OnigCaseFoldType flag, https://github.com/ruby/ruby/blob/trunk/enc/windows_1254.c#L126 return 2; } - *lower = ENC_ISO_8859_9_TO_LOWER_CASE(*p); + *lower = ENC_CP1254_TO_LOWER_CASE(*p); (*pp)++; return 1; } @@ -144,7 +144,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag, https://github.com/ruby/ruby/blob/trunk/enc/windows_1254.c#L144 } (*pp)++; - v = (EncISO_8859_9_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER)); + v = (EncCP1254_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER)); if ((v | BIT_CTYPE_LOWER) != 0) { /* 0xdf etc.. are lower case letter, but can't convert. */ if (*p >= 0xaa && *p <= 0xba) @@ -161,7 +161,7 @@ static int https://github.com/ruby/ruby/blob/trunk/enc/windows_1254.c#L161 is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED) { if (code < 256) - return ENC_IS_ISO_8859_9_CTYPE(code, ctype); + return ENC_IS_CP1254_CTYPE(code, ctype); else return FALSE; } Index: ChangeLog =================================================================== --- ChangeLog (revision 55653) +++ ChangeLog (revision 55654) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Jul 13 14:15:22 2016 Martin Duerst <duerst@i...> + + * enc/windows_1254.c: Adjust variable/macro names. + Wed Jul 13 13:19:12 2016 Martin Duerst <duerst@i...> * enc/iso_8859_9.c, enc/windows_1254.c: Split Windows-1254 from @@ -73,7 +77,7 @@ Sun Jul 10 19:53:41 2016 Martin Duerst https://github.com/ruby/ruby/blob/trunk/ChangeLog#L77 Sun Jul 10 19:33:47 2016 Martin Duerst <duerst@i...> - * test/ruby/enc/test_case_comprehensive.rb: Changed testing logic in to + * test/ruby/enc/test_case_comprehensive.rb: Changed testing logic to catch unintended modifications of characters that do not have a case equivalent in the respective encoding. * enc/iso_8859_1.c, enc/iso_8859_15.c: Fixed unintended modifications of -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/