Home | History | Annotate | Download | only in i18n

Lines Matching defs:CE

1046  * Converts implicit CE into raw integer ("code point")
1342 /* Following are the CE retrieval functions */
1521 if(order > UCOL_NOT_FOUND) { /* if a CE is special */
1522 order = ucol_prv_getSpecialCE(coll, ch, order, collationSource, status); /* and try to get the special CE */
1525 if(order == UCOL_NOT_FOUND && coll->UCA) { /* We couldn't find a good CE in the tailoring */
1529 if(order > UCOL_NOT_FOUND) { /* UCA also gives us a special CE */
1537 return order; /* return the CE */
1804 * Inline function that gets a simple CE.
2414 //constart = (UChar *)coll->image + getContractOffset(CE);
2723 uint32_t ucol_prv_getSpecialCE(const UCollator *coll, UChar ch, uint32_t CE, collIterate *source, UErrorCode *status) {
2730 // is found and the first CE resulting from that contraction is itself a special
2731 // (an expansion, for example.) All other special CE types are fully handled the
2735 switch(getCETag(CE)) {
2738 return CE;
2741 // Special processing is getting a CE that is preceded by a certain prefix
2760 const UChar *ContractionStart = UCharOffset = (UChar *)coll->image+getContractOffset(CE);
2762 CE = *(coll->contractionCEs + (UCharOffset - coll->contractionIndex));
2774 // Pick up the corresponding CE from the table.
2775 CE = *(coll->contractionCEs +
2782 CE = *(coll->contractionCEs +
2786 if(!isPrefix(CE)) {
2788 // CE is not a prefix CE. We found the prefix, break
2789 // out of loop, this CE will end up being returned. This is the normal
2795 if(CE != UCOL_NOT_FOUND) { // we found something and we can merilly continue
2810 uint32_t firstCE = *(coll->contractionCEs + ((UChar *)coll->image+getContractOffset(CE) - coll->contractionIndex)); //UCOL_NOT_FOUND;
2819 const UChar *ContractionStart = UCharOffset = (UChar *)coll->image+getContractOffset(CE);
2823 CE = *(coll->contractionCEs + (UCharOffset - coll->contractionIndex));
2825 if (CE == UCOL_NOT_FOUND) {
2827 CE = firstCE;
2846 // Pick up the corresponding CE from the table.
2847 CE = *(coll->contractionCEs +
2893 CE = *(coll->contractionCEs +
2912 CE = *(coll->contractionCEs +
2915 CE = getDiscontiguous(coll, source, ContractionStart);
2920 if(CE == UCOL_NOT_FOUND) {
2925 CE = firstCE;
2929 if(!isContraction(CE)) {
2931 // CE is not a contraction CE. We completed the contraction, break
2932 // out of loop, this CE will end up being returned. This is the normal
2940 // CE is IS a contraction CE. We will continue looping to check the source
2945 // CE from the contraction table. Remember the CE and scan position, so
2972 *(source->CEpos++) = ((CE & 0xFF)<<24)|UCOL_CONTINUATION_MARKER;
2973 CE = ((CE & 0xFFFF00) << 8) | (UCOL_BYTE_COMMON << 8) | UCOL_BYTE_COMMON;
2975 return CE;
2985 CEOffset = (uint32_t *)coll->image+getExpansionOffset(CE); /* find the offset to expansion table */
2986 size = getExpansionCount(CE);
2987 CE = *CEOffset++;
3002 return CE;
3077 overlapping magic CE byte values). The last byte we subtract 1 to ensure it is less
3180 CE = (((numTempBuf[0] << 8) | numTempBuf[1]) << UCOL_PRIMARYORDERSHIFT) | //Primary weight
3194 CEOffset = (uint32_t *)coll->image+getExpansionOffset(CE); /* find the offset to expansion table */
3195 CE = *CEOffset++;
3198 return CE;
3231 // return the first CE, but first put the rest into the expansion buffer
3274 /* we encountered a leading surrogate. We shall get the CE by using the following code unit */
3276 /* to retrieve the CE, or it is not a trailing surrogate (or the string is done). In that case */
3288 /* TODO: CE contain the data from the previous CE + the mask. It should at least be unmasked */
3289 CE = UTRIE_GET32_FROM_OFFSET_TRAIL(&coll->mapping, CE&0xFFFFFF, trail);
3290 if(CE == UCOL_NOT_FOUND) { // there are tailored surrogates in this block, but not this one.
3293 return CE;
3326 CE=0;
3329 if (CE <= UCOL_NOT_FOUND) break;
3331 return CE;
3377 uint32_t ucol_prv_getSpecialPrevCE(const UCollator *coll, UChar ch, uint32_t CE,
3395 switch (getCETag(CE))
3398 return CE;
3402 // Special processing is getting a CE that is preceded by a certain prefix
3417 const UChar *ContractionStart = UCharOffset = (UChar *)coll->image+getContractOffset(CE);
3420 CE = *(coll->contractionCEs + (UCharOffset - coll->contractionIndex));
3432 // Pick up the corresponding CE from the table.
3433 CE = *(coll->contractionCEs +
3476 CE = *(coll->contractionCEs +
3480 if(!isPrefix(CE)) {
3482 // CE is not a prefix CE. We found the prefix, break
3483 // out of loop, this CE will end up being returned. This is the normal
3500 constart = (UChar *)coll->image + getContractOffset(CE);
3505 CE = *(coll->contractionCEs +
3577 CE = ucol_IGetNextCE(coll, &temp, status);
3593 while (CE != UCOL_NO_MORE_CES) {
3594 *(source->CEpos ++) = CE;
3602 /* ran out of CE space, reallocate to new buffer.
3673 CE = ucol_IGetNextCE(coll, &temp, status);
3707 CE & 0xFFFF00) << 8) | (UCOL_BYTE_COMMON << 8) | UCOL_BYTE_COMMON;
3708 *(source->CEpos++) = ((CE & 0xFF)<<24)|UCOL_CONTINUATION_MARKER;
3761 CEOffset = (uint32_t *)coll->image + getExpansionOffset(CE);
3762 size = getExpansionCount(CE);
3885 overlapping magic CE byte values). The last byte we subtract 1 to ensure it is less
4032 CEOffset = (uint32_t *)coll->image + getExpansionOffset(CE);
4033 CE = *(CEOffset++);
4075 * return the first CE, but first put the rest into the expansion buffer
4188 CE=0;
4192 if (CE <= UCOL_NOT_FOUND) {
4197 return CE;
5201 /* we have done all the CE's, now let's put them together to form a key */
5696 /* we have done all the CE's, now let's put them together to form a key */
5804 UBool isShiftedCE(uint32_t CE, uint32_t LVT, UBool *wasShifted) {
5805 UBool notIsContinuation = !isContinuation(CE);
5806 uint8_t primary1 = (uint8_t)((CE >> 24) & 0xFF);
5807 if(LVT && ((notIsContinuation && (CE & 0xFFFF0000)<= LVT && primary1 > 0)
5989 // Boundary value that decides whether a CE is shifted or not
5996 uint32_t CE = UCOL_NO_MORE_CES;
6077 CE = ucol_IGetPrevCE(coll, &s, status);
6079 CE = ucol_IGetNextCE(coll, &s, status);
6081 if(CE==UCOL_NO_MORE_CES) {
6131 CE = ucol_IGetNextCE(coll, &s, status);
6133 if(CE==UCOL_NO_MORE_CES) {
6144 if(!isShiftedCE(CE, LVT, &wasShifted)) {
6145 CE >>= UCOL_PRIMARYORDERSHIFT; /* get primary */
6146 if(CE != 0) {
6149 dest[i++]=(uint8_t)(CE >> 8);
6153 if((CE &=0xff)!=0) {
6160 dest[i++]=(uint8_t)CE;
6188 CE = ucol_IGetNextCE(coll, &s, status);
6190 if(CE==UCOL_NO_MORE_CES) {
6201 if(!isShiftedCE(CE, LVT, &wasShifted)) {
6202 CE >>= 8; /* get secondary */
6203 if(CE != 0) {
6204 dest[i++]=(uint8_t)CE;
6234 CE = ucol_IGetPrevCE(coll, &s, status);
6236 if(CE==UCOL_NO_MORE_CES) {
6245 if(isContinuation(CE)) { // if it's a continuation, we want to save it and
6246 // reverse when we get a first non-continuation CE.
6247 CE >>= 8;
6248 frenchBuff[frenchIndex++] = (uint8_t)CE;
6249 } else if(!isShiftedCE(CE, LVT, &wasShifted)) {
6250 CE >>= 8; /* get secondary */
6252 if(CE != 0) {
6253 dest[i++]=(uint8_t)CE;
6256 frenchBuff[frenchIndex++] = (uint8_t)CE;
6296 CE = ucol_IGetNextCE(coll, &s, status);
6298 if(CE==UCOL_NO_MORE_CES) {
6321 if(!isShiftedCE(CE, LVT, &wasShifted)) {
6322 if(!isContinuation(CE) && ((CE & UCOL_PRIMARYMASK) != 0 || strength > UCOL_PRIMARY)) {
6326 CE = (uint8_t)(CE & UCOL_BYTE_SIZE_MASK);
6327 caseBits = (uint8_t)(CE & 0xC0);
6330 if(CE != 0) {
6389 CE = ucol_IGetNextCE(coll, &s, status);
6391 if(CE==UCOL_NO_MORE_CES) {
6402 if(!isShiftedCE(CE, LVT, &wasShifted)) {
6403 notIsContinuation = !isContinuation(CE);
6406 CE = (uint8_t)(CE & UCOL_BYTE_SIZE_MASK);
6407 CE ^= coll->caseSwitch;
6408 CE &= coll->tertiaryMask;
6410 CE = (uint8_t)((CE & UCOL_REMOVE_CONTINUATION));
6413 if(CE != 0) {
6414 dest[i++]=(uint8_t)CE;
6445 CE = ucol_IGetNextCE(coll, &s, status);
6447 if(CE==UCOL_NO_MORE_CES) {
6459 if(CE==0)
6461 if(isShiftedCE(CE, LVT, &wasShifted)) {
6462 CE >>= 16; /* get primary */
6463 if(CE != 0) {
6465 dest[i++]=(uint8_t)(CE >> 8);
6469 if((CE &=0xff)!=0) {
6475 dest[i++]=(uint8_t)CE;
6479 notIsContinuation = !isContinuation(CE);
6632 // Was the latest CE shifted
6740 ucol_addLatinOneEntry(UCollator *coll, UChar ch, uint32_t CE,
6745 if(!isContinuation(CE)) {
6746 tertiary = (uint8_t)((CE & coll->tertiaryMask));
6750 tertiary = (uint8_t)((CE & UCOL_REMOVE_CONTINUATION));
6755 secondary = (uint8_t)((CE >>= 8) & UCOL_BYTE_SIZE_MASK);
6756 primary2 = (uint8_t)((CE >>= 8) & UCOL_BYTE_SIZE_MASK);
6757 primary1 = (uint8_t)(CE >> 8);
6827 uint32_t CE = 0;
6834 CE = coll->latinOneMapping[ch];
6836 CE = UTRIE_GET32_FROM_LEAD(&coll->mapping, ch);
6837 if(CE == UCOL_NOT_FOUND && coll->UCA) {
6838 CE = UTRIE_GET32_FROM_LEAD(&coll->UCA->mapping, ch);
6841 if(CE < UCOL_NOT_FOUND) {
6842 ucol_addLatinOneEntry(coll, ch, CE, &primShift, &secShift, &terShift);
6844 switch (getCETag(CE)) {
6848 while((int32_t)(CE = ucol_next(it, status)) != UCOL_NULLORDER) {
6855 ucol_addLatinOneEntry(coll, ch, CE, &primShift, &secShift, &terShift);
6865 if((CE & 0x00FFF000) != 0) {
6870 const UChar *UCharOffset = (UChar *)coll->image+getContractOffset(CE);
6872 CE |= (contractionOffset & 0xFFF) << 12; // insert the offset in latin-1 table
6874 coll->latinOneCEs[ch] = CE;
6875 coll->latinOneCEs[coll->latinOneTableLen+ch] = CE;
6876 coll->latinOneCEs[2*coll->latinOneTableLen+ch] = CE;
6881 CE = *(coll->contractionCEs +
6883 if(CE > UCOL_NOT_FOUND && getCETag(CE) == EXPANSION_TAG) {
6886 uint32_t *CEOffset = (uint32_t *)coll->image+getExpansionOffset(CE); /* find the offset to expansion table */
6887 size = getExpansionCount(CE);
6888 //CE = *CEOffset++;
6911 } else if(CE < UCOL_NOT_FOUND) {
6912 ucol_addLatinOneEntry(coll, (UChar)contractionOffset++, CE, &primShift, &secShift, &terShift);
6935 ucol_addLatinOneEntry(coll, ch, CE, &primShift, &secShift, &terShift);
7041 uint32_t CE = ucol_IGetNextCE(coll, &s, status);
7046 if(s.pos != s.endp || CE == UCOL_NO_MORE_CES) {
7057 if(coll->variableTopValue != (CE & UCOL_PRIMARYMASK)>>16) {
7059 coll->variableTopValue = (CE & UCOL_PRIMARYMASK)>>16;
7065 return CE & UCOL_PRIMARYMASK;
7308 uint32_t CE = UCOL_NOT_FOUND;
7311 CE = coll->latinOneMapping[u];
7312 if(coll->UCA && CE == coll->UCA->latinOneMapping[u]) {
7316 CE = UTRIE_GET32_FROM_LEAD(&coll->mapping, u);
7319 if(isContraction(CE)) {
7320 ContractionStart = (UChar *)coll->image+getContractOffset(CE);
7321 CE = *(coll->contractionCEs + (ContractionStart- coll->contractionIndex));
7324 return (UBool)(CE != UCOL_NOT_FOUND);
7522 inline void UCOL_CEBUF_PUT(ucol_CEBuf *b, uint32_t ce, collIterate *ci, UErrorCode *status) {
7527 *(b)->pos++ = ce;
7655 // Preparing the CE buffers. They will be filled during the primary phase
7670 // We get the next CE
8102 uint32_t CE, const UChar *s, int32_t *index, int32_t len)
8104 const UChar *UCharOffset = (UChar *)coll->image+getContractOffset(CE&0xFFF);
8105 int32_t latinOneOffset = (CE & 0x00FFF000) >> 12;