ICU-5420 ucol_IGetPrevCE: always reset flags when finished w/ side buffer; fix a couple of signed/unsigned problems.
X-SVN-Rev: 23982
This commit is contained in:
parent
246077067f
commit
ea4a1a7b48
@ -1642,7 +1642,7 @@ void collPrevIterNormalize(collIterate *data)
|
||||
* **** THIS IS PROBABLY NOT A COMPLETE TEST ****
|
||||
*/
|
||||
if (baseChar >= 0x100) {
|
||||
int32_t baseOrder = UTRIE_GET32_FROM_LEAD(&data->coll->mapping, baseChar);
|
||||
uint32_t baseOrder = UTRIE_GET32_FROM_LEAD(&data->coll->mapping, baseChar);
|
||||
|
||||
if (baseOrder == UCOL_NOT_FOUND && data->coll->UCA) {
|
||||
baseOrder = UTRIE_GET32_FROM_LEAD(&data->coll->UCA->mapping, baseChar);
|
||||
@ -1903,6 +1903,9 @@ inline uint32_t ucol_IGetPrevCE(const UCollator *coll, collIterate *data,
|
||||
Because pointer points to the last accessed character,
|
||||
hence we have to increment it by one here.
|
||||
*/
|
||||
data->flags = data->origFlags;
|
||||
data->offsetRepeatValue = 0;
|
||||
|
||||
if (data->fcdPosition == NULL) {
|
||||
data->pos = data->string;
|
||||
return UCOL_NO_MORE_CES;
|
||||
@ -1910,8 +1913,7 @@ inline uint32_t ucol_IGetPrevCE(const UCollator *coll, collIterate *data,
|
||||
else {
|
||||
data->pos = data->fcdPosition + 1;
|
||||
}
|
||||
data->flags = data->origFlags;
|
||||
data->offsetRepeatValue = 0;
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@ -3794,7 +3796,7 @@ uint32_t ucol_prv_getSpecialPrevCE(const UCollator *coll, UChar ch, uint32_t CE,
|
||||
|
||||
// **** doesn't work if using iterator ****
|
||||
if (source->offsetReturn != NULL) {
|
||||
if (source->offsetReturn == source->offsetBuffer) {
|
||||
if (! (source->flags & UCOL_ITER_INNORMBUF) && source->offsetReturn == source->offsetBuffer) {
|
||||
source->offsetStore = source->offsetBuffer;
|
||||
}else {
|
||||
firstOffset = -1;
|
||||
|
@ -497,7 +497,7 @@ ucol_previousProcessed(UCollationElements *elems,
|
||||
// UCollationStrength strength = ucol_getStrength(coll);
|
||||
// UBool toShift = ucol_getAttribute(coll, UCOL_ALTERNATE_HANDLING, status) == UCOL_SHIFTED;
|
||||
// uint32_t variableTop = coll->variableTopValue;
|
||||
uint32_t low = 0, high = 0;
|
||||
int32_t low = 0, high = 0;
|
||||
|
||||
if (U_FAILURE(*status)) {
|
||||
return UCOL_PROCESSED_NULLORDER;
|
||||
|
Loading…
Reference in New Issue
Block a user