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( char *file_name )
|
Remarks
|
Return either a user provided config_file name or the module subsystem
default name.
|
Function
|
set_config_table
|
Include file
|
PRC_CNFG.H
|
Prototype
|
void set_config_table( CNF *user_cnf_table , int user_cnf_table_size )
|
Remarks
|
Set the module vars to point to the user config table so that when
ld_ascii_data_file calls process_config_file( one_input_line ) the
table will be available for use.
|
Function
|
process_config_file
|
Include file
|
PRC_CNFG.H
|
Prototype
|
void process_config_file( char *file_name )
|
Remarks
|
Module entry point to get a config file processed.
|
Function
|
lc_process_config_file
|
Include file
|
PRC_CNFG.H
|
Prototype
|
static void lc_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
|
static 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
|
static 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
|
static 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 22 September 1998 - 12:55:22
© 1998 Tierra del Fuego Ltd.
|