ECONF\_SETEXTVALUE(3) libeconf Manual ECONF\_SETEXTVALUE(3)

# [NAME](#NAME)

econf\_setExtValue - set extended value for a key in a configuration file structure

# [SYNOPSIS](#SYNOPSIS)

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

**int econf\_setExtValue(econf\_file \*key\_file, const char \*group, const char \*key, const econf\_ext\_value \*value);**

# [DESCRIPTION](#DESCRIPTION)

The **econf\_setExtValue**() function adds or modifies a key's value in the configuration file structure referenced by *key\_file*. This function allows setting the value using the full **econf\_ext\_value** structure, which includes additional metadata such as the file source, comments and line number.

The function cannot be used for setting the value. Values have to be set via econf\_set&lt;Type&gt;Value.

The key will be set within the specified *group*. If *group* is NULL or an empty string, the key is set in the global section.

The parameters are defined as:

*key\_file*

A pointer to the **econf\_file** structure where the key/value pair should be modified.

*group*

The name of the configuration group (section) to which the key belongs.

*key*

The name of the key to set.

*value*

A pointer to the **econf\_ext\_value** structure containing additional information.

# [RETURN VALUE](#RETURN_VALUE)

On success, **econf\_setExtValue**() returns **ECONF\_SUCCESS**.

On error, a non-zero error number is returned. The function returns a value from the **econf\_err** enumeration.

# [ERRORS](#ERRORS)

**ECONF\_NOMEM**

Memory allocation failed.

# [SEE ALSO](#SEE_ALSO)

[**libeconf**(3)](/man/os/libeconf/libeconf.3), [**econf\_readConfig**(3)](/man/os/libeconf/econf_readConfig.3), [**econf\_errString**(3)](/man/os/libeconf/econf_errString.3).

2025-01-01 libeconf

---

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