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

NAME

6       optionSaveFile - saves the option state to a file
7
8

SYNOPSIS

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

DESCRIPTION

17       This  routine  will save the state of option processing to a file.  The
18       name of that file can be specified with the argument to the --save-opts
19       option,  or by appending the rcfile attribute to the last homerc attri‐
20       bute.  If no rcfile attribute was specified, it will default  to  .pro‐
21       gramnamerc.  If you wish to specify another file, you should invoke the
22       SET_OPT_SAVE_OPTS(filename) macro.
23
24       The recommend usage is as follows:
25           optionProcess(&progOptions, argc, argv);
26           if (i_want_a_non_standard_place_for_this)
27           SET_OPT_SAVE_OPTS("myfilename");
28           optionSaveFile(&progOptions);
29
30       opts   program options descriptor
31
32

ERRORS

34       If no homerc file was specified, this routine will silently return  and
35       do nothing.  If the output file cannot be created or updated, a message
36       will be printed to stderr and the routine will return.
37

SEE ALSO

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