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

NAME

6       configFileLoad - parse a configuration file
7
8

SYNOPSIS

10       #include <your-opts.h>
11       cc [...] -o outfile infile.c -lopts [...]
12
13       const tOptionValue * configFileLoad(char const * fname);
14
15

DESCRIPTION

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       fname  the file to load
25
26

RETURN VALUE

28       An allocated, compound value structure
29
30

ERRORS

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 not found.
43
44       ENOMSG - the file was empty.
45
46       EINVAL - the file contents are invalid -- not properly formed.
47
48       ENOMEM - not enough memory to allocate  the  needed  structures.   @end
49       itemize
50

SEE ALSO

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