Lines Matching refs:list
0 /* list.c - Functions for manipulating linked lists of objects. */
33 /* A global variable which acts as a sentinel for an `error' list return. */
37 /* Call FUNCTION on every member of LIST, a generic list. */
39 list_walk (list, function)
40 GENERIC_LIST *list;
43 for ( ; list; list = list->next)
44 if ((*function) (list) < 0)
64 list_reverse (list)
65 GENERIC_LIST *list;
69 for (prev = (GENERIC_LIST *)NULL; list; )
71 next = list->next;
72 list->next = prev;
73 prev = list;
74 list = next;
79 /* Return the number of elements in LIST, a generic list. */
81 list_length (list)
82 GENERIC_LIST *list;
86 for (i = 0; list; list = list->next, i++);
90 /* Append TAIL to HEAD. Return the header of the list. */
109 the element wasn't found. COMPARER is called with the list element and
111 to the list. You might call this function like this:
117 list_remove (list, comparer, arg)
118 GENERIC_LIST **list;
124 for (prev = (GENERIC_LIST *)NULL, temp = *list; temp; prev = temp, temp = temp->next)
131 *list = temp->next;