[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This section describes the data that may be accessed from within the
option processing callback routines. The following fields may be used
in the following ways and may be used for read only. The first set is
addressed from the tOptDesc*
pointer:
OPTST_
, e.g. OPTST_INIT
):
SET_OPT()
macro.
optionLoadLine()
routine.
disabled
.)
As an example of how this might be used, in AutoGen I want to allow
template writers to specify that the template output can be left
in a writable or read-only state. To support this, there is a Guile
function named set-writable
(see section 3.4.30 `set-writable' - Make the output file be writable).
Also, I provide for command options --writable
and
--not-writable
. I give precedence to command line and RC
file options, thus:
switch (STATE_OPT( WRITABLE )) { case OPTST_DEFINED: case OPTST_PRESET: fprintf( stderr, zOverrideWarn, pCurTemplate->pzFileName, pCurMacro->lineNo ); break; default: if (gh_boolean_p( set ) && (set == SCM_BOOL_F)) CLEAR_OPT( WRITABLE ); else SET_OPT_WRITABLE; } |
The following two fields are addressed from the tOptions*
pointer:
Note these fields get filled in during the first call to
optionProcess()
. All other fields are private, for the exclusive
use of AutoOpts code and is subject to change.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |