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

NAME

6       optionSaveState - saves the option state to memory
7
8

SYNOPSIS

10       #include <your-opts.h>
11       cc [...] -o outfile infile.c -lopts [...]
12
13       void optionSaveState(tOptions * pOpts);
14
15

DESCRIPTION

17       This  routine  will  allocate  enough memory to save the current option
18       processing state.  If this routine has been called before, that  memory
19       will  be reused.  You may only save one copy of the option state.  This
20       routine may be called before optionProcess(3AO).  If  you  do  call  it
21       before  the  first  call to optionProcess, then you may also change the
22       contents of argc/argv after you call optionRestore(3AO)
23
24       In fact, more strongly put: it is safest  to  only  use  this  function
25       before  having  processed  any  options.  In particular, the saving and
26       restoring of stacked string arguments and hierarchical values  is  dis‐
27       abled.  The values are not saved.
28
29       pOpts  program options descriptor
30
31

ERRORS

33       If  it  fails to allocate the memory, it will print a message to stderr
34       and exit.  Otherwise, it will always succeed.
35

SEE ALSO

37       The info documentation for the -lopts library.
38       ao_string_tokenize(3),  configFileLoad(3),  optionFileLoad(3),  option‐
39       FindNextValue(3), optionFindValue(3), optionFree(3), optionGetValue(3),
40       optionLoadLine(3), optionMemberList(3),  optionNextValue(3),  optionOn‐
41       lyUsage(3),    optionPrintVersion(3),   optionPrintVersionAndReturn(3),
42       optionProcess(3),  optionRestore(3),  optionSaveFile(3),  optionUnload‐
43       Nested(3),  optionVersion(3), strequate(3), streqvcmp(3), streqvmap(3),
44       strneqvcmp(3), strtransform(3),
45
46
47
48                                  2019-07-24                optionSaveState(3)
Impressum