Home | History | Annotate | Download | only in src

Lines Matching refs:node

20 static list_node_t *list_free_node_(list_t *list, list_node_t *node);
55 for (const list_node_t *node = list_begin(list); node != list_end(list); node = list_next(node)) {
56 if (list_node(node) == data)
94 list_node_t *node = (list_node_t *)list->allocator->alloc(sizeof(list_node_t));
95 if (!node)
98 node->next = prev_node->next;
99 node->data = data;
100 prev_node->next = node;
102 list->tail = node;
111 list_node_t *node = (list_node_t *)list->allocator->alloc(sizeof(list_node_t));
112 if (!node)
114 node->next = list->head;
115 node->data = data;
116 list->head = node;
127 list_node_t *node = (list_node_t *)list->allocator->alloc(sizeof(list_node_t));
128 if (!node)
130 node->next = NULL;
131 node->data = data;
133 list->head = node;
134 list->tail = node;
136 list->tail->next = node;
137 list->tail = node;
158 for (list_node_t *prev = list->head, *node = list->head->next; node; prev = node, node = node->next)
159 if (node->data == data) {
160 prev->next = list_free_node_(list, node);
161 if (list->tail == node)
171 for (list_node_t *node = list->head; node; )
172 node = list_free_node_(list, node);
182 for (list_node_t *node = list->head; node; ) {
183 list_node_t *next = node->next;
184 if (!callback(node->data, context))
185 return node;
186 node = next;
201 list_node_t *list_next(const list_node_t *node) {
202 assert(node != NULL);
203 return node->next;
206 void *list_node(const list_node_t *node) {
207 assert(node != NULL);
208 return node->data;
211 static list_node_t *list_free_node_(list_t *list, list_node_t *node) {
213 assert(node != NULL);
215 list_node_t *next = node->next;
218 list->free_cb(node->data);
219 list->allocator->free(node);