Home | History | Annotate | Download | only in i18n

Lines Matching defs:CE

1102  * Converts implicit CE into raw integer ("code point")
1374 /* Following are the CE retrieval functions */
1553 if(order > UCOL_NOT_FOUND) { /* if a CE is special */
1554 order = ucol_prv_getSpecialCE(coll, ch, order, collationSource, status); /* and try to get the special CE */
1557 if(order == UCOL_NOT_FOUND && coll->UCA) { /* We couldn't find a good CE in the tailoring */
1561 if(order > UCOL_NOT_FOUND) { /* UCA also gives us a special CE */
1569 return order; /* return the CE */
1823 * Inline function that gets a simple CE.
2339 //constart = (UChar *)coll->image + getContractOffset(CE);
2586 uint32_t ucol_prv_getSpecialCE(const UCollator *coll, UChar ch, uint32_t CE, collIterate *source, UErrorCode *status) {
2593 // is found and the first CE resulting from that contraction is itself a special
2594 // (an expansion, for example.) All other special CE types are fully handled the
2598 switch(getCETag(CE)) {
2601 return CE;
2604 // Special processing is getting a CE that is preceded by a certain prefix
2623 const UChar *ContractionStart = UCharOffset = (UChar *)coll->image+getContractOffset(CE);
2625 CE = *(coll->contractionCEs + (UCharOffset - coll->contractionIndex));
2637 // Pick up the corresponding CE from the table.
2638 CE = *(coll->contractionCEs +
2645 CE = *(coll->contractionCEs +
2649 if(!isPrefix(CE)) {
2651 // CE is not a prefix CE. We found the prefix, break
2652 // out of loop, this CE will end up being returned. This is the normal
2658 if(CE != UCOL_NOT_FOUND) { // we found something and we can merilly continue
2673 uint32_t firstCE = *(coll->contractionCEs + ((UChar *)coll->image+getContractOffset(CE) - coll->contractionIndex)); //UCOL_NOT_FOUND;
2682 CE);
2686 CE = *(coll->contractionCEs + (UCharOffset - coll->contractionIndex));
2688 if (CE == UCOL_NOT_FOUND) {
2690 CE = firstCE;
2709 // Pick up the corresponding CE from the table.
2710 CE = *(coll->contractionCEs +
2756 CE = *(coll->contractionCEs +
2775 CE = *(coll->contractionCEs +
2778 CE = getDiscontiguous(coll, source, ContractionStart);
2783 if(CE == UCOL_NOT_FOUND) {
2788 CE = firstCE;
2792 if(!isContraction(CE)) {
2794 // CE is not a contraction CE. We completed the contraction, break
2795 // out of loop, this CE will end up being returned. This is the normal
2803 // CE is IS a contraction CE. We will continue looping to check the source
2808 // CE from the contraction table. Remember the CE and scan position, so
2835 *(source->CEpos++) = ((CE & 0xFF)<<24)|UCOL_CONTINUATION_MARKER;
2836 CE = ((CE & 0xFFFF00) << 8) | (UCOL_BYTE_COMMON << 8) | UCOL_BYTE_COMMON;
2838 return CE;
2848 CEOffset = (uint32_t *)coll->image+getExpansionOffset(CE); /* find the offset to expansion table */
2849 size = getExpansionCount(CE);
2850 CE = *CEOffset++;
2865 return CE;
2940 overlapping magic CE byte values). The last byte we subtract 1 to ensure it is less
3043 CE = (((numTempBuf[0] << 8) | numTempBuf[1]) << UCOL_PRIMARYORDERSHIFT) | //Primary weight
3057 CEOffset = (uint32_t *)coll->image+getExpansionOffset(CE); /* find the offset to expansion table */
3058 CE = *CEOffset++;
3061 return CE;
3094 // return the first CE, but first put the rest into the expansion buffer
3140 /* we encountered a leading surrogate. We shall get the CE by using the following code unit */
3142 /* to retrieve the CE, or it is not a trailing surrogate (or the string is done). In that case */
3154 /* TODO: CE contain the data from the previous CE + the mask. It should at least be unmasked */
3155 CE = UTRIE_GET32_FROM_OFFSET_TRAIL(&coll->mapping, CE&0xFFFFFF, trail);
3156 if(CE == UCOL_NOT_FOUND) { // there are tailored surrogates in this block, but not this one.
3159 return CE;
3192 CE=0;
3195 if (CE <= UCOL_NOT_FOUND) break;
3197 return CE;
3243 uint32_t ucol_prv_getSpecialPrevCE(const UCollator *coll, UChar ch, uint32_t CE,
3261 switch (getCETag(CE))
3264 return CE;
3268 // Special processing is getting a CE that is preceded by a certain prefix
3283 const UChar *ContractionStart = UCharOffset = (UChar *)coll->image+getContractOffset(CE);
3286 CE = *(coll->contractionCEs + (UCharOffset - coll->contractionIndex));
3298 // Pick up the corresponding CE from the table.
3299 CE = *(coll->contractionCEs +
3342 CE = *(coll->contractionCEs +
3346 if(!isPrefix(CE)) {
3348 // CE is not a prefix CE. We found the prefix, break
3349 // out of loop, this CE will end up being returned. This is the normal
3366 constart = (UChar *)coll->image + getContractOffset(CE);
3371 CE = *(coll->contractionCEs +
3446 CE = ucol_IGetNextCE(coll, &temp, status);
3462 while (CE != UCOL_NO_MORE_CES) {
3463 *(source->CEpos ++) = CE;
3471 /* ran out of CE space, reallocate to new buffer.
3515 CE = ucol_IGetNextCE(coll, &temp, status);
3547 *(source->CEpos++) = ((CE & 0xFFFF00) << 8) | (UCOL_BYTE_COMMON << 8) | UCOL_BYTE_COMMON;
3548 *(source->CEpos++) = ((CE & 0xFF)<<24)|UCOL_CONTINUATION_MARKER;
3601 CEOffset = (uint32_t *)coll->image + getExpansionOffset(CE);
3602 size = getExpansionCount(CE);
3724 overlapping magic CE byte values). The last byte we subtract 1 to ensure it is less
3874 CEOffset = (uint32_t *)coll->image + getExpansionOffset(CE);
3875 CE = *(CEOffset++);
3917 * return the first CE, but first put the rest into the expansion buffer
4029 CE=0;
4033 if (CE
4038 return CE;
5029 /* we have done all the CE's, now let's put them together to form a key */
5504 /* we have done all the CE's, now let's put them together to form a key */
5608 UBool isShiftedCE(uint32_t CE, uint32_t LVT, UBool *wasShifted) {
5609 UBool notIsContinuation = !isContinuation(CE);
5610 uint8_t primary1 = (uint8_t)((CE >> 24) & 0xFF);
5611 if(LVT && ((notIsContinuation && (CE & 0xFFFF0000)<= LVT && primary1 > 0)
5793 // Boundary value that decides whether a CE is shifted or not
5800 uint32_t CE = UCOL_NO_MORE_CES;
5885 CE = ucol_IGetPrevCE(coll, &s, status);
5887 CE = ucol_IGetNextCE(coll, &s, status);
5889 if(CE==UCOL_NO_MORE_CES) {
5939 CE = ucol_IGetNextCE(coll, &s, status);
5941 if(CE==UCOL_NO_MORE_CES) {
5952 if(!isShiftedCE(CE, LVT, &wasShifted)) {
5953 CE >>= UCOL_PRIMARYORDERSHIFT; /* get primary */
5954 if(CE != 0) {
5957 dest[i++]=(uint8_t)(CE >> 8);
5961 if((CE &=0xff)!=0) {
5968 dest[i++]=(uint8_t)CE;
5996 CE = ucol_IGetNextCE(coll, &s, status);
5998 if(CE==UCOL_NO_MORE_CES) {
6009 if(!isShiftedCE(CE, LVT, &wasShifted)) {
6010 CE >>= 8; /* get secondary */
6011 if(CE != 0) {
6012 dest[i++]=(uint8_t)CE;
6042 CE = ucol_IGetPrevCE(coll, &s, status);
6044 if(CE==UCOL_NO_MORE_CES) {
6053 if(isContinuation(CE)) { // if it's a continuation, we want to save it and
6054 // reverse when we get a first non-continuation CE.
6055 CE >>= 8;
6056 frenchBuff[frenchIndex++] = (uint8_t)CE;
6057 } else if(!isShiftedCE(CE, LVT, &wasShifted)) {
6058 CE >>= 8; /* get secondary */
6060 if(CE != 0) {
6061 dest[i++]=(uint8_t)CE;
6064 frenchBuff[frenchIndex++] = (uint8_t)CE;
6105 CE = ucol_IGetNextCE(coll, &s, status);
6107 if(CE==UCOL_NO_MORE_CES) {
6130 if(!isShiftedCE(CE, LVT, &wasShifted)) {
6131 if(!isContinuation(CE) && ((CE & UCOL_PRIMARYMASK) != 0 || strength > UCOL_PRIMARY)) {
6135 CE = (uint8_t)(CE & UCOL_BYTE_SIZE_MASK);
6136 caseBits = (uint8_t)(CE & 0xC0);
6139 if(CE != 0) {
6203 CE = ucol_IGetNextCE(coll, &s, status);
6205 if(CE==UCOL_NO_MORE_CES) {
6216 if(!isShiftedCE(CE, LVT, &wasShifted)) {
6217 notIsContinuation = !isContinuation(CE);
6220 CE = (uint8_t)(CE & UCOL_BYTE_SIZE_MASK);
6221 CE ^= coll->caseSwitch;
6222 CE &= coll->tertiaryMask;
6224 CE = (uint8_t)((CE & UCOL_REMOVE_CONTINUATION));
6227 if(CE != 0) {
6228 dest[i++]=(uint8_t)CE;
6259 CE = ucol_IGetNextCE(coll, &s, status);
6261 if(CE==UCOL_NO_MORE_CES) {
6273 if(CE==0)
6275 if(isShiftedCE(CE, LVT, &wasShifted)) {
6276 CE >>= 16; /* get primary */
6277 if(CE != 0) {
6279 dest[i++]=(uint8_t)(CE >> 8);
6283 if((CE &=0xff)!=0) {
6289 dest[i++]=(uint8_t)CE;
6293 notIsContinuation = !isContinuation(CE);
6446 // Was the latest CE shifted
6554 ucol_addLatinOneEntry(UCollator *coll, UChar ch, uint32_t CE,
6559 if(!isContinuation(CE)) {
6560 tertiary = (uint8_t)((CE & coll->tertiaryMask));
6564 tertiary = (uint8_t)((CE & UCOL_REMOVE_CONTINUATION));
6569 secondary = (uint8_t)((CE >>= 8) & UCOL_BYTE_SIZE_MASK);
6570 primary2 = (uint8_t)((CE >>= 8) & UCOL_BYTE_SIZE_MASK);
6571 primary1 = (uint8_t)(CE >> 8);
6641 uint32_t CE = 0;
6648 CE = coll->latinOneMapping[ch];
6650 CE = UTRIE_GET32_FROM_LEAD(&coll->mapping, ch);
6651 if(CE == UCOL_NOT_FOUND && coll->UCA) {
6652 CE = UTRIE_GET32_FROM_LEAD(&coll->UCA->mapping, ch);
6655 if(CE < UCOL_NOT_FOUND) {
6656 ucol_addLatinOneEntry(coll, ch, CE, &primShift, &secShift, &terShift);
6658 switch (getCETag(CE)) {
6662 while((int32_t)(CE = ucol_next(it, status)) != UCOL_NULLORDER) {
6669 ucol_addLatinOneEntry(coll, ch, CE, &primShift, &secShift, &terShift);
6679 if((CE & 0x00FFF000) != 0) {
6684 const UChar *UCharOffset = (UChar *)coll->image+getContractOffset(CE);
6686 CE |= (contractionOffset & 0xFFF) << 12; // insert the offset in latin-1 table
6688 coll->latinOneCEs[ch] = CE;
6689 coll->latinOneCEs[coll->latinOneTableLen+ch] = CE;
6690 coll->latinOneCEs[2*coll->latinOneTableLen+ch] = CE;
6695 CE = *(coll->contractionCEs +
6697 if(CE > UCOL_NOT_FOUND && getCETag(CE) == EXPANSION_TAG) {
6700 uint32_t *CEOffset = (uint32_t *)coll->image+getExpansionOffset(CE); /* find the offset to expansion table */
6701 size = getExpansionCount(CE);
6702 //CE = *CEOffset++;
6725 } else if(CE < UCOL_NOT_FOUND) {
6726 ucol_addLatinOneEntry(coll, (UChar)contractionOffset++, CE, &primShift, &secShift, &terShift);
6749 ucol_addLatinOneEntry(coll, ch, CE, &primShift, &secShift, &terShift);
6858 uint32_t CE = ucol_IGetNextCE(coll, &s, status);
6863 if(s.pos != s.endp || CE == UCOL_NO_MORE_CES) {
6874 if(coll->variableTopValue != (CE & UCOL_PRIMARYMASK)>>16) {
6876 coll->variableTopValue = (CE & UCOL_PRIMARYMASK)>>16;
6882 return CE & UCOL_PRIMARYMASK;
7125 uint32_t CE = UCOL_NOT_FOUND;
7128 CE = coll->latinOneMapping[u];
7129 if(coll->UCA && CE == coll->UCA->latinOneMapping[u]) {
7133 CE = UTRIE_GET32_FROM_LEAD(&coll->mapping, u);
7136 CE)) {
7137 ContractionStart = (UChar *)coll->image+getContractOffset(CE);
7138 CE = *(coll->contractionCEs + (ContractionStart- coll->contractionIndex));
7141 return (UBool)(CE != UCOL_NOT_FOUND);
7261 inline void UCOL_CEBUF_PUT(ucol_CEBuf *b, uint32_t ce, collIterate *ci, UErrorCode *status) {
7266 *(b)->pos++ = ce;
7386 // Preparing the CE buffers. They will be filled during the primary phase
7401 // We get the next CE
7844 uint32_t CE, const UChar *s, int32_t *index, int32_t len)
7846 const UChar *UCharOffset = (UChar *)coll->image+getContractOffset(CE&0xFFF);
7847 int32_t latinOneOffset = (CE & 0x00FFF000) >> 12;