table of contents
- Tumbleweed 0.8.3-1.1
- Leap-16.0
| ECONF_GETKEYS(3) | libeconf Manual | ECONF_GETKEYS(3) |
NAME¶
econf_getKeys - evaluate all keys of a specific group
SYNOPSIS¶
#include <libeconf.h>
econf_err econf_getKeys(econf_file *kf, const char *group, size_t *length, char ***keys);
DESCRIPTION¶
The econf_getKeys() function retrieves all keys belonging to a specific group from the configuration file object pointed to by kf.
The group parameter specifies the name of the section (group) to be evaluated. If group is NULL, the function retrieves keys that do not belong to any specific group (entries defined at the beginning of the file).
The total number of keys found is stored in the integer pointed to by length.
The names of the keys are stored in a dynamically allocated array of strings, which is returned via the keys pointer. The memory for this array is allocated by the library and should be freed by the caller using econf_freeArray() or an equivalent method when it is no longer needed.
RETURN VALUE¶
Upon successful completion, the function returns ECONF_SUCCESS.
Otherwise, an error value is returned to indicate the error condition.
ERRORS¶
ECONF_ARGUMENT_IS_NULL_VALUE
The value specified by kf or keys is NULL.
ECONF_NOKEY
Keys not found.
ECONF_NOMEM
Insufficient memory could be allocated for the return array.
SEE ALSO¶
libeconf(3), econf_getGroups(3), econf_freeArray(3), econf_readFile(3), econf_errString(3).
| 2023-12-15 | libeconf |