Scroll to navigation

ECONF_NEWINIFILE(3) libeconf Manual ECONF_NEWINIFILE(3)

NAME

econf_newIniFile - create a new econf_file object in IniFile format

SYNOPSIS

#include <libeconf.h>

econf_err econf_newIniFile(econf_file **result);

DESCRIPTION

The econf_newIniFile() function initializes a new econf_file object with default settings suitable for INI-style configuration files. It allocates the necessary memory and stores the pointer to the newly created object in the location pointed to by result.

This function is a wrapper around the generic econf_newKeyFile() function. It configures the new file object to use the standard INI delimiter = and supports standard comment characters (typically #).

The caller is responsible for freeing the allocated memory using econf_freeFile() when the object is no longer needed.

RETURN VALUE

Upon successful completion, econf_newIniFile() returns ECONF_SUCCESS.

On failure, a non-zero error code of type econf_err is returned.

ERRORS

The function may fail with the following error(s):

ECONF_NOMEM


Insufficient memory was available to allocate the new econf_file object.

SEE ALSO

libeconf(3), econf_newKeyFile(3), econf_freeFile(3), econf_errString(3).

2024-12-13 libeconf