Files | |
file | ub_confutils.h |
Provides functions for configuring from a file. | |
Functions | |
int | ub_read_config_file (char *fname, ub_set_item_cb_t set_item) |
Read a configuration file and set all items in the file. More... | |
Typedefs | |
typedef int(* | ub_set_item_cb_t) (char *itemp, void *v) |
Callback function for configuring a single item. More... | |
typedef int(* ub_set_item_cb_t) (char *itemp, void *v) |
Callback function for configuring a single item.
This function is called for each configuration item in the file. It takes a string itemp
indicating the item to configure and a pointer v
to the value to set the item to.
itemp | The configuration item to set. |
v | A pointer to the value to set the item to. |
int ub_read_config_file | ( | char * | fname, |
ub_set_item_cb_t | set_item | ||
) |
Read a configuration file and set all items in the file.
This function reads the configuration file specified by fname
and calls the set_item
callback function for each item in the file.
fname | The name of the configuration file to read. |
set_item | The callback function to call for each configuration item. |