Lines Matching refs:list

33 static void ulist_addFirstItem(UList *list, UListNode *newItem);
61 static void ulist_addFirstItem(UList *list, UListNode *newItem) { in ulist_addFirstItem() argument
64 list->head = newItem; in ulist_addFirstItem()
65 list->tail = newItem; in ulist_addFirstItem()
66 list->currentIndex = 0; in ulist_addFirstItem()
69 U_CAPI void U_EXPORT2 ulist_addItemEndList(UList *list, const void *data, UBool forceDelete, UError… in ulist_addItemEndList() argument
72 if (U_FAILURE(*status) || list == NULL || data == NULL) { in ulist_addItemEndList()
84 if (list->size == 0) { in ulist_addItemEndList()
85 ulist_addFirstItem(list, newItem); in ulist_addItemEndList()
88 newItem->previous = list->tail; in ulist_addItemEndList()
89 list->tail->next = newItem; in ulist_addItemEndList()
90 list->tail = newItem; in ulist_addItemEndList()
93 list->size++; in ulist_addItemEndList()
96 U_CAPI void U_EXPORT2 ulist_addItemBeginList(UList *list, const void *data, UBool forceDelete, UErr… in ulist_addItemBeginList() argument
99 if (U_FAILURE(*status) || list == NULL || data == NULL) { in ulist_addItemBeginList()
111 if (list->size == 0) { in ulist_addItemBeginList()
112 ulist_addFirstItem(list, newItem); in ulist_addItemBeginList()
115 newItem->next = list->head; in ulist_addItemBeginList()
116 list->head->previous = newItem; in ulist_addItemBeginList()
117 list->head = newItem; in ulist_addItemBeginList()
118 list->currentIndex++; in ulist_addItemBeginList()
121 list->size++; in ulist_addItemBeginList()
124 U_CAPI UBool U_EXPORT2 ulist_containsString(const UList *list, const char *data, int32_t length) { in ulist_containsString() argument
128 if (list != NULL && list->size != 0) { in ulist_containsString()
129 pointer = list->head; in ulist_containsString()
146 U_CAPI void *U_EXPORT2 ulist_getNext(UList *list) { in ulist_getNext() argument
149 if (list == NULL || list->curr == NULL) { in ulist_getNext()
153 curr = list->curr; in ulist_getNext()
154 list->curr = curr->next; in ulist_getNext()
155 list->currentIndex++; in ulist_getNext()
160 U_CAPI int32_t U_EXPORT2 ulist_getListSize(const UList *list) { in ulist_getListSize() argument
161 if (list != NULL) { in ulist_getListSize()
162 return list->size; in ulist_getListSize()
168 U_CAPI void U_EXPORT2 ulist_resetList(UList *list) { in ulist_resetList() argument
169 if (list != NULL) { in ulist_resetList()
170 list->curr = list->head; in ulist_resetList()
171 list->currentIndex = 0; in ulist_resetList()
175 U_CAPI void U_EXPORT2 ulist_deleteList(UList *list) { in ulist_deleteList() argument
178 if (list != NULL) { in ulist_deleteList()
179 listHead = list->head; in ulist_deleteList()
190 uprv_free(list); in ulist_deleteList()
191 list = NULL; in ulist_deleteList()