aboutsummaryrefslogtreecommitdiffstats
path: root/enc/unicode.c
diff options
context:
space:
mode:
authorduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-29 04:30:58 +0000
committerduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-29 04:30:58 +0000
commit49f25a1299e04d3423351ab9bc212b8cdd6547a3 (patch)
tree8c2eb7b39b4bcd69dce700b8661f17abb9b12252 /enc/unicode.c
parent0e6f8b166d6155503bf490a9853c0f0c2fbd135b (diff)
downloadruby-49f25a1299e04d3423351ab9bc212b8cdd6547a3.tar.gz
* enc/unicode.c: Cleaned up some comments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enc/unicode.c')
-rw-r--r--enc/unicode.c13
1 files changed, 6 insertions, 7 deletions
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))<<ONIGENC_CASE_SPECIAL_OFFSET;
- /* hopelessly preliminary implementation, just dealing with ASCII and Turkic */
while (*pp<end && to<=to_end) {
code = ONIGENC_MBC_TO_CODE(enc, *pp, end);
*pp += enclen(enc, *pp, end);
@@ -704,9 +703,9 @@ onigenc_unicode_case_map(OnigCaseFoldType* flagP,
}
}
else if ((folded = onigenc_unicode_fold_lookup(code)) != 0) { /* data about character found in CaseFold_11_Table */
- if ((flags&ONIGENC_CASE_TITLECASE) /* titlecase needed, */
- && (OnigCaseFoldFlags(folded->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;