]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
libopts-27.5.3
authorHarlan Stenn <stenn@ntp.org>
Sun, 8 Oct 2006 08:32:17 +0000 (04:32 -0400)
committerHarlan Stenn <stenn@ntp.org>
Sun, 8 Oct 2006 08:32:17 +0000 (04:32 -0400)
bk: 4528b791tsoSriFA6aLtRM0JToirig

53 files changed:
clockstuff/clktest-opts.c
clockstuff/clktest-opts.h
libopts/Makefile.am
libopts/autoopts.c
libopts/autoopts/options.h
libopts/autoopts/usage-txt.h
libopts/configfile.c
libopts/cook.c
libopts/enumeration.c
libopts/genshell.c
libopts/genshell.h
libopts/load.c
libopts/m4/libopts.m4
libopts/makeshell.c
libopts/nested.c
libopts/numeric.c
libopts/proto.h
libopts/putshell.c
libopts/restore.c
libopts/save.c
libopts/stack.c
ntpd/ntpd-opts.c
ntpd/ntpd-opts.h
ntpd/ntpdsim-opts.c
ntpd/ntpdsim-opts.h
ntpdc/ntpdc-opts.c
ntpdc/ntpdc-opts.h
ntpq/ntpq-opts.c
ntpq/ntpq-opts.h
ntpq/ntpq-opts.texi
sntp/libopts/Makefile.am
sntp/libopts/autoopts.c
sntp/libopts/autoopts/options.h
sntp/libopts/autoopts/usage-txt.h
sntp/libopts/configfile.c
sntp/libopts/cook.c
sntp/libopts/enumeration.c
sntp/libopts/genshell.c
sntp/libopts/genshell.h
sntp/libopts/load.c
sntp/libopts/m4/libopts.m4
sntp/libopts/makeshell.c
sntp/libopts/nested.c
sntp/libopts/numeric.c
sntp/libopts/proto.h
sntp/libopts/putshell.c
sntp/libopts/restore.c
sntp/libopts/save.c
sntp/libopts/stack.c
sntp/sntp-opts.c
sntp/sntp-opts.h
util/ntp-keygen-opts.c
util/ntp-keygen-opts.h

index 2d518f0e778df72b59fbe26ba3bb596de78b7ea0..3cfe3c446ce07785f1a211252465773014f0838d 100644 (file)
@@ -2,9 +2,11 @@
  *  
  *  DO NOT EDIT THIS FILE   (clktest-opts.c)
  *  
- *  It has been AutoGen-ed  Monday September 25, 2006 at 02:49:53 PM EDT
+ *  It has been AutoGen-ed  Sunday October  8, 2006 at 03:53:03 AM EDT
  *  From the definitions    clktest-opts.def
  *  and the template file   options
+ *
+ * Generated from AutoOpts 27:5:3 templates.
  */
 
 /*
@@ -500,7 +502,7 @@ doOptMagic2(
 {
     static const struct {const int rmin, rmax;} rng[ 1 ] = {
         { 0, 255 } };
-    long val;
+    int val;
     int ix;
     char const* pzIndent = "\t\t\t\t  ";
     extern FILE* option_usage_fp;
@@ -537,7 +539,7 @@ doOptMagic2(
     return;
 
   valid_return:
-    pOptDesc->optArg.argString = (char*)val;
+    pOptDesc->optArg.argInt = val;
 }
 #endif /* defined CLKLDISC */
 
@@ -553,7 +555,7 @@ doOptMagic1(
 {
     static const struct {const int rmin, rmax;} rng[ 1 ] = {
         { 0, 255 } };
-    long val;
+    int val;
     int ix;
     char const* pzIndent = "\t\t\t\t  ";
     extern FILE* option_usage_fp;
@@ -590,7 +592,7 @@ doOptMagic1(
     return;
 
   valid_return:
-    pOptDesc->optArg.argString = (char*)val;
+    pOptDesc->optArg.argInt = val;
 }
 #endif /* defined CLKLDISC */
 
@@ -699,7 +701,7 @@ doOptTimeout(
 {
     static const struct {const int rmin, rmax;} rng[ 1 ] = {
         { 1, 600 } };
-    long val;
+    int val;
     int ix;
     char const* pzIndent = "\t\t\t\t  ";
     extern FILE* option_usage_fp;
@@ -736,7 +738,7 @@ doOptTimeout(
     return;
 
   valid_return:
-    pOptDesc->optArg.argString = (char*)val;
+    pOptDesc->optArg.argInt = val;
 }
 
 /* extracted from optmain.tpl near line 92 */
index 0672ace8aedf5f413c7139b5b561fbea1d9ee0dc..3b97ebf73bdb9fb34ba9f3df0cfb9def2f5bfd21 100644 (file)
@@ -2,9 +2,11 @@
  *  
  *  DO NOT EDIT THIS FILE   (clktest-opts.h)
  *  
- *  It has been AutoGen-ed  Monday September 25, 2006 at 02:49:53 PM EDT
+ *  It has been AutoGen-ed  Sunday October  8, 2006 at 03:53:02 AM EDT
  *  From the definitions    clktest-opts.def
  *  and the template file   options
+ *
+ * Generated from AutoOpts 27:5:3 templates.
  */
 
 /*
@@ -40,7 +42,7 @@
  *  tolerable version is at least as old as what was current when the header
  *  template was released.
  */
-#define AO_TEMPLATE_VERSION 110592
+#define AO_TEMPLATE_VERSION 110597
 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
  || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
 # error option template version mismatches autoopts/options.h header
@@ -86,7 +88,7 @@ typedef enum {
 #define  STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt)
 #define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
 #define    CLEAR_OPT(n) STMTS( \
-                DESC(n).fOptState &= OPTST_PERSISTENT;   \
+                DESC(n).fOptState &= OPTST_PERSISTENT_MASK;   \
                 if ( (DESC(n).fOptState & OPTST_INITENABLED) == 0) \
                     DESC(n).fOptState |= OPTST_DISABLED; \
                 DESC(n).optCookie = NULL )
@@ -165,7 +167,7 @@ typedef enum {
 #define VALUE_OPT_HELP          '?'
 #define VALUE_OPT_MORE_HELP     '!'
 #define SET_OPT_SAVE_OPTS(a)   STMTS( \
-        DESC(SAVE_OPTS).fOptState &= OPTST_PERSISTENT; \
+        DESC(SAVE_OPTS).fOptState &= OPTST_PERSISTENT_MASK; \
         DESC(SAVE_OPTS).fOptState |= OPTST_SET; \
         DESC(SAVE_OPTS).optArg.argString = (char const*)(a) )
 /*
index a5729889c6a4a994358fdae4b15c44f5eb5a755c..cb82180886547cc9a7c2e6e97372680c7f1b9c7d 100644 (file)
@@ -7,7 +7,7 @@ noinst_LTLIBRARIES      = libopts.la
 endif
 libopts_la_SOURCES      = libopts.c
 libopts_la_CPPFLAGS     = -I$(top_srcdir)
-libopts_la_LDFLAGS      = -version-info  27:4:3
+libopts_la_LDFLAGS      = -version-info  27:5:3
 EXTRA_DIST              = \
     COPYING.lgpl            COPYING.mbsd            MakeDefs.inc  \
     README                  autoopts/options.h      autoopts/usage-txt.h  \
index c0888508359937a733df39af51b3745c57d3c000..a97083e493731bca62ae5f841f3972ec79c20f33 100644 (file)
@@ -1,7 +1,7 @@
 
 /*
- *  $Id: autoopts.c,v 4.26 2006/09/24 02:10:44 bkorb Exp $
- *  Time-stamp:      "2006-09-22 18:21:53 bkorb"
+ *  $Id: autoopts.c,v 4.27 2006/10/05 03:39:53 bkorb Exp $
+ *  Time-stamp:      "2006-10-04 19:32:32 bkorb"
  *
  *  This file contains all of the routines that must be linked into
  *  an executable to use the generated option processing.  The optional
@@ -221,8 +221,8 @@ handleOption( tOptions* pOpts, tOptState* pOptState )
         pOD->optActualIndex = pOD->optIndex;
     }
 
-    pOD->fOptState &= OPTST_PERSISTENT;
-    pOD->fOptState |= (pOptState->flags & ~OPTST_PERSISTENT);
+    pOD->fOptState &= OPTST_PERSISTENT_MASK;
+    pOD->fOptState |= (pOptState->flags & ~OPTST_PERSISTENT_MASK);
 
     /*
      *  Keep track of count only for DEFINED (command line) options.
@@ -558,11 +558,13 @@ nextOption( tOptions* pOpts, tOptState* pOptState )
 {
     tSuccess res;
     enum { ARG_NONE, ARG_MAY, ARG_MUST } arg_type = ARG_NONE;
+    teOptArgType at;
 
     res = findOptDesc( pOpts, pOptState );
     if (! SUCCESSFUL( res ))
         return res;
-    pOptState->flags |= (pOptState->pOD->fOptState & OPTST_PERSISTENT);
+    pOptState->flags |= (pOptState->pOD->fOptState & OPTST_PERSISTENT_MASK);
+    at = OPTST_GET_ARGTYPE(pOptState->flags);
 
     /*
      *  Figure out what to do about option arguments.  An argument may be
@@ -572,7 +574,7 @@ nextOption( tOptions* pOpts, tOptState* pOptState )
      */
     if ((pOptState->flags & OPTST_DISABLED) != 0)
         arg_type = ARG_NONE;
-    else if (OPTST_GET_ARGTYPE(pOptState->flags) == OPARG_TYPE_NONE)
+    else if (at == OPARG_TYPE_NONE)
         arg_type = ARG_NONE;
     else if (pOptState->flags & OPTST_ARG_OPTIONAL)
         arg_type = ARG_MAY;
index 1dfc6f0d80417640da9e7e9f802f421ab3e3fa31..97814ee3f9c74ced04d0e3cbab5c5f219992d955 100644 (file)
@@ -2,7 +2,7 @@
  *  
  *  DO NOT EDIT THIS FILE   (options.h)
  *  
- *  It has been AutoGen-ed  Sunday September 24, 2006 at 03:28:25 PM PDT
+ *  It has been AutoGen-ed  Thursday October  5, 2006 at 09:15:13 PM PDT
  *  From the definitions    funcs.def
  *  and the template file   options_h
  *
  *  values for "opt_name" are available.
  */
 
+#define  OPTIONS_STRUCT_VERSION  110597
+#define  OPTIONS_VERSION_STRING  "27:5:3"
+#define  OPTIONS_MINIMUM_VERSION 98304
+#define  OPTIONS_MIN_VER_STRING  "24:0:0"
+
 typedef enum {
     OPARG_TYPE_NONE             = 0,
     OPARG_TYPE_STRING           = 1,    /* default type/ vanilla string      */
@@ -75,50 +80,96 @@ typedef struct optionValue {
     char*               pzName;
     union {
         char            strVal[1];      /* OPARG_TYPE_STRING      */
-        int             enumVal;        /* OPARG_TYPE_ENUMERATION */
-        int             boolVal;        /* OPARG_TYPE_BOOLEAN     */
-        long            setVal;         /* OPARG_TYPE_MEMBERSHIP  */
+        unsigned int    enumVal;        /* OPARG_TYPE_ENUMERATION */
+        unsigned int    boolVal;        /* OPARG_TYPE_BOOLEAN     */
+        unsigned long   setVal;         /* OPARG_TYPE_MEMBERSHIP  */
         long            longVal;        /* OPARG_TYPE_NUMERIC     */
         void*           nestVal;        /* OPARG_TYPE_HIERARCHY   */
     } v;
 } tOptionValue;
 
-#define OPTST_SET_ARGTYPE(n) ((n) << 12)
-#define OPTST_GET_ARGTYPE(f) (((f) & OPTST_ARG_TYPE_MASK) >> 12)
-
 /*
  *  Bits in the fOptState option descriptor field.
  */
-#define OPTST_INIT           0x0000000U /* Initial compiled value            */
-#define OPTST_SET            0x0000001U /* Set via the "SET_OPT()" macro     */
-#define OPTST_PRESET         0x0000002U /* Set via an RC/INI file            */
-#define OPTST_DEFINED        0x0000004U /* Set via a command line option     */
-
-#define OPTST_SET_MASK       0x0000007U /* mask of flags that show set state */
-
-#define OPTST_EQUIVALENCE    0x0000010U /* selected by equiv'ed option       */
-#define OPTST_DISABLED       0x0000020U /* option is in disabled state       */
-
-#define OPTST_NO_INIT        0x0000100U /* option cannot be preset           */
-#define OPTST_NUMBER_OPT     0x0000200U /* opt value (flag) is any digit     */
-#define OPTST_STACKED        0x0000400U /* opt uses optionStackArg procedure */
-#define OPTST_INITENABLED    0x0000800U /* option defaults to enabled        */
-#define OPTST_ARG_TYPE_MASK  0x000F000U /* bits used to specify opt arg type */
-#define OPTST_ARG_OPTIONAL   0x0010000U /* the option argument not required  */
-#define OPTST_IMM            0x0020000U /* process option on first pass      */
-#define OPTST_DISABLE_IMM    0x0040000U /* process disablement on first pass */
-#define OPTST_OMITTED        0x0080000U /* compiled out of program           */
-#define OPTST_MUST_SET       0x0100000U /* must be set or pre-set            */
-#define OPTST_DOCUMENT       0x0200000U /* opt is for documentation only     */
-#define OPTST_TWICE          0x0400000U /* process option twice - imm + reg  */
-#define OPTST_DISABLE_TWICE  0x0800000U /* process disabled option twice     */
-
-#define OPTST_PERSISTENT     0xFFFFF00U /* mask of flags that do not change  */
-
-#define SELECTED_OPT( pod )  ( (pod)->fOptState & (OPTST_SET | OPTST_DEFINED))
-#define UNUSED_OPT(   pod )  (((pod)->fOptState & OPTST_SET_MASK) == 0)
-#define DISABLED_OPT( pod )  ( (pod)->fOptState & OPTST_DISABLED)
-#define OPTION_STATE( pod )  ((pod)->fOptState)
+typedef enum {
+        OPTST_SET_ID             =   0, /* Set via the "SET_OPT()" macro */
+        OPTST_PRESET_ID          =   1, /* Set via an RC/INI file        */
+        OPTST_DEFINED_ID         =   2, /* Set via a command line option */
+        OPTST_EQUIVALENCE_ID     =   4, /* selected by equiv'ed option   */
+        OPTST_DISABLED_ID        =   5, /* option is in disabled state   */
+        OPTST_NO_INIT_ID         =   8, /* option cannot be preset       */
+        OPTST_NUMBER_OPT_ID      =   9, /* opt value (flag) is any digit */
+        OPTST_STACKED_ID         =  10, /* opt uses optionStackArg proc  */
+        OPTST_INITENABLED_ID     =  11, /* option defaults to enabled    */
+        OPTST_ARG_TYPE_1_ID      =  12, /* bit 1 of arg type enum        */
+        OPTST_ARG_TYPE_2_ID      =  13, /* bit 2 of arg type enum        */
+        OPTST_ARG_TYPE_3_ID      =  14, /* bit 3 of arg type enum        */
+        OPTST_ARG_TYPE_4_ID      =  15, /* bit 4 of arg type enum        */
+        OPTST_ARG_OPTIONAL_ID    =  16, /* the option arg not required   */
+        OPTST_IMM_ID             =  17, /* process opt on first pass     */
+        OPTST_DISABLE_IMM_ID     =  18, /* process disablement immed.    */
+        OPTST_OMITTED_ID         =  19, /* compiled out of program       */
+        OPTST_MUST_SET_ID        =  20, /* must be set or pre-set        */
+        OPTST_DOCUMENT_ID        =  21, /* opt is for doc only           */
+        OPTST_TWICE_ID           =  22, /* process opt twice - imm + reg */
+        OPTST_DISABLE_TWICE_ID   =  23  /* process disabled option twice */
+} opt_state_enum_t;
+
+#define OPTST_INIT           0U
+#define OPTST_SET            (1U << OPTST_SET_ID)
+#define OPTST_PRESET         (1U << OPTST_PRESET_ID)
+#define OPTST_DEFINED        (1U << OPTST_DEFINED_ID)
+#define OPTST_EQUIVALENCE    (1U << OPTST_EQUIVALENCE_ID)
+#define OPTST_DISABLED       (1U << OPTST_DISABLED_ID)
+#define OPTST_NO_INIT        (1U << OPTST_NO_INIT_ID)
+#define OPTST_NUMBER_OPT     (1U << OPTST_NUMBER_OPT_ID)
+#define OPTST_STACKED        (1U << OPTST_STACKED_ID)
+#define OPTST_INITENABLED    (1U << OPTST_INITENABLED_ID)
+#define OPTST_ARG_TYPE_1     (1U << OPTST_ARG_TYPE_1_ID)
+#define OPTST_ARG_TYPE_2     (1U << OPTST_ARG_TYPE_2_ID)
+#define OPTST_ARG_TYPE_3     (1U << OPTST_ARG_TYPE_3_ID)
+#define OPTST_ARG_TYPE_4     (1U << OPTST_ARG_TYPE_4_ID)
+#define OPTST_ARG_OPTIONAL   (1U << OPTST_ARG_OPTIONAL_ID)
+#define OPTST_IMM            (1U << OPTST_IMM_ID)
+#define OPTST_DISABLE_IMM    (1U << OPTST_DISABLE_IMM_ID)
+#define OPTST_OMITTED        (1U << OPTST_OMITTED_ID)
+#define OPTST_MUST_SET       (1U << OPTST_MUST_SET_ID)
+#define OPTST_DOCUMENT       (1U << OPTST_DOCUMENT_ID)
+#define OPTST_TWICE          (1U << OPTST_TWICE_ID)
+#define OPTST_DISABLE_TWICE  (1U << OPTST_DISABLE_TWICE_ID)
+#define OPT_STATE_MASK       0x00FFFF37U
+
+#define OPTST_SET_MASK       (  \
+        OPTST_SET | \
+        OPTST_PRESET | \
+        OPTST_DEFINED )
+
+#define OPTST_MUTABLE_MASK   (  \
+        OPTST_SET | \
+        OPTST_PRESET | \
+        OPTST_DEFINED | \
+        OPTST_EQUIVALENCE | \
+        OPTST_DISABLED )
+
+#define OPTST_SELECTED_MASK  (  \
+        OPTST_SET | \
+        OPTST_DEFINED )
+
+#define OPTST_ARG_TYPE_MASK  (  \
+        OPTST_ARG_TYPE_1 | \
+        OPTST_ARG_TYPE_2 | \
+        OPTST_ARG_TYPE_3 | \
+        OPTST_ARG_TYPE_4 )
+
+#define OPTST_PERSISTENT_MASK (~OPTST_MUTABLE_MASK)
+
+#define SELECTED_OPT( pod )   ((pod)->fOptState  & OPTST_SELECTED_MASK)
+#define UNUSED_OPT(   pod )   (((pod)->fOptState & OPTST_SET_MASK) == 0)
+#define DISABLED_OPT( pod )   ((pod)->fOptState  & OPTST_DISABLED)
+#define OPTION_STATE( pod )   ((pod)->fOptState)
+
+#define OPTST_SET_ARGTYPE(n)  ((n) << OPTST_ARG_TYPE_1_ID)
+#define OPTST_GET_ARGTYPE(f)  (((f) & OPTST_ARG_TYPE_MASK)>>OPTST_ARG_TYPE_1_ID)
 
 /*
  *  PRIVATE INTERFACES
@@ -129,25 +180,45 @@ typedef struct optionValue {
  */
 
 /*
- *  Define any special processing flags
- */
-#define OPTPROC_NONE        0x000000
-#define OPTPROC_LONGOPT     0x000001 /* Process long style options      */
-#define OPTPROC_SHORTOPT    0x000002 /* Process short style "flags"     */
-#define OPTPROC_ERRSTOP     0x000004 /* Stop on argument errors         */
-#define OPTPROC_DISABLEDOPT 0x000008 /* Current option is disabled      */
-#define OPTPROC_NO_REQ_OPT  0x000010 /* no options are required         */
-#define OPTPROC_NUM_OPT     0x000020 /* there is a number option        */
-#define OPTPROC_INITDONE    0x000040 /* have initializations been done? */
-#define OPTPROC_NEGATIONS   0x000080 /* any negation options?           */
-#define OPTPROC_ENVIRON     0x000100 /* check environment?              */
-#define OPTPROC_NO_ARGS     0x000200 /* Disallow remaining arguments    */
-#define OPTPROC_ARGS_REQ    0x000400 /* Require arguments after options */
-#define OPTPROC_REORDER     0x000800 /* reorder arguments after options */
-#define OPTPROC_GNUUSAGE    0x001000 /* emit usage in GNU style         */
-#define OPTPROC_TRANSLATE   0x002000 /* Translate strings in tOptions   */
-#define OPTPROC_HAS_IMMED   0x004000 /* program defines immed options   */
-#define OPTPROC_PRESETTING  0x800000 /* opt processing in preset state  */
+ *  Define the processing state flags
+ */
+typedef enum {
+        OPTPROC_LONGOPT_ID       =   0, /* Process long style options      */
+        OPTPROC_SHORTOPT_ID      =   1, /* Process short style "flags"     */
+        OPTPROC_ERRSTOP_ID       =   2, /* Stop on argument errors         */
+        OPTPROC_DISABLEDOPT_ID   =   3, /* Current option is disabled      */
+        OPTPROC_NO_REQ_OPT_ID    =   4, /* no options are required         */
+        OPTPROC_NUM_OPT_ID       =   5, /* there is a number option        */
+        OPTPROC_INITDONE_ID      =   6, /* have initializations been done? */
+        OPTPROC_NEGATIONS_ID     =   7, /* any negation options?           */
+        OPTPROC_ENVIRON_ID       =   8, /* check environment?              */
+        OPTPROC_NO_ARGS_ID       =   9, /* Disallow remaining arguments    */
+        OPTPROC_ARGS_REQ_ID      =  10, /* Require arguments after options */
+        OPTPROC_REORDER_ID       =  11, /* reorder operands after options  */
+        OPTPROC_GNUUSAGE_ID      =  12, /* emit usage in GNU style         */
+        OPTPROC_TRANSLATE_ID     =  13, /* Translate strings in tOptions   */
+        OPTPROC_HAS_IMMED_ID     =  14, /* program defines immed options   */
+        OPTPROC_PRESETTING_ID    =  19  /* opt processing in preset state  */
+} optproc_state_enum_t;
+
+#define OPTPROC_NONE         0U
+#define OPTPROC_LONGOPT      (1U << OPTPROC_LONGOPT_ID)
+#define OPTPROC_SHORTOPT     (1U << OPTPROC_SHORTOPT_ID)
+#define OPTPROC_ERRSTOP      (1U << OPTPROC_ERRSTOP_ID)
+#define OPTPROC_DISABLEDOPT  (1U << OPTPROC_DISABLEDOPT_ID)
+#define OPTPROC_NO_REQ_OPT   (1U << OPTPROC_NO_REQ_OPT_ID)
+#define OPTPROC_NUM_OPT      (1U << OPTPROC_NUM_OPT_ID)
+#define OPTPROC_INITDONE     (1U << OPTPROC_INITDONE_ID)
+#define OPTPROC_NEGATIONS    (1U << OPTPROC_NEGATIONS_ID)
+#define OPTPROC_ENVIRON      (1U << OPTPROC_ENVIRON_ID)
+#define OPTPROC_NO_ARGS      (1U << OPTPROC_NO_ARGS_ID)
+#define OPTPROC_ARGS_REQ     (1U << OPTPROC_ARGS_REQ_ID)
+#define OPTPROC_REORDER      (1U << OPTPROC_REORDER_ID)
+#define OPTPROC_GNUUSAGE     (1U << OPTPROC_GNUUSAGE_ID)
+#define OPTPROC_TRANSLATE    (1U << OPTPROC_TRANSLATE_ID)
+#define OPTPROC_HAS_IMMED    (1U << OPTPROC_HAS_IMMED_ID)
+#define OPTPROC_PRESETTING   (1U << OPTPROC_PRESETTING_ID)
+#define OPTPROC_STATE_MASK   0x00087FFFU
 
 #define STMTS(s)  do { s; } while (0)
 
@@ -219,10 +290,11 @@ struct argList {
 
 typedef union {
     char const *    argString;
+    uintptr_t       argEnum;
     uintptr_t       argIntptr;
-    int             argInt;
-    unsigned int    argUint;
-    ag_bool         argBool;
+    long            argInt;
+    unsigned long   argUint;
+    unsigned int    argBool;
 } optArgBucket_t;
 
 /*
@@ -269,11 +341,6 @@ struct optSpecIndex {
     const tAoUS         default_opt;
 };
 
-#define  OPTIONS_STRUCT_VERSION  110595
-#define  OPTIONS_VERSION_STRING  "27:4:3"
-#define  OPTIONS_MINIMUM_VERSION 98304
-#define  OPTIONS_MIN_VER_STRING  "24:0:0"
-
 /*
  *  The procedure generated for translating option text
  */
@@ -610,7 +677,7 @@ extern const tOptionValue* optionNextValue( const tOptionValue*, const tOptionVa
 extern void optionOnlyUsage( tOptions*, int );
 
 
-/* From: autoopts.c line 980
+/* From: autoopts.c line 982
  *
  * optionProcess - this is the main option processing routine
  *
index 8bc08065b8665b462950ef35e54d725549a2784c..9c7079b8c82024829398185df84edd70160119c0 100644 (file)
@@ -2,7 +2,7 @@
  *  
  *  DO NOT EDIT THIS FILE   (usage-txt.h)
  *  
- *  It has been AutoGen-ed  Sunday September 24, 2006 at 03:28:22 PM PDT
+ *  It has been AutoGen-ed  Thursday October  5, 2006 at 09:15:10 PM PDT
  *  From the definitions    usage-txt.def
  *  and the template file   usage-txt.tpl
  *
index bdde8de8055372561ab4c6faba9f6279c0907679..59037d6b29db26f67960cf4de9d58cacea60c58b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  $Id: configfile.c,v 4.28 2006/09/24 02:10:45 bkorb Exp $
+ *  $Id: configfile.c,v 4.29 2006/09/28 01:26:16 bkorb Exp $
  *  Time-stamp:      "2006-09-24 15:18:51 bkorb"
  *
  *  configuration/rc/ini file handling.
index 9685d0641664482bb3837ee9192886f67e7419e7..56d4c04082d0e8538acb27dc6fbcdcef35ed3163 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- *  $Id: cook.c,v 4.8 2006/09/24 02:10:45 bkorb Exp $
+ *  $Id: cook.c,v 4.9 2006/09/28 01:26:16 bkorb Exp $
  *  Time-stamp:      "2006-09-24 15:21:02 bkorb"
  *
  *  This file contains the routines that deal with processing quoted strings
index 4586967c782f7e10f48dea6ec2777123041b1550..dd51b1111b1b0d6b804cbf4ce7d12fc74bf10f7a 100644 (file)
@@ -1,7 +1,7 @@
 
 /*
  *  $Id: enumeration.c,v 4.14 2006/09/24 02:10:45 bkorb Exp $
- * Time-stamp:      "2006-09-22 18:00:53 bkorb"
+ * Time-stamp:      "2006-10-05 21:10:21 bkorb"
  *
  *   Automated Options Paged Usage module.
  *
@@ -235,7 +235,7 @@ optionKeywordName(
 {
     tOptDesc od;
 
-    od.optArg.argIntptr = enum_val;
+    od.optArg.argEnum = enum_val;
     (*(pOD->pOptProc))( (void*)(2UL), &od );
     return od.optArg.argString;
 }
@@ -280,7 +280,7 @@ optionEnumerationVal(
 
     case 1UL:
     {
-        unsigned int ix = pOD->optArg.argIntptr;
+        unsigned int ix = pOD->optArg.argEnum;
         /*
          *  print the name string.
          */
@@ -293,7 +293,7 @@ optionEnumerationVal(
     case 2UL:
     {
         tSCC zInval[] = "*INVALID*";
-        unsigned int ix = pOD->optArg.argIntptr;
+        unsigned int ix = pOD->optArg.argEnum;
         /*
          *  Replace the enumeration value with the name string.
          */
index 7c5e12f74199065f0fc5c7dbe60fa167087074cf..c7331f49fb291296a7be4d7d5eac22076f0bbe40 100644 (file)
@@ -2,9 +2,11 @@
  *  
  *  DO NOT EDIT THIS FILE   (genshell.c)
  *  
- *  It has been AutoGen-ed  Sunday September 24, 2006 at 03:28:26 PM PDT
+ *  It has been AutoGen-ed  Thursday October  5, 2006 at 09:15:14 PM PDT
  *  From the definitions    genshell.def
  *  and the template file   options
+ *
+ * Generated from AutoOpts 27:5:3 templates.
  */
 
 /*
index 44760b784d84863ba5ea4030b59521f873bbfeb4..e7c524eab184376f52ac231ea31eb3d3de61e62f 100644 (file)
@@ -2,9 +2,11 @@
  *  
  *  DO NOT EDIT THIS FILE   (genshell.h)
  *  
- *  It has been AutoGen-ed  Sunday September 24, 2006 at 03:28:26 PM PDT
+ *  It has been AutoGen-ed  Thursday October  5, 2006 at 09:15:14 PM PDT
  *  From the definitions    genshell.def
  *  and the template file   options
+ *
+ * Generated from AutoOpts 27:5:3 templates.
  */
 
 /*
@@ -53,7 +55,7 @@
  *  tolerable version is at least as old as what was current when the header
  *  template was released.
  */
-#define AO_TEMPLATE_VERSION 110592
+#define AO_TEMPLATE_VERSION 110597
 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
  || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
 # error option template version mismatches autoopts/options.h header
@@ -91,7 +93,7 @@ typedef enum {
 #define  STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt)
 #define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
 #define    CLEAR_OPT(n) STMTS( \
-                DESC(n).fOptState &= OPTST_PERSISTENT;   \
+                DESC(n).fOptState &= OPTST_PERSISTENT_MASK;   \
                 if ( (DESC(n).fOptState & OPTST_INITENABLED) == 0) \
                     DESC(n).fOptState |= OPTST_DISABLED; \
                 DESC(n).optCookie = NULL )
index 46ac97dc2d1da410d1111a96b5a4e8a0d7091206..45fb53a4717bddaa4c1220b8f5242ed9d12bfad2 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- *  $Id: load.c,v 4.25 2006/09/24 02:10:45 bkorb Exp $
+ *  $Id: load.c,v 4.26 2006/09/28 01:26:16 bkorb Exp $
  *  Time-stamp:      "2006-09-24 15:23:01 bkorb"
  *
  *  This file contains the routines that deal with processing text strings
index 6fea8bfd753c0f6016187b51aaee8080dd27a1c3..4c6f71151ef5ccb8f2593c1f422d428d17fbf0cf 100644 (file)
@@ -2,7 +2,7 @@ dnl  -*- buffer-read-only: t -*- vi: set ro:
 dnl 
 dnl DO NOT EDIT THIS FILE   (libopts.m4)
 dnl 
-dnl It has been AutoGen-ed  Sunday September 24, 2006 at 03:28:29 PM PDT
+dnl It has been AutoGen-ed  Thursday October  5, 2006 at 09:15:16 PM PDT
 dnl From the definitions    libopts.def
 dnl and the template file   conftest.tpl
 dnl
index 4051a27b580df3c0c9deeab4c6827b6d5a271745..088df02f94f251e0feca8380e2e53ba498c7dc36 100644 (file)
@@ -1,7 +1,7 @@
 
 /*
- *  $Id: makeshell.c,v 4.17 2006/09/24 02:10:45 bkorb Exp $
- * Time-stamp:      "2006-09-22 18:19:24 bkorb"
+ *  $Id: makeshell.c,v 4.18 2006/10/05 03:39:53 bkorb Exp $
+ * Time-stamp:      "2006-10-05 20:41:23 bkorb"
  *
  *  This module will interpret the options set in the tOptions
  *  structure and create a Bourne shell script capable of parsing them.
@@ -699,12 +699,21 @@ emitSetup( tOptions* pOpts )
          *  Numeric and membership bit options are just printed as a number.
          */
         case OPARG_TYPE_NUMERIC:
-        case OPARG_TYPE_MEMBERSHIP:
             snprintf( zVal, sizeof( zVal ), "%d",
-                      (int)pOptDesc->optArg.argIntptr );
+                      (int)pOptDesc->optArg.argInt );
             pzDefault = zVal;
             break;
 
+        case OPARG_TYPE_MEMBERSHIP:
+            snprintf( zVal, sizeof( zVal ), "%lu",
+                      (unsigned long)pOptDesc->optArg.argIntptr );
+            pzDefault = zVal;
+            break;
+
+        case OPARG_TYPE_BOOLEAN:
+            pzDefault = (pOptDesc->optArg.argBool) ? "true" : "false";
+            break;
+
         default:
             if (pOptDesc->optArg.argString == NULL) {
                 if (pzFmt == zSingleDef)
index 013b742c3161a281fba2cbef19cd2bc9230e7b5f..0989cec17c1e7bf0a93c6fae78ffbc7cc9e9472d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- *  $Id: nested.c,v 4.13 2006/09/24 02:10:45 bkorb Exp $
+ *  $Id: nested.c,v 4.14 2006/09/28 01:26:16 bkorb Exp $
  *  Time-stamp:      "2006-09-24 15:27:32 bkorb"
  *
  *   Automated Options Nested Values module.
index 486981fb5cce4ac78362946c17b764328621b15e..a186984e6113c43697406e065abb1b419c2bfb0b 100644 (file)
@@ -1,7 +1,7 @@
 
 /*
- *  $Id: numeric.c,v 4.9 2006/09/24 02:10:45 bkorb Exp $
- *  Time-stamp:      "2006-09-22 18:14:38 bkorb"
+ *  $Id: numeric.c,v 4.10 2006/10/05 03:39:53 bkorb Exp $
+ *  Time-stamp:      "2006-10-04 16:12:34 bkorb"
  */
 
 /*
@@ -61,7 +61,7 @@ void
 optionNumericVal( tOptions* pOpts, tOptDesc* pOD )
 {
     char* pz;
-    int   val;
+    long  val;
 
     /*
      *  Numeric options may have a range associated with it.
@@ -71,7 +71,7 @@ optionNumericVal( tOptions* pOpts, tOptDesc* pOD )
     if ((pOD == NULL) || (pOD->optArg.argString == NULL))
         return;
 
-    val = (int)strtol( pOD->optArg.argString, &pz, 0 );
+    val = strtol( pOD->optArg.argString, &pz, 0 );
     if (*pz != NUL) {
         fprintf( stderr, zNotNumber, pOpts->pzProgName, pOD->optArg.argString );
         (*(pOpts->pUsageProc))(pOpts, EXIT_FAILURE);
index 80f1d06e393dc25ed203b1974c7141f63268d9e4..70a421b108a847f73b11c97ccc3adf4abd481357 100644 (file)
@@ -1,7 +1,7 @@
 /* -*- buffer-read-only: t -*- vi: set ro:
  *
  * Prototypes for autoopts
- * Generated Sun Sep 24 15:28:27 PDT 2006
+ * Generated Thu Oct  5 21:15:15 PDT 2006
  */
 #ifndef AUTOOPTS_PROTO_H_GUARD
 #define AUTOOPTS_PROTO_H_GUARD 1
index fda77eea75016ff8164fed0c08e1a0b25fe2cc46..a9ff3ef42f2641350d029c08662612a89cccea27 100644 (file)
@@ -1,7 +1,7 @@
 
 /*
- *  $Id: putshell.c,v 4.14 2006/09/24 02:10:45 bkorb Exp $
- * Time-stamp:      "2006-09-24 15:28:15 bkorb"
+ *  $Id: putshell.c,v 4.16 2006/10/05 03:39:53 bkorb Exp $
+ * Time-stamp:      "2006-10-05 20:37:42 bkorb"
  *
  *  This module will interpret the options set in the tOptions
  *  structure and print them to standard out in a fashion that
@@ -164,8 +164,8 @@ optionPutShell( tOptions* pOpts )
         if (pOD->optActualIndex != optIx) {
             tOptDesc* p   = pOpts->pOptDesc + pOD->optActualIndex;
             p->optArg     = pOD->optArg;
-            p->fOptState &= OPTST_PERSISTENT;
-            p->fOptState |= pOD->fOptState & ~OPTST_PERSISTENT;
+            p->fOptState &= OPTST_PERSISTENT_MASK;
+            p->fOptState |= pOD->fOptState & ~OPTST_PERSISTENT_MASK;
             printf( zEquivMode, pOpts->pzPROGNAME, pOD->pz_NAME, p->pz_NAME );
             pOD = p;
         }
@@ -176,7 +176,7 @@ optionPutShell( tOptions* pOpts )
          *  of bitmask value and we need to emit the bit values.
          */
         if (OPTST_GET_ARGTYPE(pOD->fOptState) == OPARG_TYPE_MEMBERSHIP) {
-            char* pz;
+            char const * pz;
             uintptr_t val = 1;
             printf( zOptNumFmt, pOpts->pzPROGNAME, pOD->pz_NAME,
                     (uintptr_t)(pOD->optCookie) );
@@ -187,7 +187,7 @@ optionPutShell( tOptions* pOpts )
              *  We are building the typeset list.  The list returned starts with
              *  'none + ' for use by option saving stuff.  We must ignore that.
              */
-            pz = (char*)pOD->optArg.argString + 7;
+            pz = pOD->optArg.argString + 7;
             while (*pz != NUL) {
                 printf( "typeset -x -i %s_", pOD->pz_NAME );
                 pz += strspn( pz, " +\t\n\f" );
@@ -256,7 +256,7 @@ optionPutShell( tOptions* pOpts )
          */
         else if (OPTST_GET_ARGTYPE(pOD->fOptState) == OPARG_TYPE_NUMERIC)
             printf( zOptNumFmt, pOpts->pzPROGNAME, pOD->pz_NAME,
-                    pOD->optArg.argIntptr );
+                    (int)pOD->optArg.argInt );
 
         /*
          *  If the argument type is an enumeration, then it is much
@@ -277,7 +277,7 @@ optionPutShell( tOptions* pOpts )
          */
         else if (OPTST_GET_ARGTYPE(pOD->fOptState) == OPARG_TYPE_BOOLEAN)
             printf( zFullOptFmt, pOpts->pzPROGNAME, pOD->pz_NAME,
-                    (pOD->optArg.argIntptr == 0) ? "false" : "true" );
+                    (pOD->optArg.argBool == 0) ? "false" : "true" );
 
         /*
          *  IF the option has an empty value,
index 0bd7e1f07f8b5fc7c5e27588af7a8055ab41a2ca..c5d56f9c763f466f956974370bb1120c8393ae5c 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- *  restore.c  $Id: restore.c,v 4.8 2006/09/24 02:10:45 bkorb Exp $
+ *  restore.c  $Id: restore.c,v 4.9 2006/10/05 03:39:53 bkorb Exp $
  * Time-stamp:      "2005-02-23 15:10:20 bkorb"
  *
  *  This module's routines will save the current option state to memory
@@ -181,7 +181,7 @@ optionFree( tOptions* pOpts )
                 if (  (p->fOptState & OPTST_STACKED)
                    && (p->optCookie != NULL)) {
                     AGFREE( p->optCookie );
-                    p->fOptState &= OPTST_PERSISTENT;
+                    p->fOptState &= OPTST_PERSISTENT_MASK;
                     if ((p->fOptState & OPTST_INITENABLED) == 0)
                         p->fOptState |= OPTST_DISABLED;
                 }
index 6c5666e0c8b253033f2b6a67e2b8d0fbe664bfa7..573508c562118f0426e34065040cf3a91ba0de63 100644 (file)
@@ -1,7 +1,7 @@
 
 /*
- *  save.c  $Id: save.c,v 4.19 2006/09/24 02:10:45 bkorb Exp $
- * Time-stamp:      "2006-09-22 18:11:20 bkorb"
+ *  save.c  $Id: save.c,v 4.20 2006/10/05 03:39:53 bkorb Exp $
+ * Time-stamp:      "2006-10-05 21:09:18 bkorb"
  *
  *  This module's routines will take the currently set options and
  *  store them into an ".rc" file for re-interpretation the next
@@ -437,7 +437,7 @@ optionSaveFile( tOptions* pOpts )
         switch (arg_state) {
         case 0:
         case OPARG_TYPE_NUMERIC:
-            printEntry( fp, p, p->optArg.argString );
+            printEntry( fp, p, (void*)(p->optArg.argInt));
             break;
 
         case OPARG_TYPE_STRING:
@@ -462,26 +462,25 @@ optionSaveFile( tOptions* pOpts )
         case OPARG_TYPE_ENUMERATION:
         case OPARG_TYPE_MEMBERSHIP:
         {
-            tCC* val = p->optArg.argString;
+            uintptr_t val = p->optArg.argEnum;
             /*
              *  This is a magic incantation that will convert the
              *  bit flag values back into a string suitable for printing.
              */
             (*(p->pOptProc))( (tOptions*)2UL, p );
-            printEntry( fp, p, p->optArg.argString );
+            printEntry( fp, p, (void*)(p->optArg.argString));
             if (  (p->optArg.argString != NULL)
                && (arg_state != OPARG_TYPE_ENUMERATION))
                 /*
                  *  bit flag and enumeration strings get allocated
                  */
                 AGFREE( (void*)p->optArg.argString );
-            p->optArg.argString = val;
+            p->optArg.argEnum = val;
             break;
         }
 
         case OPARG_TYPE_BOOLEAN:
-            printEntry( fp, p, (p->optArg.argBool != AG_FALSE)
-                        ? "true" : "false" );
+            printEntry( fp, p, p->optArg.argBool ? "true" : "false" );
             break;
 
         default:
index fb78898e134e0484755f9bb85cffd8fbab7e12f6..9d8f3a3d9ef6a0d99ba0886d7fb43443c05841b8 100644 (file)
@@ -1,7 +1,7 @@
 
 /*
  *  stack.c
- *  $Id: stack.c,v 4.12 2006/09/24 02:10:45 bkorb Exp $
+ *  $Id: stack.c,v 4.13 2006/10/05 03:39:53 bkorb Exp $
  *  Time-stamp:      "2006-09-22 18:13:19 bkorb"
  *
  *  This is a special option processing routine that will save the
@@ -78,7 +78,7 @@ optionUnstackArg(
      *  THEN indicate that we don't have any of these options
      */
     if (pAL == NULL) {
-        pOptDesc->fOptState &= OPTST_PERSISTENT;
+        pOptDesc->fOptState &= OPTST_PERSISTENT_MASK;
         if ( (pOptDesc->fOptState & OPTST_INITENABLED) == 0)
             pOptDesc->fOptState |= OPTST_DISABLED;
         return;
@@ -177,7 +177,7 @@ optionUnstackArg(
      *  THEN indicate that we don't have any of these options
      */
     if (pAL->useCt == 0) {
-        pOptDesc->fOptState &= OPTST_PERSISTENT;
+        pOptDesc->fOptState &= OPTST_PERSISTENT_MASK;
         if ( (pOptDesc->fOptState & OPTST_INITENABLED) == 0)
             pOptDesc->fOptState |= OPTST_DISABLED;
         free( (void*)pAL );
index 89f67ed331f7f4121b681350c695d416fbe7b875..5488f54c5055ebf6de3ff1ffefd17710ea25961c 100644 (file)
@@ -2,9 +2,11 @@
  *  
  *  DO NOT EDIT THIS FILE   (ntpd-opts.c)
  *  
- *  It has been AutoGen-ed  Monday September 25, 2006 at 02:49:56 PM EDT
+ *  It has been AutoGen-ed  Sunday October  8, 2006 at 03:53:05 AM EDT
  *  From the definitions    ntpd-opts.def
  *  and the template file   options
+ *
+ * Generated from AutoOpts 27:5:3 templates.
  */
 
 /*
index 8c5e665c0c4da0d5dc736b9d798fd236fc1ee619..45cd4451f33e1b2245f6636cb929e06ffb6ada43 100644 (file)
@@ -2,9 +2,11 @@
  *  
  *  DO NOT EDIT THIS FILE   (ntpd-opts.h)
  *  
- *  It has been AutoGen-ed  Monday September 25, 2006 at 02:49:55 PM EDT
+ *  It has been AutoGen-ed  Sunday October  8, 2006 at 03:53:04 AM EDT
  *  From the definitions    ntpd-opts.def
  *  and the template file   options
+ *
+ * Generated from AutoOpts 27:5:3 templates.
  */
 
 /*
@@ -40,7 +42,7 @@
  *  tolerable version is at least as old as what was current when the header
  *  template was released.
  */
-#define AO_TEMPLATE_VERSION 110592
+#define AO_TEMPLATE_VERSION 110597
 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
  || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
 # error option template version mismatches autoopts/options.h header
@@ -107,7 +109,7 @@ typedef enum {
 #define  STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt)
 #define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
 #define    CLEAR_OPT(n) STMTS( \
-                DESC(n).fOptState &= OPTST_PERSISTENT;   \
+                DESC(n).fOptState &= OPTST_PERSISTENT_MASK;   \
                 if ( (DESC(n).fOptState & OPTST_INITENABLED) == 0) \
                     DESC(n).fOptState |= OPTST_DISABLED; \
                 DESC(n).optCookie = NULL )
@@ -313,7 +315,7 @@ typedef enum {
 #define VALUE_OPT_HELP          '?'
 #define VALUE_OPT_MORE_HELP     '!'
 #define SET_OPT_SAVE_OPTS(a)   STMTS( \
-        DESC(SAVE_OPTS).fOptState &= OPTST_PERSISTENT; \
+        DESC(SAVE_OPTS).fOptState &= OPTST_PERSISTENT_MASK; \
         DESC(SAVE_OPTS).fOptState |= OPTST_SET; \
         DESC(SAVE_OPTS).optArg.argString = (char const*)(a) )
 /*
index 93e32d4ac24cf641dcf50dd71e5f6bba1c67a304..ad988a0b68b9bd22af6c565f400e790929ca94a1 100644 (file)
@@ -2,9 +2,11 @@
  *  
  *  DO NOT EDIT THIS FILE   (ntpdsim-opts.c)
  *  
- *  It has been AutoGen-ed  Monday September 25, 2006 at 02:49:58 PM EDT
+ *  It has been AutoGen-ed  Sunday October  8, 2006 at 03:53:07 AM EDT
  *  From the definitions    ntpdsim-opts.def
  *  and the template file   options
+ *
+ * Generated from AutoOpts 27:5:3 templates.
  */
 
 /*
index ea06b08b47a12fc8141b98e193898244f4ae936f..abdcbf4248095db7c2c2ee85d743e60b37071b83 100644 (file)
@@ -2,9 +2,11 @@
  *  
  *  DO NOT EDIT THIS FILE   (ntpdsim-opts.h)
  *  
- *  It has been AutoGen-ed  Monday September 25, 2006 at 02:49:57 PM EDT
+ *  It has been AutoGen-ed  Sunday October  8, 2006 at 03:53:06 AM EDT
  *  From the definitions    ntpdsim-opts.def
  *  and the template file   options
+ *
+ * Generated from AutoOpts 27:5:3 templates.
  */
 
 /*
@@ -40,7 +42,7 @@
  *  tolerable version is at least as old as what was current when the header
  *  template was released.
  */
-#define AO_TEMPLATE_VERSION 110592
+#define AO_TEMPLATE_VERSION 110597
 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
  || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
 # error option template version mismatches autoopts/options.h header
@@ -116,7 +118,7 @@ typedef enum {
 #define  STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt)
 #define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
 #define    CLEAR_OPT(n) STMTS( \
-                DESC(n).fOptState &= OPTST_PERSISTENT;   \
+                DESC(n).fOptState &= OPTST_PERSISTENT_MASK;   \
                 if ( (DESC(n).fOptState & OPTST_INITENABLED) == 0) \
                     DESC(n).fOptState |= OPTST_DISABLED; \
                 DESC(n).optCookie = NULL )
@@ -376,7 +378,7 @@ typedef enum {
 #define VALUE_OPT_HELP          '?'
 #define VALUE_OPT_MORE_HELP     '!'
 #define SET_OPT_SAVE_OPTS(a)   STMTS( \
-        DESC(SAVE_OPTS).fOptState &= OPTST_PERSISTENT; \
+        DESC(SAVE_OPTS).fOptState &= OPTST_PERSISTENT_MASK; \
         DESC(SAVE_OPTS).fOptState |= OPTST_SET; \
         DESC(SAVE_OPTS).optArg.argString = (char const*)(a) )
 /*
index 571c069d00414f06a15295a0ae4d55a64139a253..d2b07d049104e59e5cd729471e2402bf780e1199 100644 (file)
@@ -2,9 +2,11 @@
  *  
  *  DO NOT EDIT THIS FILE   (ntpdc-opts.c)
  *  
- *  It has been AutoGen-ed  Monday September 25, 2006 at 02:50:00 PM EDT
+ *  It has been AutoGen-ed  Sunday October  8, 2006 at 03:53:09 AM EDT
  *  From the definitions    ntpdc-opts.def
  *  and the template file   options
+ *
+ * Generated from AutoOpts 27:5:3 templates.
  */
 
 /*
index 83be94896af97faca9ba3531c1969ceaac01a58a..1a01d28afc02d74c699c6cc94e8a648aba0410bd 100644 (file)
@@ -2,9 +2,11 @@
  *  
  *  DO NOT EDIT THIS FILE   (ntpdc-opts.h)
  *  
- *  It has been AutoGen-ed  Monday September 25, 2006 at 02:49:59 PM EDT
+ *  It has been AutoGen-ed  Sunday October  8, 2006 at 03:53:09 AM EDT
  *  From the definitions    ntpdc-opts.def
  *  and the template file   options
+ *
+ * Generated from AutoOpts 27:5:3 templates.
  */
 
 /*
@@ -40,7 +42,7 @@
  *  tolerable version is at least as old as what was current when the header
  *  template was released.
  */
-#define AO_TEMPLATE_VERSION 110592
+#define AO_TEMPLATE_VERSION 110597
 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
  || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
 # error option template version mismatches autoopts/options.h header
@@ -88,7 +90,7 @@ typedef enum {
 #define  STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt)
 #define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
 #define    CLEAR_OPT(n) STMTS( \
-                DESC(n).fOptState &= OPTST_PERSISTENT;   \
+                DESC(n).fOptState &= OPTST_PERSISTENT_MASK;   \
                 if ( (DESC(n).fOptState & OPTST_INITENABLED) == 0) \
                     DESC(n).fOptState |= OPTST_DISABLED; \
                 DESC(n).optCookie = NULL )
@@ -176,7 +178,7 @@ typedef enum {
 #define VALUE_OPT_HELP          '?'
 #define VALUE_OPT_MORE_HELP     '!'
 #define SET_OPT_SAVE_OPTS(a)   STMTS( \
-        DESC(SAVE_OPTS).fOptState &= OPTST_PERSISTENT; \
+        DESC(SAVE_OPTS).fOptState &= OPTST_PERSISTENT_MASK; \
         DESC(SAVE_OPTS).fOptState |= OPTST_SET; \
         DESC(SAVE_OPTS).optArg.argString = (char const*)(a) )
 /*
index 9e827979f77d79328e436f5479fb74f5a38b5850..5da6e50ac86ace459b14c68366f77df3e5e5e86e 100644 (file)
@@ -2,9 +2,11 @@
  *  
  *  DO NOT EDIT THIS FILE   (ntpq-opts.c)
  *  
- *  It has been AutoGen-ed  Monday September 25, 2006 at 02:50:02 PM EDT
+ *  It has been AutoGen-ed  Sunday October  8, 2006 at 03:53:10 AM EDT
  *  From the definitions    ntpq-opts.def
  *  and the template file   options
+ *
+ * Generated from AutoOpts 27:5:3 templates.
  */
 
 /*
index dcc0e4e9edbabf80d33933fa57ab7e4fec3c91f8..5c42be9cc8f6fa9c889b11b339a1c6c88272b3b1 100644 (file)
@@ -2,9 +2,11 @@
  *  
  *  DO NOT EDIT THIS FILE   (ntpq-opts.h)
  *  
- *  It has been AutoGen-ed  Monday September 25, 2006 at 02:50:01 PM EDT
+ *  It has been AutoGen-ed  Sunday October  8, 2006 at 03:53:10 AM EDT
  *  From the definitions    ntpq-opts.def
  *  and the template file   options
+ *
+ * Generated from AutoOpts 27:5:3 templates.
  */
 
 /*
@@ -40,7 +42,7 @@
  *  tolerable version is at least as old as what was current when the header
  *  template was released.
  */
-#define AO_TEMPLATE_VERSION 110592
+#define AO_TEMPLATE_VERSION 110597
 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
  || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
 # error option template version mismatches autoopts/options.h header
@@ -86,7 +88,7 @@ typedef enum {
 #define  STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt)
 #define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
 #define    CLEAR_OPT(n) STMTS( \
-                DESC(n).fOptState &= OPTST_PERSISTENT;   \
+                DESC(n).fOptState &= OPTST_PERSISTENT_MASK;   \
                 if ( (DESC(n).fOptState & OPTST_INITENABLED) == 0) \
                     DESC(n).fOptState |= OPTST_DISABLED; \
                 DESC(n).optCookie = NULL )
@@ -162,7 +164,7 @@ typedef enum {
 #define VALUE_OPT_HELP          '?'
 #define VALUE_OPT_MORE_HELP     '!'
 #define SET_OPT_SAVE_OPTS(a)   STMTS( \
-        DESC(SAVE_OPTS).fOptState &= OPTST_PERSISTENT; \
+        DESC(SAVE_OPTS).fOptState &= OPTST_PERSISTENT_MASK; \
         DESC(SAVE_OPTS).fOptState |= OPTST_SET; \
         DESC(SAVE_OPTS).optArg.argString = (char const*)(a) )
 /*
index 573f1ae5f335d8cd4636f20da44fd33adca32a8c..b63061716ef43f1c40839bc00707330628dd83d3 100644 (file)
@@ -7,7 +7,7 @@
 # 
 # DO NOT EDIT THIS FILE   (ntpq-opts.texi)
 # 
-# It has been AutoGen-ed  Monday September 25, 2006 at 08:59:28 AM EDT
+# It has been AutoGen-ed  Sunday October  8, 2006 at 03:44:53 AM EDT
 # From the definitions    ntpq-opts.def
 # and the template file   aginfo.tpl
 @end ignore
index 31b312ff8d5cb0fb5bbb55d0750196671fa9e087..cb82180886547cc9a7c2e6e97372680c7f1b9c7d 100644 (file)
@@ -1,10 +1,14 @@
 ## LIBOPTS Makefile
-MAINTAINERCLEANFILES  = Makefile.in
-lib_LTLIBRARIES       = libopts.la
-libopts_la_SOURCES    = libopts.c
-libopts_la_CPPFLAGS   = -I$(top_srcdir)
-libopts_la_LDFLAGS    = -version-info  27:4:2
-EXTRA_DIST            = \
+MAINTAINERCLEANFILES    = Makefile.in
+if INSTALL_LIBOPTS
+lib_LTLIBRARIES         = libopts.la
+else
+noinst_LTLIBRARIES      = libopts.la
+endif
+libopts_la_SOURCES      = libopts.c
+libopts_la_CPPFLAGS     = -I$(top_srcdir)
+libopts_la_LDFLAGS      = -version-info  27:5:3
+EXTRA_DIST              = \
     COPYING.lgpl            COPYING.mbsd            MakeDefs.inc  \
     README                  autoopts/options.h      autoopts/usage-txt.h  \
     autoopts.c              autoopts.h              boolean.c  \
index c0888508359937a733df39af51b3745c57d3c000..a97083e493731bca62ae5f841f3972ec79c20f33 100644 (file)
@@ -1,7 +1,7 @@
 
 /*
- *  $Id: autoopts.c,v 4.26 2006/09/24 02:10:44 bkorb Exp $
- *  Time-stamp:      "2006-09-22 18:21:53 bkorb"
+ *  $Id: autoopts.c,v 4.27 2006/10/05 03:39:53 bkorb Exp $
+ *  Time-stamp:      "2006-10-04 19:32:32 bkorb"
  *
  *  This file contains all of the routines that must be linked into
  *  an executable to use the generated option processing.  The optional
@@ -221,8 +221,8 @@ handleOption( tOptions* pOpts, tOptState* pOptState )
         pOD->optActualIndex = pOD->optIndex;
     }
 
-    pOD->fOptState &= OPTST_PERSISTENT;
-    pOD->fOptState |= (pOptState->flags & ~OPTST_PERSISTENT);
+    pOD->fOptState &= OPTST_PERSISTENT_MASK;
+    pOD->fOptState |= (pOptState->flags & ~OPTST_PERSISTENT_MASK);
 
     /*
      *  Keep track of count only for DEFINED (command line) options.
@@ -558,11 +558,13 @@ nextOption( tOptions* pOpts, tOptState* pOptState )
 {
     tSuccess res;
     enum { ARG_NONE, ARG_MAY, ARG_MUST } arg_type = ARG_NONE;
+    teOptArgType at;
 
     res = findOptDesc( pOpts, pOptState );
     if (! SUCCESSFUL( res ))
         return res;
-    pOptState->flags |= (pOptState->pOD->fOptState & OPTST_PERSISTENT);
+    pOptState->flags |= (pOptState->pOD->fOptState & OPTST_PERSISTENT_MASK);
+    at = OPTST_GET_ARGTYPE(pOptState->flags);
 
     /*
      *  Figure out what to do about option arguments.  An argument may be
@@ -572,7 +574,7 @@ nextOption( tOptions* pOpts, tOptState* pOptState )
      */
     if ((pOptState->flags & OPTST_DISABLED) != 0)
         arg_type = ARG_NONE;
-    else if (OPTST_GET_ARGTYPE(pOptState->flags) == OPARG_TYPE_NONE)
+    else if (at == OPARG_TYPE_NONE)
         arg_type = ARG_NONE;
     else if (pOptState->flags & OPTST_ARG_OPTIONAL)
         arg_type = ARG_MAY;
index 1dfc6f0d80417640da9e7e9f802f421ab3e3fa31..97814ee3f9c74ced04d0e3cbab5c5f219992d955 100644 (file)
@@ -2,7 +2,7 @@
  *  
  *  DO NOT EDIT THIS FILE   (options.h)
  *  
- *  It has been AutoGen-ed  Sunday September 24, 2006 at 03:28:25 PM PDT
+ *  It has been AutoGen-ed  Thursday October  5, 2006 at 09:15:13 PM PDT
  *  From the definitions    funcs.def
  *  and the template file   options_h
  *
  *  values for "opt_name" are available.
  */
 
+#define  OPTIONS_STRUCT_VERSION  110597
+#define  OPTIONS_VERSION_STRING  "27:5:3"
+#define  OPTIONS_MINIMUM_VERSION 98304
+#define  OPTIONS_MIN_VER_STRING  "24:0:0"
+
 typedef enum {
     OPARG_TYPE_NONE             = 0,
     OPARG_TYPE_STRING           = 1,    /* default type/ vanilla string      */
@@ -75,50 +80,96 @@ typedef struct optionValue {
     char*               pzName;
     union {
         char            strVal[1];      /* OPARG_TYPE_STRING      */
-        int             enumVal;        /* OPARG_TYPE_ENUMERATION */
-        int             boolVal;        /* OPARG_TYPE_BOOLEAN     */
-        long            setVal;         /* OPARG_TYPE_MEMBERSHIP  */
+        unsigned int    enumVal;        /* OPARG_TYPE_ENUMERATION */
+        unsigned int    boolVal;        /* OPARG_TYPE_BOOLEAN     */
+        unsigned long   setVal;         /* OPARG_TYPE_MEMBERSHIP  */
         long            longVal;        /* OPARG_TYPE_NUMERIC     */
         void*           nestVal;        /* OPARG_TYPE_HIERARCHY   */
     } v;
 } tOptionValue;
 
-#define OPTST_SET_ARGTYPE(n) ((n) << 12)
-#define OPTST_GET_ARGTYPE(f) (((f) & OPTST_ARG_TYPE_MASK) >> 12)
-
 /*
  *  Bits in the fOptState option descriptor field.
  */
-#define OPTST_INIT           0x0000000U /* Initial compiled value            */
-#define OPTST_SET            0x0000001U /* Set via the "SET_OPT()" macro     */
-#define OPTST_PRESET         0x0000002U /* Set via an RC/INI file            */
-#define OPTST_DEFINED        0x0000004U /* Set via a command line option     */
-
-#define OPTST_SET_MASK       0x0000007U /* mask of flags that show set state */
-
-#define OPTST_EQUIVALENCE    0x0000010U /* selected by equiv'ed option       */
-#define OPTST_DISABLED       0x0000020U /* option is in disabled state       */
-
-#define OPTST_NO_INIT        0x0000100U /* option cannot be preset           */
-#define OPTST_NUMBER_OPT     0x0000200U /* opt value (flag) is any digit     */
-#define OPTST_STACKED        0x0000400U /* opt uses optionStackArg procedure */
-#define OPTST_INITENABLED    0x0000800U /* option defaults to enabled        */
-#define OPTST_ARG_TYPE_MASK  0x000F000U /* bits used to specify opt arg type */
-#define OPTST_ARG_OPTIONAL   0x0010000U /* the option argument not required  */
-#define OPTST_IMM            0x0020000U /* process option on first pass      */
-#define OPTST_DISABLE_IMM    0x0040000U /* process disablement on first pass */
-#define OPTST_OMITTED        0x0080000U /* compiled out of program           */
-#define OPTST_MUST_SET       0x0100000U /* must be set or pre-set            */
-#define OPTST_DOCUMENT       0x0200000U /* opt is for documentation only     */
-#define OPTST_TWICE          0x0400000U /* process option twice - imm + reg  */
-#define OPTST_DISABLE_TWICE  0x0800000U /* process disabled option twice     */
-
-#define OPTST_PERSISTENT     0xFFFFF00U /* mask of flags that do not change  */
-
-#define SELECTED_OPT( pod )  ( (pod)->fOptState & (OPTST_SET | OPTST_DEFINED))
-#define UNUSED_OPT(   pod )  (((pod)->fOptState & OPTST_SET_MASK) == 0)
-#define DISABLED_OPT( pod )  ( (pod)->fOptState & OPTST_DISABLED)
-#define OPTION_STATE( pod )  ((pod)->fOptState)
+typedef enum {
+        OPTST_SET_ID             =   0, /* Set via the "SET_OPT()" macro */
+        OPTST_PRESET_ID          =   1, /* Set via an RC/INI file        */
+        OPTST_DEFINED_ID         =   2, /* Set via a command line option */
+        OPTST_EQUIVALENCE_ID     =   4, /* selected by equiv'ed option   */
+        OPTST_DISABLED_ID        =   5, /* option is in disabled state   */
+        OPTST_NO_INIT_ID         =   8, /* option cannot be preset       */
+        OPTST_NUMBER_OPT_ID      =   9, /* opt value (flag) is any digit */
+        OPTST_STACKED_ID         =  10, /* opt uses optionStackArg proc  */
+        OPTST_INITENABLED_ID     =  11, /* option defaults to enabled    */
+        OPTST_ARG_TYPE_1_ID      =  12, /* bit 1 of arg type enum        */
+        OPTST_ARG_TYPE_2_ID      =  13, /* bit 2 of arg type enum        */
+        OPTST_ARG_TYPE_3_ID      =  14, /* bit 3 of arg type enum        */
+        OPTST_ARG_TYPE_4_ID      =  15, /* bit 4 of arg type enum        */
+        OPTST_ARG_OPTIONAL_ID    =  16, /* the option arg not required   */
+        OPTST_IMM_ID             =  17, /* process opt on first pass     */
+        OPTST_DISABLE_IMM_ID     =  18, /* process disablement immed.    */
+        OPTST_OMITTED_ID         =  19, /* compiled out of program       */
+        OPTST_MUST_SET_ID        =  20, /* must be set or pre-set        */
+        OPTST_DOCUMENT_ID        =  21, /* opt is for doc only           */
+        OPTST_TWICE_ID           =  22, /* process opt twice - imm + reg */
+        OPTST_DISABLE_TWICE_ID   =  23  /* process disabled option twice */
+} opt_state_enum_t;
+
+#define OPTST_INIT           0U
+#define OPTST_SET            (1U << OPTST_SET_ID)
+#define OPTST_PRESET         (1U << OPTST_PRESET_ID)
+#define OPTST_DEFINED        (1U << OPTST_DEFINED_ID)
+#define OPTST_EQUIVALENCE    (1U << OPTST_EQUIVALENCE_ID)
+#define OPTST_DISABLED       (1U << OPTST_DISABLED_ID)
+#define OPTST_NO_INIT        (1U << OPTST_NO_INIT_ID)
+#define OPTST_NUMBER_OPT     (1U << OPTST_NUMBER_OPT_ID)
+#define OPTST_STACKED        (1U << OPTST_STACKED_ID)
+#define OPTST_INITENABLED    (1U << OPTST_INITENABLED_ID)
+#define OPTST_ARG_TYPE_1     (1U << OPTST_ARG_TYPE_1_ID)
+#define OPTST_ARG_TYPE_2     (1U << OPTST_ARG_TYPE_2_ID)
+#define OPTST_ARG_TYPE_3     (1U << OPTST_ARG_TYPE_3_ID)
+#define OPTST_ARG_TYPE_4     (1U << OPTST_ARG_TYPE_4_ID)
+#define OPTST_ARG_OPTIONAL   (1U << OPTST_ARG_OPTIONAL_ID)
+#define OPTST_IMM            (1U << OPTST_IMM_ID)
+#define OPTST_DISABLE_IMM    (1U << OPTST_DISABLE_IMM_ID)
+#define OPTST_OMITTED        (1U << OPTST_OMITTED_ID)
+#define OPTST_MUST_SET       (1U << OPTST_MUST_SET_ID)
+#define OPTST_DOCUMENT       (1U << OPTST_DOCUMENT_ID)
+#define OPTST_TWICE          (1U << OPTST_TWICE_ID)
+#define OPTST_DISABLE_TWICE  (1U << OPTST_DISABLE_TWICE_ID)
+#define OPT_STATE_MASK       0x00FFFF37U
+
+#define OPTST_SET_MASK       (  \
+        OPTST_SET | \
+        OPTST_PRESET | \
+        OPTST_DEFINED )
+
+#define OPTST_MUTABLE_MASK   (  \
+        OPTST_SET | \
+        OPTST_PRESET | \
+        OPTST_DEFINED | \
+        OPTST_EQUIVALENCE | \
+        OPTST_DISABLED )
+
+#define OPTST_SELECTED_MASK  (  \
+        OPTST_SET | \
+        OPTST_DEFINED )
+
+#define OPTST_ARG_TYPE_MASK  (  \
+        OPTST_ARG_TYPE_1 | \
+        OPTST_ARG_TYPE_2 | \
+        OPTST_ARG_TYPE_3 | \
+        OPTST_ARG_TYPE_4 )
+
+#define OPTST_PERSISTENT_MASK (~OPTST_MUTABLE_MASK)
+
+#define SELECTED_OPT( pod )   ((pod)->fOptState  & OPTST_SELECTED_MASK)
+#define UNUSED_OPT(   pod )   (((pod)->fOptState & OPTST_SET_MASK) == 0)
+#define DISABLED_OPT( pod )   ((pod)->fOptState  & OPTST_DISABLED)
+#define OPTION_STATE( pod )   ((pod)->fOptState)
+
+#define OPTST_SET_ARGTYPE(n)  ((n) << OPTST_ARG_TYPE_1_ID)
+#define OPTST_GET_ARGTYPE(f)  (((f) & OPTST_ARG_TYPE_MASK)>>OPTST_ARG_TYPE_1_ID)
 
 /*
  *  PRIVATE INTERFACES
@@ -129,25 +180,45 @@ typedef struct optionValue {
  */
 
 /*
- *  Define any special processing flags
- */
-#define OPTPROC_NONE        0x000000
-#define OPTPROC_LONGOPT     0x000001 /* Process long style options      */
-#define OPTPROC_SHORTOPT    0x000002 /* Process short style "flags"     */
-#define OPTPROC_ERRSTOP     0x000004 /* Stop on argument errors         */
-#define OPTPROC_DISABLEDOPT 0x000008 /* Current option is disabled      */
-#define OPTPROC_NO_REQ_OPT  0x000010 /* no options are required         */
-#define OPTPROC_NUM_OPT     0x000020 /* there is a number option        */
-#define OPTPROC_INITDONE    0x000040 /* have initializations been done? */
-#define OPTPROC_NEGATIONS   0x000080 /* any negation options?           */
-#define OPTPROC_ENVIRON     0x000100 /* check environment?              */
-#define OPTPROC_NO_ARGS     0x000200 /* Disallow remaining arguments    */
-#define OPTPROC_ARGS_REQ    0x000400 /* Require arguments after options */
-#define OPTPROC_REORDER     0x000800 /* reorder arguments after options */
-#define OPTPROC_GNUUSAGE    0x001000 /* emit usage in GNU style         */
-#define OPTPROC_TRANSLATE   0x002000 /* Translate strings in tOptions   */
-#define OPTPROC_HAS_IMMED   0x004000 /* program defines immed options   */
-#define OPTPROC_PRESETTING  0x800000 /* opt processing in preset state  */
+ *  Define the processing state flags
+ */
+typedef enum {
+        OPTPROC_LONGOPT_ID       =   0, /* Process long style options      */
+        OPTPROC_SHORTOPT_ID      =   1, /* Process short style "flags"     */
+        OPTPROC_ERRSTOP_ID       =   2, /* Stop on argument errors         */
+        OPTPROC_DISABLEDOPT_ID   =   3, /* Current option is disabled      */
+        OPTPROC_NO_REQ_OPT_ID    =   4, /* no options are required         */
+        OPTPROC_NUM_OPT_ID       =   5, /* there is a number option        */
+        OPTPROC_INITDONE_ID      =   6, /* have initializations been done? */
+        OPTPROC_NEGATIONS_ID     =   7, /* any negation options?           */
+        OPTPROC_ENVIRON_ID       =   8, /* check environment?              */
+        OPTPROC_NO_ARGS_ID       =   9, /* Disallow remaining arguments    */
+        OPTPROC_ARGS_REQ_ID      =  10, /* Require arguments after options */
+        OPTPROC_REORDER_ID       =  11, /* reorder operands after options  */
+        OPTPROC_GNUUSAGE_ID      =  12, /* emit usage in GNU style         */
+        OPTPROC_TRANSLATE_ID     =  13, /* Translate strings in tOptions   */
+        OPTPROC_HAS_IMMED_ID     =  14, /* program defines immed options   */
+        OPTPROC_PRESETTING_ID    =  19  /* opt processing in preset state  */
+} optproc_state_enum_t;
+
+#define OPTPROC_NONE         0U
+#define OPTPROC_LONGOPT      (1U << OPTPROC_LONGOPT_ID)
+#define OPTPROC_SHORTOPT     (1U << OPTPROC_SHORTOPT_ID)
+#define OPTPROC_ERRSTOP      (1U << OPTPROC_ERRSTOP_ID)
+#define OPTPROC_DISABLEDOPT  (1U << OPTPROC_DISABLEDOPT_ID)
+#define OPTPROC_NO_REQ_OPT   (1U << OPTPROC_NO_REQ_OPT_ID)
+#define OPTPROC_NUM_OPT      (1U << OPTPROC_NUM_OPT_ID)
+#define OPTPROC_INITDONE     (1U << OPTPROC_INITDONE_ID)
+#define OPTPROC_NEGATIONS    (1U << OPTPROC_NEGATIONS_ID)
+#define OPTPROC_ENVIRON      (1U << OPTPROC_ENVIRON_ID)
+#define OPTPROC_NO_ARGS      (1U << OPTPROC_NO_ARGS_ID)
+#define OPTPROC_ARGS_REQ     (1U << OPTPROC_ARGS_REQ_ID)
+#define OPTPROC_REORDER      (1U << OPTPROC_REORDER_ID)
+#define OPTPROC_GNUUSAGE     (1U << OPTPROC_GNUUSAGE_ID)
+#define OPTPROC_TRANSLATE    (1U << OPTPROC_TRANSLATE_ID)
+#define OPTPROC_HAS_IMMED    (1U << OPTPROC_HAS_IMMED_ID)
+#define OPTPROC_PRESETTING   (1U << OPTPROC_PRESETTING_ID)
+#define OPTPROC_STATE_MASK   0x00087FFFU
 
 #define STMTS(s)  do { s; } while (0)
 
@@ -219,10 +290,11 @@ struct argList {
 
 typedef union {
     char const *    argString;
+    uintptr_t       argEnum;
     uintptr_t       argIntptr;
-    int             argInt;
-    unsigned int    argUint;
-    ag_bool         argBool;
+    long            argInt;
+    unsigned long   argUint;
+    unsigned int    argBool;
 } optArgBucket_t;
 
 /*
@@ -269,11 +341,6 @@ struct optSpecIndex {
     const tAoUS         default_opt;
 };
 
-#define  OPTIONS_STRUCT_VERSION  110595
-#define  OPTIONS_VERSION_STRING  "27:4:3"
-#define  OPTIONS_MINIMUM_VERSION 98304
-#define  OPTIONS_MIN_VER_STRING  "24:0:0"
-
 /*
  *  The procedure generated for translating option text
  */
@@ -610,7 +677,7 @@ extern const tOptionValue* optionNextValue( const tOptionValue*, const tOptionVa
 extern void optionOnlyUsage( tOptions*, int );
 
 
-/* From: autoopts.c line 980
+/* From: autoopts.c line 982
  *
  * optionProcess - this is the main option processing routine
  *
index 8bc08065b8665b462950ef35e54d725549a2784c..9c7079b8c82024829398185df84edd70160119c0 100644 (file)
@@ -2,7 +2,7 @@
  *  
  *  DO NOT EDIT THIS FILE   (usage-txt.h)
  *  
- *  It has been AutoGen-ed  Sunday September 24, 2006 at 03:28:22 PM PDT
+ *  It has been AutoGen-ed  Thursday October  5, 2006 at 09:15:10 PM PDT
  *  From the definitions    usage-txt.def
  *  and the template file   usage-txt.tpl
  *
index bdde8de8055372561ab4c6faba9f6279c0907679..59037d6b29db26f67960cf4de9d58cacea60c58b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  $Id: configfile.c,v 4.28 2006/09/24 02:10:45 bkorb Exp $
+ *  $Id: configfile.c,v 4.29 2006/09/28 01:26:16 bkorb Exp $
  *  Time-stamp:      "2006-09-24 15:18:51 bkorb"
  *
  *  configuration/rc/ini file handling.
index 9685d0641664482bb3837ee9192886f67e7419e7..56d4c04082d0e8538acb27dc6fbcdcef35ed3163 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- *  $Id: cook.c,v 4.8 2006/09/24 02:10:45 bkorb Exp $
+ *  $Id: cook.c,v 4.9 2006/09/28 01:26:16 bkorb Exp $
  *  Time-stamp:      "2006-09-24 15:21:02 bkorb"
  *
  *  This file contains the routines that deal with processing quoted strings
index 4586967c782f7e10f48dea6ec2777123041b1550..dd51b1111b1b0d6b804cbf4ce7d12fc74bf10f7a 100644 (file)
@@ -1,7 +1,7 @@
 
 /*
  *  $Id: enumeration.c,v 4.14 2006/09/24 02:10:45 bkorb Exp $
- * Time-stamp:      "2006-09-22 18:00:53 bkorb"
+ * Time-stamp:      "2006-10-05 21:10:21 bkorb"
  *
  *   Automated Options Paged Usage module.
  *
@@ -235,7 +235,7 @@ optionKeywordName(
 {
     tOptDesc od;
 
-    od.optArg.argIntptr = enum_val;
+    od.optArg.argEnum = enum_val;
     (*(pOD->pOptProc))( (void*)(2UL), &od );
     return od.optArg.argString;
 }
@@ -280,7 +280,7 @@ optionEnumerationVal(
 
     case 1UL:
     {
-        unsigned int ix = pOD->optArg.argIntptr;
+        unsigned int ix = pOD->optArg.argEnum;
         /*
          *  print the name string.
          */
@@ -293,7 +293,7 @@ optionEnumerationVal(
     case 2UL:
     {
         tSCC zInval[] = "*INVALID*";
-        unsigned int ix = pOD->optArg.argIntptr;
+        unsigned int ix = pOD->optArg.argEnum;
         /*
          *  Replace the enumeration value with the name string.
          */
index 7c5e12f74199065f0fc5c7dbe60fa167087074cf..c7331f49fb291296a7be4d7d5eac22076f0bbe40 100644 (file)
@@ -2,9 +2,11 @@
  *  
  *  DO NOT EDIT THIS FILE   (genshell.c)
  *  
- *  It has been AutoGen-ed  Sunday September 24, 2006 at 03:28:26 PM PDT
+ *  It has been AutoGen-ed  Thursday October  5, 2006 at 09:15:14 PM PDT
  *  From the definitions    genshell.def
  *  and the template file   options
+ *
+ * Generated from AutoOpts 27:5:3 templates.
  */
 
 /*
index 44760b784d84863ba5ea4030b59521f873bbfeb4..e7c524eab184376f52ac231ea31eb3d3de61e62f 100644 (file)
@@ -2,9 +2,11 @@
  *  
  *  DO NOT EDIT THIS FILE   (genshell.h)
  *  
- *  It has been AutoGen-ed  Sunday September 24, 2006 at 03:28:26 PM PDT
+ *  It has been AutoGen-ed  Thursday October  5, 2006 at 09:15:14 PM PDT
  *  From the definitions    genshell.def
  *  and the template file   options
+ *
+ * Generated from AutoOpts 27:5:3 templates.
  */
 
 /*
@@ -53,7 +55,7 @@
  *  tolerable version is at least as old as what was current when the header
  *  template was released.
  */
-#define AO_TEMPLATE_VERSION 110592
+#define AO_TEMPLATE_VERSION 110597
 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
  || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
 # error option template version mismatches autoopts/options.h header
@@ -91,7 +93,7 @@ typedef enum {
 #define  STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt)
 #define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
 #define    CLEAR_OPT(n) STMTS( \
-                DESC(n).fOptState &= OPTST_PERSISTENT;   \
+                DESC(n).fOptState &= OPTST_PERSISTENT_MASK;   \
                 if ( (DESC(n).fOptState & OPTST_INITENABLED) == 0) \
                     DESC(n).fOptState |= OPTST_DISABLED; \
                 DESC(n).optCookie = NULL )
index 46ac97dc2d1da410d1111a96b5a4e8a0d7091206..45fb53a4717bddaa4c1220b8f5242ed9d12bfad2 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- *  $Id: load.c,v 4.25 2006/09/24 02:10:45 bkorb Exp $
+ *  $Id: load.c,v 4.26 2006/09/28 01:26:16 bkorb Exp $
  *  Time-stamp:      "2006-09-24 15:23:01 bkorb"
  *
  *  This file contains the routines that deal with processing text strings
index 6fea8bfd753c0f6016187b51aaee8080dd27a1c3..4c6f71151ef5ccb8f2593c1f422d428d17fbf0cf 100644 (file)
@@ -2,7 +2,7 @@ dnl  -*- buffer-read-only: t -*- vi: set ro:
 dnl 
 dnl DO NOT EDIT THIS FILE   (libopts.m4)
 dnl 
-dnl It has been AutoGen-ed  Sunday September 24, 2006 at 03:28:29 PM PDT
+dnl It has been AutoGen-ed  Thursday October  5, 2006 at 09:15:16 PM PDT
 dnl From the definitions    libopts.def
 dnl and the template file   conftest.tpl
 dnl
index 4051a27b580df3c0c9deeab4c6827b6d5a271745..088df02f94f251e0feca8380e2e53ba498c7dc36 100644 (file)
@@ -1,7 +1,7 @@
 
 /*
- *  $Id: makeshell.c,v 4.17 2006/09/24 02:10:45 bkorb Exp $
- * Time-stamp:      "2006-09-22 18:19:24 bkorb"
+ *  $Id: makeshell.c,v 4.18 2006/10/05 03:39:53 bkorb Exp $
+ * Time-stamp:      "2006-10-05 20:41:23 bkorb"
  *
  *  This module will interpret the options set in the tOptions
  *  structure and create a Bourne shell script capable of parsing them.
@@ -699,12 +699,21 @@ emitSetup( tOptions* pOpts )
          *  Numeric and membership bit options are just printed as a number.
          */
         case OPARG_TYPE_NUMERIC:
-        case OPARG_TYPE_MEMBERSHIP:
             snprintf( zVal, sizeof( zVal ), "%d",
-                      (int)pOptDesc->optArg.argIntptr );
+                      (int)pOptDesc->optArg.argInt );
             pzDefault = zVal;
             break;
 
+        case OPARG_TYPE_MEMBERSHIP:
+            snprintf( zVal, sizeof( zVal ), "%lu",
+                      (unsigned long)pOptDesc->optArg.argIntptr );
+            pzDefault = zVal;
+            break;
+
+        case OPARG_TYPE_BOOLEAN:
+            pzDefault = (pOptDesc->optArg.argBool) ? "true" : "false";
+            break;
+
         default:
             if (pOptDesc->optArg.argString == NULL) {
                 if (pzFmt == zSingleDef)
index 013b742c3161a281fba2cbef19cd2bc9230e7b5f..0989cec17c1e7bf0a93c6fae78ffbc7cc9e9472d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- *  $Id: nested.c,v 4.13 2006/09/24 02:10:45 bkorb Exp $
+ *  $Id: nested.c,v 4.14 2006/09/28 01:26:16 bkorb Exp $
  *  Time-stamp:      "2006-09-24 15:27:32 bkorb"
  *
  *   Automated Options Nested Values module.
index 486981fb5cce4ac78362946c17b764328621b15e..a186984e6113c43697406e065abb1b419c2bfb0b 100644 (file)
@@ -1,7 +1,7 @@
 
 /*
- *  $Id: numeric.c,v 4.9 2006/09/24 02:10:45 bkorb Exp $
- *  Time-stamp:      "2006-09-22 18:14:38 bkorb"
+ *  $Id: numeric.c,v 4.10 2006/10/05 03:39:53 bkorb Exp $
+ *  Time-stamp:      "2006-10-04 16:12:34 bkorb"
  */
 
 /*
@@ -61,7 +61,7 @@ void
 optionNumericVal( tOptions* pOpts, tOptDesc* pOD )
 {
     char* pz;
-    int   val;
+    long  val;
 
     /*
      *  Numeric options may have a range associated with it.
@@ -71,7 +71,7 @@ optionNumericVal( tOptions* pOpts, tOptDesc* pOD )
     if ((pOD == NULL) || (pOD->optArg.argString == NULL))
         return;
 
-    val = (int)strtol( pOD->optArg.argString, &pz, 0 );
+    val = strtol( pOD->optArg.argString, &pz, 0 );
     if (*pz != NUL) {
         fprintf( stderr, zNotNumber, pOpts->pzProgName, pOD->optArg.argString );
         (*(pOpts->pUsageProc))(pOpts, EXIT_FAILURE);
index 80f1d06e393dc25ed203b1974c7141f63268d9e4..70a421b108a847f73b11c97ccc3adf4abd481357 100644 (file)
@@ -1,7 +1,7 @@
 /* -*- buffer-read-only: t -*- vi: set ro:
  *
  * Prototypes for autoopts
- * Generated Sun Sep 24 15:28:27 PDT 2006
+ * Generated Thu Oct  5 21:15:15 PDT 2006
  */
 #ifndef AUTOOPTS_PROTO_H_GUARD
 #define AUTOOPTS_PROTO_H_GUARD 1
index fda77eea75016ff8164fed0c08e1a0b25fe2cc46..a9ff3ef42f2641350d029c08662612a89cccea27 100644 (file)
@@ -1,7 +1,7 @@
 
 /*
- *  $Id: putshell.c,v 4.14 2006/09/24 02:10:45 bkorb Exp $
- * Time-stamp:      "2006-09-24 15:28:15 bkorb"
+ *  $Id: putshell.c,v 4.16 2006/10/05 03:39:53 bkorb Exp $
+ * Time-stamp:      "2006-10-05 20:37:42 bkorb"
  *
  *  This module will interpret the options set in the tOptions
  *  structure and print them to standard out in a fashion that
@@ -164,8 +164,8 @@ optionPutShell( tOptions* pOpts )
         if (pOD->optActualIndex != optIx) {
             tOptDesc* p   = pOpts->pOptDesc + pOD->optActualIndex;
             p->optArg     = pOD->optArg;
-            p->fOptState &= OPTST_PERSISTENT;
-            p->fOptState |= pOD->fOptState & ~OPTST_PERSISTENT;
+            p->fOptState &= OPTST_PERSISTENT_MASK;
+            p->fOptState |= pOD->fOptState & ~OPTST_PERSISTENT_MASK;
             printf( zEquivMode, pOpts->pzPROGNAME, pOD->pz_NAME, p->pz_NAME );
             pOD = p;
         }
@@ -176,7 +176,7 @@ optionPutShell( tOptions* pOpts )
          *  of bitmask value and we need to emit the bit values.
          */
         if (OPTST_GET_ARGTYPE(pOD->fOptState) == OPARG_TYPE_MEMBERSHIP) {
-            char* pz;
+            char const * pz;
             uintptr_t val = 1;
             printf( zOptNumFmt, pOpts->pzPROGNAME, pOD->pz_NAME,
                     (uintptr_t)(pOD->optCookie) );
@@ -187,7 +187,7 @@ optionPutShell( tOptions* pOpts )
              *  We are building the typeset list.  The list returned starts with
              *  'none + ' for use by option saving stuff.  We must ignore that.
              */
-            pz = (char*)pOD->optArg.argString + 7;
+            pz = pOD->optArg.argString + 7;
             while (*pz != NUL) {
                 printf( "typeset -x -i %s_", pOD->pz_NAME );
                 pz += strspn( pz, " +\t\n\f" );
@@ -256,7 +256,7 @@ optionPutShell( tOptions* pOpts )
          */
         else if (OPTST_GET_ARGTYPE(pOD->fOptState) == OPARG_TYPE_NUMERIC)
             printf( zOptNumFmt, pOpts->pzPROGNAME, pOD->pz_NAME,
-                    pOD->optArg.argIntptr );
+                    (int)pOD->optArg.argInt );
 
         /*
          *  If the argument type is an enumeration, then it is much
@@ -277,7 +277,7 @@ optionPutShell( tOptions* pOpts )
          */
         else if (OPTST_GET_ARGTYPE(pOD->fOptState) == OPARG_TYPE_BOOLEAN)
             printf( zFullOptFmt, pOpts->pzPROGNAME, pOD->pz_NAME,
-                    (pOD->optArg.argIntptr == 0) ? "false" : "true" );
+                    (pOD->optArg.argBool == 0) ? "false" : "true" );
 
         /*
          *  IF the option has an empty value,
index 0bd7e1f07f8b5fc7c5e27588af7a8055ab41a2ca..c5d56f9c763f466f956974370bb1120c8393ae5c 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- *  restore.c  $Id: restore.c,v 4.8 2006/09/24 02:10:45 bkorb Exp $
+ *  restore.c  $Id: restore.c,v 4.9 2006/10/05 03:39:53 bkorb Exp $
  * Time-stamp:      "2005-02-23 15:10:20 bkorb"
  *
  *  This module's routines will save the current option state to memory
@@ -181,7 +181,7 @@ optionFree( tOptions* pOpts )
                 if (  (p->fOptState & OPTST_STACKED)
                    && (p->optCookie != NULL)) {
                     AGFREE( p->optCookie );
-                    p->fOptState &= OPTST_PERSISTENT;
+                    p->fOptState &= OPTST_PERSISTENT_MASK;
                     if ((p->fOptState & OPTST_INITENABLED) == 0)
                         p->fOptState |= OPTST_DISABLED;
                 }
index 6c5666e0c8b253033f2b6a67e2b8d0fbe664bfa7..573508c562118f0426e34065040cf3a91ba0de63 100644 (file)
@@ -1,7 +1,7 @@
 
 /*
- *  save.c  $Id: save.c,v 4.19 2006/09/24 02:10:45 bkorb Exp $
- * Time-stamp:      "2006-09-22 18:11:20 bkorb"
+ *  save.c  $Id: save.c,v 4.20 2006/10/05 03:39:53 bkorb Exp $
+ * Time-stamp:      "2006-10-05 21:09:18 bkorb"
  *
  *  This module's routines will take the currently set options and
  *  store them into an ".rc" file for re-interpretation the next
@@ -437,7 +437,7 @@ optionSaveFile( tOptions* pOpts )
         switch (arg_state) {
         case 0:
         case OPARG_TYPE_NUMERIC:
-            printEntry( fp, p, p->optArg.argString );
+            printEntry( fp, p, (void*)(p->optArg.argInt));
             break;
 
         case OPARG_TYPE_STRING:
@@ -462,26 +462,25 @@ optionSaveFile( tOptions* pOpts )
         case OPARG_TYPE_ENUMERATION:
         case OPARG_TYPE_MEMBERSHIP:
         {
-            tCC* val = p->optArg.argString;
+            uintptr_t val = p->optArg.argEnum;
             /*
              *  This is a magic incantation that will convert the
              *  bit flag values back into a string suitable for printing.
              */
             (*(p->pOptProc))( (tOptions*)2UL, p );
-            printEntry( fp, p, p->optArg.argString );
+            printEntry( fp, p, (void*)(p->optArg.argString));
             if (  (p->optArg.argString != NULL)
                && (arg_state != OPARG_TYPE_ENUMERATION))
                 /*
                  *  bit flag and enumeration strings get allocated
                  */
                 AGFREE( (void*)p->optArg.argString );
-            p->optArg.argString = val;
+            p->optArg.argEnum = val;
             break;
         }
 
         case OPARG_TYPE_BOOLEAN:
-            printEntry( fp, p, (p->optArg.argBool != AG_FALSE)
-                        ? "true" : "false" );
+            printEntry( fp, p, p->optArg.argBool ? "true" : "false" );
             break;
 
         default:
index fb78898e134e0484755f9bb85cffd8fbab7e12f6..9d8f3a3d9ef6a0d99ba0886d7fb43443c05841b8 100644 (file)
@@ -1,7 +1,7 @@
 
 /*
  *  stack.c
- *  $Id: stack.c,v 4.12 2006/09/24 02:10:45 bkorb Exp $
+ *  $Id: stack.c,v 4.13 2006/10/05 03:39:53 bkorb Exp $
  *  Time-stamp:      "2006-09-22 18:13:19 bkorb"
  *
  *  This is a special option processing routine that will save the
@@ -78,7 +78,7 @@ optionUnstackArg(
      *  THEN indicate that we don't have any of these options
      */
     if (pAL == NULL) {
-        pOptDesc->fOptState &= OPTST_PERSISTENT;
+        pOptDesc->fOptState &= OPTST_PERSISTENT_MASK;
         if ( (pOptDesc->fOptState & OPTST_INITENABLED) == 0)
             pOptDesc->fOptState |= OPTST_DISABLED;
         return;
@@ -177,7 +177,7 @@ optionUnstackArg(
      *  THEN indicate that we don't have any of these options
      */
     if (pAL->useCt == 0) {
-        pOptDesc->fOptState &= OPTST_PERSISTENT;
+        pOptDesc->fOptState &= OPTST_PERSISTENT_MASK;
         if ( (pOptDesc->fOptState & OPTST_INITENABLED) == 0)
             pOptDesc->fOptState |= OPTST_DISABLED;
         free( (void*)pAL );
index d1d4d331a201cc5f3847c311dbe65c202dbea7e0..2f5a6d3d87aba8a5c121c918a6cae589bb1020b6 100644 (file)
@@ -2,9 +2,11 @@
  *  
  *  DO NOT EDIT THIS FILE   (sntp-opts.c)
  *  
- *  It has been AutoGen-ed  Monday September 25, 2006 at 02:50:04 PM EDT
+ *  It has been AutoGen-ed  Sunday October  8, 2006 at 03:53:12 AM EDT
  *  From the definitions    sntp-opts.def
  *  and the template file   options
+ *
+ * Generated from AutoOpts 27:5:3 templates.
  */
 
 /*
index 4db8a182e70bad31bd2107ec6b71f07712ad42a5..c5b10b7c29926d542590e8b01dd41f63221f8440 100644 (file)
@@ -2,9 +2,11 @@
  *  
  *  DO NOT EDIT THIS FILE   (sntp-opts.h)
  *  
- *  It has been AutoGen-ed  Monday September 25, 2006 at 02:50:03 PM EDT
+ *  It has been AutoGen-ed  Sunday October  8, 2006 at 03:53:12 AM EDT
  *  From the definitions    sntp-opts.def
  *  and the template file   options
+ *
+ * Generated from AutoOpts 27:5:3 templates.
  */
 
 /*
  *  tolerable version is at least as old as what was current when the header
  *  template was released.
  */
-#define AO_TEMPLATE_VERSION 110592
+#define AO_TEMPLATE_VERSION 110597
 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
  || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
 # error option template version mismatches autoopts/options.h header
@@ -164,7 +166,7 @@ typedef enum {
 #define  STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt)
 #define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
 #define    CLEAR_OPT(n) STMTS( \
-                DESC(n).fOptState &= OPTST_PERSISTENT;   \
+                DESC(n).fOptState &= OPTST_PERSISTENT_MASK;   \
                 if ( (DESC(n).fOptState & OPTST_INITENABLED) == 0) \
                     DESC(n).fOptState |= OPTST_DISABLED; \
                 DESC(n).optCookie = NULL )
@@ -230,7 +232,7 @@ typedef enum {
 #define VALUE_OPT_HELP          '?'
 #define VALUE_OPT_MORE_HELP     '!'
 #define SET_OPT_SAVE_OPTS(a)   STMTS( \
-        DESC(SAVE_OPTS).fOptState &= OPTST_PERSISTENT; \
+        DESC(SAVE_OPTS).fOptState &= OPTST_PERSISTENT_MASK; \
         DESC(SAVE_OPTS).fOptState |= OPTST_SET; \
         DESC(SAVE_OPTS).optArg.argString = (char const*)(a) )
 /*
index 74e4eba272a8913975ba51279051d4cd1e427900..3700a617dc499e32fa5841e1f8a61ee64b8e2a60 100644 (file)
@@ -2,9 +2,11 @@
  *  
  *  DO NOT EDIT THIS FILE   (ntp-keygen-opts.c)
  *  
- *  It has been AutoGen-ed  Monday September 25, 2006 at 02:50:06 PM EDT
+ *  It has been AutoGen-ed  Sunday October  8, 2006 at 03:53:14 AM EDT
  *  From the definitions    ntp-keygen-opts.def
  *  and the template file   options
+ *
+ * Generated from AutoOpts 27:5:3 templates.
  */
 
 /*
@@ -886,7 +888,7 @@ doOptModulus(
 {
     static const struct {const int rmin, rmax;} rng[ 1 ] = {
         { 256, 2048 } };
-    long val;
+    int val;
     int ix;
     char const* pzIndent = "\t\t\t\t  ";
     extern FILE* option_usage_fp;
@@ -923,7 +925,7 @@ doOptModulus(
     return;
 
   valid_return:
-    pOptDesc->optArg.argString = (char*)val;
+    pOptDesc->optArg.argInt = val;
 }
 #endif /* defined OPENSSL */
 
index fd6192b2f667fad303a4aae7c0f2114457a81c8e..3f98056bd6167ec888a19d4118d46ad9d0d9fdb4 100644 (file)
@@ -2,9 +2,11 @@
  *  
  *  DO NOT EDIT THIS FILE   (ntp-keygen-opts.h)
  *  
- *  It has been AutoGen-ed  Monday September 25, 2006 at 02:50:05 PM EDT
+ *  It has been AutoGen-ed  Sunday October  8, 2006 at 03:53:13 AM EDT
  *  From the definitions    ntp-keygen-opts.def
  *  and the template file   options
+ *
+ * Generated from AutoOpts 27:5:3 templates.
  */
 
 /*
@@ -40,7 +42,7 @@
  *  tolerable version is at least as old as what was current when the header
  *  template was released.
  */
-#define AO_TEMPLATE_VERSION 110592
+#define AO_TEMPLATE_VERSION 110597
 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
  || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
 # error option template version mismatches autoopts/options.h header
@@ -97,7 +99,7 @@ typedef enum {
 #define  STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt)
 #define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
 #define    CLEAR_OPT(n) STMTS( \
-                DESC(n).fOptState &= OPTST_PERSISTENT;   \
+                DESC(n).fOptState &= OPTST_PERSISTENT_MASK;   \
                 if ( (DESC(n).fOptState & OPTST_INITENABLED) == 0) \
                     DESC(n).fOptState |= OPTST_DISABLED; \
                 DESC(n).optCookie = NULL )
@@ -272,7 +274,7 @@ typedef enum {
 #define VALUE_OPT_HELP          '?'
 #define VALUE_OPT_MORE_HELP     '!'
 #define SET_OPT_SAVE_OPTS(a)   STMTS( \
-        DESC(SAVE_OPTS).fOptState &= OPTST_PERSISTENT; \
+        DESC(SAVE_OPTS).fOptState &= OPTST_PERSISTENT_MASK; \
         DESC(SAVE_OPTS).fOptState |= OPTST_SET; \
         DESC(SAVE_OPTS).optArg.argString = (char const*)(a) )
 /*