Next: dll_insert_head, Previous: dll_head_node, Up: Doubly Linked Lists
Create and insert a node into a doubly linked list.
#include <linklist/linklist.h>int dll_insert( DLinkList ull, void *data );
DLinkList ull
- a handle to the list into which to insert the node
void *data
- a pointer to the new node's data
dll_insert
creates a node, stores the passed data pointer in
it, and inserts the node in the list in the collating order
determined by the comparison function with which the list was
initialized by dll_new
.
It returns zero if the insert was successful, non-zero if it was unable to create the new node.