PRC_CNFG module routines

Company Information Software Products TDF Market Reports Download Area take me Home

PRC_CNFG.C - PRoCess run-time CoNFiGuration file

A set of routines to read an ASCII configuration file and process it's data and store the info back in the caller's main() module. The user program must allocate a CNF cnf_table[] and a cnf_table_size. If config_file == NULL then use the default config file from prc_cnfg.h. Normal use would be like - ld_ascii_data_file( get_config_file(),process_config_file,debug_flag ) somewhere very early in the program activation. The normal default is to ignore non-matches to the cnf_table but you can turn-on error reporting by setting the GLOBAL var cnf_report_error to TRUE.

Function get_config_file
Include file PRC_CNFG.H
Prototype char *get_config_file( void )
Remarks Return either a user provided config_file name or the module subsystem default name.

Function process_config_file
Include file PRC_CNFG.H
Prototype void process_config_file( char *input_line )
Remarks Called by ld_ascii_data_file to process a individual config file entry. After preping the input_line, it will call process_one_config_entry.

Function process_one_config_entry
Include file PRC_CNFG.H
Prototype int process_one_config_entry( char *input_line )
Remarks Lookup, validate and store one entry.

Function lookup_config_index
Include file PRC_CNFG.H
Prototype int lookup_config_index( char *token )
Remarks Check the file token string against the CNF table. Return table index if found else return cnf_table_size as not found.

Function normal_cnf_table_store
Include file PRC_CNFG.H
Prototype void normal_cnf_table_store( int cnf_index , char *str )
Remarks Store a config entry back into the caller's data space.

Table of Contents Function Index

generated on 08 February 1998 - 14:42:20
© 1998 Tierra del Fuego Ltd.