ECONF\_NEWINIFILE(3) libeconf Manual ECONF\_NEWINIFILE(3)

# [NAME](#NAME)

econf\_newIniFile - create a new econf\_file object in IniFile format

# [SYNOPSIS](#SYNOPSIS)

```
#include <libeconf.h>
```

**econf\_err econf\_newIniFile(econf\_file \*\*result);**

# [DESCRIPTION](#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](#RETURN_VALUE)

Upon successful completion, **econf\_newIniFile**() returns **ECONF\_SUCCESS**.

On failure, a non-zero error code of type **econf\_err** is returned.

# [ERRORS](#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](#SEE_ALSO)

[**libeconf**(3)](/man/os/libeconf/libeconf.3), [**econf\_newKeyFile**(3)](/man/os/libeconf/econf_newKeyFile.3), [**econf\_freeFile**(3)](/man/os/libeconf/econf_freeFile.3), [**econf\_errString**(3)](/man/os/libeconf/econf_errString.3).

2024-12-13 libeconf

---

Document: econf_newIniFile(3) from libeconf 0.8.6-r3 (Chainguard OS)
Source: https://github.com/openSUSE/libeconf
