@section(1 cfg_files Config files)
  Allegro supports reading and writing of configuration files with a simple, INI file-like format.  These files are fully compatible with the @code(TIniFile) objects defined by Delphi and Free Pascal.  You can use @code(TIniFile), but you should use Allegro's config procedures if you're writting your own Allegro add-on.

  A configuration file consists of key-value pairs separated by newlines. Keys are separated from values by an equals sign (@code(=)).  All whitespace before the key, after the value and immediately adjacent to the equals sign is ignored.  Keys and values may have whitespace characters within them.  Keys do not need to be unique, but all but the last one are ignored.

  The hash (@code(#)) character is used a comment when it is the first non-whitespace character on the line.  All characters following that character are ignored to the end of the line.  The hash character anywhere else on the line has no special significance.

  Key-value pairs can be optionally grouped into sections, which are declared by surrounding a section name with square brackets (@code([) and @code(])) on a single line.  Whitespace before the opening bracket is ignored.  All characters after the trailing bracket are also ignored.

  All key-value pairs that follow a section declaration belong to the last declared section.  Key-value pairs that don't follow any section declarations belong to the global section. Sections do not nest.

  Here is an example configuration file:

@preformatted(
#  Monster description
monster name = Allegro Developer

[weapon 0]
damage = 443

[weapon 1]
damage = 503
)

It can then be accessed like this (make sure to check for errors in an actual program):

@longcode(%
VAR
  Cfg: ALLEGRO_CONFIGptr;
BEGIN
  cfg := al_load_config_file ('test.cfg');
  WriteLn (al_get_config_value (Cfg, '', 'monster name')); { Prints: Allegro Developer }
  WriteLn (al_get_config_value (Cfg, 'weapon 0', 'damage')); { Prints: 443 }
  WriteLn (al_get_config_value (Cfg, 'weapon 1', 'damage')); { Prints: 503 }
  al_destroy_config (Cfg)
END.
%)

  @bold(See also:) @link(al_load_config_file)
