afc_nodemaster_add

Name

afc_nodemaster_add  -- Add an item to the list

Synopsis

void * afc_nodemaster_add (NodeMaster * nm, void * object, unsigned long mode);

Description

Use this command to add an object to the list.

Inputs

object

This is the object to add.

mode

This flag is very useful to choose _where_ a new node will be added. Usually, you should add the item after the last one, but you can add it as the first line or in the middle of the list (same as afc_nodemaster_insert() command). Possible values are:

NM_ADD_HEAD

Use this one to add the node as the first in list.

NM_ADD_HERE

Use this one to add the node AFTER the current one. (Same as afc_nodemaster_insert() method)

NM_ADD_TAIL

Use this one to add the node as the last in list.

Result

the value of the node just created or NULL in case of errors

See Also