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 di‐
27       rectories  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  re‐
47       turned.
48

SEE ALSO

50       The info documentation for the -lopts library.
51       ao_string_tokenize(3),  configFileLoad(3),  optionFindNextValue(3), op‐
52       tionFindValue(3), optionFree(3), optionGetValue(3),  optionLoadLine(3),
53       optionMemberList(3),  optionNextValue(3),  optionOnlyUsage(3),  option‐
54       PrintVersion(3), optionPrintVersionAndReturn(3), optionProcess(3),  op‐
55       tionRestore(3),  optionSaveFile(3),  optionSaveState(3),  optionUnload‐
56       Nested(3), optionVersion(3), strequate(3), streqvcmp(3),  streqvmap(3),
57       strneqvcmp(3), strtransform(3),
58
59
60
61                                  2023-05-19                 optionFileLoad(3)
Impressum