Detach an item from its current parent and attach it to another node.
#include <asr/cfg.h>
cfg_item_t* cfg_attach_item(cfg_item_t *parent, cfg_item_t *item, int tail)
A pointer to the node to attach the item to.
A pointer to the item to attach to parent.
Specifies whether the child is prepended (0) or appended (1) to the parent's list of children.
The cfg_attach_item() function detaches the specified configuration item from its parent and attaches it as a child to the specified node (parent). If parent is NULL, this function is equivalent to cfg_detach_item(). If parent isn't NULL, tail specifies whether the child is prepended (0) or appended (1) to the parent's list of children.
A pointer to the item; NULL on error.