econf_newKeyFile - Man Page
create a new econf_file object
Synopsis
#include <libeconf.h>
econf_err econf_newKeyFile(econf_file **result, char delimiter, char comment);
Description
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 ';').
Return Value
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.
Errors
- ECONF_NOMEM
Insufficient memory to allocate the new econf_file object.
See Also
libeconf(3), econf_newIniFile(3), econf_newKeyFile_with_options(3), econf_freeFile(3), econf_errString(3).