[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
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 :) } |