Next: , Previous: sll_insert_tail_node, Up: Singly Linked Lists


3.1.19 sll_join

Join two lists.

Synopsis

     #include <linklist/linklist.h>
     
     
     
void sll_join( SLinkList dst_ull, SLinkList src_ull );

Parameters

SLinkList dst_ull
the destination list
SLinkList 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.