Add a new node to a configuration tree.
#include <asr/cfg.h>
cfg_item_t* cfg_add_item(cfg_item_t *current, const char *cname, const char *cvalue)
A pointer to the node to add the new configuration item to. If NULL, the new configuration item becomes the root of a new configuration tree.
The name for the new node. If NULL, the name "anon" is assigned.
The value for the new node. If NULL, an empty string is assigned.
The cfg_add_item() function creates a new configuration item with the specified name (cname) and optional value (cvalue) and adds it as a child of the specified node (current), behind its sibling nodes. Spaces and quotes are removed from the name and value; any variable references are resolved before the new item is created.
A pointer to the new node.