.TH configFileLoad 3 2024-01-05 "" "Programmer's Manual" .\" DO NOT EDIT THIS FILE (configFileLoad.3) .\" .\" It has been AutoGen-ed .\" 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 * \fIfname\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 fname 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), optionMemberList(3), optionNextValue(3), optionOnlyUsage(3), optionPrintVersion(3), optionPrintVersionAndReturn(3), optionProcess(3), optionRestore(3), optionSaveFile(3), optionSaveState(3), optionUnloadNested(3), optionVersion(3), strequate(3), streqvcmp(3), streqvmap(3), strneqvcmp(3), strtransform(3),