Scroll to navigation

ECONF_GETEXTVALUE(3) libeconf Manual ECONF_GETEXTVALUE(3)

NAME

econf_getExtValue - 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)

2023-11-01 libeconf