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

NAME

6       optionLoadLine - process a string for an option name and value
7
8

SYNOPSIS

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

DESCRIPTION

17       This is a client program callable routine for setting options from, for
18       example, the contents of a file that they read in.  Only one option may
19       appear  in  the  text.   It  will  be  treated as a normal (non-preset)
20       option.
21
22       When passed a pointer to the option struct and a string, it  will  find
23       the  option  named  by the first token on the string and set the option
24       argument to the remainder of the string.  The caller must NUL terminate
25       the  string.   The  caller need not skip over any introductory hyphens.
26       Any embedded new lines will be included in the option argument.  If the
27       input  looks  like  one  or more quoted strings, then the input will be
28       "cooked".  The "cooking" is identical to the string formation  used  in
29       AutoGen  definition  files  (@pxref{basic expression}), except that you
30       may not use backquotes.
31
32       opts   program options descriptor
33
34       line   NUL-terminated text
35
36

ERRORS

38       Invalid options are silently ignored.  Invalid  option  arguments  will
39       cause a warning to print, but the function should return.
40

SEE ALSO

42       The info documentation for the -lopts library.
43       ao_string_tokenize(3),  configFileLoad(3),  optionFileLoad(3),  option‐
44       FindNextValue(3), optionFindValue(3), optionFree(3), optionGetValue(3),
45       optionMemberList(3), optionNextValue(3), optionOnlyUsage(3), optionPro‐
46       cess(3),   optionRestore(3),   optionSaveFile(3),   optionSaveState(3),
47       optionUnloadNested(3),  optionVersion(3),  strequate(3),  streqvcmp(3),
48       streqvmap(3), strneqvcmp(3), strtransform(3),
49
50
51
52                                  2014-06-10                 optionLoadLine(3)
Impressum