list_config_entries(3alleg4) debian man page | unix.com

Man Page: list_config_entries

Operating Environment: debian

Section: 3alleg4

list_config_entries(3alleg4)					  Allegro manual				      list_config_entries(3alleg4)

NAME
list_config_entries - Lists the names of all entries in a config section Allegro game programming library.
SYNOPSIS
#include <allegro.h> int list_config_entries(const char *section, const char ***names);
DESCRIPTION
This function can be used to get a list of all entries in the given config section. The names parameter is a pointer to an array of strings. If it points to a NULL pointer, the list will be allocated, else it will be re-allocated. You should free the list again with free_config_entries if you don't need it anymore, or you can pass it again to list_config_entries and the memory will be re-used. See the following example for how you can use it, it will print out the complete contents of the current configuration: int i, n; char const **sections = NULL; char const **entries = NULL; /* List all entries not in any section. */ n = list_config_entries(NULL, &entries); for (i = 0; i printf(" %s="%s" ", entries[i], get_config_string( NULL, entries[i], "-")); /* List all sections (and entries in them). */ n = list_config_sections(&sections); /* loop through all section names */ for (i = 0; i { int j, m; printf("%s ", sections[i]); m = list_config_entries(sections[i], &entries); /* loop through all entries in the section */ for (j = 0; j { printf(" %s="%s" ", entries[j], get_config_string( sections[i], entries[j], "-")); } } /* It is enough to free the arrays once at the end. */ free_config_entries(&sections); free_config_entries(&entries);
RETURN VALUE
Returns the number of valid strings in the names array.
SEE ALSO
set_config_file(3alleg4), get_config_string(3alleg4), list_config_sections(3alleg4), free_config_entries(3alleg4) Allegro version 4.4.2 list_config_entries(3alleg4)
Related Man Pages
exzbuf(3alleg4) - debian
list_config_entries(3alleg4) - debian
exzbuf(3alleg4) - suse
override_config_file(3alleg4) - centos
exzbuf(3alleg4) - v7
Similar Topics in the Unix Linux Community
Comment entries in the file
Ordering HTML Drop Down List entries Alphabetically
List out the files which is having Error entries
Request to check:remove entries with N/A entries
Fields shifting in file, do to null values?