A simple doubly-linked list implementation. More...
#include <stddef.h>Go to the source code of this file.
Classes | |
| struct | dlList_node |
| Node. More... | |
| struct | dlList |
| Doubly-linked list. More... | |
Enumerations | |
| enum | dlList_returnValues { DLLIST_OK = 0, DLLIST_ERR_errArg, DLLIST_ERR_malloc, DLLIST_ERR_undefFunc } |
| Return values. More... | |
Functions | |
| void | dlList_init (struct dlList *list, void(*destroyFunction)(void *data), int(*compareFunction)(const void *data1, const void *data2), void *(*dataDeepCopyFunction)(const void *data)) |
| Initialise a doubly-linked list object. | |
| void | dlList_destroy (struct dlList *list) |
| Destroy a doubly-linked list. | |
| int | dlList_insertBefore (struct dlList *list, struct dlList_node *beforeNode, void *data) |
| Insert a new node before another node. | |
| int | dlList_insertAfter (struct dlList *list, struct dlList_node *afterNode, void *data) |
| Insert a new node after another node. | |
| int | dlList_insertOrdered (struct dlList *list, void *data) |
| Insert a new node in a sorted list. | |
| int | dlList_append (struct dlList *list, void *data) |
| Insert a new node at the end of a list. | |
| int | dlList_remove (struct dlList *list, struct dlList_node *node, void **data) |
| Remove a node from a list. | |
| struct dlList_node * | dlList_find (const struct dlList *list, const void *key) |
| Search for a node in a list. | |
| struct dlList | dlList_copy (const struct dlList *list) |
| Creates a duplicate of a list. | |
| int | dlList_appendList (struct dlList *list1, const struct dlList *list2) |
| Append one list to another. | |
| void | dlList_sort (struct dlList *list) |
| Sort a list. | |
| size_t | dlList_size (const struct dlList *list) |
| Number of nodes in list. | |
| struct dlList_node * | dlList_first (const struct dlList *list) |
| First node in list. | |
| struct dlList_node * | dlList_last (const struct dlList *list) |
| Last node in list. | |
A simple doubly-linked list implementation.
Supports sorting and user-defined node deep-copy and destroy functions.
1.8.1.2