Go to the first, previous, next, last section, table of contents.
AutoOpts supports option processing; option state saving; and
program documentation with innumerable features. Here, we list
a few obvious ones and some important ones, but the full list is
really defined by all the attributes defined in the section Option Definitions
section.
-
POSIX-compliant short (flag) option processing.
-
GNU-style long options processing. Long options
are recognized without case sensitivity, and they may be abbreviated.
-
Environment variable initializations.
-
Initialization from RC or INI files, and
saving the option state back into one.
-
Options may be marked as
dis-abled
with a disablement prefix.
Such options may default to either an enabled or a disabled state. You
may also provide an enablement prifix, too, e.g., --allow-mumble
and --prevent-mumble
.
-
Verify that required options are present between the minimum and
maximum number of times on the command line.
-
Verify that conflicting options do not appear together, and that options
that require the presence of other options are, in fact, used in the
presence of other options.
-
Provides a callable routine to parse
a text string as if it were from one of the RC/INI files.
-
--help
and --version
are automatically supported.
--more-help
will page the generated help.
-
By adding a `doc' and `arg-name' attributes to each option,
AutoGen will also be able to produce a man page and the `invoking'
section of a texinfo document.
-
Insert the option processing state into Scheme-defined variables.
Thus, Guile based applications that are linked with private
main()
routines can take advantage of all of AutoOpts' functionality.
-
If
test-main
is defined, the output `.c' file will contain a
main routine that will be compiled when TEST_<prog-name>_OPTS
is
defined. See section AutoOpts for Shell Scripts. If you choose to compile this program,
it is currently capable of producing one of three results:
-
A program that processes the arguments and writes to standard out
portable shell commands containing the digested options.
-
A program that will generate portable shell commands to parse the defined
options. The expectation is that this result will be copied into a
shell script and used there.
-
test-main
may specify a routine that will be called with a
pointer to the option descriptions as the single argument. You must
supply this routine and, obviously, you can cause it to do whatever you
wish it to do.
-
There are facilities in place to allow libraries to intermingle their
command line and initialization options with client program options.
Explanatory details:
Go to the first, previous, next, last section, table of contents.