Lines Matching full:en
34 static void* _getBuffer(UEnumeration* en, int32_t capacity) { in _getBuffer() argument
36 if (en->baseContext != NULL) { in _getBuffer()
37 if (((_UEnumBuffer*) en->baseContext)->len < capacity) { in _getBuffer()
39 en->baseContext = uprv_realloc(en->baseContext, in _getBuffer()
41 if (en->baseContext == NULL) { in _getBuffer()
44 ((_UEnumBuffer*) en->baseContext)->len = capacity; in _getBuffer()
48 en->baseContext = uprv_malloc(sizeof(int32_t) + capacity); in _getBuffer()
49 if (en->baseContext == NULL) { in _getBuffer()
52 ((_UEnumBuffer*) en->baseContext)->len = capacity; in _getBuffer()
55 return (void*) & ((_UEnumBuffer*) en->baseContext)->data; in _getBuffer()
59 uenum_close(UEnumeration* en) in uenum_close() argument
61 if (en) { in uenum_close()
62 if (en->close != NULL) { in uenum_close()
63 if (en->baseContext) { in uenum_close()
64 uprv_free(en->baseContext); in uenum_close()
66 en->close(en); in uenum_close()
68 uprv_free(en); in uenum_close()
74 uenum_count(UEnumeration* en, UErrorCode* status) in uenum_count() argument
76 if (!en || U_FAILURE(*status)) { in uenum_count()
79 if (en->count != NULL) { in uenum_count()
80 return en->count(en, status); in uenum_count()
89 uenum_unextDefault(UEnumeration* en, in uenum_unextDefault() argument
95 if (en->next != NULL) { in uenum_unextDefault()
96 const char *cstr = en->next(en, &len, status); in uenum_unextDefault()
98 ustr = (UChar*) _getBuffer(en, (len+1) * sizeof(UChar)); in uenum_unextDefault()
116 uenum_nextDefault(UEnumeration* en, in uenum_nextDefault() argument
120 if (en->uNext != NULL) { in uenum_nextDefault()
122 const UChar *tempUCharVal = en->uNext(en, resultLength, status); in uenum_nextDefault()
127 _getBuffer(en, (*resultLength+1) * sizeof(char)); in uenum_nextDefault()
141 uenum_unext(UEnumeration* en, in uenum_unext() argument
145 if (!en || U_FAILURE(*status)) { in uenum_unext()
148 if (en->uNext != NULL) { in uenum_unext()
149 return en->uNext(en, resultLength, status); in uenum_unext()
157 uenum_next(UEnumeration* en, in uenum_next() argument
161 if (!en || U_FAILURE(*status)) { in uenum_next()
164 if (en->next != NULL) { in uenum_next()
166 return en->next(en, resultLength, status); in uenum_next()
170 return en->next(en, &dummyLength, status); in uenum_next()
179 uenum_reset(UEnumeration* en, UErrorCode* status) in uenum_reset() argument
181 if (!en || U_FAILURE(*status)) { in uenum_reset()
184 if (en->reset != NULL) { in uenum_reset()
185 en->reset(en, status); in uenum_reset()