hook_config_section man page on DragonFly

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

hook_config_section(3)		Allegro manual		hook_config_section(3)

NAME
       hook_config_section  -  Hooks  a configuration file section with custom
       handlers. Allegro game programming library.

SYNOPSIS
       #include <allegro.h>

       void hook_config_section(const char  *section,  int  (*intgetter)(const
       char  *name,  int  def),	 const char *(*stringgetter)(const char *name,
       const char *def), void (*stringsetter)(const  char  *name,  const  char
       *value));

DESCRIPTION
       Takes  control  of the specified config file section, so that your hook
       functions will be used to manipulate it instead of the normal disk file
       access.	If  both the getter and setter functions are NULL, a currently
       present hook will be unhooked. Hooked functions have the highest prior‐
       ity. If a section is hooked, the hook will always be called, so you can
       also hook a '#' section: even override_config_file() cannot override  a
       hooked section. Example:

	  int decode_encrypted_int(const char *name, int def)
	  {
	     ...
	  }

	  const char *decode_encrypted_string(const char *name, const char *def)
	  {
	     ...
	  }

	  void encode_plaintext_string(const char *name, const char *value)
	  {
	     ...
	  }

	  int main(int argc, char *argv[])
	  {
	     ...
	     /* Make it harder for users to tinker with the high scores. */
	     hook_config_section("high_scores", decode_encrypted_int,
		decode_encrypted_string, encode_plaintext_string);
	     ...
	  } END_OF_MAIN()

SEE ALSO
       config_is_hooked(3)

Allegro				 version 4.4.2		hook_config_section(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