Lines Matching refs:item
4 node in the list consists of two pointers, one to the data item
6 the same struct as each node, but the "item" ptr is used to point
50 lp->ptr.item = NULL;
54 Adds item to the list pointed to by lp. Finds the end of the
56 The item pointer in the new node is set to "item" passed in,
61 add_to_list(list_ptr lp, void *item)
70 lp->next->ptr.item = item;
88 lp->ptr.item = NULL;
97 passed in. If start_at_curr is TRUE, the new list's first item
98 is the "current" item (as set by calls to first/next_in_list()).
99 If start_at_curr is FALSE, the first item in the new list is the
100 same as the first item in the old list. In either case, the
139 Scans through list, looking for a node whose ptr.item is equal to
140 the "item" passed in. "Equal" here means the same address - no
143 list. Storage for the node is freed, but not for the item itself.
144 Returns a pointer to the item, so the caller can free it if it
148 delete_from_list(list_ptr lp, void *item)
153 if (lp->next->ptr.item == item) {
158 return item;
171 with new_list(). If free_items is true, each item pointed to
179 void *item = del_node->ptr.item;
183 free(item);
189 delete_list_destroying(list_ptr lp, void destructor(void *item))
193 void *item = del_node->ptr.item;
197 destructor(item);
204 Returns a ptr to the first *item* (not list node) in the list.
217 return lp->ptr.curr ? lp->ptr.curr->ptr.item : NULL;
221 Returns a ptr to the next *item* (not list node) in the list.
224 Returns NULL if no next item.
237 return lp->ptr.curr ? lp->ptr.curr->ptr.item : NULL;