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

NAME

6       plparseopts - Parse command-line arguments
7

SYNOPSIS

9       int 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)
45              pointer to number of arguments.
46
47       argv (char **, input)
48              Pointer to character array containing *p_argc command-line argu‐
49              ments.
50
51       mode (PLINT, 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       Geoffrey Furnish and Maurice LeBrun wrote and  maintain  PLplot.   This
69       man  page  was  automatically  generated from the DocBook source of the
70       PLplot  documentation,  maintained  by  Alan  W.   Irwin   and   Rafael
71       Laboissiere.
72

SEE ALSO

74       PLplot documentation at http://plplot.sourceforge.net/resources.
75
76
77
78                                  July, 2010              PLPARSEOPTS(3plplot)
Impressum