cfg_find_next_item()

Find a node in a configuration tree.

Synopsis:

#include <asr/cfg.h>
 
cfg_item_t* cfg_find_next_item(const cfg_item_t *base, const cfg_item_t *current, const char *key, int levels)

Arguments:

base

A pointer to the parent of the current node (used only if current == NULL)

current

NULL or the result of a previous call to cfg_find_node() or cfg_find_next_node().

key

A '/' separated list of node names to search for.

levels

Indicates how high up the hiearchy the search will go (0 = siblings only; -1 = all the way to the root).

Library:

libasr

Description:

The cfg_find_next_item() function performs a restricted hiearchical search for a node with cname. For example, if key is "phone/digit-dialing", cfg_find_next_item() searches for the "phone" node within the subtree of node, and then searches for the "digit-dialing" node within the "phone" node.

Returns:

A pointer to the next node with a matching key; NULL if the item wasn't found.