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


3.1.16 sll_insert_node

Insert a detached node into a list.

Synopsis

     #include <linklist/linklist.h>
     
     
     
int sll_insert_node( SLinkList ull, SLLNode unode );

Parameters

SLinkList ull
a handle to the list into which to insert the node
SLLNode unode
the node to insert

Description

This routine inserts a detached node into a list in the collating sequence determined by the comparison function with which the list was initialized by sll_new. It assumes that the list's insert/delete comparison function can be applied to the data in the passed node. The node handle must have been obtained from sll_detach_node.

Returns

It returns non-zero if the node is NULL, zero otherwise.