Blame autoopts/optionFileLoad.3

Packit ebee63
.TH optionFileLoad 3 2016-08-29 "" "Programmer's Manual"
Packit ebee63
.\"  DO NOT EDIT THIS FILE   (optionFileLoad.3)
Packit ebee63
.\"
Packit ebee63
.\"  It has been AutoGen-ed
Packit ebee63
.\"  From the definitions    ./funcs.def
Packit ebee63
.\"  and the template file   agman3.tpl
Packit ebee63
.SH NAME
Packit ebee63
optionFileLoad - Load the locatable config files, in order
Packit ebee63
.sp 1
Packit ebee63
.SH SYNOPSIS
Packit ebee63
Packit ebee63
#include <\fIyour-opts.h\fP>
Packit ebee63
.br
Packit ebee63
cc [...] -o outfile infile.c -l\fBopts\fP [...]
Packit ebee63
.sp 1
Packit ebee63
int \fBoptionFileLoad\fP(tOptions * \fIopts\fP, char const * \fIprog\fP);
Packit ebee63
.sp 1
Packit ebee63
.SH DESCRIPTION
Packit ebee63
This function looks in all the specified directories for a configuration
Packit ebee63
file ("rc" file or "ini" file) and processes any found twice.  The first
Packit ebee63
time through, they are processed in reverse order (last file first).  At
Packit ebee63
that time, only "immediate action" configurables are processed.  For
Packit ebee63
example, if the last named file specifies not processing any more
Packit ebee63
configuration files, then no more configuration files will be processed.
Packit ebee63
Such an option in the \fBfirst\fP named directory will have no effect.
Packit ebee63
Packit ebee63
Once the immediate action configurables have been handled, then the
Packit ebee63
directories are handled in normal, forward order.  In that way, later
Packit ebee63
config files can override the settings of earlier config files.
Packit ebee63
Packit ebee63
See the AutoOpts documentation for a thorough discussion of the
Packit ebee63
config file format.
Packit ebee63
Packit ebee63
Configuration files not found or not decipherable are simply ignored.
Packit ebee63
.TP
Packit ebee63
.IR opts
Packit ebee63
program options descriptor
Packit ebee63
.TP
Packit ebee63
.IR prog
Packit ebee63
program name
Packit ebee63
.sp 1
Packit ebee63
.SH RETURN VALUE
Packit ebee63
0 \-> SUCCESS, \-1 \-> FAILURE
Packit ebee63
.sp 1
Packit ebee63
.SH ERRORS
Packit ebee63
Returns the value, "-1" if the program options descriptor
Packit ebee63
is out of date or indecipherable.  Otherwise, the value "0" will
Packit ebee63
always be returned.
Packit ebee63
.SH SEE ALSO
Packit ebee63
The \fIinfo\fP documentation for the -l\fIopts\fP library.
Packit ebee63
.br
Packit ebee63
ao_string_tokenize(3), configFileLoad(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),