Next: sll_destroy, Previous: sll_delete, Up: Singly Linked Lists
Delete a singly linked list.
#include <linklist/linklist.h>void sll_udelete( SLinkList ull, void (*ufree)(void *,void *), void *udata );
SLinkList ull
- the linked list to be deleted
void (*ufree)(void *,void *)
- a function called at each link to delete user data. it may be
SLL_NULL_DELETE
void *udata
- a pointer to data to be passed to the action routine
sll_udelete
traverses a linked list, calling a user-supplied
function at each node in the list, then deleting the node. Finally
it deletes the list header. This routine differs from
sll_delete
in that it can pass along a pointer provided by
the calling routine to the action routine, allowing arbitrary data
to be available to the action routine.