mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* enc/unicode.c: Refactoring in preparation for data reduction for
titlecase. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
890ce36b79
commit
2d20a27fb4
2 changed files with 13 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
Mon Mar 28 14:54:49 2016 Martin Duerst <duerst@it.aoyama.ac.jp>
|
||||
|
||||
* enc/unicode.c: Refactoring in preparation for data reduction for
|
||||
titlecase.
|
||||
|
||||
Mon Mar 28 14:36:36 2016 Martin Duerst <duerst@it.aoyama.ac.jp>
|
||||
|
||||
* enc/unicode.c: Minor refactoring for I WITH DOT ABOVE.
|
||||
|
|
|
@ -712,12 +712,15 @@ 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 */
|
||||
if (OnigCaseFoldFlags(folded->n)&ONIGENC_CASE_IS_TITLECASE) /* alread titlecase */
|
||||
flags ^= ONIGENC_CASE_MODIFIED;
|
||||
if ((OnigCaseFoldFlags(folded->n)&ONIGENC_CASE_TITLECASE) /* titlecase available, */
|
||||
&& (flags&ONIGENC_CASE_TITLECASE) /* AND titlecase needed, */
|
||||
&& (OnigCaseFoldFlags(folded->n)&ONIGENC_CASE_IS_TITLECASE)) { /* BUT alread titlecase */
|
||||
flags ^= ONIGENC_CASE_MODIFIED;
|
||||
goto SpecialsCopy;
|
||||
}
|
||||
else 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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue