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

NAME

6       optionProcess - this is the main option processing routine
7
8

SYNOPSIS

10       #include <your-opts.h>
11       cc [...] -o outfile infile.c -lopts [...]
12
13       int optionProcess(tOptions * opts, int a_ct, char ** a_v);
14
15

DESCRIPTION

17       This  is  the  main entry point for processing options.  It is intended
18       that this procedure be called once at the beginning of the execution of
19       a program.  Depending on options selected earlier, it is sometimes nec‐
20       essary to stop and restart option processing, or to  select  completely
21       different  sets of options.  This can be done easily, but you generally
22       do not want to do this.
23
24       The number of arguments processed always includes the program name.  If
25       one  of  the  arguments  is "--", then it is counted and the processing
26       stops.  If an error was encountered and errors  are  to  be  tolerated,
27       then the returned value is the index of the argument causing the error.
28       A hyphen by itself ("-") will also cause processing to  stop  and  will
29       not  be  counted  among the processed arguments.  A hyphen by itself is
30       treated as an operand.  Encountering an operand stops  option  process‐
31       ing.
32
33       opts   program options descriptor
34
35       a_ct   program arg count
36
37       a_v    program arg vector
38
39

RETURN VALUE

41       the count of the arguments processed
42
43

ERRORS

45       Errors will cause diagnostics to be printed.  exit(3) may or may not be
46       called.  It depends upon whether or not the options were generated with
47       the   "allow-errors"   attribute,   or   if   the   ERRSKIP_OPTERR   or
48       ERRSTOP_OPTERR macros were invoked.
49

SEE ALSO

51       The info documentation for the -lopts library.
52       ao_string_tokenize(3),  configFileLoad(3),  optionFileLoad(3),  option‐
53       FindNextValue(3), optionFindValue(3), optionFree(3), optionGetValue(3),
54       optionLoadLine(3), optionMemberList(3),  optionNextValue(3),  optionOn‐
55       lyUsage(3),    optionPrintVersion(3),   optionPrintVersionAndReturn(3),
56       optionRestore(3), optionSaveFile(3), optionSaveState(3),  optionUnload‐
57       Nested(3),  optionVersion(3), strequate(3), streqvcmp(3), streqvmap(3),
58       strneqvcmp(3), strtransform(3),
59
60
61
62                                  2018-07-31                  optionProcess(3)
Impressum