econf_getExtValue - Man Page

get a key's value and extended metadata from a configuration file

Synopsis

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

econf_err econf_getExtValue(econf_file *key_file, const char *group, const char *key, struct econf_ext_value **value);

Description

The econf_getExtValue() function searches for the specified key within the given group in the parsed configuration file structure key_file​. If the key is found, the function returns a pointer to an econf_ext_value structure via the value argument​.

The group parameter may be NULL or an empty string for keys in the global section​.

The caller is responsible for freeing the returned structure using econf_freeExtValue(3)​.

Return Value

On success, econf_getExtValue() returns ECONF_SUCCESS​.

On error, a non-zero econf_err error code is returned​.

Errors

ECONF_NOKEY

         The specified key was not found in the given group, or no key was found in the configuration structure at all​.

ECONF_NOMEM

         Memory allocation failed​.

ECONF_ARGUMENT_IS_NULL_VALUE

         Given argument is NULL

See Also

libeconf(3), econf_readConfig(3), econf_freeExtValue(3), econf_errString(3)​

Info

2023-11-01 libeconf Manual