list_config_entries man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

list_config_entries(3)		Allegro manual		list_config_entries(3)

NAME
       list_config_entries  -  Lists the names of all entries in a config sec‐
       tion 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  com‐
       plete 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\"\n", entries[i], get_config_string(
		    NULL, entries[i], "-"));

	  /* List all sections (and entries in them). */
	  n = list_config_sections(§ions);
	  /* loop through all section names */
	  for (i = 0; i
	  {
	     int j, m;
	     printf("%s\n", sections[i]);
	     m = list_config_entries(sections[i], &entries);
	     /* loop through all entries in the section */
	     for (j = 0; j
	     {
		 printf(" %s=\"%s\"\n", entries[j], get_config_string(
		    sections[i], entries[j], "-"));
	     }
	  }
	  /* It is enough to free the arrays once at the end. */
	  free_config_entries(§ions);
	  free_config_entries(&entries);

RETURN VALUE
       Returns the number of valid strings in the names array.

SEE ALSO
       set_config_file(3),    get_config_string(3),   list_config_sections(3),
       free_config_entries(3)

Allegro				 version 4.4.2		list_config_entries(3)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net