cfg_load()

Load a configuration file.

Synopsis:

#include <asr/cfg.h>
 
int cfg_load(cfg_item_t *base, const char *path)

Arguments:

base

A pointer to the configuration node (usually the root) to populate.

path

The filepath to the configuration file to load.

Library:

libasr

Description:

The cfg_load() function populates the specified configuration tree, base, with the contents of the configuration file specified by path. The base configuration tree isn't cleared prior to this operation, so the nodes specified within path are merged into base. Note that duplicate configuration items are permitted, so loading a configuration file twice will yield double entries.

Returns:

0 Success.

-1 An error occurred.