Lines Matching defs:sts
87 initFromResourceBundle(UErrorCode& sts) {
91 gLocExtKeyMap = uhash_open(uhash_hashIChars, uhash_compareIChars, NULL, &sts);
93 LocalUResourceBundlePointer keyTypeDataRes(ures_openDirect(NULL, "keyTypeData", &sts));
94 LocalUResourceBundlePointer keyMapRes(ures_getByKey(keyTypeDataRes.getAlias(), "keyMap", NULL, &sts));
95 LocalUResourceBundlePointer typeMapRes(ures_getByKey(keyTypeDataRes.getAlias(), "typeMap", NULL, &sts));
97 if (U_FAILURE(sts)) {
107 gKeyTypeStringPool = new UVector(uloc_deleteKeyTypeStringPoolEntry, NULL, sts);
109 if (U_SUCCESS(sts)) {
110 sts = U_MEMORY_ALLOCATION_ERROR;
113 if (U_FAILURE(sts)) {
116 gLocExtKeyDataEntries = new UVector(uloc_deleteKeyDataEntry, NULL, sts);
118 if (U_SUCCESS(sts)) {
119 sts = U_MEMORY_ALLOCATION_ERROR;
122 if (U_FAILURE(sts)) {
125 gLocExtTypeEntries = new UVector(uloc_deleteTypeEntry, NULL, sts);
127 if (U_SUCCESS(sts)) {
128 sts = U_MEMORY_ALLOCATION_ERROR;
131 if (U_FAILURE(sts)) {
139 keyMapEntry.adoptInstead(ures_getNextResource(keyMapRes.getAlias(), keyMapEntry.orphan(), &sts));
140 if (U_FAILURE(sts)) {
145 const UChar* uBcpKeyId = ures_getString(keyMapEntry.getAlias(), &bcpKeyIdLen, &sts);
146 if (U_FAILURE(sts)) {
155 sts = U_MEMORY_ALLOCATION_ERROR;
160 gKeyTypeStringPool->addElement(bcpKeyIdBuf, sts);
161 if (U_FAILURE(sts)) {
169 UHashtable* typeDataMap = uhash_open(uhash_hashIChars, uhash_compareIChars, NULL, &sts);
170 if (U_FAILURE(sts)) {
203 typeMapEntry.adoptInstead(ures_getNextResource(typeMapResByKey.getAlias(), typeMapEntry.orphan(), &sts));
204 if (U_FAILURE(sts)) {
226 sts = U_MEMORY_ALLOCATION_ERROR;
241 gKeyTypeStringPool->addElement(legacyTypeIdBuf, sts);
242 if (U_FAILURE(sts)) {
250 const UChar* uBcpTypeId = ures_getString(typeMapEntry.getAlias(), &bcpTypeIdLen, &sts);
251 if (U_FAILURE(sts)) {
260 sts = U_MEMORY_ALLOCATION_ERROR;
265 gKeyTypeStringPool->addElement(bcpTypeIdBuf, sts);
266 if (U_FAILURE(sts)) {
278 sts = U_MEMORY_ALLOCATION_ERROR;
283 gLocExtTypeEntries->addElement((void*)t, sts);
284 if (U_FAILURE(sts)) {
288 uhash_put(typeDataMap, (void*)legacyTypeId, t, &sts);
291 uhash_put(typeDataMap, (void*)bcpTypeId, t, &sts);
293 if (U_FAILURE(sts)) {
302 while (ures_hasNext(typeAliasResByKey.getAlias()) && U_SUCCESS(sts)) {
304 typeAliasDataEntry.adoptInstead(ures_getNextResource(typeAliasResByKey.getAlias(), typeAliasDataEntry.orphan(), &sts));
305 const UChar* to = ures_getString(typeAliasDataEntry.getAlias(), &toLen, &sts);
306 if (U_FAILURE(sts)) {
318 sts = U_MEMORY_ALLOCATION_ERROR;
333 gKeyTypeStringPool->addElement(fromBuf, sts);
334 if (U_FAILURE(sts)) {
340 uhash_put(typeDataMap, (void*)from, t, &sts);
343 if (U_FAILURE(sts)) {
352 while (ures_hasNext(bcpTypeAliasResByKey.getAlias()) && U_SUCCESS(sts)) {
354 bcpTypeAliasDataEntry.adoptInstead(ures_getNextResource(bcpTypeAliasResByKey.getAlias(), bcpTypeAliasDataEntry.orphan(), &sts));
355 const UChar* to = ures_getString(bcpTypeAliasDataEntry.getAlias(), &toLen, &sts);
356 if (U_FAILURE(sts)) {
362 uhash_put(typeDataMap, (void*)from, t, &sts);
365 if (U_FAILURE(sts)) {
371 if (U_FAILURE(sts)) {
377 sts = U_MEMORY_ALLOCATION_ERROR;
385 gLocExtKeyDataEntries->addElement((void*)keyData, sts);
386 if (U_FAILURE(sts)) {
390 uhash_put(gLocExtKeyMap, (void*)legacyKeyId, keyData, &sts);
393 uhash_put(gLocExtKeyMap, (void*)bcpKeyId, keyData, &sts);
395 if (U_FAILURE(sts)) {
403 UErrorCode sts = U_ZERO_ERROR;
404 umtx_initOnce(gLocExtKeyMapInitOnce, &initFromResourceBundle, sts);
405 if (U_FAILURE(sts)) {