OS Manuals

econf_getGroups(3)

econf_getGroups - retrieve all groups from a configuration file

ECONF_GETGROUPS(3) libeconf Manual ECONF_GETGROUPS(3)

econf_getGroups - retrieve all groups from a configuration file

#include <libeconf.h>

econf_err econf_getGroups(econf_file *kf, size_t *length, char ***groups);

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().

If successful, ECONF_SUCCESS is returned. Otherwise, an error code is returned to indicate the error.

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.

libeconf(3), econf_getKeys(3), econf_freeArray(3), econf_errString(3)

2023-12-15 libeconf

libeconf 0.8.6-r2 · os · ingested 2026-10-27