OS Manuals

econf_newIniFile(3)

econf_newIniFile - create a new econf_file object in IniFile format

ECONF_NEWINIFILE(3) libeconf Manual ECONF_NEWINIFILE(3)

econf_newIniFile - create a new econf_file object in IniFile format

#include <libeconf.h>

econf_err econf_newIniFile(econf_file **result);

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.

Upon successful completion, econf_newIniFile() returns ECONF_SUCCESS.

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

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

ECONF_NOMEM


Insufficient memory was available to allocate the new econf_file object.

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

2024-12-13 libeconf

libeconf 0.8.6-r2 · os · ingested 2026-10-27