Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

config_parser.h File Reference

Configuration file parser. More...

Go to the source code of this file.

Functions


Detailed Description

Configuration file parser.

The configuration parser analyzes a configuration file and divides it into blocks and assignment statements.

The configuration file has the syntax:

 *  
 *  Block:
 *  
 *  <Block Type> [<Block Name>] {
 *	[Block] | [Assignment]
 *	...
 *  }
 *
 *  Assignment:
 *
 *  <Variable name> = <Value>
 *
 * 

Function Documentation

int config_parser_read const char *  filename,
void(*)(const char *, const char *)  f_start_block,
void(*)()  f_end_block,
void(*)(const char *, const char *)  f_set_attr
 

Read a configuration file.

This function parses a configiration file and calls callback functions at the beginning of each block, at the end of each block, and when an assignment occurs.

Parameters:
filename Name of the configuration file
f_start_block Callback function. Called at the beginning of a block. Arguments: Block type and block name.
f_end_block Callback function. Called at the end of a block.
f_set_attr Callback function. Called when an attribute is set. Arguments: Variable name and value.


Generated on Fri Jan 20 10:12:18 2006 by  doxygen 1.4.2