1configFileLoad(3) Programmer's Manual configFileLoad(3)
2
3
4
6 configFileLoad - parse a configuration file
7
8
10 #include <your-opts.h>
11 cc [...] -o outfile infile.c -lopts [...]
12
13 const tOptionValue* configFileLoad(char const* pzFile);
14
15
17 This routine will load a named configuration file and parse the text as
18 a hierarchically valued option. The option descriptor created from an
19 option definition file is not used via this interface. The returned
20 value is "named" with the input file name and is of type
21 "OPARG_TYPE_HIERARCHY". It may be used in calls to optionGetValue(),
22 optionNextValue() and optionUnloadNested().
23
24 pzFile the file to load
25
26
28 An allocated, compound value structure
29
30
32 If the file cannot be loaded or processed, NULL is returned and errno
33 is set. It may be set by a call to either open(2) mmap(2) or other
34 file system calls, or it may be:
35
36
37
38
39
40
41
42 ENOENT - the file was empty.
43
44 EINVAL - the file contents are invalid -- not properly formed.
45
46 ENOMEM - not enough memory to allocate the needed structures. @end
47 itemize
48
50 The info documentation for the -lopts library.
51 ao_string_tokenize(3), optionFileLoad(3), optionFindNextValue(3),
52 optionFindValue(3), optionFree(3), optionGetValue(3), optionLoadā
53 Line(3), optionNextValue(3), optionOnlyUsage(3), optionProcess(3),
54 optionRestore(3), optionSaveFile(3), optionSaveState(3), optionUnloadā
55 Nested(3), optionVersion(3), pathfind(3), strequate(3), streqvcmp(3),
56 streqvmap(3), strneqvcmp(3), strtransform(3),
57
58
59
60 2009-08-10 configFileLoad(3)