Generic doubly-linked list routines.
|
Functions |
|
void | dlAddAfter (dlNode *anchor, dlNode *newNode) |
| | Add a node to list after anchor member.
|
|
void | dlAddBefore (dlNode *anchor, dlNode *newNode) |
| | Add a node to list before anchor member.
|
|
void | dlAddHead (dlList *list, dlNode *newNode) |
| | Add a node to head of list.
|
|
void | dlAddTail (dlList *list, dlNode *newNode) |
| | Add a node to tail of list.
|
|
dlNode * | dlAddValAfter (dlNode *anchor, void *val) |
| | Create a node containing val and add to list after anchor member.
|
|
dlNode * | dlAddValBefore (dlNode *anchor, void *val) |
| | Create a node containing val and add to list before anchor member.
|
|
dlNode * | dlAddValHead (dlList *list, void *val) |
| | Create a node containing val and add to head of list.
|
|
dlNode * | dlAddValTail (dlList *list, void *val) |
| | Create a node containing val and add to tail of list.
|
|
void | dlCat (dlList *a, dlList *b) |
| | Move items from b to end of a.
|
|
int | dlCount (dlList *list) |
| | Return length of list.
|
|
void | dlDelete (dlNode **nodePtr) |
| | Removes a node from list and frees it.
|
|
int | dlEmpty (dlList *list) |
| | Return 1 if list is empty.
|
|
dlNode * | dlGetAfterTail (dlList *list) |
| | Get the node after the tail of the list.
|
|
dlNode * | dlGetBeforeHead (dlList *list) |
| | Get the node before the head of the list.
|
|
void | dlListFree (dlList **pList) |
| | Free up a doubly linked list and it's nodes, but not the node values.
|
| void | dlListFreeAndVals (dlList **pList) |
| | Free all values in doubly linked list and the list itself.
|
|
void | dlListInit (dlList *dl) |
| | Initialize list to be empty.
|
|
dlList * | dlListNew (void) |
| | Return a new doubly linked list.
|
|
void | dlListReset (dlList *dl) |
| | Reset a list to the empty state (does not free values).
|
|
dlNode * | dlPopHead (dlList *list) |
| | Remove first node from list and return it.
|
|
dlNode * | dlPopTail (dlList *list) |
| | Remove last node from list and return it.
|
| void | dlRemove (dlNode *node) |
| | Removes a node from list.
|
| void | dlRemoveHead (dlList *list) |
| | Removes head from list.
|
| void | dlRemoveTail (dlList *list) |
| | Remove tail from list.
|
| void | dlSort (dlList *list, int(*compare)(const void *elem1, const void *elem2)) |
| | Sort a singly linked list with Qsort and a temporary array.
|
|
dlNode * | dlValInList (dlList *list, void *val) |
| | Return node on list if any that has associated val.
|
Generic doubly-linked list routines.