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

8.5.20 STATE_OPT( <NAME> ) - Option State

If you need to know if an option was set because of presetting actions (RC/INI processing or environment variables), versus a command line entry versus one of the SET/DISABLE macros, then use this macro. It will yield one of four values: OPTST_INIT, OPTST_SET, OPTST_PRESET or OPTST_DEFINED. It is used thus:

 
switch (STATE_OPT( NAME )) {
    case OPTST_INIT:
        not-preset, set or on the command line.  (unless CLEAR-ed)

    case OPTST_SET:
        option set via the SET_OPT_NAME() macro.

    case OPTST_PRESET:
        option set via an RC/INI file or environment variable

    case OPTST_DEFINED:
        option set via a command line option.

    default:
        cannot happen :)
}



This document was generated by Bruce Korb on February, 4 2002 using texi2html