From 49f25a1299e04d3423351ab9bc212b8cdd6547a3 Mon Sep 17 00:00:00 2001 From: duerst Date: Tue, 29 Mar 2016 04:30:58 +0000 Subject: * enc/unicode.c: Cleaned up some comments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ enc/unicode.c | 13 ++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7e32f8ba77..9a40fc09a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Tue Mar 29 13:31:00 2016 Martin Duerst + + * enc/unicode.c: Cleaned up some comments. + Tue Mar 29 13:24:56 2016 Martin Duerst * enc/unicode/case-folding.rb, casefold.h: Removing data for idempotent diff --git a/enc/unicode.c b/enc/unicode.c index 1b1c92bac8..87ebb0d8a8 100644 --- a/enc/unicode.c +++ b/enc/unicode.c @@ -666,7 +666,6 @@ onigenc_unicode_case_map(OnigCaseFoldType* flagP, to_end -= CASE_MAPPING_SLACK; flags |= (flags&(ONIGENC_CASE_UPCASE|ONIGENC_CASE_DOWNCASE))<n)&ONIGENC_CASE_IS_TITLECASE)) { /* BUT alread titlecase */ - /* already titlecase, no changes needed */ + if ((flags&ONIGENC_CASE_TITLECASE) /* Titlecase needed, */ + && (OnigCaseFoldFlags(folded->n)&ONIGENC_CASE_IS_TITLECASE)) { /* but alread Titlecase */ + /* already Titlecase, no changes needed */ } else if (flags&OnigCaseFoldFlags(folded->n)) { /* needs and data availability match */ const OnigCodePoint *next; @@ -716,8 +715,8 @@ onigenc_unicode_case_map(OnigCaseFoldType* flagP, if (flags&OnigCaseFoldFlags(folded->n)&ONIGENC_CASE_SPECIALS) { /* special */ OnigCodePoint *SpecialsStart = CaseMappingSpecials + OnigSpecialIndexDecode(folded->n); - if (OnigCaseFoldFlags(folded->n)&ONIGENC_CASE_TITLECASE) { /* titlecase available */ - if (flags&ONIGENC_CASE_TITLECASE) /* titlecase needed, but not yet titlecase */ + if (OnigCaseFoldFlags(folded->n)&ONIGENC_CASE_TITLECASE) { /* Titlecase available */ + if (flags&ONIGENC_CASE_TITLECASE) /* Titlecase needed, but not yet Titlecase */ goto SpecialsCopy; else /* Titlecase not needed */ SpecialsStart += SpecialsLengthExtract(*SpecialsStart); @@ -726,7 +725,7 @@ onigenc_unicode_case_map(OnigCaseFoldType* flagP, if (!(flags&ONIGENC_CASE_DOWN_SPECIAL)) SpecialsStart += SpecialsLengthExtract(*SpecialsStart); } - /* if we pass here, we know we use special upcasing, and are at the right position */ + /* here, we know we use ONIGENC_CASE_UP_SPECIAL, and the position is right */ SpecialsCopy: count = SpecialsLengthExtract(*SpecialsStart); next = SpecialsStart; -- cgit v1.2.3