AutoGen - The Automated Program Generator: 7.5.24 STATE_OPT( <NAME> ) - Option State

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

### 7.5.24 STATE_OPT( <NAME> ) - Option State

If you need to know if an option was set because of presetting actions (configuration file 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 configuration 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 May, 16 2009 using texi2html 1.78.