Lines Matching refs:list
0 /* list.c - Functions for manipulating linked lists of objects. */
32 /* A global variable which acts as a sentinel for an `error' list return. */
36 /* Call FUNCTION on every member of LIST, a generic list. */
38 list_walk (list, function)
39 GENERIC_LIST *list;
42 for ( ; list; list = list->next)
43 if ((*function) (list) < 0)
63 list_reverse (list)
64 GENERIC_LIST *list;
68 for (prev = (GENERIC_LIST *)NULL; list; )
70 next = list->next;
71 list->next = prev;
72 prev = list;
73 list = next;
78 /* Return the number of elements in LIST, a generic list. */
80 list_length (list)
81 GENERIC_LIST *list;
85 for (i = 0; list; list = list->next, i++);
89 /* Append TAIL to HEAD. Return the header of the list. */
108 the element wasn't found. COMPARER is called with the list element and
110 to the list. You might call this function like this:
116 list_remove (list, comparer, arg)
117 GENERIC_LIST **list;
123 for (prev = (GENERIC_LIST *)NULL, temp = *list; temp; prev = temp, temp = temp->next)
130 *list = temp->next;