mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 22:44:49 +00:00
ICU-3969 Fix new case mapping code so that it will work on z/OS
X-SVN-Rev: 16469
This commit is contained in:
parent
5f2505021e
commit
ac294b5379
3 changed files with 10 additions and 8 deletions
|
@ -83,8 +83,9 @@ Transliterator* CaseMapTransliterator::clone(void) const {
|
|||
}
|
||||
|
||||
/* case context iterator using a Replaceable */
|
||||
UChar32 U_CALLCONV
|
||||
CaseMapTransliterator::rep_caseContextIterator(void *context, int8_t dir) {
|
||||
U_CFUNC UChar32 U_CALLCONV
|
||||
utrans_rep_caseContextIterator(void *context, int8_t dir)
|
||||
{
|
||||
UCaseContext *csc=(UCaseContext *)context;
|
||||
Replaceable *rep=(Replaceable *)csc->p;
|
||||
UChar32 c;
|
||||
|
@ -157,7 +158,7 @@ void CaseMapTransliterator::handleTransliterate(Replaceable& text,
|
|||
c=text.char32At(textPos);
|
||||
csc.cpLimit=textPos+=U16_LENGTH(c);
|
||||
|
||||
result=fMap(fCsp, c, rep_caseContextIterator, &csc, &s, fLocName, &locCache);
|
||||
result=fMap(fCsp, c, utrans_rep_caseContextIterator, &csc, &s, fLocName, &locCache);
|
||||
|
||||
if(csc.b1 && isIncremental) {
|
||||
// fMap() tried to look beyond the context limit
|
||||
|
|
|
@ -98,9 +98,6 @@ protected:
|
|||
UTransPosition& offsets,
|
||||
UBool isIncremental) const;
|
||||
|
||||
/** case context iterator using a Replaceable */
|
||||
static UChar32 U_CALLCONV rep_caseContextIterator(void *context, int8_t dir);
|
||||
|
||||
Locale fLoc;
|
||||
const char *fLocName;
|
||||
UCaseProps *fCsp;
|
||||
|
@ -109,6 +106,10 @@ protected:
|
|||
|
||||
U_NAMESPACE_END
|
||||
|
||||
/** case context iterator using a Replaceable. This must be a C function because it is a callback. */
|
||||
U_CFUNC UChar32 U_CALLCONV
|
||||
utrans_rep_caseContextIterator(void *context, int8_t dir);
|
||||
|
||||
#endif /* #if !UCONFIG_NO_TRANSLITERATION */
|
||||
|
||||
#endif
|
||||
|
|
|
@ -123,9 +123,9 @@ void TitlecaseTransliterator::handleTransliterate(
|
|||
type=ucase_getTypeOrIgnorable(fCsp, c);
|
||||
if(type>=0) { // not case-ignorable
|
||||
if(doTitle) {
|
||||
result=ucase_toFullTitle(fCsp, c, rep_caseContextIterator, &csc, &s, fLocName, &locCache);
|
||||
result=ucase_toFullTitle(fCsp, c, utrans_rep_caseContextIterator, &csc, &s, fLocName, &locCache);
|
||||
} else {
|
||||
result=ucase_toFullLower(fCsp, c, rep_caseContextIterator, &csc, &s, fLocName, &locCache);
|
||||
result=ucase_toFullLower(fCsp, c, utrans_rep_caseContextIterator, &csc, &s, fLocName, &locCache);
|
||||
}
|
||||
doTitle = (UBool)(type==0); // doTitle=isUncased
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue