Home | History | Annotate | Download | only in i18n

Lines Matching refs:currencyNames

823                      CurrencyNameStruct** currencyNames, 
841 *currencyNames = (CurrencyNameStruct*)uprv_malloc
912 (*currencyNames)[*total_currency_name_count].IsoCode = iso;
914 (*currencyNames)[*total_currency_name_count].currencyName = upperName;
915 (*currencyNames)[*total_currency_name_count].flag = NEED_TO_BE_DELETED;
916 (*currencyNames)[(*total_currency_name_count)++].currencyNameLen = len;
954 (*currencyNames)[*total_currency_name_count].IsoCode = iso;
956 (*currencyNames)[*total_currency_name_count].currencyName = upperName;
957 (*currencyNames)[*total_currency_name_count].flag = NEED_TO_BE_DELETED;
958 (*currencyNames)[(*total_currency_name_count)++].currencyNameLen = len;
975 qsort(*currencyNames, *total_currency_name_count,
984 printf("iso: %s\n", (*currencyNames)[index].IsoCode);
986 for (int32_t i = 0; i < (*currencyNames)[index].currencyNameLen; ++i) {
987 printf("%c", (unsigned char)(*currencyNames)[index].currencyName[i]);
990 printf("len: %d\n", (*currencyNames)[index].currencyNameLen);
1006 // @param currencyNames: currency names array
1013 binarySearch(const CurrencyNameStruct* currencyNames,
1024 if (indexInCurrencyNames >= currencyNames[mid].currencyNameLen) {
1027 if (key > currencyNames[mid].currencyName[indexInCurrencyNames]) {
1030 else if (key < currencyNames[mid].currencyName[indexInCurrencyNames]) {
1048 if (indexInCurrencyNames >= currencyNames[M].currencyNameLen) {
1051 if (currencyNames[M].currencyName[indexInCurrencyNames] < key) {
1055 U_ASSERT(currencyNames[M].currencyName[indexInCurrencyNames] == key);
1067 U_ASSERT(currencyNames[*begin].currencyName[indexInCurrencyNames] == key);
1079 if (currencyNames[M].currencyNameLen < indexInCurrencyNames) {
1082 if (currencyNames[M].currencyName[indexInCurrencyNames] > key) {
1086 U_ASSERT(currencyNames[M].currencyName[indexInCurrencyNames] == key);
1095 if (currencyNames[R].currencyName[indexInCurrencyNames] > key) {
1105 if (currencyNames[*begin].currencyNameLen == indexInCurrencyNames + 1) {
1118 // Linear search "text" in "currencyNames".
1119 // @param begin, end: the begin and end index in currencyNames, within which
1127 linearSearch(const CurrencyNameStruct* currencyNames,
1132 int32_t len = currencyNames[index].currencyNameLen;
1134 uprv_memcmp(currencyNames[index].currencyName, text, len * sizeof(UChar)) == 0) {
1147 // Find longest match between "text" and currency names in "currencyNames".
1148 // @param total_currency_count: total number of currency names in CurrencyNames.
1155 searchCurrencyName(const CurrencyNameStruct* currencyNames,
1165 // For example, given the currency names in currencyNames array are:
1181 matchIndex = binarySearch(currencyNames, index,
1189 // in currencyNames array.
1195 linearSearch(currencyNames, binarySearchBegin, binarySearchEnd,
1208 CurrencyNameStruct* currencyNames; // value
1232 deleteCurrencyNames(CurrencyNameStruct* currencyNames, int32_t count) {
1234 if ( (currencyNames[index].flag & NEED_TO_BE_DELETED) ) {
1235 uprv_free(currencyNames[index].currencyName);
1238 uprv_free(currencyNames);
1244 deleteCurrencyNames(entry->currencyNames, entry->totalCurrencyNameCount);
1278 CurrencyNameStruct* currencyNames = NULL;
1296 currencyNames = cacheEntry->currencyNames;
1304 collectCurrencyNames(locale, &currencyNames, &total_currency_name_count, &currencySymbols, &total_currency_symbol_count, ec);
1335 cacheEntry->currencyNames = currencyNames;
1344 deleteCurrencyNames(currencyNames, total_currency_name_count);
1347 currencyNames = cacheEntry->currencyNames;
1368 searchCurrencyName(currencyNames, total_currency_name_count,
1389 u_charsToUChars(currencyNames[matchIndex].IsoCode, result, 4);