| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
AutoOpts 27.1 is bundled with AutoGen. It is a tool that virtually eliminates the hassle of processing options and keeping man pages, info docs and usage text up to date. This package allows you to specify several program attributes, up to a hundred option types and many option attributes. From this, it then produces all the code necessary to parse and handle the command line and configuration file options, and the documentation that should go with your program as well. All the features notwithstanding, some applications simply have well-established command line interfaces. Even still, those programs may use the configuration file parsing portion of the library. See the "AutoOpts Features" and "Configuration File Format" sections.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
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 Option Definitions section.
[PROGRAM_NAME]", See section configuration file presets.
dis-abled with a disablement prefix.
Such options may default to either an enabled or a disabled state. You
may also provide an enablement prefix, too, e.g., --allow-mumble
and --prevent-mumble.
--help and --version are automatically supported.
--more-help will page the generated help.
main() routines can take advantage of all of AutoOpts' functionality.
#include-d into the client option definitions
and they specify an "anchor" option that has a callback and must be invoked.
That will give the library access to the option state for their options.
gnu-usage attribute (see section Program Information Attributes).
This can be overridden by the user himself with the
AUTOOPTS_USAGE environment variable. If it exists and is set
to the string gnu, it will force GNU-ish style format; if it is
set to the string autoopts, it will force AutoOpts standard
format; otherwise, it will have no effect.
ENABLE_NLS defined and _() defined to
a localization function such as gettext(3GNU), then the option
processing code will be localizable (see section Internationalizing AutoOpts).
allow-errors
(see section Program Description Attributes) attribute. When processing reaches a point
where optionProcess (see section optionProcess) needs to be called
again, the current option can be set with RESTART_OPT(n)
(see section RESTART_OPT( n ) - Resume Option Processing) before calling optionProcess.
See: See section Options for Library Code.
#include into their own option definitions.
See "AutoOpt-ed Library for AutoOpt-ed Program" (see section AutoOpt-ed Library for AutoOpt-ed Program)
for more details.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
When AutoGen is installed, the AutoOpts project is installed with it. AutoOpts includes various AutoGen templates and a pair of shared libraries. These libraries may be used under the terms of the GNU Lesser General Public License (LGPL).
One of these libraries (libopts) is needed by programs that are built
using AutoOpts generated code. This library is available as a separate
"tear-off" source tarball. It is redistributable for use under either of
two licenses: The GNU Lesser General Public License ("Lesser" meaning you
have greater license with it and may link it into commercial programs), and
the advertising-clause-free BSD license. Both of these license terms are
incorporated into appropriate COPYING files included with the libopts
source tarball. This source may be incorporated into your package with
the following simple commands:
rm -rf libopts libopts-* gunzip -c `autoopts-config libsrc` | \ tar -xvf - mv libopts-*.*.* libopts |
View the `libopts/README' file for further integration information.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Since it is generally easier to start with a simple example than it is
to look at the options that AutoGen uses itself, here is a very simple
AutoOpts example. You can copy this example out of the Info file and
into a source file to try it. You can then embellish it into what you
really need. For more extensive examples, you can also examine the help
output and option definitions for the commands columns,
getdefs and autogen itself.
For our simple example, assume you have a program named check
that takes two options:
check does.
You want this option available as a POSIX-style flag option
and a GNU long option. You want to allow as many of these
as the user wishes.
First, specify your program attributes and its options to AutoOpts, as with the following example.
AutoGen Definitions options;
prog-name = check;
prog-title = "Checkout Automated Options";
long-opts;
main = { main-type = shell-process; };
flag = {
name = check-dirs;
value = L; /* flag style option character */
arg-type = string; /* option argument indication */
max = NOLIMIT; /* occurrence limit (none) */
stack-arg; /* save opt args in a stack */
descrip = "Checkout directory list";
};
flag = {
name = show_defs;
descrip = "Show the definition tree";
disable = dont; /* mark as enable/disable type */
/* option. Disable as `dont-' */
};
|
Then perform the following steps:
cflags="-DTEST_CHECK_OPTS `autoopts-config cflags`"
ldflags="`autoopts-config ldflags`"
autogen checkopt.def
cc -o check -g ${cflags} checkopt.c ${ldflags}
./check --help
Running those commands yields:
check - Checkout Automated Options
USAGE: check [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
Flg Arg Option-Name Description
-L Str check-dirs Checkout directory list
- may appear multiple times
no show-defs Show the definition tree
- disabled as --dont-show-defs
-? no help Display usage information and exit
-! no more-help Extended usage information passed thru pager
Options are specified by doubled hyphens and their name
or by a single hyphen and the flag character.
|
Normally, however, you would compile `checkopt.c' as in:
cc -o checkopt.o -I$prefix/include -c checkopt.c |
and link `checkopt.o' with the rest of your program.
The main program causes the options to be processed
by calling optionProcess (see section optionProcess):
main( int argc, char** argv )
{
{
int optct = optionProcess( &checkOptions, argc, argv );
argc -= optct;
argv += optct;
}
|
The options are tested and used as in the following fragment.
"ENABLED_OPT" is used instead of "HAVE_OPT" for the
show-defs option because it is an enabled/disabled option type:
if ( ENABLED_OPT( SHOW_DEFS )
&& HAVE_OPT( CHECK_DIRS )) {
int dirct = STACKCT_OPT( CHECK_DIRS );
char** dirs = STACKLST_OPT( CHECK_DIRS );
while (dirct-- > 0) {
char* dir = *dirs++;
...
|
A lot of magic happens to make this happen. The rest of this chapter will describe the myriad of option attributes supported by AutoOpts. However, keep in mind that, in general, you won't need much more than what was described in this "quick start" section.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
AutoOpts was designed to configure a program for running. This generally
happens before much real work has been started. Consequently, it is
expected to be run before multi-threaded applications have started multiple
threads. However, this is not always the case. Some applications may
need to reset and reload their running configuration, and some may use
SET_OPT_xxx() macros during processing. If you need to dynamically
change your option configuration in your multi-threaded application, it is
your responsibility to prevent all threads from accessing the option
configuration state, except the one altering the configuration.
The various accessor macros (HAVE_OPT(), etc.) do not modify state
and are safe to use in a multi-threaded application. It is safe as long
as no other thread is concurrently modifying state, of course.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
AutoOpts uses an AutoGen definitions file for the definitions of the program options and overall configuration attributes. The complete list of program and option attributes is quite extensive, so if you are reading to understand how to use AutoOpts, I recommend reading the "Quick Start" section (see section Quick Start) and paying attention to the following:
prog-name, prog-title, and argument, program
attributes, See section Program Description Attributes.
name and descrip option attributes, See section Required Attributes.
value (flag character) and min (occurrence counts)
option attributes, See section Common Option Attributes.
arg-type from the option argument specification section,
See section Option Argument Specification.
Keep in mind that the majority are rarely used and can be safely ignored. However, when you have special option processing requirements, the flexibility is there.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The following global definitions are used to define attributes of the entire program. These generally alter the configuration or global behavior of the AutoOpts option parser. The first two are required of every program. The rest have been alphabetized. Except as noted, there may be only one copy of each of these definitions:
This attribute is required. Variable names derived from this name
are derived using string->c_name! (see section `string->c-name!' - map non-name chars to underscore).
This attribute is required and may be any descriptive text.
The presence of this attribute indicates ignoring any command line
option errors. This may also be turned on and off by invoking the
macros ERRSKIP_OPTERR and ERRSTOP_OPTERR from the
generated interface file.
Specifies the syntax of the arguments that follow the options.
It may not be empty, but if it is not supplied, then option processing
must consume all the arguments. If it is supplied and starts with an
open bracket ([), then there is no requirement on the presence or
absence of command line arguments following the options. Lastly, if it
is supplied and does not start with an open bracket, then option
processing must not consume all of the command line arguments.
Indicates looking in the environment for values of variables named,
PROGRAM_OPTNAME or PROGRAM, where PROGRAM is the
upper cased C-name of the program and OPTNAME is the
upper cased C-name of a specific option.
This string is inserted into the .h interface file. Generally used for
global variables or #include directives required by
flag_code text and shared with other program text.
Do not specify your configuration header (`config.h') in this
attribute or the include attribute, however. Instead, use
config-header, below.
The contents of this attribute should be just the name of the configuration file. A "#include" naming this file will be inserted at the top of the generated header.
Specifies either a directory or a file using a specific path (like .
or `/usr/local/share/progname') or an environment variable (like
`$HOME/rc/' or `$PREFIX/share/progname') or the directory
where the executable was found (`$$[/...]') to use to try to find
the rcfile. Use as many as you like. The presence of this attribute
activates the --save-opts and --load-opts options.
See section configuration file presets.
This string is inserted into the .c file. Generally used for global
variables required only by flag_code program text.
Presence indicates GNU-standard long option processing. If any options
do not have an option value (flag character) specified, and least one
does specify such a value, then you must specify long-opts. If
none of your options specify an option value (flag character) and you do
not specify long-opts, then command line arguments are processed
in "named option mode". This means that:
- and -- are completely optional.
argument program attribute is disallowed.
This value is inserted into all global names. This will disambiguate them if more than one set of options are to be compiled into a single program.
Specifies the configuration file name. This is only useful if you
have provided at least one homerc attribute.
default: .<prog-name>rc
Specifies the program version and activates the VERSION option, See section Automatically Supported Options.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Some libraries provide their own code for processing command line options, and this may be used by programs that utilize AutoOpts. You may also wish to write a library that gets configured with AutoOpts options and config files. Such a library may either supply its own configury routine and process its own options, or it may export its option descriptions to programs that also use AutoOpts. This section will describe how to do all of these different things.
| 7.5.2.1 AutoOpt-ed Library for AutoOpt-ed Program | ||
| 7.5.2.2 AutoOpt-ed Library for Regular Program | ||
| 7.5.2.3 AutoOpt-ed Program Calls Regular Library |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The library source code must provide an option definition file that consists
of only the flag entries. The first flag entry must contain the
following attributes:
This name is used in the construction of a global pointer of type
tOptDesc const*. It is always required.
It tells AutoOpts that this option serves no normal purpose.
It will be used to add usage clarity and to locate option descriptors
in the library code.
This is a string that is inserted in the extended usage display before the options specific to the current library. It is always required.
This should match the name of the library. This string is also used in the construction of the option descriptor pointer name. In the end, it looks like this:
extern tOptDesc const* <<lib-name>>_<<name>>_optDesc_p; |
and is used in the macros generated for the library's .h file.
In order to compile this AutoOpts using library, you must create a
special header that is not used by the client program. This is accomplished
by creating an option definition file that contains essentially exactly the
following:
AutoGen definitions options; prog-name = does-not-matter; // but is always required prog-title = 'also does not matter'; // also required config-header = 'config.h'; // optional, but common library; #include library-options-only.def |
and nothing else. AutoGen will produce only the .h file.
You may now compile your library, referencing just this .h file.
The macros it creates will utilize a global variable that will be defined
by the AutoOpts-using client program. That program will need to
have the following #include in its option definition file:
#include library-options-only.def |
All the right things will magically happen so that the global variables
named <<lib-name>>_<<name>>_optDesc_p are initialized correctly.
For an example, please see the AutoOpts test script:
`autoopts/test/library.test'.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
In this case, your library must provide an option processing function
to a calling program. This is accomplished by setting the allow-errors
global option attribute. Each time your option handling function is called,
you must determine where your scan is to resume and tell the AutoOpts library
by invoking:
RESTART_OPT(next_arg_index); |
and then invoke not_opt_index = optionProcess(...).
The not_opt_index value can be used to set optind,
if that is the global being used to scan the program argument array.
In this method, do NOT utilize the global library attribute.
Your library must specify its options as if it were a complete program.
You may choose to specify an alternate usage() function so that
usage for other parts of the option interface may be displayed as well.
See "Program Information Attributes" (see section Program Information Attributes).
At the moment, there is no method for calling optionUsage() telling
it to produce just the information about the options and not the program
as a whole. Some later revision after somebody asks.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
As with providing an AutoOpt-ed library to a non-AutoOpt-ed
program, you must write the option description file as if you were writing
all the options for the program, but you should specify the
allow-errors global option attribute and you will likely want an
alternate usage() function (see "Program Information Attributes"
see section Program Information Attributes). In this case, though, when
optionProcess() returns, you need to test to see if there might be
library options. If there might be, then call the library's exported
routine for handling command line options, set the next-option-to-process
with the RESTART_OPT() macro, and recall optionProcess().
Repeat until done.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
When AutoOpts generates the code to parse the command line options, it has
the ability to produce any of several types of main() procedures.
This is done by specifying a global structured value for main. The
values that it contains are dependent on the value set for the one value it
must have: main-type.
The recognized values for main-type are:
Here is an example of an include variation:
main = {
main-type = include;
tpl = "main-template.tpl";
};
|
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
When the main-type is specified to be guile,
a main() procedure is generated that calls gh_enter(), providing
it with a generated inner_main() to invoke. If you must perform
certain tasks before calling gh_enter(), you may specify such code
in the value for the before-guile-boot attribute.
The inner_main() procedure itself will process the command line
arguments (by calling optionProcess(),
see section optionProcess), and then either invoke the code
specified with the guile-main attribute, or else export the
parsed options to Guile symbols and invoke the scm_shell()
function from the Guile library. This latter will render the program
nearly identical to the stock guile(1) program.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This will produce a main() procedure that parses the command line
options and emits to stdout Bourne shell commands that puts the
option state into environment variables. This can be used within a
shell script as follows:
unset OPTION_CT
eval "`opt_parser \"$@\"`"
test -z "${OPTION_CT}" && exit 1
test ${OPTION_CT} -gt 0 && shift ${OPTION_CT}
|
If the option parsing code detects an error or a request for usage,
it will not emit an assignment to OPTION_CT and the script should just
exit. If the options are set consistently, then something along the
lines of the following will be written to stdout and evaled:
OPTION_CT=4
export OPTION_CT
MYPROG_SECOND='first'
export MYPROG_SECOND
MYPROG_ANOTHER=1 # 0x1
export MYPROG_ANOTHER
|
If the arguments are to be reordered, however, then the resulting set
of operands will be emitted and OPTION_CT gets set to zero.
For example, the following would be appended to the above:
set -- 'operand1' 'operand2' 'operand3'
OPTION_CT=0
|
OPTION_CT is set to zero since it is not necessary to shift
off any options.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This will produce a main() procedure that emits a shell script
that will parse the command line options. That script can be emitted
to stdout or inserted or substituted into a pre-existing shell
script file. Improbable markers are used to identify previously inserted
parsing text:
# # # # # # # # # # -- do not modify this marker -- |
The program is also pretty insistent upon starting its parsing script on the second line.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
You must supply a value for the main-text attribute.
You may also supply a value for option-code. If you do, then
the optionProcess invocation will not be emitted into the code.
AutoOpts will wrap the main-text inside of:
int
main( int argc, char** argv )
{
{
int ct = optionProcess( &<<prog-name>>Options, argc, argv );
argc -= ct;
argv += ct;
}
<<your text goes here>>
}
|
so you can most conveniently set the value with a "here string"
(see section A Here String):
code = <<- _EndOfMainProc_ <<your text goes here>> _EndOfMainProc_; |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
You must write a template to produce your main procedure.
You specify the name of the template with the tpl attribute
and it will be incorporated at the point where AutoOpts is ready
to emit the main() procedure.
This can be very useful if, in your working environment, you have
many programs with highly similar main() procedures. All you need
to do is parameterize the variations and specify which variant is needed
within the main AutoOpts specification. Since you are coding
the template for this, the attributes needed for this variation would
be dictated by your template.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
You must write a template to produce your main procedure. That template
must contain a definition for the function specified with the func
attribute to this main() procedure specification. Typically, this
template will be incorporated by using the --lib-template option
(see section lib-template option (-l)) in the AutoGen invocation. Otherwise, this
variation operates in much the same way as "include"
(see section include: code emitted from included template) method.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This produces a main procedure that invokes a procedure once for each operand
on the command line (non-option arguments), OR once for each
non-blank, non-comment stdin input line. Leading and trailing white
space is trimmed from the input line and comment lines are lines that are
empty or begin with a comment character, defaulting to a hash ('#') character.
NB:
The argument program attribute (see section Program Description Attributes)
must begin with the [ character, to indicate that there are
command operands, but that they are optional.
There are a number of attributes to main that may be used:
handler-procThis attribute is required. It is used to name the procedure to call. That procedure is presumed to be external, but if you provide the code for it, then the procedure is emitted as a static procedure in the generated code.
This procedure should return 0 on success, a cumulative error code on warning and exit without returning on an unrecoverable error. As the cumulative warning codes are or-ed together, the codes should be some sort of bit mask in order to be ultimately decipherable (if you need to do that).
If the called procedure needs to cause a fail-exit, it is expected to call
exit(3) directly. If you want to cause a warning exit code, then this
handler function should return a non-zero status. That value will be
OR-ed into a result integer for computing the final exit code. E.g.,
here is part of the emitted code:
int res = 0;
if (argc > 0) {
do {
res |= my_handler( *(argv++) );
} while (--argc > 0);
} else { ...
|
handler-typeIf you do not supply this attribute, your handler procedure must be the default type. The profile of the procedure must be:
int my_handler( const char *pz_entry ); |
However, if you do supply this attribute, you may select any of three alternate flavors:
This is essentially the same as the default handler type, except that before your procedure is invoked, the generated code has verified that the string names an existing file. The profile is unchanged.
Before calling your procedure, the file is f-opened according to the "X",
where "X" may be any of the legal modes for fopen(3C). In this case,
the profile for your procedure must be:
int my_handler( const char* pz_fname, FILE* entry_fp ); |
Before calling your procedure, the contents of the file are read into memory. (Excessively large files may cause problems.) The "`some-text-of-file'" disallows empty files. Both require regular files. In this case, the profile for your procedure must be:
int my_handler( const char* pz_fname, char* file_text,
size_t text_size );
|
Note that though the file_text is not const, any changes made to
it are not written back to the original file. It is merely a memory image of
the file contents. Also, the memory allocated to hold the text is
text_size + 1 bytes long and the final byte is always NUL.
The file contents need not be text, as the data are read with the read(2)
system call.
my_handler-codeWith this attribute, you provide the code for your handler procedure
in the option definition file. In this case, your main()
procedure specification might look something like this:
main = {
main-type = for-each;
handler-proc = my_handler;
my_handler-code = <<- EndOfMyCode
/* whatever you want to do */
EndOfMyCode;
};
|
and instead of an emitted external reference, a procedure will be emitted that looks like this:
static int
my_handler( const char* pz_entry )
{
int res = 0;
<<my_handler-code goes here>>
return res;
}
|
main-initThis is code that gets inserted after the options have been processed, but before the handler procs get invoked.
main-finiThis is code that gets inserted after all the entries have been processed,
just before returning from main().
comment-charIf you wish comment lines to start with a character other than a hash
(#) character, then specify one character with this attribute.
If that character is the NUL byte, then only blank lines will be
considered comments.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes are used to define how and what information is displayed to the user of the program.
The copyright is a structured value containing three to five
values. If copyright is used, then the first three are required.
An example of this might be:
copyright = {
date = "1992-2004";
owner = "Bruce Korb";
eaddr = 'bkorb@gnu.org';
type = GPL;
};
|
This string is added to the usage output when the HELP option is selected.
Gives additional information whenever the usage routine is invoked..
The name of the package the program belongs to. This will appear
parenthetically after the program name in the version and usage output,
e.g.: autogen (GNU autogen) - The Automated Program Generator.
This attribute will not change anything except appearance. Normally, the option names are all documented in lower case. However, if you specify this attribute, then they will display in the case used in their specification. Command line options will still be matched without case sensitivity.
These define global pointer variables that point to the program
descriptor and the first option descriptor for a library option. This
is intended for use by certain libraries that need command line and/or
initialization file option processing. These definitions have no effect
on the option template output, but are used for creating a library
interface file. Normally, the first "option" for a library will be a
documentation option that cannot be specified on the command line, but
is marked as settable. The library client program will invoke the
SET_OPTION macro which will invoke a handler function that will
finally set these global variables.
Optionally names the usage procedure, if the library routine
optionUsage() does not work for you. If you specify
my_usage as the value of this attribute, for example, you will
use a procedure by that name for displaying usage. Of course, you will
need to provide that procedure and it must conform to this profile:
void my_usage( tOptions* pOptions, int exitCode ) |
Normally, the default format produced by the optionUsage procedure
is AutoOpts Standard. By specifying this attribute, the default format
will be GNU-ish style. Either default may be overridden by the user with
the AUTOOPTS_USAGE environment variable. If it is set to gnu
or autoopts, it will alter the style appropriately. This attribute
will conflict with the usage attribute.
Some applications traditionally require that the command operands be
intermixed with the command options. In order to handle that, the arguments
must be reordered. If you are writing such an application, specify this
global option. All of the options (and any associated option arguments)
will be brought to the beginning of the argument list. New applications
should not use this feature, if at all possible. This feature is
disabled if POSIXLY_CORRECT is defined in the environment.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
For each option you wish to specify, you must have a block macro named
flag defined. There are two required attributes: name and
descrip. If any options do not have a value (traditional flag
character) attribute, then the long-opts program attribute must also
be defined. As a special exception, if no options have a value
and long-opts is not defined and argument is
not defined, then all arguments to the program are named options. In this
case, the - and -- command line option markers are optional.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Every option must have exactly one copy of both of these attributes.
Long name for the option. Even if you are not accepting long options
and are only accepting flags, it must be provided. AutoOpts generates
private, named storage that requires this name. This name also causes
a #define-d name to be emitted. It must not conflict with any
other names you may be using in your program.
For example, if your option name is, debug or munged-up,
you must not use the #define names DEBUG (or
MUNGED_UP) in your program for non-AutoOpts related purposes.
They are now used by AutoOpts.
Except for documentation options, a very brief description of
the option. About 40 characters on one line, maximum. It appears on
the usage() output next to the option name. If, however, the
option is a documentation option, it will appear on one or more lines by
itself. It is thus used to visually separate and comment upon groups of
options in the usage text.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These option attributes are optional. Any that do appear in the definition of a flag, may appear only once.
The flag character to specify for traditional option flags. e.g. -L.
Maximum occurrence count (invalid if disable present).
The default maximum is 1. NOLIMIT can be used for the value,
otherwise it must be a number or a #define that evaluates to a number.
Minimum occurrence count. If present, then the option must appear on the command line. Do not define it with the value zero (0).
If an option must be specified, but it need not be specified on the command line, then specify this attribute for the option.
Long-name prefix for enabling the option (invalid if disable not present). Only useful if long option names are being processed.
Prefix for disabling (inverting sense of) the option. Only useful if long option names are being processed.
If default is for option being enabled. (Otherwise, the OPTST_DISABLED bit is set at compile time.) Only useful if the option can be disabled.
If an option is relevant on certain platforms or when certain features
are enabled or disabled, you can specify the compile time flag used
to indicate when the option should be compiled in or out. For example,
if you have a configurable feature, mumble that is indicated
with the compile time define, WITH_MUMBLING, then add:
ifdef = WITH_MUMBLING; |
Take care when using these. There are several caveats:
VALUE_OPT_ values are #define-d. If WITH_MUMBLING
is not defined, then the associated VALUE_OPT_ value will not be
#define-d either. So, if you have an option named, MUMBLING
that is active only if WITH_MUMBLING is #define-d, then
VALUE_OPT_MUMBLING will be #define-d iff WITH_MUMBLING
is #define-d. Watch those switch statements.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These option attributes do not fit well with other categories.
If presetting this option is not allowed. (Thus, environment variables and values set in configuration files will be ignored.)
If the option can be set outside of option processing. If this
attribute is defined, special macros for setting this particular option
will be inserted into the interface file. For example,
TEMPL_DIRS is a settable option for AutoGen, so a macro named
SET_OPT_TEMPL_DIRS(a) appears in the interface file. This
attribute interacts with the documentation attribute.
Generally, when several options are mutually exclusive and basically serve the purpose of selecting one of several processing modes, these options can be considered an equivalence class. Sometimes, it is just easier to deal with them as such. All members of the equivalence class must contain the same equivalenced-to option, including the equivalenced-to option itself. Thus, it must be a class member.
For an option equivalence class, there is a single occurrence counter for
the class. It can be referenced with the interface macro,
COUNT_OPT(BASE_OPTION), where "BASE_OPTION" is the equivalenced-to
option name.
Also, please take careful note: since the options are mapped to the equivalenced-to option descriptor, any option argument values are mapped to that descriptor also. Be sure you know which "equivalent option" was selected before getting an option argument value!
During the presetting phase of option processing (see section Configuring your program), equivalenced options may be specified. However, if different equivalanced members are specified, only the last instance will be recognized and the others will be discarded. A conflict error is indicated only when multiple different members appear on the command line itself.
As an example of where equivalenced options might be useful, cpio(1)
has three options -o, -i, and -p that define the
operational mode of the program (create, extract and
pass-through, respectively). They form an equivalence class from
which one and only one member must appear on the command line. If
cpio were an AutoOpt-ed program, then each of these option
definitions would contain:
equivalence = create; |
and the program would be able to determine the operating mode with code that worked something like this:
switch (WHICH_IDX_CREATE) {
case INDEX_OPT_CREATE: ...
case INDEX_OPT_EXTRACT: ...
case INDEX_OPT_PASS_THROUGH: ...
default: /* cannot happen */
}
|
This attribute means the option exists for the purpose of separating option description text in the usage output. Libraries may choose to make it settable so that the library can determine which command line option is the first one that pertains to the library.
If present, this option disables all other attributes except settable,
call-proc and flag_-ode. settable must be and is only
specified if call-proc, extract-code or flag-code has
been specified. When present, the descrip attribute will be displayed
only when the --help option has been specified. It will be displayed
flush to the left hand margin and may consist of one or more lines of text.
The name of the option will not be printed.
Documentation options are for clarifying the usage text and will not appear in generated man pages or in the generated invoking texinfo doc.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Certain options may need to be processed early. For example, in order to
suppress the processing of configuration files, it is necessary to process the
command line option --no-load-opts before the config files are
processed. To accommodate this, certain options may have their enabled or
disabled forms marked for immediate processing. The consequence of this is
that they are processed ahead of all other options in the reverse of normal
order.
Normally, the first options processed are the options specified in the first
homerc file, followed by then next homerc file through to the
end of config file processing. Next, environment variables are processed and
finally, the command line options. The later options override settings
processed earlier. That actually gives them higher priority. Command line
immediate action options actually have the lowest priority of all. They would
be used only if they are to have an effect on the processing of subsequent
options.
Use this option attribute to specify that the enabled form of the option
is to be processed immediately. The help and more-help
options are so specified. They will also call exit() upon
completion, so they do have an effect on the processing
of the remaining options :-).
Use this option attribute to specify that the disabled form of the
option is to be processed immediately. The load-opts option is
so specified. The --no-load-opts command line option will
suppress the processing of config files and environment variables.
Contrariwise, the --load-opts command line option is
processed normally. That means that the options specified in that file
will be processed after all the homerc files and, in fact, after
options that precede it on the command line.
If either the immediate or the immed-disable attributes
are set to the string, "also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type" attribute, AutoOpts will not process an argument to an option. If "arg-type" is specified and "arg-optional" is also specified, then the next command line token will be taken to be an argument, unless it looks like the name of another option.
If the argument type is specified to be anything other than "str[ing]", then
AutoOpts will specify a callback procedure to handle the argument. Some of
these procedures will be created and inserted into the generated .c
file, and others are already built into the `libopts' library.
Therefore, if you write your own callback procedure
(see section Option Argument Handling), then you must either not specify an
"arg-type" attribute, or else specify it to be of type "str[ing]". Your
callback function will be able to place its own restrictions on what that
string may contain or represent.
This specifies the type of argument the option will take. If not present, the option cannot take an argument. If present, it must be one of the following five. The bracketed part of each name is optional.
The argument may be any arbitrary string, though your program or option callback procedure may place additional constraints upon it.
The argument must be a correctly formed integer, without any trailing U's or
L's. AutoOpts contains a library procedure to convert the string to a
number. If you specify range checking with arg-range, then AutoOpts
produces a special purpose procedure for this option.
The argument will be interpreted and always yield either AG_TRUE or
AG_FALSE. False values are the empty string, the number zero, or a
string that starts with f, F, n or N
(representing False or No). Anything else will be interpreted as True.
The argument must match a specified list of strings.
Assuming you have named the option, optn-name,
the strings will be converted into an enumeration of type te_Optn_Name
with the values OPTN_NAME_KEYWORD. If you have not
specified a default value, the value OPTN_NAME_UNDEFINED will be
inserted with the value zero. The option will be initialized to that
value. You may now use this in your code as follows:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
switch (opt) {
case OPTN_NAME_UNDEFINED: /* undefined things */ break;
case OPTN_NAME_KEYWORD: /* `keyword' things */ break;
default: /* utterly impossible */ ;
}
|
AutoOpts produces a special purpose procedure for this option.
If you have need for the string name of the selected keyword, you
may obtain this with the macro, OPT_OPTN_NAME_VAL2STR(val).
The value you pass would normally be OPT_VALUE_OPTN_NAME,
but anything with numeric value that is legal for te_Optn_Name
may be passed. Anything out of range will result in the string,
"*INVALID*" being returned. The strings are read only.
It may be used as in:
te_Optn_Name opt = OPT_VALUE_OPTN_NAME;
printf( "you selected the %s keyword\n",
OPT_OPTN_NAME_VAL2STR(opt) );
|
The argument must be a list of names each of which must match the
strings "all", "none" or one of the keywords specified
for this option. all will turn on all membership bits and
none will turn them all off. Specifying one of the keywords
will turn on the corresponding set membership bit. Literal numbers
may also be used and may, thereby, set or clear more than one bit.
Preceding a keyword or literal numbert;also", then the option will actually be
processed twice: first at the immediate processing phase and again
at the "normal" time.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These attributes may be used as many times as you need. They are used at the end of the option processing to verify that the context within which each option is found does not conflict with the presence or absence of other options.
This is not a complete cover of all possible conflicts and requirements, but it simple to implement and covers the more common situations.
one entry for every option that must be present when this option is present
one entry for every option that cannot be present when this option is present
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Command line options come in three flavors: options that do not take arguments, those that do and those that may. Without an "arg-type