summaryrefslogtreecommitdiff
path: root/autoopts/configFileLoad.3
blob: 83c3d7ed46963bd6a6dba1cb047e19a4c5a74886 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
.TH configFileLoad 3 2012-08-11 "" "Programmer's Manual"
.\"  DO NOT EDIT THIS FILE   (configFileLoad.3)
.\"  
.\"  It has been AutoGen-ed  August 11, 2012 at 09:44:56 AM by AutoGen 5.16.2
.\"  From the definitions    ./funcs.def
.\"  and the template file   agman3.tpl
.SH NAME
configFileLoad - parse a configuration file
.sp 1
.SH SYNOPSIS

#include <\fIyour-opts.h\fP>
.br
cc [...] -o outfile infile.c -l\fBopts\fP [...]
.sp 1
const tOptionValue* \fBconfigFileLoad\fP(char const* \fIpzFile\fP);
.sp 1
.SH DESCRIPTION
This routine will load a named configuration file and parse the
text as a hierarchically valued option.  The option descriptor
created from an option definition file is not used via this interface.
The returned value is "named" with the input file name and is of
type "\fBOPARG_TYPE_HIERARCHY\fP".  It may be used in calls to
\fBoptionGetValue()\fP, \fBoptionNextValue()\fP and
\fBoptionUnloadNested()\fP.
.TP
.IR pzFile
the file to load
.sp 1
.SH RETURN VALUE
An allocated, compound value structure
.sp 1
.SH ERRORS
If the file cannot be loaded or processed, \fBNULL\fP is returned and
\fBerrno\fP is set.  It may be set by a call to either \fBopen(2)\fP
\fBmmap(2)\fP or other file system calls, or it may be:
.sp 1ize @bullet
.sp 1
\fBENOENT\fP \- the file was not found.
.sp 1
\fBENOMSG\fP \- the file was empty.
.sp 1
\fBEINVAL\fP \- the file contents are invalid \-- not properly formed.
.sp 1
\fBENOMEM\fP \- not enough memory to allocate the needed structures.
@end itemize
.SH SEE ALSO
The \fIinfo\fP documentation for the -l\fIopts\fP library.
.br
ao_string_tokenize(3), optionFileLoad(3), optionFindNextValue(3), optionFindValue(3), optionFree(3), optionGetValue(3), optionLoadLine(3), optionNextValue(3), optionOnlyUsage(3), optionProcess(3), optionRestore(3), optionSaveFile(3), optionSaveState(3), optionUnloadNested(3), optionVersion(3), pathfind(3), strequate(3), streqvcmp(3), streqvmap(3), strneqvcmp(3), strtransform(3),