Lines Matching refs:CollationFastLatin
30 #include "collationfastlatin.h"
140 uint32_t r0 = (CollationFastLatin::VERSION << 8) | headerLength;
207 if(c == CollationFastLatin::LATIN_LIMIT) {
208 c = CollationFastLatin::PUNCT_START;
209 } else if(c == CollationFastLatin::PUNCT_LIMIT) {
234 addContractionEntry(CollationFastLatin::CONTR_CHAR_MASK, ce0, ce1, errorCode);
240 contractionCEs.addElement(CollationFastLatin::CONTR_CHAR_MASK, errorCode);
350 addContractionEntry(CollationFastLatin::CONTR_CHAR_MASK, ce0, ce1, errorCode);
353 addContractionEntry(CollationFastLatin::CONTR_CHAR_MASK, Collation::NO_CE, 0, errorCode);
362 int32_t x = CollationFastLatin::getCharIndex(suffix.charAt(0));
444 uint32_t ter = CollationFastLatin::COMMON_TER;
452 U_ASSERT(pri <= CollationFastLatin::MAX_LONG);
465 pri = CollationFastLatin::MIN_LONG;
466 } else if(pri < CollationFastLatin::MAX_LONG) {
467 pri += CollationFastLatin::LONG_INC;
472 miniCEs[i] = CollationFastLatin::BAIL_OUT;
476 if(pri < CollationFastLatin::MIN_SHORT) {
477 pri = CollationFastLatin::MIN_SHORT;
478 } else if(pri < (CollationFastLatin::MAX_SHORT - CollationFastLatin::SHORT_INC)) {
480 pri += CollationFastLatin::SHORT_INC;
486 miniCEs[i] = CollationFastLatin::BAIL_OUT;
492 sec = CollationFastLatin::COMMON_SEC;
493 ter = CollationFastLatin::COMMON_TER;
500 sec = CollationFastLatin::MIN_SEC_HIGH;
501 } else if(sec < CollationFastLatin::MAX_SEC_HIGH) {
502 sec += CollationFastLatin::SEC_INC;
504 miniCEs[i] = CollationFastLatin::BAIL_OUT;
508 ter = CollationFastLatin::COMMON_TER;
510 if(sec == CollationFastLatin::COMMON_SEC) {
511 sec = CollationFastLatin::MIN_SEC_BEFORE;
512 } else if(sec < CollationFastLatin::MAX_SEC_BEFORE) {
513 sec += CollationFastLatin::SEC_INC;
515 miniCEs[i] = CollationFastLatin::BAIL_OUT;
519 sec = CollationFastLatin::COMMON_SEC;
521 if(sec < CollationFastLatin::MIN_SEC_AFTER) {
522 sec = CollationFastLatin::MIN_SEC_AFTER;
523 } else if(sec < CollationFastLatin::MAX_SEC_AFTER) {
524 sec += CollationFastLatin::SEC_INC;
526 miniCEs[i] = CollationFastLatin::BAIL_OUT;
531 ter = CollationFastLatin::COMMON_TER;
536 if(ter < CollationFastLatin::MAX_TER_AFTER) {
539 miniCEs[i] = CollationFastLatin::BAIL_OUT;
543 if(CollationFastLatin::MIN_LONG <= pri && pri <= CollationFastLatin::MAX_LONG) {
544 U_ASSERT(sec == CollationFastLatin::COMMON_SEC);
566 for(int32_t i = 0; i < CollationFastLatin::NUM_FAST_CHARS; ++i) {
570 for(int32_t i = 0; i < CollationFastLatin::NUM_FAST_CHARS; ++i) {
579 if(expansionIndex > (int32_t)CollationFastLatin::INDEX_MASK) {
580 miniCE = CollationFastLatin::BAIL_OUT;
583 miniCE = CollationFastLatin::EXPANSION | expansionIndex;
596 int32_t indexBase = headerLength + CollationFastLatin::NUM_FAST_CHARS;
598 for(int32_t i = 0; i < CollationFastLatin::NUM_FAST_CHARS; ++i) {
602 if(contractionIndex > (int32_t)CollationFastLatin::INDEX_MASK) {
603 result.setCharAt(headerLength + i, CollationFastLatin::BAIL_OUT);
609 if((uint32_t)x == CollationFastLatin::CONTR_CHAR_MASK && !firstTriple) { break; }
613 if(miniCE == CollationFastLatin::BAIL_OUT) {
614 result.append((UChar)(x | (1 << CollationFastLatin::CONTR_LENGTH_SHIFT)));
616 result.append((UChar)(x | (2 << CollationFastLatin::CONTR_LENGTH_SHIFT)));
619 result.append((UChar)(x | (3 << CollationFastLatin::CONTR_LENGTH_SHIFT)));
628 (UChar)(CollationFastLatin::CONTRACTION | contractionIndex));
632 result.append((UChar)CollationFastLatin::CONTR_CHAR_MASK);
646 U_ASSERT(CollationFastLatin::NUM_FAST_CHARS % 16 == 0);
649 if(c >= CollationFastLatin::LATIN_LIMIT) {
650 c = CollationFastLatin::PUNCT_START + c - CollationFastLatin::LATIN_LIMIT;
673 return CollationFastLatin::BAIL_OUT;
678 if(miniCE == CollationFastLatin::BAIL_OUT) { return miniCE; }
679 if(miniCE >= CollationFastLatin::MIN_SHORT) {
684 c += CollationFastLatin::LOWER_CASE;
690 if(miniCE1 == CollationFastLatin::BAIL_OUT) { return miniCE1; }
693 if(miniCE >= CollationFastLatin::MIN_SHORT &&
694 (miniCE & CollationFastLatin::SECONDARY_MASK) == CollationFastLatin::COMMON_SEC) {
696 uint32_t sec1 = miniCE1 & CollationFastLatin::SECONDARY_MASK;
697 uint32_t ter1 = miniCE1 & CollationFastLatin::TERTIARY_MASK;
698 if(sec1 >= CollationFastLatin::MIN_SEC_HIGH && case1 == 0 &&
699 ter1 == CollationFastLatin::COMMON_TER) {
701 return (miniCE & ~CollationFastLatin::SECONDARY_MASK) | sec1;
705 if(miniCE1 <= CollationFastLatin::SECONDARY_MASK || CollationFastLatin::MIN_SHORT <= miniCE1) {
707 case1 = (case1 >> (14 - 3)) + CollationFastLatin::LOWER_CASE;