• Home
  • Raw
  • Download

Lines Matching refs:coll

52 static void ucol_setReorderCodesFromParser(UCollator *coll, UColTokenParser *parser, UErrorCode *st…
543 ucol_getRulesEx(const UCollator *coll, UColRuleOption delta, UChar *buffer, int32_t bufferLen) { in ucol_getRulesEx() argument
548 const UChar *rules = ucol_getRules(coll, &len); in ucol_getRulesEx()
552 ucaRules = coll->ucaRules; in ucol_getRulesEx()
583 ucol_getRules( const UCollator *coll, in ucol_getRules() argument
586 if(coll->rules != NULL) { in ucol_getRules()
587 *length = coll->rulesLength; in ucol_getRules()
588 return coll->rules; in ucol_getRules()
942 ucol_getLocale(const UCollator *coll, ULocDataLocaleType type, UErrorCode *status) { in ucol_getLocale() argument
943 return ucol_getLocaleByType(coll, type, status); in ucol_getLocale()
947 ucol_getLocaleByType(const UCollator *coll, ULocDataLocaleType type, UErrorCode *status) { in ucol_getLocaleByType() argument
953 UTRACE_DATA1(UTRACE_INFO, "coll=%p", coll); in ucol_getLocaleByType()
957 result = coll->actualLocale; in ucol_getLocaleByType()
960 result = coll->validLocale; in ucol_getLocaleByType()
963 result = coll->requestedLocale; in ucol_getLocaleByType()
974 ucol_setReqValidLocales(UCollator *coll, char *requestedLocaleToAdopt, char *validLocaleToAdopt, ch… in ucol_setReqValidLocales() argument
976 if (coll) { in ucol_setReqValidLocales()
977 if (coll->validLocale) { in ucol_setReqValidLocales()
978 uprv_free(coll->validLocale); in ucol_setReqValidLocales()
980 coll->validLocale = validLocaleToAdopt; in ucol_setReqValidLocales()
981 if (coll->requestedLocale) { // should always have in ucol_setReqValidLocales()
982 uprv_free(coll->requestedLocale); in ucol_setReqValidLocales()
984 coll->requestedLocale = requestedLocaleToAdopt; in ucol_setReqValidLocales()
985 if (coll->actualLocale) { in ucol_setReqValidLocales()
986 uprv_free(coll->actualLocale); in ucol_setReqValidLocales()
988 coll->actualLocale = actualLocaleToAdopt; in ucol_setReqValidLocales()
993 ucol_getTailoredSet(const UCollator *coll, UErrorCode *status) in ucol_getTailoredSet() argument
1000 if(coll == NULL || coll->UCA == NULL) { in ucol_getTailoredSet()
1007 const UChar *rules = ucol_getRules(coll, &rulesLen); in ucol_getTailoredSet()
1021 …ucol_tok_initTokenList(&src, rules, rulesLen, coll->UCA, ucol_tok_getRulesFromBundle, NULL, status… in ucol_getTailoredSet()
1044 void ucol_setReorderCodesFromParser(UCollator *coll, UColTokenParser *parser, UErrorCode *status) { in ucol_setReorderCodesFromParser() argument
1053 coll->reorderCodesLength = 0; in ucol_setReorderCodesFromParser()
1054 if (coll->reorderCodes != NULL && coll->freeReorderCodesOnClose == TRUE) { in ucol_setReorderCodesFromParser()
1055 uprv_free(coll->reorderCodes); in ucol_setReorderCodesFromParser()
1058 if (coll->defaultReorderCodes != NULL && coll->freeDefaultReorderCodesOnClose == TRUE) { in ucol_setReorderCodesFromParser()
1059 uprv_free(coll->defaultReorderCodes); in ucol_setReorderCodesFromParser()
1061 coll->defaultReorderCodesLength = parser->reorderCodesLength; in ucol_setReorderCodesFromParser()
1062coll->defaultReorderCodes = (int32_t*) uprv_malloc(coll->defaultReorderCodesLength * sizeof(int32… in ucol_setReorderCodesFromParser()
1063 if (coll->defaultReorderCodes == NULL) { in ucol_setReorderCodesFromParser()
1067 …uprv_memcpy(coll->defaultReorderCodes, parser->reorderCodes, coll->defaultReorderCodesLength * siz… in ucol_setReorderCodesFromParser()
1068 coll->freeDefaultReorderCodesOnClose = TRUE; in ucol_setReorderCodesFromParser()
1070 coll->reorderCodesLength = parser->reorderCodesLength; in ucol_setReorderCodesFromParser()
1071 coll->reorderCodes = (int32_t*) uprv_malloc(coll->reorderCodesLength * sizeof(int32_t)); in ucol_setReorderCodesFromParser()
1072 if (coll->reorderCodes == NULL) { in ucol_setReorderCodesFromParser()
1076 … uprv_memcpy(coll->reorderCodes, parser->reorderCodes, coll->reorderCodesLength * sizeof(int32_t)); in ucol_setReorderCodesFromParser()
1077 coll->freeReorderCodesOnClose = TRUE; in ucol_setReorderCodesFromParser()
1159 ucol_buildPermutationTable(UCollator *coll, UErrorCode *status) { in ucol_buildPermutationTable() argument
1162 …int32_t internalReorderCodesLength = coll->reorderCodesLength + (UCOL_REORDER_CODE_LIMIT - UCOL_RE… in ucol_buildPermutationTable()
1180 if(U_FAILURE(*status) || coll == NULL) { in ucol_buildPermutationTable()
1185 if (coll->reorderCodes == NULL || coll->reorderCodesLength == 0 in ucol_buildPermutationTable()
1186 || (coll->reorderCodesLength == 1 && coll->reorderCodes[0] == UCOL_REORDER_CODE_NONE)) { in ucol_buildPermutationTable()
1187 if (coll->leadBytePermutationTable != NULL) { in ucol_buildPermutationTable()
1188 if (coll->freeLeadBytePermutationTableOnClose) { in ucol_buildPermutationTable()
1189 uprv_free(coll->leadBytePermutationTable); in ucol_buildPermutationTable()
1191 coll->leadBytePermutationTable = NULL; in ucol_buildPermutationTable()
1192 coll->reorderCodesLength = 0; in ucol_buildPermutationTable()
1198 if (coll->reorderCodes[0] == UCOL_REORDER_CODE_DEFAULT) { in ucol_buildPermutationTable()
1199 if (coll->reorderCodesLength != 1) { in ucol_buildPermutationTable()
1203 if (coll->freeReorderCodesOnClose == TRUE) { in ucol_buildPermutationTable()
1204 uprv_free(coll->reorderCodes); in ucol_buildPermutationTable()
1206 coll->reorderCodes = NULL; in ucol_buildPermutationTable()
1208 … if (coll->leadBytePermutationTable != NULL && coll->freeLeadBytePermutationTableOnClose == TRUE) { in ucol_buildPermutationTable()
1209 uprv_free(coll->leadBytePermutationTable); in ucol_buildPermutationTable()
1211 coll->leadBytePermutationTable = NULL; in ucol_buildPermutationTable()
1213 if (coll->defaultReorderCodesLength == 0) { in ucol_buildPermutationTable()
1217coll->reorderCodes = (int32_t*)uprv_malloc(coll->defaultReorderCodesLength * sizeof(int32_t)); in ucol_buildPermutationTable()
1218 coll->freeReorderCodesOnClose = TRUE; in ucol_buildPermutationTable()
1219 if (coll->reorderCodes == NULL) { in ucol_buildPermutationTable()
1223 coll->reorderCodesLength = coll->defaultReorderCodesLength; in ucol_buildPermutationTable()
1224 …uprv_memcpy(coll->defaultReorderCodes, coll->reorderCodes, coll->reorderCodesLength * sizeof(int32… in ucol_buildPermutationTable()
1227 if (coll->leadBytePermutationTable == NULL) { in ucol_buildPermutationTable()
1228 coll->leadBytePermutationTable = (uint8_t*)uprv_malloc(256*sizeof(uint8_t)); in ucol_buildPermutationTable()
1229 coll->freeLeadBytePermutationTableOnClose = TRUE; in ucol_buildPermutationTable()
1230 if (coll->leadBytePermutationTable == NULL) { in ucol_buildPermutationTable()
1240 … if (coll->leadBytePermutationTable != NULL && coll->freeLeadBytePermutationTableOnClose == TRUE) { in ucol_buildPermutationTable()
1241 uprv_free(coll->leadBytePermutationTable); in ucol_buildPermutationTable()
1243 coll->leadBytePermutationTable = NULL; in ucol_buildPermutationTable()
1250 for (int32_t codeIndex = 0; codeIndex < coll->reorderCodesLength; codeIndex++) { in ucol_buildPermutationTable()
1251 uint32_t reorderCodesCode = coll->reorderCodes[codeIndex]; in ucol_buildPermutationTable()
1262 coll->leadBytePermutationTable[i] = i; in ucol_buildPermutationTable()
1266 coll->leadBytePermutationTable[i] = 0; in ucol_buildPermutationTable()
1286 … if (coll->leadBytePermutationTable != NULL && coll->freeLeadBytePermutationTableOnClose == TRUE) { in ucol_buildPermutationTable()
1287 uprv_free(coll->leadBytePermutationTable); in ucol_buildPermutationTable()
1289 coll->leadBytePermutationTable = NULL; in ucol_buildPermutationTable()
1290 coll->reorderCodesLength = 0; in ucol_buildPermutationTable()
1301 …uint16_t leadByteCount = ucol_getLeadBytesForReorderCode(coll->UCA, next, leadBytes, leadBytesSize… in ucol_buildPermutationTable()
1308 … if (coll->leadBytePermutationTable != NULL && coll->freeLeadBytePermutationTableOnClose == TRUE) { in ucol_buildPermutationTable()
1309 uprv_free(coll->leadBytePermutationTable); in ucol_buildPermutationTable()
1311 coll->leadBytePermutationTable = NULL; in ucol_buildPermutationTable()
1312 coll->reorderCodesLength = 0; in ucol_buildPermutationTable()
1319 coll->leadBytePermutationTable[leadBytes[leadByteIndex]] = toBottom; in ucol_buildPermutationTable()
1330 … if (coll->leadBytePermutationTable != NULL && coll->freeLeadBytePermutationTableOnClose == TRUE) { in ucol_buildPermutationTable()
1331 uprv_free(coll->leadBytePermutationTable); in ucol_buildPermutationTable()
1333 coll->leadBytePermutationTable = NULL; in ucol_buildPermutationTable()
1334 coll->reorderCodesLength = 0; in ucol_buildPermutationTable()
1341 coll->leadBytePermutationTable[leadBytes[leadByteIndex]] = toTop; in ucol_buildPermutationTable()
1352 fprintf(stdout, "\t%02x = %02x\n", i, coll->leadBytePermutationTable[i]); in ucol_buildPermutationTable()
1371 coll->leadBytePermutationTable[i] = reorderCode; in ucol_buildPermutationTable()
1380 fprintf(stdout, "\t%02x = %02x\n", i, coll->leadBytePermutationTable[i]); in ucol_buildPermutationTable()
1389 coll->latinOneRegenTable = TRUE; in ucol_buildPermutationTable()
1390 ucol_updateInternalState(coll, status); in ucol_buildPermutationTable()