table of contents
- Tumbleweed 0.8.3-1.1
- Leap-16.0
| ECONF_GETGROUPS(3) | libeconf Manual | ECONF_GETGROUPS(3) |
NAME¶
econf_getGroups - retrieve all groups from a configuration file
SYNOPSIS¶
#include <libeconf.h>
econf_err econf_getGroups(econf_file *kf, size_t *length, char ***groups);
DESCRIPTION¶
The econf_getGroups() function retrieves a list of all groups (sections) defined in the configuration file object specified by kf.
Upon successful return, length will contain the number of groups found, and groups will point to a newly allocated array of strings (group names). The memory for this array and the strings within it is allocated by the function and must be freed by the caller using econf_freeArray().
RETURN VALUE¶
If successful, ECONF_SUCCESS is returned. Otherwise, an error code is returned to indicate the error.
ERRORS¶
ECONF_ARGUMENT_IS_NULL_VALUE
The value specified by kf, length, or groups is NULL.
ECONF_NOGROUP
Group not found.
ECONF_NOMEM
Insufficient memory was available to allocate the groups array.
SEE ALSO¶
libeconf(3), econf_getKeys(3), econf_freeArray(3), econf_errString(3)
| 2023-12-15 | libeconf |