Lines Matching refs:aiter
80 static void ures_a_open(UResourceBundleAIterator *aiter, UResourceBundle *bund, UErrorCode *status)… in ures_a_open() argument
84 aiter->bund = bund; in ures_a_open()
85 aiter->num = ures_getSize(aiter->bund); in ures_a_open()
86 aiter->cursor = 0; in ures_a_open()
88 aiter->entries = NULL; in ures_a_open()
90 aiter->entries = (UResAEntry*)uprv_malloc(sizeof(UResAEntry)*aiter->num); in ures_a_open()
91 for(int i=0;i<aiter->num;i++) { in ures_a_open()
92 aiter->entries[i].item = ures_getByIndex(aiter->bund, i, NULL, status); in ures_a_open()
93 const char *akey = ures_getKey(aiter->entries[i].item); in ures_a_open()
95 aiter->entries[i].key = (UChar*)uprv_malloc(len*sizeof(UChar)); in ures_a_open()
96 u_charsToUChars(akey, aiter->entries[i].key, len); in ures_a_open()
98 …uprv_sortArray(aiter->entries, aiter->num, sizeof(UResAEntry), ures_a_codepointSort, NULL, TRUE, s… in ures_a_open()
102 static void ures_a_close(UResourceBundleAIterator *aiter) { in ures_a_close() argument
104 for(int i=0;i<aiter->num;i++) { in ures_a_close()
105 uprv_free(aiter->entries[i].key); in ures_a_close()
106 ures_close(aiter->entries[i].item); in ures_a_close()
111 static const UChar *ures_a_getNextString(UResourceBundleAIterator *aiter, int32_t *len, const char … in ures_a_getNextString() argument
113 return ures_getNextString(aiter->bund, len, key, err); in ures_a_getNextString()
116 UResourceBundle *item = aiter->entries[aiter->cursor].item; in ures_a_getNextString()
119 aiter->cursor++; in ures_a_getNextString()
639 UResourceBundleAIterator aiter; in addCLDRData() local
640 ures_a_open(&aiter, patBundle, &err); in addCLDRData()
644 retPattern=ures_a_getNextString(&aiter, &len, &key, &err); in addCLDRData()
658 ures_a_close(&aiter); in addCLDRData()