Main Page   File List   File Members   Related Pages  

frdi_config.c File Reference

the interface to the configuration file More...

#include "frdi.h"

Functions

int frdiConfigGetInt (frdi_config *config, char *key)
char * frdiConfigGetChar (frdi_config *config, char *key)
int frdiConfigSetChar (frdi_config *config, char *key, char *value)
void frdiScanTreeForContents (scew_element *element, char scew_stack[50][50], frdi_config *config, int indent)
frdi_config * frdiReadConfigFromFileName (char *file_name)
int frdiWriteConfigToFileName (char *file_name, frdi_config *config)
frdi_config * frdiConfigLoad (int argc, char **argv, char **argenv)
char * frdiConfigDisplay (frdi_config *config)


Detailed Description

the interface to the configuration file

Author:
Douglas Reay <douglas-legal@reay.org>
Warning:

Function Documentation

int frdiConfigGetInt (  frdi_config *    config,
char *    key
) 
 

returns the int value associated with key

char* frdiConfigGetChar (  frdi_config *    config,
char *    key
) 
 

returns the char value associated with key returns NULL if no value has been associted with key or if config is in some way invalid, or if there is no memory

int frdiConfigSetChar (  frdi_config *    config,
char *    key,
char *    value
) 
 

returns 0 on success returns non-0 if the pair key:value is invalid

void frdiScanTreeForContents (  scew_element *    element,
char    scew_stack[50][50],
frdi_config *    config,
int    indent
) 
 

recursively goes down the element tree (depth first)

frdi_config* frdiReadConfigFromFileName (  char *    file_name ) 
 

returns a null pointer on failure

int frdiWriteConfigToFileName (  char *    file_name,
frdi_config *    config
) 
 

returns 0 on success, non-0 on failure

frdi_config* frdiConfigLoad (  int    argc,
char **    argv,
char **    argenv
) 
 

Called straight from main() this is the only point where input arguments, environmental variables and the configuration file are accessed.

char* frdiConfigDisplay (  frdi_config *    config ) 
 

Displays the contents of the configuration object


Generated on Wed Aug 18 13:23:51 2004 for Project Fairdice by doxygen1.2.18