void AddNodeToList_bn ( node_bn*  node,   nodelist_bn*  nodes,   int  index )

Inserts node into the list nodes, so that its position is index, making the list one longer, and maintaining the order of the rest of the nodes.

index can range from zero (which adds node to the front), to LengthNodeList_bn(nodes) (which adds node to the end), or it can be LAST_ENTRY, which also adds node to the end.

If index is outside these bounds, or the system runs out of memory, the list will not be modified and an error will be generated.

Adding nodes to the end of the list executes the fastest.

You can also build a node list by creating it full length using NewNodeList2_bn, and then filling it with SetNthNode_bn.

Version:

In versions previous to 2.10, INT_MAX was used instead of LAST_ENTRY

See also:

RemoveNthNode_bn    (reverse operation) Removes a node from the list, shortening it
SetNthNode_bn    Put a node in the list without increasing its length
LengthNodeList_bn    Find maximum value for index
NewNodeList2_bn    Create the node list to start with
DupNodeList_bn    To duplicate a list before modifying it