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


3.2.19 dll_join

Join two lists.

Synopsis

     #include <linklist/linklist.h>
     
     
     
void dll_join( DLinkList dst_ull, DLinkList src_ull );

Parameters

DLinkList dst_ull
the destination list
DLinkList src_ull
the source list

Description

This routine moves the nodes in a list to another. If the destination list has a preferred order (if a comparison function was specified when the list was created), the new nodes are inserted in order. (This implies that the data in the source list have the same format as those in the destination list.) If it has no preferred order, the source list is simply appended to the destination list. The source list is not destroyed, it is simply emptied.