[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.4.2.7 Option Argument Handling

AutoOpts will automatically generate a callback procedure for options with enumerated keyword arguments and numeric arguments with range checking. If you have specified such an option, you may not specify any of the attributes listed here.

Otherwise, you may pick zero or one of the following attributes. The first two attributes interact with the documentation and settable attributes, See section 8.4.2.3 Special Option Handling.

`flag-code'
statements to execute when the option is encountered. The generated procedure will look like this:

 
static void
doOpt<name>( tOptions* pOptions, tOptDesc* pOptDesc )
{
<flag_code>
}

Only certain fields within the tOptions and tOptDesc structures may be accessed. See section 8.5.1 Data for Option Processing.

`extract-code'
This is effectively identical to flag_code, except that the source is kept in the output file instead of the definitions file. A long comment is used to demarcate the code. You must not modify that marker. Before regenerating the option code file, the old file is renamed from MUMBLE.c to MUMBLE.c.save. The template will be looking there for the text to copy into the new output file.

`call-proc'
external procedure to call when option is encountered. The calling sequence must conform to the sequence defined above for the generated procedure, doOpt<name>. It has the same restrictions regarding the fields within the structures passed in as arguments. See section 8.5.1 Data for Option Processing.

`flag-proc'
Name of another option whose flag_code can be executed when this option is encountered.

`stack-arg'
Call a special library routine to stack the option's arguments. Special macros in the interface file are provided for determining how many of the options were found (STACKCT_OPT(NAME)) and to obtain a pointer to a list of pointers to the argument values (STACKLST_OPT(NAME)).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by Davide on March, 6 2002 using texi2html