Lines Matching refs:list
77 Curl_llist_insert_next(struct Curl_llist *list, in Curl_llist_insert_next() argument
82 DEBUGASSERT(list); in Curl_llist_insert_next()
83 DEBUGASSERT(list->_init == LLISTINIT); in Curl_llist_insert_next()
90 ne->_list = list; in Curl_llist_insert_next()
91 if(list->_size == 0) { in Curl_llist_insert_next()
92 list->_head = ne; in Curl_llist_insert_next()
93 list->_head->_prev = NULL; in Curl_llist_insert_next()
94 list->_head->_next = NULL; in Curl_llist_insert_next()
95 list->_tail = ne; in Curl_llist_insert_next()
99 ne->_next = e ? e->_next : list->_head; in Curl_llist_insert_next()
102 list->_head->_prev = ne; in Curl_llist_insert_next()
103 list->_head = ne; in Curl_llist_insert_next()
109 list->_tail = ne; in Curl_llist_insert_next()
115 ++list->_size; in Curl_llist_insert_next()
128 Curl_llist_append(struct Curl_llist *list, const void *p, in Curl_llist_append() argument
131 DEBUGASSERT(list); in Curl_llist_append()
132 DEBUGASSERT(list->_init == LLISTINIT); in Curl_llist_append()
134 Curl_llist_insert_next(list, list->_tail, p, ne); in Curl_llist_append()
144 struct Curl_llist *list; in Curl_node_uremove() local
148 list = e->_list; in Curl_node_uremove()
149 DEBUGASSERT(list); in Curl_node_uremove()
150 DEBUGASSERT(list->_init == LLISTINIT); in Curl_node_uremove()
151 DEBUGASSERT(list->_size); in Curl_node_uremove()
153 if(e == list->_head) { in Curl_node_uremove()
154 list->_head = e->_next; in Curl_node_uremove()
156 if(!list->_head) in Curl_node_uremove()
157 list->_tail = NULL; in Curl_node_uremove()
166 list->_tail = e->_prev; in Curl_node_uremove()
181 --list->_size; in Curl_node_uremove()
184 if(list->_dtor) in Curl_node_uremove()
185 list->_dtor(user, ptr); in Curl_node_uremove()
194 Curl_llist_destroy(struct Curl_llist *list, void *user) in Curl_llist_destroy() argument
196 if(list) { in Curl_llist_destroy()
197 DEBUGASSERT(list->_init == LLISTINIT); in Curl_llist_destroy()
198 while(list->_size > 0) in Curl_llist_destroy()
199 Curl_node_uremove(list->_tail, user); in Curl_llist_destroy()
205 struct Curl_llist_node *Curl_llist_head(struct Curl_llist *list) in Curl_llist_head() argument
207 DEBUGASSERT(list); in Curl_llist_head()
208 DEBUGASSERT(list->_init == LLISTINIT); in Curl_llist_head()
209 return VERIFYNODE(list->_head); in Curl_llist_head()
215 struct Curl_llist_node *Curl_llist_tail(struct Curl_llist *list) in Curl_llist_tail() argument
217 DEBUGASSERT(list); in Curl_llist_tail()
218 DEBUGASSERT(list->_init == LLISTINIT); in Curl_llist_tail()
219 return VERIFYNODE(list->_tail); in Curl_llist_tail()
224 size_t Curl_llist_count(struct Curl_llist *list) in Curl_llist_count() argument
226 DEBUGASSERT(list); in Curl_llist_count()
227 DEBUGASSERT(list->_init == LLISTINIT); in Curl_llist_count()
228 return list->_size; in Curl_llist_count()