Next: , Previous: dll_delete, Up: Doubly Linked Lists


3.2.3 dll_udelete

Delete a doubly list.

Synopsis

     #include <linklist/linklist.h>
     
     
     
void dll_udelete( DLinkList ull, void (*ufree)(void *,void *), void *udata );

Parameters

DLinkList ull
the linked list to be deleted
void (*ufree)(void *,void *)
a function called at each link to delete user data. it may be DLL_NULL_DELETE
void *udata
a pointer to data to be passed to the action routine

Description

dll_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 dll_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.