Table of Contents
SaveCONFIG_TBL - save a configuration table to a file
SaveCONFIG_TBL
creates a new configuration file. It reads name entries from an old file
and looks for a match in a CONFIG_TBL array.
If a match is found the value
field from the CONFIG_TBL array is written to the new file.
Lines starting
with a # are treated as comments and written to the output file without
change. Lines that don’t have a matching entry in the program’s CONFIG_TBL
are also written to the output file without change.
This function is part
of libconfig.
int SaveCONFIG_TBL(
CONFIG_TBL CFTpnt[],
int Size,
char *FNold,
char *FNnew
);
pointer to the CONFIG_TBL array.
size of the CONFIG_TBL
array.
pathname of the old file
pathname of the new file
0 is returned on success, -1 is returned on errors and a message is
printed to stderr. It is left to the program using this function to decide
what the error is and create the config file if necessary.
BldCONFIG_TBLfn(3cf)
,
ClearCONFIG_TBL(3cf)
, CopyCONFIG_TBL(3cf)
, CreateCONFIG_TBL(3cf)
, FindCONFIG_TBL(3cf)
,
LoadCONFIG_TBL(3cf)
, PrintCONFIG_TBL(3cf)
, libconfigtbl(3cf)
It’s possible
some of the error msgs with be eliminated in the future because they can
be annoying.
$Id: SaveCONFIG_TBL.3,v 1.2 2002/04/07 18:46:04
kitchen Exp $
Table of Contents