cfg_insert_raw_item()

Insert a node in a configuration tree.

Synopsis:

#include <asr/cfg.h>
 
cfg_item_t* cfg_insert_raw_item(cfg_item_t *current, const char *ckey, const char *cvalue)

Arguments:

current

The node to add the new configuration item to. If NULL, the new configuration item becomes the root of a new configuration tree.

ckey

The name for the new node. If NULL, the name "anon" is assigned.

cvalue

The value for the new node. If NULL, an empty string is assigned.

Library:

libasr

Description:

The cfg_insert_raw_item() function creates a new a configuration item with the specifed name (ckey) and optional value (cvalue). Spaces and quotes are removed from the name, but the value is used as specified. The new item is added as a child of the specified node (current), behind its sibling nodes.

Returns:

A pointer to the new node.