econf_newIniFile - Man Page

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)​.

Info

2024-12-13 libeconf Manual