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) Perl/PDL: Not
38              available?
39
40
41              This function is used in all of the examples.
42

ARGUMENTS

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

AUTHORS

68       Many   developers   (who   are   credited   at    http://plplot.source
69       forge.net/credits.php)  have  contributed  to PLplot over its long his‐
70       tory.
71

SEE ALSO

73       PLplot   documentation   at    http://plplot.sourceforge.net/documenta
74       tion.php.
75
76
77
78                                 August, 2017             PLPARSEOPTS(3plplot)
Impressum