Table of Contents

Name

LoadCONFIG_TBL - Loads a configuration table from a file

Description

LoadCONFIG_TBL reads a previously created configuration file and copies the name/value pairs into a CONFIG_TBL array.

Lines starting with a # are treated as comments and ignored. Lines which don’t have a matching entry in the program’s CONFIG_TBL are also ignored.

This function is part of libconfig.

Syntax

int LoadCONFIG_TBL(
   CONFIG_TBL CFTpnt[],

   int Size,

   char *FN,

   int verbosity

   );

Arguments

CFTpnt

pointer to the CONFIG_TBL array.

Size

size of the CONFIG_TBL array.

Fn

pathname of the source file to load from

verbosity


0 = don’t print file open error messages
1 = print file open error messages

Return Value

0 is returned on success, -1 is returned on all errors and a message is printed to stderr. It is left to the program to decide what the error is and do something about it.

Notes

It’s possible that some of the error messages will be eliminated in the future because they are annoying.

See Also

BldCONFIG_TBLfn(3cf) , ClearCONFIG_TBL(3cf) , CopyCONFIG_TBL(3cf) , CreateCONFIG_TBL(3cf) , FindCONFIG_TBL(3cf) , PrintCONFIG_TBL(3cf) , SaveCONFIG_TBL(3cf) , libconfigtbl(3cf)

Manual page revision

$Id: LoadCONFIG_TBL.3,v 1.3 2009/12/01 15:11:15 kitchen Exp $


Table of Contents