Annotation of embedaddon/ntp/ntpsnmpd/ntpsnmpd-opts.h, revision 1.1

1.1     ! misho       1: /*  
        !             2:  *  EDIT THIS FILE WITH CAUTION  (ntpsnmpd-opts.h)
        !             3:  *  
        !             4:  *  It has been AutoGen-ed  December 24, 2011 at 06:34:36 PM by AutoGen 5.12
        !             5:  *  From the definitions    ntpsnmpd-opts.def
        !             6:  *  and the template file   options
        !             7:  *
        !             8:  * Generated from AutoOpts 35:0:10 templates.
        !             9:  *
        !            10:  *  AutoOpts is a copyrighted work.  This header file is not encumbered
        !            11:  *  by AutoOpts licensing, but is provided under the licensing terms chosen
        !            12:  *  by the ntpsnmpd author or copyright holder.  AutoOpts is
        !            13:  *  licensed under the terms of the LGPL.  The redistributable library
        !            14:  *  (``libopts'') is licensed under the terms of either the LGPL or, at the
        !            15:  *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
        !            16:  *  for details.
        !            17:  *
        !            18:  * This source file is copyrighted and licensed under the following terms:
        !            19:  *
        !            20:  *  see html/copyright.html
        !            21:  *  
        !            22:  */
        !            23: /*
        !            24:  *  This file contains the programmatic interface to the Automated
        !            25:  *  Options generated for the ntpsnmpd program.
        !            26:  *  These macros are documented in the AutoGen info file in the
        !            27:  *  "AutoOpts" chapter.  Please refer to that doc for usage help.
        !            28:  */
        !            29: #ifndef AUTOOPTS_NTPSNMPD_OPTS_H_GUARD
        !            30: #define AUTOOPTS_NTPSNMPD_OPTS_H_GUARD 1
        !            31: #include "config.h"
        !            32: #include <autoopts/options.h>
        !            33: 
        !            34: /*
        !            35:  *  Ensure that the library used for compiling this generated header is at
        !            36:  *  least as new as the version current when the header template was released
        !            37:  *  (not counting patch version increments).  Also ensure that the oldest
        !            38:  *  tolerable version is at least as old as what was current when the header
        !            39:  *  template was released.
        !            40:  */
        !            41: #define AO_TEMPLATE_VERSION 143360
        !            42: #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
        !            43:  || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
        !            44: # error option template version mismatches autoopts/options.h header
        !            45:   Choke Me.
        !            46: #endif
        !            47: 
        !            48: /*
        !            49:  *  Enumeration of each option:
        !            50:  */
        !            51: typedef enum {
        !            52:     INDEX_OPT_NOFORK        =  0,
        !            53:     INDEX_OPT_SYSLOG        =  1,
        !            54:     INDEX_OPT_AGENTXSOCKET  =  2,
        !            55:     INDEX_OPT_VERSION       =  3,
        !            56:     INDEX_OPT_HELP          =  4,
        !            57:     INDEX_OPT_MORE_HELP     =  5,
        !            58:     INDEX_OPT_SAVE_OPTS     =  6,
        !            59:     INDEX_OPT_LOAD_OPTS     =  7
        !            60: } teOptIndex;
        !            61: 
        !            62: #define OPTION_CT    8
        !            63: #define NTPSNMPD_VERSION       "4.2.6p5"
        !            64: #define NTPSNMPD_FULL_VERSION  "ntpsnmpd 4.2.6p5"
        !            65: 
        !            66: /*
        !            67:  *  Interface defines for all options.  Replace "n" with the UPPER_CASED
        !            68:  *  option name (as in the teOptIndex enumeration above).
        !            69:  *  e.g. HAVE_OPT(NOFORK)
        !            70:  */
        !            71: #define         DESC(n) (ntpsnmpdOptions.pOptDesc[INDEX_OPT_## n])
        !            72: #define     HAVE_OPT(n) (! UNUSED_OPT(& DESC(n)))
        !            73: #define      OPT_ARG(n) (DESC(n).optArg.argString)
        !            74: #define    STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK)
        !            75: #define    COUNT_OPT(n) (DESC(n).optOccCt)
        !            76: #define    ISSEL_OPT(n) (SELECTED_OPT(&DESC(n)))
        !            77: #define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n)))
        !            78: #define  ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n)))
        !            79: #define  STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt)
        !            80: #define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
        !            81: #define    CLEAR_OPT(n) STMTS( \
        !            82:                 DESC(n).fOptState &= OPTST_PERSISTENT_MASK;   \
        !            83:                 if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \
        !            84:                     DESC(n).fOptState |= OPTST_DISABLED; \
        !            85:                 DESC(n).optCookie = NULL )
        !            86: 
        !            87: /* * * * * *
        !            88:  *
        !            89:  *  Enumeration of ntpsnmpd exit codes
        !            90:  */
        !            91: typedef enum {
        !            92:     NTPSNMPD_EXIT_SUCCESS = 0,
        !            93:     NTPSNMPD_EXIT_FAILURE = 1
        !            94: } ntpsnmpd_exit_code_t;
        !            95: /*
        !            96:  *  Make sure there are no #define name conflicts with the option names
        !            97:  */
        !            98: #ifndef     NO_OPTION_NAME_WARNINGS
        !            99: # ifdef    NOFORK
        !           100: #  warning undefining NOFORK due to option name conflict
        !           101: #  undef   NOFORK
        !           102: # endif
        !           103: # ifdef    SYSLOG
        !           104: #  warning undefining SYSLOG due to option name conflict
        !           105: #  undef   SYSLOG
        !           106: # endif
        !           107: # ifdef    AGENTXSOCKET
        !           108: #  warning undefining AGENTXSOCKET due to option name conflict
        !           109: #  undef   AGENTXSOCKET
        !           110: # endif
        !           111: #else  /* NO_OPTION_NAME_WARNINGS */
        !           112: # undef NOFORK
        !           113: # undef SYSLOG
        !           114: # undef AGENTXSOCKET
        !           115: #endif  /*  NO_OPTION_NAME_WARNINGS */
        !           116: 
        !           117: /* * * * * *
        !           118:  *
        !           119:  *  Interface defines for specific options.
        !           120:  */
        !           121: #define VALUE_OPT_NOFORK         'n'
        !           122: #define VALUE_OPT_SYSLOG         'p'
        !           123: #define VALUE_OPT_AGENTXSOCKET   2
        !           124: #define VALUE_OPT_HELP          '?'
        !           125: #define VALUE_OPT_MORE_HELP     '!'
        !           126: #define VALUE_OPT_VERSION       INDEX_OPT_VERSION
        !           127: #define VALUE_OPT_SAVE_OPTS     '>'
        !           128: #define VALUE_OPT_LOAD_OPTS     '<'
        !           129: #define SET_OPT_SAVE_OPTS(a)   STMTS( \
        !           130:         DESC(SAVE_OPTS).fOptState &= OPTST_PERSISTENT_MASK; \
        !           131:         DESC(SAVE_OPTS).fOptState |= OPTST_SET; \
        !           132:         DESC(SAVE_OPTS).optArg.argString = (char const*)(a) )
        !           133: /*
        !           134:  *  Interface defines not associated with particular options
        !           135:  */
        !           136: #define ERRSKIP_OPTERR  STMTS(ntpsnmpdOptions.fOptSet &= ~OPTPROC_ERRSTOP)
        !           137: #define ERRSTOP_OPTERR  STMTS(ntpsnmpdOptions.fOptSet |= OPTPROC_ERRSTOP)
        !           138: #define RESTART_OPT(n)  STMTS( \
        !           139:                 ntpsnmpdOptions.curOptIdx = (n); \
        !           140:                 ntpsnmpdOptions.pzCurOpt  = NULL)
        !           141: #define START_OPT       RESTART_OPT(1)
        !           142: #define USAGE(c)        (*ntpsnmpdOptions.pUsageProc)(&ntpsnmpdOptions, c)
        !           143: /* extracted from opthead.tlib near line 451 */
        !           144: 
        !           145: #ifdef  __cplusplus
        !           146: extern "C" {
        !           147: #endif
        !           148: 
        !           149: /* * * * * *
        !           150:  *
        !           151:  *  Declare the ntpsnmpd option descriptor.
        !           152:  */
        !           153: extern tOptions ntpsnmpdOptions;
        !           154: 
        !           155: #if defined(ENABLE_NLS)
        !           156: # ifndef _
        !           157: #   include <stdio.h>
        !           158: static inline char* aoGetsText(char const* pz) {
        !           159:     if (pz == NULL) return NULL;
        !           160:     return (char*)gettext(pz);
        !           161: }
        !           162: #   define _(s)  aoGetsText(s)
        !           163: # endif /* _() */
        !           164: 
        !           165: # define OPT_NO_XLAT_CFG_NAMES  STMTS(ntpsnmpdOptions.fOptSet |= \
        !           166:                                     OPTPROC_NXLAT_OPT_CFG;)
        !           167: # define OPT_NO_XLAT_OPT_NAMES  STMTS(ntpsnmpdOptions.fOptSet |= \
        !           168:                                     OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG;)
        !           169: 
        !           170: # define OPT_XLAT_CFG_NAMES     STMTS(ntpsnmpdOptions.fOptSet &= \
        !           171:                                   ~(OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG);)
        !           172: # define OPT_XLAT_OPT_NAMES     STMTS(ntpsnmpdOptions.fOptSet &= \
        !           173:                                   ~OPTPROC_NXLAT_OPT;)
        !           174: 
        !           175: #else   /* ENABLE_NLS */
        !           176: # define OPT_NO_XLAT_CFG_NAMES
        !           177: # define OPT_NO_XLAT_OPT_NAMES
        !           178: 
        !           179: # define OPT_XLAT_CFG_NAMES
        !           180: # define OPT_XLAT_OPT_NAMES
        !           181: 
        !           182: # ifndef _
        !           183: #   define _(_s)  _s
        !           184: # endif
        !           185: #endif  /* ENABLE_NLS */
        !           186: 
        !           187: #ifdef  __cplusplus
        !           188: }
        !           189: #endif
        !           190: #endif /* AUTOOPTS_NTPSNMPD_OPTS_H_GUARD */
        !           191: /* ntpsnmpd-opts.h ends here */

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>