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),
54       optionFindValue(3),   optionFree(3),   optionGetValue(3),   optionLoad‐
55       Line(3),  optionMemberList(3),  optionNextValue(3), optionOnlyUsage(3),
56       optionProcess(3),  optionRestore(3),  optionSaveFile(3),   optionSaveS‐
57       tate(3),  optionUnloadNested(3),  optionVersion(3), strequate(3), stre‐
58       qvcmp(3), streqvmap(3), strneqvcmp(3), strtransform(3),
59
60
61
62                                  2014-06-10                 configFileLoad(3)
Impressum