ECONF_NEWKEYFILE(3)

NAME
econf_newKeyFile - 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_freeFile(3), econf_errString(3).