Nilorea Library
C utilities for networking, threading, graphics
|
Config file reading and writing. More...
Go to the source code of this file.
Data Structures | |
struct | CONFIG_FILE |
Structure of a config file. More... | |
struct | CONFIG_FILE_SECTION |
Structure of a config section. More... | |
Macros | |
#define | config_endfor |
Foreach elements of CONFIG_FILE macro END. More... | |
#define | config_foreach(__config, __section_name, __key, __val) |
Foreach elements of CONFIG_FILE macro, i.e config_foreach( config , section , key , val ); config_endfor;. More... | |
#define | CONFIG_SECTION_HASH_TABLE_LEN 16 |
size of the hash table of config sections entries More... | |
#define | MAX_CONFIG_LINE_LEN 1024 |
maximum length of a single config line More... | |
Functions | |
int | destroy_config_file (CONFIG_FILE **cfg_file) |
Destroy a loaded config file. More... | |
char * | get_config_section_value (CONFIG_FILE *cfg_file, char *section_name, int section_position, char *entry, int entry_position) |
Function to parse sections and get entries values. More... | |
int | get_nb_config_file_sections (CONFIG_FILE *cfg_file, char *section_name) |
Get the number of config file with section_name. More... | |
int | get_nb_config_file_sections_entries (CONFIG_FILE *cfg_file, char *section_name, int section_position, char *entry) |
Get the number of config file with section_name. More... | |
CONFIG_FILE * | load_config_file (char *filename, int *errors) |
load a config file More... | |
int | write_config_file (CONFIG_FILE *cfg_file, char *filename) |
write a config file More... | |