Lines Matching full:list

14  *    notice, this list of conditions and the following disclaimer.
16 * notice, this list of conditions and the following disclaimer in the
49 * notice, this list of conditions and the following disclaimer.
51 * notice, this list of conditions and the following disclaimer in the
90 /* A doubly-linked list of pointers. */
91 typedef struct List List; typedef
92 /* A single node in the doubly-linked list. */
96 ListNode *prev; /* previous node in list, or NULL */
97 ListNode *next; /* next node in list, or NULL */
101 struct List { struct
106 /* Free the list nodes. */
107 void Lst_Done(List *);
108 /* Free the list nodes, as well as each node's datum. */
109 void Lst_DoneFree(List *);
113 /* Initialize a list, without memory allocation. */
115 Lst_Init(List *list) in Lst_Init() argument
117 list->first = NULL; in Lst_Init()
118 list->last = NULL; in Lst_Init()
121 /* Get information about a list */
124 Lst_IsEmpty(List *list) in Lst_IsEmpty() argument
126 return list->first == NULL; in Lst_IsEmpty()
130 ListNode *Lst_FindDatum(List *, const void *) MAKE_ATTR_USE;
132 /* Modify a list */
135 void Lst_InsertBefore(List *, ListNode *, void *);
136 /* Add a datum at the head of the list. */
137 void Lst_Prepend(List *, void *);
138 /* Add a datum at the tail of the list. */
139 void Lst_Append(List *, void *);
140 /* Remove the node from the list. */
141 void Lst_Remove(List *, ListNode *);
142 void Lst_PrependAll(List *, List *);
143 void Lst_AppendAll(List *, List *);
144 void Lst_MoveAll(List *, List *);
150 /* Set the value of the node to NULL. Having NULL in a list is unusual. */
153 /* Using the list as a queue */
157 Lst_Enqueue(List *list, void *datum) in Lst_Enqueue() argument
159 Lst_Append(list, datum); in Lst_Enqueue()
163 void *Lst_Dequeue(List *) MAKE_ATTR_USE;