PLPARSEOPTS(3plplot) | PLplot API | PLPARSEOPTS(3plplot) |
plparseopts - Parse command-line arguments
PLINT plparseopts(p_argc, argv, mode)
Parse command-line arguments.
plparseopts(3plplot) removes all recognized flags (decreasing argc accordingly), so that invalid input may be readily detected. It can also be used to process user command line flags. The user can merge an option table of type PLOptionTable into the internal option table info structure using plMergeOpts(3plplot). Or, the user can specify that ONLY the external table(s) be parsed by calling plClearOpts(3plplot) before plMergeOpts(3plplot).
The default action taken by plparseopts(3plplot) is as follows:
Returns with an error if an unrecognized option or badly formed option-value pair are encountered.
Returns immediately (return code 0) when the first non-option command line argument is found.
Returns with the return code of the option handler, if one was called.
Deletes command line arguments from argv list as they are found, and decrements argc accordingly.
Does not show "invisible" options in usage or help messages.
Assumes the program name is contained in argv[0].
These behaviors may be controlled through the mode argument.
Redacted form: General: plparseopts(argv, mode)
This function is used in all of the examples.
Many developers (who are credited at http://plplot.org/credits.php) have contributed to PLplot over its long history.
PLplot documentation at http://plplot.org/documentation.php.
April, 2023 |