econf_newKeyFile − create a new econf_file object
#include <libeconf.h>
|
econf_err econf_newKeyFile(econf_file **result, char delimiter, char comment); |
The econf_newKeyFile function creates a new, empty econf_file object. It allocates the necessary memory and initializes the structure.
The result parameter is a pointer to a pointer where the newly created econf_file object will be stored upon success.
The delimiter parameter specifies the character used to separate keys from values in the configuration file (e.g., '=' or ' ').
The comment parameter specifies the character used to mark the beginning of a comment line (e.g., '#' or ';').
On success, econf_newKeyFile returns ECONF_SUCCESS.
On failure, a non−zero error code of type econf_err is returned, and *result may be set to NULL.
ECONF_NOMEM
Insufficient memory to allocate the new econf_file object.
libeconf(3), econf_newIniFile(3), econf_freeFile(3), econf_errString(3).