1optionFileLoad(3)             Programmer's Manual            optionFileLoad(3)
2
3
4

NAME

6       optionFileLoad - Load the locatable config files, in order
7
8

SYNOPSIS

10       #include <your-opts.h>
11       cc [...] -o outfile infile.c -lopts [...]
12
13       int optionFileLoad(tOptions* opts, char const* prog);
14
15

DESCRIPTION

17       This  function  looks in all the specified directories for a configura‐
18       tion file ("rc" file or "ini" file) and processes any found twice.  The
19       first  time  through,  they  are  processed in reverse order (last file
20       first).  At that time, only "immediate action" configurables  are  pro‐
21       cessed.   For  example, if the last named file specifies not processing
22       any more configuration files, then no more configuration files will  be
23       processed.   Such  an  option in the first named directory will have no
24       effect.
25
26       Once the immediate action configurables have  been  handled,  then  the
27       directories  are  handled in normal, forward order.  In that way, later
28       config files can override the settings of earlier config files.
29
30       See the AutoOpts documentation for a thorough discussion of the  config
31       file format.
32
33       Configuration files not found or not decipherable are simply ignored.
34
35       opts   program options descriptor
36
37       prog   program name
38
39

RETURN VALUE

41       0 -> SUCCESS, -1 -> FAILURE
42
43

ERRORS

45       Returns  the  value,  "-1"  if the program options descriptor is out of
46       date or indecipherable.   Otherwise,  the  value  "0"  will  always  be
47       returned.
48

SEE ALSO

50       The info documentation for the -lopts library.
51       ao_string_tokenize(3),    configFileLoad(3),    optionFindNextValue(3),
52       optionFindValue(3),   optionFree(3),   optionGetValue(3),   optionLoad‐
53       Line(3),  optionMemberList(3),  optionNextValue(3), optionOnlyUsage(3),
54       optionProcess(3),  optionRestore(3),  optionSaveFile(3),   optionSaveS‐
55       tate(3),  optionUnloadNested(3),  optionVersion(3), strequate(3), stre‐
56       qvcmp(3), streqvmap(3), strneqvcmp(3), strtransform(3),
57
58
59
60                                  2014-06-10                 optionFileLoad(3)
Impressum