1PLPARSEOPTS(3plplot)              PLplot API              PLPARSEOPTS(3plplot)
2
3
4

NAME

6       plparseopts - Parse command-line arguments
7

SYNOPSIS

9       PLINT plparseopts(p_argc, argv, mode)
10

DESCRIPTION

12       Parse command-line arguments.
13
14       plparseopts(3plplot)  removes  all  recognized  flags  (decreasing argc
15       accordingly), so that invalid input may be readily  detected.   It  can
16       also be used to process user command line flags.  The user can merge an
17       option table of type PLOptionTable into the internal option table  info
18       structure  using  plMergeOpts(3plplot).   Or, the user can specify that
19       ONLY the external table(s) be parsed  by  calling  plClearOpts(3plplot)
20       before plMergeOpts(3plplot).
21
22       The default action taken by plparseopts(3plplot) is as follows:
23
24              Returns  with an error if an unrecognized option or badly formed
25              option-value pair are encountered.
26              Returns immediately (return code 0) when  the  first  non-option
27              command line argument is found.
28              Returns  with  the return code of the option handler, if one was
29              called.
30              Deletes command line arguments from argv list as they are found,
31              and decrements argc accordingly.
32              Does not show "invisible" options in usage or help messages.
33              Assumes the program name is contained in argv[0].
34
35              These behaviors may be controlled through the mode argument.
36
37              Redacted form: General: plparseopts(argv, mode)
38
39
40              This function is used in all of the examples.
41

ARGUMENTS

43       p_argc (int *, input/output)
44              Number of arguments.
45
46       argv (PLCHAR_NC_MATRIX(3plplot), input/output)
47              A  vector  of  character strings containing *p_argc command-line
48              arguments.
49
50       mode (PLINT(3plplot), input)
51              Parsing mode with the following possibilities: PL_PARSE_FULL (1)
52              --  Full parsing of command line and all error messages enabled,
53              including program exit when an error occurs.   Anything  on  the
54              command  line  that isn't recognized as a valid option or option
55              argument is flagged as an error.  PL_PARSE_QUIET  (2)  --  Turns
56              off  all output except in the case of errors.  PL_PARSE_NODELETE
57              (4)   --   Turns   off   deletion   of   processed    arguments.
58              PL_PARSE_SHOWALL  (8)  -- Show invisible options PL_PARSE_NOPRO‐
59              GRAM (32) -- Specified if argv[0] is NOT a pointer to  the  pro‐
60              gram  name.   PL_PARSE_NODASH (64) -- Set if leading dash is NOT
61              required.  PL_PARSE_SKIP (128) -- Set to quietly skip  over  any
62              unrecognized arguments.
63
64
65

AUTHORS

67       Many  developers  (who  are  credited at http://plplot.org/credits.php)
68       have contributed to PLplot over its long history.
69

SEE ALSO

71       PLplot documentation at http://plplot.org/documentation.php.
72
73
74
75                                February, 2019            PLPARSEOPTS(3plplot)
Impressum