]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
NTP_4_2_7P160 NTP_4_2_7P160
authorHarlan Stenn <stenn@ntp.org>
Sun, 1 May 2011 08:30:32 +0000 (08:30 +0000)
committerHarlan Stenn <stenn@ntp.org>
Sun, 1 May 2011 08:30:32 +0000 (08:30 +0000)
bk: 4dbd1a28wA1gdEVh9Jz3nrwee3kD6g

27 files changed:
ChangeLog
ntpd/ntpd-opts.c
ntpd/ntpd-opts.h
ntpd/ntpd-opts.texi
ntpd/ntpd.1
ntpdc/ntpdc-opts.c
ntpdc/ntpdc-opts.h
ntpdc/ntpdc-opts.texi
ntpdc/ntpdc.1
ntpq/ntpq-opts.c
ntpq/ntpq-opts.h
ntpq/ntpq-opts.texi
ntpq/ntpq.1
ntpsnmpd/ntpsnmpd-opts.c
ntpsnmpd/ntpsnmpd-opts.h
ntpsnmpd/ntpsnmpd-opts.texi
ntpsnmpd/ntpsnmpd.1
packageinfo.sh
sntp/sntp-opts.c
sntp/sntp-opts.h
sntp/sntp-opts.texi
sntp/sntp.1
sntp/sntp.html
util/ntp-keygen-opts.c
util/ntp-keygen-opts.h
util/ntp-keygen-opts.texi
util/ntp-keygen.1

index 43cea1cb4b3f755ac76d35055c291f8b3ad8cfe3..655f65fcf1f7988163aa0bc907648f239068acd9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+(4.2.7p160) 2011/05/01 Released by Harlan Stenn <stenn@ntp.org>
 * from 4.2.6p4-RC1: Upgrade to libopts 35.0.10 from AutoGen 5.11.9pre8.
 * [Bug 1901] Simulator does not set progname.
 (4.2.7p159) 2011/04/28 Released by Harlan Stenn <stenn@ntp.org>
index f28fdb80bb214cfe1c9d2950e16ebb4a4a0f7f88..ea62de8af06ed0ce8a760e373bc9279dfe81b943 100644 (file)
@@ -1,11 +1,11 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpd-opts.c)
  *  
- *  It has been AutoGen-ed  April 28, 2011 at 06:46:25 AM by AutoGen 5.11.6
+ *  It has been AutoGen-ed  May  1, 2011 at 08:13:49 AM by AutoGen 5.11.9pre8
  *  From the definitions    ntpd-opts.def
  *  and the template file   options
  *
- * Generated from AutoOpts 34:0:9 templates.
+ * Generated from AutoOpts 35:0:10 templates.
  *
  *  AutoOpts is a copyrighted work.  This source file is not encumbered
  *  by AutoOpts licensing, but is provided under the licensing terms chosen
  * ntpd copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved
  *
  * see html/copyright.html
+ * 
  */
 
 #include <sys/types.h>
+
 #include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
 #ifdef  __cplusplus
 extern "C" {
 #endif
+extern FILE * option_usage_fp;
 
 /* TRANSLATORS: choose the translation for option names wisely because you
                 cannot ever change your mind. */
-tSCC zCopyright[] =
-       "ntpd copyright (c) 1970-2011 David L. Mills and/or others, all rights reserved"
-/* extracted from copyright.def near line 8 */
-;
-tSCC zCopyrightNotice[24] =
-"see html/copyright.html";
+static char const zCopyright[40] =
+"ntpd 4.2.7p160\n\
+see html/copyright.html\n";
+static char const zCopyrightNotice[25] =
+"see html/copyright.html\n";
 
 extern tUsageProc optionUsage;
 
@@ -57,12 +59,6 @@ extern tUsageProc optionUsage;
 #ifndef NULL
 #  define NULL 0
 #endif
-#ifndef EXIT_SUCCESS
-#  define  EXIT_SUCCESS 0
-#endif
-#ifndef EXIT_FAILURE
-#  define  EXIT_FAILURE 1
-#endif
 
 /*
  *  Ipv4 option description with
@@ -542,8 +538,8 @@ static tOptProc
 extern tOptProc
     optionBooleanVal,    optionNestedVal,     optionNumericVal,
     optionPagedUsage,    optionPrintVersion,  optionResetOpt,
-    optionStackArg,      optionTimeVal,       optionUnstackArg,
-    optionVersionStderr;
+    optionStackArg,      optionTimeDate,      optionTimeVal,
+    optionUnstackArg,    optionVersionStderr;
 static tOptProc
     doUsageOpt;
 
@@ -564,7 +560,7 @@ static tOptProc
  *
  *  Define the Ntpd Option Descriptions.
  */
-static tOptDesc optDesc[ OPTION_CT ] = {
+static tOptDesc optDesc[OPTION_CT] = {
   {  /* entry idx, value */ 0, VALUE_OPT_IPV4,
      /* equiv idx, value */ 0, VALUE_OPT_IPV4,
      /* equivalenced to  */ NO_EQUIVALENT,
@@ -1006,7 +1002,7 @@ static tOptDesc optDesc[ OPTION_CT ] = {
  */
 static char const zPROGNAME[5] = "NTPD";
 static char const zUsageTitle[133] =
-"ntpd - NTP daemon program - Ver. 4.2.7p159\n\
+"ntpd - NTP daemon program - Ver. 4.2.7p160\n\
 USAGE:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
 \t\t[ <server1> ... <serverN> ]\n";
 #define zRcName     NULL
@@ -1016,7 +1012,7 @@ static char const zBugsAddr[34]    = "http://bugs.ntp.org, bugs@ntp.org";
 #define zExplain NULL
 static char const zDetail[7] = "\n\n";
 static char const zFullVersion[] = NTPD_FULL_VERSION;
-/* extracted from optcode.tlib near line 504 */
+/* extracted from optcode.tlib near line 515 */
 
 #if defined(ENABLE_NLS)
 # define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -1086,12 +1082,10 @@ tOptions ntpdOptions = {
  *  Create the static procedure(s) declared above.
  */
 static void
-doUsageOpt(
-    tOptions*   pOptions,
-    tOptDesc*   pOptDesc )
+doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
 {
     (void)pOptions;
-    USAGE(EXIT_SUCCESS);
+    USAGE(NTPD_EXIT_SUCCESS);
 }
 
 #if ! defined(TEST_NTPD_OPTS)
@@ -1109,16 +1103,16 @@ DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
 }
 #endif /* defined DEBUG */
 #endif /* defined(TEST_NTPD_OPTS) */
-/* extracted from optmain.tlib near line 107 */
+/* extracted from optmain.tlib near line 128 */
 
 #if defined(TEST_NTPD_OPTS) /* TEST MAIN PROCEDURE: */
 
 extern void optionPutShell(tOptions*);
 
 int
-main(int argc, char** argv)
+main(int argc, char ** argv)
 {
-    int res = EXIT_SUCCESS;
+    int res = NTPD_EXIT_SUCCESS;
     (void)optionProcess(&ntpdOptions, argc, argv);
     optionPutShell(&ntpdOptions);
     res = ferror(stdout);
@@ -1127,7 +1121,7 @@ main(int argc, char** argv)
     return res;
 }
 #endif  /* defined TEST_NTPD_OPTS */
-/* extracted from optcode.tlib near line 657 */
+/* extracted from optcode.tlib near line 666 */
 
 #if ENABLE_NLS
 #include <stdio.h>
@@ -1151,14 +1145,13 @@ AO_gettext(char const* pz)
     pzRes = strdup(pzRes);
     if (pzRes == NULL) {
         fputs(_("No memory for duping translated strings\n"), stderr);
-        exit(EXIT_FAILURE);
+        exit(NTPD_EXIT_FAILURE);
     }
     return pzRes;
 }
 
-static void coerce_it(void** s) { *s = AO_gettext(*s); }
-#define COERSION(_f) \
-  coerce_it((void*)&(ntpdOptions._f))
+static void coerce_it(void** s) { *s = AO_gettext(*s);
+}
 
 /*
  *  This invokes the translation code (e.g. gettext(3)).
@@ -1166,6 +1159,8 @@ static void coerce_it(void** s) { *s = AO_gettext(*s); }
 static void
 translate_option_strings(void)
 {
+    tOptions * const pOpt = &ntpdOptions;
+
     /*
      *  Guard against re-translation.  It won't work.  The strings will have
      *  been changed by the first pass through this code.  One shot only.
@@ -1175,33 +1170,33 @@ translate_option_strings(void)
          *  Do the translations.  The first pointer follows the field count
          *  field.  The field count field is the size of a pointer.
          */
-        tOptDesc* pOD = ntpdOptions.pOptDesc;
-        char**    ppz = (char**)(void*)&(option_usage_text);
-        int       ix  = option_usage_text.field_ct;
+        tOptDesc * pOD = pOpt->pOptDesc;
+        char **    ppz = (char**)(void*)&(option_usage_text);
+        int        ix  = option_usage_text.field_ct;
 
         do {
             ppz++;
             *ppz = AO_gettext(*ppz);
         } while (--ix > 0);
 
-        COERSION(pzCopyright);
-        COERSION(pzCopyNotice);
-        COERSION(pzFullVersion);
-        COERSION(pzUsageTitle);
-        COERSION(pzExplain);
-        COERSION(pzDetail);
-        COERSION(pzPackager);
+        coerce_it((void*)&(pOpt->pzCopyright));
+        coerce_it((void*)&(pOpt->pzCopyNotice));
+        coerce_it((void*)&(pOpt->pzFullVersion));
+        coerce_it((void*)&(pOpt->pzUsageTitle));
+        coerce_it((void*)&(pOpt->pzExplain));
+        coerce_it((void*)&(pOpt->pzDetail));
+        coerce_it((void*)&(pOpt->pzPackager));
         option_usage_text.field_ct = 0;
 
-        for (ix = ntpdOptions.optCt; ix > 0; ix--, pOD++)
+        for (ix = pOpt->optCt; ix > 0; ix--, pOD++)
             coerce_it((void*)&(pOD->pzText));
     }
 
-    if ((ntpdOptions.fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
-        tOptDesc* pOD = ntpdOptions.pOptDesc;
-        int       ix;
+    if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
+        tOptDesc * pOD = pOpt->pOptDesc;
+        int        ix;
 
-        for (ix = ntpdOptions.optCt; ix > 0; ix--, pOD++) {
+        for (ix = pOpt->optCt; ix > 0; ix--, pOD++) {
             coerce_it((void*)&(pOD->pz_Name));
             coerce_it((void*)&(pOD->pz_DisableName));
             coerce_it((void*)&(pOD->pz_DisablePfx));
index 250cbe0a43677fbb53515ca53f1fccf036b7cb0d..3c1f5639fd20940ca991588acd2f6ed498b75fcf 100644 (file)
@@ -1,11 +1,11 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpd-opts.h)
  *  
- *  It has been AutoGen-ed  April 28, 2011 at 06:46:25 AM by AutoGen 5.11.6
+ *  It has been AutoGen-ed  May  1, 2011 at 08:13:49 AM by AutoGen 5.11.9pre8
  *  From the definitions    ntpd-opts.def
  *  and the template file   options
  *
- * Generated from AutoOpts 34:0:9 templates.
+ * Generated from AutoOpts 35:0:10 templates.
  *
  *  AutoOpts is a copyrighted work.  This header file is not encumbered
  *  by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -20,6 +20,7 @@
  * ntpd copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved
  *
  * see html/copyright.html
+ * 
  */
 /*
  *  This file contains the programmatic interface to the Automated
@@ -39,7 +40,7 @@
  *  tolerable version is at least as old as what was current when the header
  *  template was released.
  */
-#define AO_TEMPLATE_VERSION 139264
+#define AO_TEMPLATE_VERSION 143360
 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
  || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
 # error option template version mismatches autoopts/options.h header
@@ -89,8 +90,8 @@ typedef enum {
 } teOptIndex;
 
 #define OPTION_CT    36
-#define NTPD_VERSION       "4.2.7p159"
-#define NTPD_FULL_VERSION  "ntpd - NTP daemon program - Ver. 4.2.7p159"
+#define NTPD_VERSION       "4.2.7p160"
+#define NTPD_FULL_VERSION  "ntpd 4.2.7p160"
 
 /*
  *  Interface defines for all options.  Replace "n" with the UPPER_CASED
@@ -121,7 +122,6 @@ typedef enum {
     NTPD_EXIT_SUCCESS = 0,
     NTPD_EXIT_FAILURE = 1
 } ntpd_exit_code_t;
-
 /*
  *  Make sure there are no #define name conflicts with the option names
  */
@@ -352,17 +352,17 @@ typedef enum {
                 ntpdOptions.pzCurOpt  = NULL)
 #define START_OPT       RESTART_OPT(1)
 #define USAGE(c)        (*ntpdOptions.pUsageProc)(&ntpdOptions, c)
-/* extracted from opthead.tlib near line 435 */
+/* extracted from opthead.tlib near line 451 */
 
-/* * * * * *
- *
- *  Declare the ntpd option descriptor.
- */
 #ifdef  __cplusplus
 extern "C" {
 #endif
 
-extern tOptions   ntpdOptions;
+/* * * * * *
+ *
+ *  Declare the ntpd option descriptor.
+ */
+extern tOptions ntpdOptions;
 
 #if defined(ENABLE_NLS)
 # ifndef _
index 4d8f48beb33c08d7af2f8baf1690c290e1708b8e..7fa2dd02bdddc2114b3e5ad3493cce4d6a4ac094 100644 (file)
@@ -6,7 +6,7 @@
 # 
 # EDIT THIS FILE WITH CAUTION  (ntpd-opts.texi)
 # 
-# It has been AutoGen-ed  April 28, 2011 at 06:46:56 AM by AutoGen 5.11.6
+# It has been AutoGen-ed  May  1, 2011 at 04:28:25 AM by AutoGen 5.11.9pre8
 # From the definitions    ntpd-opts.def
 # and the template file   aginfo.tpl
 @end ignore
@@ -64,7 +64,7 @@ This is the automatically generated usage text for ntpd:
 
 @exampleindent 0
 @example
-ntpd - NTP daemon program - Ver. 4.2.7p159
+ntpd - NTP daemon program - Ver. 4.2.7p160
 USAGE:  ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
                 [ <server1> ... <serverN> ]
   Flg Arg Option-Name    Description
index 982dc41f26c57ddf1549e5f03084c47c8c4a3408..640d97f2bc7ddb375b858e1cd15d1f404c36f5a5 100644 (file)
@@ -1,7 +1,7 @@
-.TH NTPD 1 2011-04-28 "( 4.2.7p159)" "Programmer's Manual"
+.TH NTPD 1 2011-05-01 "( 4.2.7p160)" "Programmer's Manual"
 .\"  EDIT THIS FILE WITH CAUTION  (ntpd.1)
 .\"  
-.\"  It has been AutoGen-ed  April 28, 2011 at 06:46:56 AM by AutoGen 5.11.6
+.\"  It has been AutoGen-ed  May  1, 2011 at 08:14:09 AM by AutoGen 5.11.9pre8
 .\"  From the definitions    ntpd-opts.def
 .\"  and the template file   agman1.tpl
 .\"
@@ -354,6 +354,7 @@ Please send bug reports to:  http://bugs.ntp.org, bugs@ntp.org
 .nf
 .na
 see html/copyright.html
+
 .fi
 .ad
 .PP
index 1f491933552b4d5463eff658d4f55a32d781f3c8..cc1dc8865ed8c4da76e16db3f98cd2f398d5b014 100644 (file)
@@ -1,11 +1,11 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpdc-opts.c)
  *  
- *  It has been AutoGen-ed  April 28, 2011 at 06:47:02 AM by AutoGen 5.11.6
+ *  It has been AutoGen-ed  May  1, 2011 at 04:28:32 AM by AutoGen 5.11.9pre8
  *  From the definitions    ntpdc-opts.def
  *  and the template file   options
  *
- * Generated from AutoOpts 34:0:9 templates.
+ * Generated from AutoOpts 35:0:10 templates.
  *
  *  AutoOpts is a copyrighted work.  This source file is not encumbered
  *  by AutoOpts licensing, but is provided under the licensing terms chosen
  * ntpdc copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved
  *
  * see html/copyright.html
+ * 
  */
 
 #include <sys/types.h>
+
 #include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
 #ifdef  __cplusplus
 extern "C" {
 #endif
+extern FILE * option_usage_fp;
 
 /* TRANSLATORS: choose the translation for option names wisely because you
                 cannot ever change your mind. */
-tSCC zCopyright[] =
-       "ntpdc copyright (c) 1970-2011 David L. Mills and/or others, all rights reserved"
-/* extracted from copyright.def near line 8 */
-;
-tSCC zCopyrightNotice[24] =
-"see html/copyright.html";
+static char const zCopyright[41] =
+"ntpdc 4.2.7p160\n\
+see html/copyright.html\n";
+static char const zCopyrightNotice[25] =
+"see html/copyright.html\n";
 
 extern tUsageProc optionUsage;
 
@@ -57,12 +59,6 @@ extern tUsageProc optionUsage;
 #ifndef NULL
 #  define NULL 0
 #endif
-#ifndef EXIT_SUCCESS
-#  define  EXIT_SUCCESS 0
-#endif
-#ifndef EXIT_FAILURE
-#  define  EXIT_FAILURE 1
-#endif
 
 /*
  *  Ipv4 option description with
@@ -237,8 +233,8 @@ static tOptProc
 extern tOptProc
     optionBooleanVal,    optionNestedVal,     optionNumericVal,
     optionPagedUsage,    optionPrintVersion,  optionResetOpt,
-    optionStackArg,      optionTimeVal,       optionUnstackArg,
-    optionVersionStderr;
+    optionStackArg,      optionTimeDate,      optionTimeVal,
+    optionUnstackArg,    optionVersionStderr;
 static tOptProc
     doOptSet_Debug_Level, doUsageOpt;
 
@@ -259,7 +255,7 @@ static tOptProc
  *
  *  Define the Ntpdc Option Descriptions.
  */
-static tOptDesc optDesc[ OPTION_CT ] = {
+static tOptDesc optDesc[OPTION_CT] = {
   {  /* entry idx, value */ 0, VALUE_OPT_IPV4,
      /* equiv idx, value */ 0, VALUE_OPT_IPV4,
      /* equivalenced to  */ NO_EQUIVALENT,
@@ -451,7 +447,7 @@ static tOptDesc optDesc[ OPTION_CT ] = {
  */
 static char const zPROGNAME[6] = "NTPDC";
 static char const zUsageTitle[129] =
-"ntpdc - vendor-specific NTP query program - Ver. 4.2.7p159\n\
+"ntpdc - vendor-specific NTP query program - Ver. 4.2.7p160\n\
 USAGE:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n";
 static char const zRcName[7] = ".ntprc";
 static char const * const apzHomeList[3] = {
@@ -472,7 +468,7 @@ configuration options which can be specified at startup using ntpd's\n\
 configuration file may also be specified at run time using [= prog-name =]\n\
 .\n";
 static char const zFullVersion[] = NTPDC_FULL_VERSION;
-/* extracted from optcode.tlib near line 504 */
+/* extracted from optcode.tlib near line 515 */
 
 #if defined(ENABLE_NLS)
 # define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -542,12 +538,10 @@ tOptions ntpdcOptions = {
  *  Create the static procedure(s) declared above.
  */
 static void
-doUsageOpt(
-    tOptions*   pOptions,
-    tOptDesc*   pOptDesc )
+doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
 {
     (void)pOptions;
-    USAGE(EXIT_SUCCESS);
+    USAGE(NTPDC_EXIT_SUCCESS);
 }
 
 #if ! defined(TEST_NTPDC_OPTS)
@@ -563,16 +557,16 @@ doOptSet_Debug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
 DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
 }
 #endif /* defined(TEST_NTPDC_OPTS) */
-/* extracted from optmain.tlib near line 107 */
+/* extracted from optmain.tlib near line 128 */
 
 #if defined(TEST_NTPDC_OPTS) /* TEST MAIN PROCEDURE: */
 
 extern void optionPutShell(tOptions*);
 
 int
-main(int argc, char** argv)
+main(int argc, char ** argv)
 {
-    int res = EXIT_SUCCESS;
+    int res = NTPDC_EXIT_SUCCESS;
     (void)optionProcess(&ntpdcOptions, argc, argv);
     optionPutShell(&ntpdcOptions);
     res = ferror(stdout);
@@ -581,7 +575,7 @@ main(int argc, char** argv)
     return res;
 }
 #endif  /* defined TEST_NTPDC_OPTS */
-/* extracted from optcode.tlib near line 657 */
+/* extracted from optcode.tlib near line 666 */
 
 #if ENABLE_NLS
 #include <stdio.h>
@@ -605,14 +599,13 @@ AO_gettext(char const* pz)
     pzRes = strdup(pzRes);
     if (pzRes == NULL) {
         fputs(_("No memory for duping translated strings\n"), stderr);
-        exit(EXIT_FAILURE);
+        exit(NTPDC_EXIT_FAILURE);
     }
     return pzRes;
 }
 
-static void coerce_it(void** s) { *s = AO_gettext(*s); }
-#define COERSION(_f) \
-  coerce_it((void*)&(ntpdcOptions._f))
+static void coerce_it(void** s) { *s = AO_gettext(*s);
+}
 
 /*
  *  This invokes the translation code (e.g. gettext(3)).
@@ -620,6 +613,8 @@ static void coerce_it(void** s) { *s = AO_gettext(*s); }
 static void
 translate_option_strings(void)
 {
+    tOptions * const pOpt = &ntpdcOptions;
+
     /*
      *  Guard against re-translation.  It won't work.  The strings will have
      *  been changed by the first pass through this code.  One shot only.
@@ -629,33 +624,33 @@ translate_option_strings(void)
          *  Do the translations.  The first pointer follows the field count
          *  field.  The field count field is the size of a pointer.
          */
-        tOptDesc* pOD = ntpdcOptions.pOptDesc;
-        char**    ppz = (char**)(void*)&(option_usage_text);
-        int       ix  = option_usage_text.field_ct;
+        tOptDesc * pOD = pOpt->pOptDesc;
+        char **    ppz = (char**)(void*)&(option_usage_text);
+        int        ix  = option_usage_text.field_ct;
 
         do {
             ppz++;
             *ppz = AO_gettext(*ppz);
         } while (--ix > 0);
 
-        COERSION(pzCopyright);
-        COERSION(pzCopyNotice);
-        COERSION(pzFullVersion);
-        COERSION(pzUsageTitle);
-        COERSION(pzExplain);
-        COERSION(pzDetail);
-        COERSION(pzPackager);
+        coerce_it((void*)&(pOpt->pzCopyright));
+        coerce_it((void*)&(pOpt->pzCopyNotice));
+        coerce_it((void*)&(pOpt->pzFullVersion));
+        coerce_it((void*)&(pOpt->pzUsageTitle));
+        coerce_it((void*)&(pOpt->pzExplain));
+        coerce_it((void*)&(pOpt->pzDetail));
+        coerce_it((void*)&(pOpt->pzPackager));
         option_usage_text.field_ct = 0;
 
-        for (ix = ntpdcOptions.optCt; ix > 0; ix--, pOD++)
+        for (ix = pOpt->optCt; ix > 0; ix--, pOD++)
             coerce_it((void*)&(pOD->pzText));
     }
 
-    if ((ntpdcOptions.fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
-        tOptDesc* pOD = ntpdcOptions.pOptDesc;
-        int       ix;
+    if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
+        tOptDesc * pOD = pOpt->pOptDesc;
+        int        ix;
 
-        for (ix = ntpdcOptions.optCt; ix > 0; ix--, pOD++) {
+        for (ix = pOpt->optCt; ix > 0; ix--, pOD++) {
             coerce_it((void*)&(pOD->pz_Name));
             coerce_it((void*)&(pOD->pz_DisableName));
             coerce_it((void*)&(pOD->pz_DisablePfx));
index 782c1fa993aedae881868be16dfcf5f34d51c43e..63563df6a2ae02e389b9c15c1251fd4529b594ab 100644 (file)
@@ -1,11 +1,11 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpdc-opts.h)
  *  
- *  It has been AutoGen-ed  April 28, 2011 at 06:47:02 AM by AutoGen 5.11.6
+ *  It has been AutoGen-ed  May  1, 2011 at 04:28:32 AM by AutoGen 5.11.9pre8
  *  From the definitions    ntpdc-opts.def
  *  and the template file   options
  *
- * Generated from AutoOpts 34:0:9 templates.
+ * Generated from AutoOpts 35:0:10 templates.
  *
  *  AutoOpts is a copyrighted work.  This header file is not encumbered
  *  by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -20,6 +20,7 @@
  * ntpdc copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved
  *
  * see html/copyright.html
+ * 
  */
 /*
  *  This file contains the programmatic interface to the Automated
@@ -39,7 +40,7 @@
  *  tolerable version is at least as old as what was current when the header
  *  template was released.
  */
-#define AO_TEMPLATE_VERSION 139264
+#define AO_TEMPLATE_VERSION 143360
 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
  || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
 # error option template version mismatches autoopts/options.h header
@@ -68,8 +69,8 @@ typedef enum {
 } teOptIndex;
 
 #define OPTION_CT    15
-#define NTPDC_VERSION       "4.2.7p159"
-#define NTPDC_FULL_VERSION  "ntpdc - vendor-specific NTP query program - Ver. 4.2.7p159"
+#define NTPDC_VERSION       "4.2.7p160"
+#define NTPDC_FULL_VERSION  "ntpdc 4.2.7p160"
 
 /*
  *  Interface defines for all options.  Replace "n" with the UPPER_CASED
@@ -100,7 +101,6 @@ typedef enum {
     NTPDC_EXIT_SUCCESS = 0,
     NTPDC_EXIT_FAILURE = 1
 } ntpdc_exit_code_t;
-
 /*
  *  Make sure there are no #define name conflicts with the option names
  */
@@ -191,17 +191,17 @@ typedef enum {
                 ntpdcOptions.pzCurOpt  = NULL)
 #define START_OPT       RESTART_OPT(1)
 #define USAGE(c)        (*ntpdcOptions.pUsageProc)(&ntpdcOptions, c)
-/* extracted from opthead.tlib near line 435 */
+/* extracted from opthead.tlib near line 451 */
 
-/* * * * * *
- *
- *  Declare the ntpdc option descriptor.
- */
 #ifdef  __cplusplus
 extern "C" {
 #endif
 
-extern tOptions   ntpdcOptions;
+/* * * * * *
+ *
+ *  Declare the ntpdc option descriptor.
+ */
+extern tOptions ntpdcOptions;
 
 #if defined(ENABLE_NLS)
 # ifndef _
index 3c35368ba59fc82f537eba839297539e2d4b8f5a..da221a63ad11a85e708884f5dedb7d9b4a17d717 100644 (file)
@@ -6,7 +6,7 @@
 # 
 # EDIT THIS FILE WITH CAUTION  (ntpdc-opts.texi)
 # 
-# It has been AutoGen-ed  April 28, 2011 at 06:47:12 AM by AutoGen 5.11.6
+# It has been AutoGen-ed  May  1, 2011 at 04:28:41 AM by AutoGen 5.11.9pre8
 # From the definitions    ntpdc-opts.def
 # and the template file   aginfo.tpl
 @end ignore
@@ -58,7 +58,7 @@ This is the automatically generated usage text for ntpdc:
 
 @exampleindent 0
 @example
-ntpdc - vendor-specific NTP query program - Ver. 4.2.7p159
+ntpdc - vendor-specific NTP query program - Ver. 4.2.7p160
 USAGE:  ntpdc [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
   Flg Arg Option-Name    Description
    -4 no  ipv4           Force IPv4 DNS name resolution
index f0fd95a01a82a69b026e8058878f9b48a3e7a83c..3b5edf20e3368dd75aab3d1c50d7756ad875bd8e 100644 (file)
@@ -1,7 +1,7 @@
-.TH NTPDC 1 2011-04-28 "( 4.2.7p159)" "Programmer's Manual"
+.TH NTPDC 1 2011-05-01 "( 4.2.7p160)" "Programmer's Manual"
 .\"  EDIT THIS FILE WITH CAUTION  (ntpdc.1)
 .\"  
-.\"  It has been AutoGen-ed  April 28, 2011 at 06:47:11 AM by AutoGen 5.11.6
+.\"  It has been AutoGen-ed  May  1, 2011 at 04:28:41 AM by AutoGen 5.11.9pre8
 .\"  From the definitions    ntpdc-opts.def
 .\"  and the template file   agman1.tpl
 .\"
@@ -153,6 +153,7 @@ Please send bug reports to:  http://bugs.ntp.org, bugs@ntp.org
 .nf
 .na
 see html/copyright.html
+
 .fi
 .ad
 .PP
index 90a8834f0668ad5235ffff20957fa4b7cda2d2ad..f5ab4339f52d106f3d38634fffcc5e0b8bd40944 100644 (file)
@@ -1,11 +1,11 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpq-opts.c)
  *  
- *  It has been AutoGen-ed  April 28, 2011 at 06:47:12 AM by AutoGen 5.11.6
+ *  It has been AutoGen-ed  May  1, 2011 at 04:28:42 AM by AutoGen 5.11.9pre8
  *  From the definitions    ntpq-opts.def
  *  and the template file   options
  *
- * Generated from AutoOpts 34:0:9 templates.
+ * Generated from AutoOpts 35:0:10 templates.
  *
  *  AutoOpts is a copyrighted work.  This source file is not encumbered
  *  by AutoOpts licensing, but is provided under the licensing terms chosen
  * ntpq copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved
  *
  * see html/copyright.html
+ * 
  */
 
 #include <sys/types.h>
+
 #include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
 #ifdef  __cplusplus
 extern "C" {
 #endif
+extern FILE * option_usage_fp;
 
 /* TRANSLATORS: choose the translation for option names wisely because you
                 cannot ever change your mind. */
-tSCC zCopyright[] =
-       "ntpq copyright (c) 1970-2011 David L. Mills and/or others, all rights reserved"
-/* extracted from copyright.def near line 8 */
-;
-tSCC zCopyrightNotice[24] =
-"see html/copyright.html";
+static char const zCopyright[40] =
+"ntpq 4.2.7p160\n\
+see html/copyright.html\n";
+static char const zCopyrightNotice[25] =
+"see html/copyright.html\n";
 
 extern tUsageProc optionUsage;
 
@@ -57,12 +59,6 @@ extern tUsageProc optionUsage;
 #ifndef NULL
 #  define NULL 0
 #endif
-#ifndef EXIT_SUCCESS
-#  define  EXIT_SUCCESS 0
-#endif
-#ifndef EXIT_FAILURE
-#  define  EXIT_FAILURE 1
-#endif
 
 /*
  *  Ipv4 option description with
@@ -222,8 +218,8 @@ static tOptProc
 extern tOptProc
     ntpq_custom_opt_handler, optionBooleanVal,        optionNestedVal,
     optionNumericVal,        optionPagedUsage,        optionPrintVersion,
-    optionResetOpt,          optionStackArg,          optionTimeVal,
-    optionUnstackArg,        optionVersionStderr;
+    optionResetOpt,          optionStackArg,          optionTimeDate,
+    optionTimeVal,           optionUnstackArg,        optionVersionStderr;
 static tOptProc
     doOptSet_Debug_Level, doUsageOpt;
 
@@ -248,7 +244,7 @@ static tOptProc
  *
  *  Define the Ntpq Option Descriptions.
  */
-static tOptDesc optDesc[ OPTION_CT ] = {
+static tOptDesc optDesc[OPTION_CT] = {
   {  /* entry idx, value */ 0, VALUE_OPT_IPV4,
      /* equiv idx, value */ 0, VALUE_OPT_IPV4,
      /* equivalenced to  */ NO_EQUIVALENT,
@@ -428,7 +424,7 @@ static tOptDesc optDesc[ OPTION_CT ] = {
  */
 static char const zPROGNAME[5] = "NTPQ";
 static char const zUsageTitle[121] =
-"ntpq - standard NTP query program - Ver. 4.2.7p159\n\
+"ntpq - standard NTP query program - Ver. 4.2.7p160\n\
 USAGE:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n";
 static char const zRcName[7] = ".ntprc";
 static char const * const apzHomeList[3] = {
@@ -446,7 +442,7 @@ about current state and/or changes in that state.  The same formats are\n\
 used in NTPv4, although some of the variables have changed and new ones\n\
 added.\n";
 static char const zFullVersion[] = NTPQ_FULL_VERSION;
-/* extracted from optcode.tlib near line 504 */
+/* extracted from optcode.tlib near line 515 */
 
 #if defined(ENABLE_NLS)
 # define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -516,12 +512,10 @@ tOptions ntpqOptions = {
  *  Create the static procedure(s) declared above.
  */
 static void
-doUsageOpt(
-    tOptions*   pOptions,
-    tOptDesc*   pOptDesc )
+doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
 {
     (void)pOptions;
-    USAGE(EXIT_SUCCESS);
+    USAGE(NTPQ_EXIT_SUCCESS);
 }
 
 #if ! defined(TEST_NTPQ_OPTS)
@@ -537,16 +531,16 @@ doOptSet_Debug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
 DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
 }
 #endif /* defined(TEST_NTPQ_OPTS) */
-/* extracted from optmain.tlib near line 107 */
+/* extracted from optmain.tlib near line 128 */
 
 #if defined(TEST_NTPQ_OPTS) /* TEST MAIN PROCEDURE: */
 
 extern void optionPutShell(tOptions*);
 
 int
-main(int argc, char** argv)
+main(int argc, char ** argv)
 {
-    int res = EXIT_SUCCESS;
+    int res = NTPQ_EXIT_SUCCESS;
     (void)optionProcess(&ntpqOptions, argc, argv);
     optionPutShell(&ntpqOptions);
     res = ferror(stdout);
@@ -555,7 +549,7 @@ main(int argc, char** argv)
     return res;
 }
 #endif  /* defined TEST_NTPQ_OPTS */
-/* extracted from optcode.tlib near line 657 */
+/* extracted from optcode.tlib near line 666 */
 
 #if ENABLE_NLS
 #include <stdio.h>
@@ -579,14 +573,13 @@ AO_gettext(char const* pz)
     pzRes = strdup(pzRes);
     if (pzRes == NULL) {
         fputs(_("No memory for duping translated strings\n"), stderr);
-        exit(EXIT_FAILURE);
+        exit(NTPQ_EXIT_FAILURE);
     }
     return pzRes;
 }
 
-static void coerce_it(void** s) { *s = AO_gettext(*s); }
-#define COERSION(_f) \
-  coerce_it((void*)&(ntpqOptions._f))
+static void coerce_it(void** s) { *s = AO_gettext(*s);
+}
 
 /*
  *  This invokes the translation code (e.g. gettext(3)).
@@ -594,6 +587,8 @@ static void coerce_it(void** s) { *s = AO_gettext(*s); }
 static void
 translate_option_strings(void)
 {
+    tOptions * const pOpt = &ntpqOptions;
+
     /*
      *  Guard against re-translation.  It won't work.  The strings will have
      *  been changed by the first pass through this code.  One shot only.
@@ -603,33 +598,33 @@ translate_option_strings(void)
          *  Do the translations.  The first pointer follows the field count
          *  field.  The field count field is the size of a pointer.
          */
-        tOptDesc* pOD = ntpqOptions.pOptDesc;
-        char**    ppz = (char**)(void*)&(option_usage_text);
-        int       ix  = option_usage_text.field_ct;
+        tOptDesc * pOD = pOpt->pOptDesc;
+        char **    ppz = (char**)(void*)&(option_usage_text);
+        int        ix  = option_usage_text.field_ct;
 
         do {
             ppz++;
             *ppz = AO_gettext(*ppz);
         } while (--ix > 0);
 
-        COERSION(pzCopyright);
-        COERSION(pzCopyNotice);
-        COERSION(pzFullVersion);
-        COERSION(pzUsageTitle);
-        COERSION(pzExplain);
-        COERSION(pzDetail);
-        COERSION(pzPackager);
+        coerce_it((void*)&(pOpt->pzCopyright));
+        coerce_it((void*)&(pOpt->pzCopyNotice));
+        coerce_it((void*)&(pOpt->pzFullVersion));
+        coerce_it((void*)&(pOpt->pzUsageTitle));
+        coerce_it((void*)&(pOpt->pzExplain));
+        coerce_it((void*)&(pOpt->pzDetail));
+        coerce_it((void*)&(pOpt->pzPackager));
         option_usage_text.field_ct = 0;
 
-        for (ix = ntpqOptions.optCt; ix > 0; ix--, pOD++)
+        for (ix = pOpt->optCt; ix > 0; ix--, pOD++)
             coerce_it((void*)&(pOD->pzText));
     }
 
-    if ((ntpqOptions.fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
-        tOptDesc* pOD = ntpqOptions.pOptDesc;
-        int       ix;
+    if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
+        tOptDesc * pOD = pOpt->pOptDesc;
+        int        ix;
 
-        for (ix = ntpqOptions.optCt; ix > 0; ix--, pOD++) {
+        for (ix = pOpt->optCt; ix > 0; ix--, pOD++) {
             coerce_it((void*)&(pOD->pz_Name));
             coerce_it((void*)&(pOD->pz_DisableName));
             coerce_it((void*)&(pOD->pz_DisablePfx));
index 4703c45eafef0f6ed08cb672a44e43f1ad0607f3..7c9d7a3ed6c6fd284fe497675acf82af0ba94151 100644 (file)
@@ -1,11 +1,11 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpq-opts.h)
  *  
- *  It has been AutoGen-ed  April 28, 2011 at 06:47:12 AM by AutoGen 5.11.6
+ *  It has been AutoGen-ed  May  1, 2011 at 04:28:41 AM by AutoGen 5.11.9pre8
  *  From the definitions    ntpq-opts.def
  *  and the template file   options
  *
- * Generated from AutoOpts 34:0:9 templates.
+ * Generated from AutoOpts 35:0:10 templates.
  *
  *  AutoOpts is a copyrighted work.  This header file is not encumbered
  *  by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -20,6 +20,7 @@
  * ntpq copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved
  *
  * see html/copyright.html
+ * 
  */
 /*
  *  This file contains the programmatic interface to the Automated
@@ -39,7 +40,7 @@
  *  tolerable version is at least as old as what was current when the header
  *  template was released.
  */
-#define AO_TEMPLATE_VERSION 139264
+#define AO_TEMPLATE_VERSION 143360
 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
  || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
 # error option template version mismatches autoopts/options.h header
@@ -67,8 +68,8 @@ typedef enum {
 } teOptIndex;
 
 #define OPTION_CT    14
-#define NTPQ_VERSION       "4.2.7p159"
-#define NTPQ_FULL_VERSION  "ntpq - standard NTP query program - Ver. 4.2.7p159"
+#define NTPQ_VERSION       "4.2.7p160"
+#define NTPQ_FULL_VERSION  "ntpq 4.2.7p160"
 
 /*
  *  Interface defines for all options.  Replace "n" with the UPPER_CASED
@@ -99,7 +100,6 @@ typedef enum {
     NTPQ_EXIT_SUCCESS = 0,
     NTPQ_EXIT_FAILURE = 1
 } ntpq_exit_code_t;
-
 /*
  *  Make sure there are no #define name conflicts with the option names
  */
@@ -184,17 +184,17 @@ typedef enum {
                 ntpqOptions.pzCurOpt  = NULL)
 #define START_OPT       RESTART_OPT(1)
 #define USAGE(c)        (*ntpqOptions.pUsageProc)(&ntpqOptions, c)
-/* extracted from opthead.tlib near line 435 */
+/* extracted from opthead.tlib near line 451 */
 
-/* * * * * *
- *
- *  Declare the ntpq option descriptor.
- */
 #ifdef  __cplusplus
 extern "C" {
 #endif
 
-extern tOptions   ntpqOptions;
+/* * * * * *
+ *
+ *  Declare the ntpq option descriptor.
+ */
+extern tOptions ntpqOptions;
 
 #if defined(ENABLE_NLS)
 # ifndef _
index 7e9dabe80a5fdf331405e26efe9d650594b1f8d0..68543f07f1a8fcc876f80a9bdbe3d79774b25a8e 100644 (file)
@@ -6,7 +6,7 @@
 # 
 # EDIT THIS FILE WITH CAUTION  (ntpq-opts.texi)
 # 
-# It has been AutoGen-ed  April 28, 2011 at 06:47:23 AM by AutoGen 5.11.6
+# It has been AutoGen-ed  May  1, 2011 at 04:29:04 AM by AutoGen 5.11.9pre8
 # From the definitions    ntpq-opts.def
 # and the template file   aginfo.tpl
 @end ignore
@@ -47,7 +47,7 @@ This is the automatically generated usage text for ntpq:
 
 @exampleindent 0
 @example
-ntpq - standard NTP query program - Ver. 4.2.7p159
+ntpq - standard NTP query program - Ver. 4.2.7p160
 USAGE:  ntpq [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
   Flg Arg Option-Name    Description
    -4 no  ipv4           Force IPv4 DNS name resolution
index c6737c2517c8129aed62bb9a12b3d4c504b12ccf..199e5e799fdb2cfec4c77942db0ad2778de7a039 100644 (file)
@@ -1,7 +1,7 @@
-.TH NTPQ 1 2011-04-28 "( 4.2.7p159)" "Programmer's Manual"
+.TH NTPQ 1 2011-05-01 "( 4.2.7p160)" "Programmer's Manual"
 .\"  EDIT THIS FILE WITH CAUTION  (ntpq.1)
 .\"  
-.\"  It has been AutoGen-ed  April 28, 2011 at 06:47:23 AM by AutoGen 5.11.6
+.\"  It has been AutoGen-ed  May  1, 2011 at 04:29:03 AM by AutoGen 5.11.9pre8
 .\"  From the definitions    ntpq-opts.def
 .\"  and the template file   agman1.tpl
 .\"
@@ -391,6 +391,7 @@ Please send bug reports to:  http://bugs.ntp.org, bugs@ntp.org
 .nf
 .na
 see html/copyright.html
+
 .fi
 .ad
 .PP
index a1770193f9b16868f045cdc760da9d9514586308..f1b1c2ec6c88f1128265dd3ed0e444d98f34c00e 100644 (file)
@@ -1,11 +1,11 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpsnmpd-opts.c)
  *  
- *  It has been AutoGen-ed  April 28, 2011 at 06:47:24 AM by AutoGen 5.11.6
+ *  It has been AutoGen-ed  May  1, 2011 at 04:29:04 AM by AutoGen 5.11.9pre8
  *  From the definitions    ntpsnmpd-opts.def
  *  and the template file   options
  *
- * Generated from AutoOpts 34:0:9 templates.
+ * Generated from AutoOpts 35:0:10 templates.
  *
  *  AutoOpts is a copyrighted work.  This source file is not encumbered
  *  by AutoOpts licensing, but is provided under the licensing terms chosen
  * ntpsnmpd copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved
  *
  * see html/copyright.html
+ * 
  */
 
 #include <sys/types.h>
+
 #include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
 #ifdef  __cplusplus
 extern "C" {
 #endif
+extern FILE * option_usage_fp;
 
 /* TRANSLATORS: choose the translation for option names wisely because you
                 cannot ever change your mind. */
-tSCC zCopyright[] =
-       "ntpsnmpd copyright (c) 1970-2011 David L. Mills and/or others, all rights reserved"
-/* extracted from copyright.def near line 8 */
-;
-tSCC zCopyrightNotice[24] =
-"see html/copyright.html";
+static char const zCopyright[44] =
+"ntpsnmpd 4.2.7p160\n\
+see html/copyright.html\n";
+static char const zCopyrightNotice[25] =
+"see html/copyright.html\n";
 
 extern tUsageProc optionUsage;
 
 #ifndef NULL
 #  define NULL 0
 #endif
-#ifndef EXIT_SUCCESS
-#  define  EXIT_SUCCESS 0
-#endif
-#ifndef EXIT_FAILURE
-#  define  EXIT_FAILURE 1
-#endif
 
 /*
  *  Nofork option description:
@@ -132,8 +128,8 @@ static tOptProc
 extern tOptProc
     optionBooleanVal,    optionNestedVal,     optionNumericVal,
     optionPagedUsage,    optionPrintVersion,  optionResetOpt,
-    optionStackArg,      optionTimeVal,       optionUnstackArg,
-    optionVersionStderr;
+    optionStackArg,      optionTimeDate,      optionTimeVal,
+    optionUnstackArg,    optionVersionStderr;
 static tOptProc
     doUsageOpt;
 #endif /* defined(TEST_NTPSNMPD_OPTS) */
@@ -147,7 +143,7 @@ static tOptProc
  *
  *  Define the Ntpsnmpd Option Descriptions.
  */
-static tOptDesc optDesc[ OPTION_CT ] = {
+static tOptDesc optDesc[OPTION_CT] = {
   {  /* entry idx, value */ 0, VALUE_OPT_NOFORK,
      /* equiv idx, value */ 0, VALUE_OPT_NOFORK,
      /* equivalenced to  */ NO_EQUIVALENT,
@@ -255,7 +251,7 @@ static tOptDesc optDesc[ OPTION_CT ] = {
  */
 static char const zPROGNAME[9] = "NTPSNMPD";
 static char const zUsageTitle[105] =
-"ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.7p159\n\
+"ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.7p160\n\
 USAGE:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n";
 static char const zRcName[7] = ".ntprc";
 static char const * const apzHomeList[3] = {
@@ -267,7 +263,7 @@ static char const zBugsAddr[34]    = "http://bugs.ntp.org, bugs@ntp.org";
 #define zExplain NULL
 #define zDetail         NULL
 static char const zFullVersion[] = NTPSNMPD_FULL_VERSION;
-/* extracted from optcode.tlib near line 504 */
+/* extracted from optcode.tlib near line 515 */
 
 #if defined(ENABLE_NLS)
 # define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -338,23 +334,21 @@ tOptions ntpsnmpdOptions = {
  *  Create the static procedure(s) declared above.
  */
 static void
-doUsageOpt(
-    tOptions*   pOptions,
-    tOptDesc*   pOptDesc )
+doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
 {
     (void)pOptions;
-    USAGE(EXIT_SUCCESS);
+    USAGE(NTPSNMPD_EXIT_SUCCESS);
 }
-/* extracted from optmain.tlib near line 107 */
+/* extracted from optmain.tlib near line 128 */
 
 #if defined(TEST_NTPSNMPD_OPTS) /* TEST MAIN PROCEDURE: */
 
 extern void optionPutShell(tOptions*);
 
 int
-main(int argc, char** argv)
+main(int argc, char ** argv)
 {
-    int res = EXIT_SUCCESS;
+    int res = NTPSNMPD_EXIT_SUCCESS;
     (void)optionProcess(&ntpsnmpdOptions, argc, argv);
     optionPutShell(&ntpsnmpdOptions);
     res = ferror(stdout);
@@ -363,7 +357,7 @@ main(int argc, char** argv)
     return res;
 }
 #endif  /* defined TEST_NTPSNMPD_OPTS */
-/* extracted from optcode.tlib near line 657 */
+/* extracted from optcode.tlib near line 666 */
 
 #if ENABLE_NLS
 #include <stdio.h>
@@ -387,14 +381,13 @@ AO_gettext(char const* pz)
     pzRes = strdup(pzRes);
     if (pzRes == NULL) {
         fputs(_("No memory for duping translated strings\n"), stderr);
-        exit(EXIT_FAILURE);
+        exit(NTPSNMPD_EXIT_FAILURE);
     }
     return pzRes;
 }
 
-static void coerce_it(void** s) { *s = AO_gettext(*s); }
-#define COERSION(_f) \
-  coerce_it((void*)&(ntpsnmpdOptions._f))
+static void coerce_it(void** s) { *s = AO_gettext(*s);
+}
 
 /*
  *  This invokes the translation code (e.g. gettext(3)).
@@ -402,6 +395,8 @@ static void coerce_it(void** s) { *s = AO_gettext(*s); }
 static void
 translate_option_strings(void)
 {
+    tOptions * const pOpt = &ntpsnmpdOptions;
+
     /*
      *  Guard against re-translation.  It won't work.  The strings will have
      *  been changed by the first pass through this code.  One shot only.
@@ -411,33 +406,33 @@ translate_option_strings(void)
          *  Do the translations.  The first pointer follows the field count
          *  field.  The field count field is the size of a pointer.
          */
-        tOptDesc* pOD = ntpsnmpdOptions.pOptDesc;
-        char**    ppz = (char**)(void*)&(option_usage_text);
-        int       ix  = option_usage_text.field_ct;
+        tOptDesc * pOD = pOpt->pOptDesc;
+        char **    ppz = (char**)(void*)&(option_usage_text);
+        int        ix  = option_usage_text.field_ct;
 
         do {
             ppz++;
             *ppz = AO_gettext(*ppz);
         } while (--ix > 0);
 
-        COERSION(pzCopyright);
-        COERSION(pzCopyNotice);
-        COERSION(pzFullVersion);
-        COERSION(pzUsageTitle);
-        COERSION(pzExplain);
-        COERSION(pzDetail);
-        COERSION(pzPackager);
+        coerce_it((void*)&(pOpt->pzCopyright));
+        coerce_it((void*)&(pOpt->pzCopyNotice));
+        coerce_it((void*)&(pOpt->pzFullVersion));
+        coerce_it((void*)&(pOpt->pzUsageTitle));
+        coerce_it((void*)&(pOpt->pzExplain));
+        coerce_it((void*)&(pOpt->pzDetail));
+        coerce_it((void*)&(pOpt->pzPackager));
         option_usage_text.field_ct = 0;
 
-        for (ix = ntpsnmpdOptions.optCt; ix > 0; ix--, pOD++)
+        for (ix = pOpt->optCt; ix > 0; ix--, pOD++)
             coerce_it((void*)&(pOD->pzText));
     }
 
-    if ((ntpsnmpdOptions.fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
-        tOptDesc* pOD = ntpsnmpdOptions.pOptDesc;
-        int       ix;
+    if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
+        tOptDesc * pOD = pOpt->pOptDesc;
+        int        ix;
 
-        for (ix = ntpsnmpdOptions.optCt; ix > 0; ix--, pOD++) {
+        for (ix = pOpt->optCt; ix > 0; ix--, pOD++) {
             coerce_it((void*)&(pOD->pz_Name));
             coerce_it((void*)&(pOD->pz_DisableName));
             coerce_it((void*)&(pOD->pz_DisablePfx));
index 8275d8f634ac6dc2bbb261b18fac39d765aa46e0..6336af66c3b26a124d098e5536838ba1f2e7bc65 100644 (file)
@@ -1,11 +1,11 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpsnmpd-opts.h)
  *  
- *  It has been AutoGen-ed  April 28, 2011 at 06:47:23 AM by AutoGen 5.11.6
+ *  It has been AutoGen-ed  May  1, 2011 at 04:29:04 AM by AutoGen 5.11.9pre8
  *  From the definitions    ntpsnmpd-opts.def
  *  and the template file   options
  *
- * Generated from AutoOpts 34:0:9 templates.
+ * Generated from AutoOpts 35:0:10 templates.
  *
  *  AutoOpts is a copyrighted work.  This header file is not encumbered
  *  by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -20,6 +20,7 @@
  * ntpsnmpd copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved
  *
  * see html/copyright.html
+ * 
  */
 /*
  *  This file contains the programmatic interface to the Automated
@@ -39,7 +40,7 @@
  *  tolerable version is at least as old as what was current when the header
  *  template was released.
  */
-#define AO_TEMPLATE_VERSION 139264
+#define AO_TEMPLATE_VERSION 143360
 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
  || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
 # error option template version mismatches autoopts/options.h header
@@ -61,8 +62,8 @@ typedef enum {
 } teOptIndex;
 
 #define OPTION_CT    8
-#define NTPSNMPD_VERSION       "4.2.7p159"
-#define NTPSNMPD_FULL_VERSION  "ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.7p159"
+#define NTPSNMPD_VERSION       "4.2.7p160"
+#define NTPSNMPD_FULL_VERSION  "ntpsnmpd 4.2.7p160"
 
 /*
  *  Interface defines for all options.  Replace "n" with the UPPER_CASED
@@ -93,7 +94,6 @@ typedef enum {
     NTPSNMPD_EXIT_SUCCESS = 0,
     NTPSNMPD_EXIT_FAILURE = 1
 } ntpsnmpd_exit_code_t;
-
 /*
  *  Make sure there are no #define name conflicts with the option names
  */
@@ -142,17 +142,17 @@ typedef enum {
                 ntpsnmpdOptions.pzCurOpt  = NULL)
 #define START_OPT       RESTART_OPT(1)
 #define USAGE(c)        (*ntpsnmpdOptions.pUsageProc)(&ntpsnmpdOptions, c)
-/* extracted from opthead.tlib near line 435 */
+/* extracted from opthead.tlib near line 451 */
 
-/* * * * * *
- *
- *  Declare the ntpsnmpd option descriptor.
- */
 #ifdef  __cplusplus
 extern "C" {
 #endif
 
-extern tOptions   ntpsnmpdOptions;
+/* * * * * *
+ *
+ *  Declare the ntpsnmpd option descriptor.
+ */
+extern tOptions ntpsnmpdOptions;
 
 #if defined(ENABLE_NLS)
 # ifndef _
index db378de7d2c285a4a133a832c5bebd5f7c7ba949..7e25268555667399eb809ba717b4b21bf4198c8d 100644 (file)
@@ -6,7 +6,7 @@
 # 
 # EDIT THIS FILE WITH CAUTION  (ntpsnmpd-opts.texi)
 # 
-# It has been AutoGen-ed  April 28, 2011 at 06:47:29 AM by AutoGen 5.11.6
+# It has been AutoGen-ed  May  1, 2011 at 04:29:14 AM by AutoGen 5.11.9pre8
 # From the definitions    ntpsnmpd-opts.def
 # and the template file   aginfo.tpl
 @end ignore
@@ -34,7 +34,7 @@ This is the automatically generated usage text for ntpsnmpd:
 
 @exampleindent 0
 @example
-ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.7p159
+ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.7p160
 USAGE:  ntpsnmpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
   Flg Arg Option-Name    Description
    -n no  nofork         Do not fork
index e9636683e8ca91f73bbe23dba3f4a5e0877485fb..19ce7c95813d8d5a9128c5c9ea1fb20298ea1836 100644 (file)
@@ -1,7 +1,7 @@
-.TH NTPSNMPD 1 2011-04-28 "( 4.2.7p159)" "Programmer's Manual"
+.TH NTPSNMPD 1 2011-05-01 "( 4.2.7p160)" "Programmer's Manual"
 .\"  EDIT THIS FILE WITH CAUTION  (ntpsnmpd.1)
 .\"  
-.\"  It has been AutoGen-ed  April 28, 2011 at 06:47:29 AM by AutoGen 5.11.6
+.\"  It has been AutoGen-ed  May  1, 2011 at 04:29:14 AM by AutoGen 5.11.9pre8
 .\"  From the definitions    ntpsnmpd-opts.def
 .\"  and the template file   agman1.tpl
 .\"
@@ -79,6 +79,7 @@ Please send bug reports to:  http://bugs.ntp.org, bugs@ntp.org
 .nf
 .na
 see html/copyright.html
+
 .fi
 .ad
 .PP
index 8d6eb4c45340d2f750ec8c1f15351406ec0543b3..33dfa0b944eaf86f50f6e3cd1eac03dea635f5b0 100644 (file)
@@ -57,7 +57,7 @@ CLTAG=NTP_4_2_0
 # - Numeric values increment
 # - empty 'increments' to 1
 # - NEW 'increments' to empty
-point=159
+point=160
 
 ### betapoint is normally modified by script.
 # ntp-stable Beta number (betapoint)
index 19cfb27879df33fc5c405b91dd43d68282b212a9..c4292288ba806edb337223655b0bd35d3ca7ed06 100644 (file)
@@ -1,11 +1,11 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (sntp-opts.c)
  *  
- *  It has been AutoGen-ed  April 28, 2011 at 06:44:05 AM by AutoGen 5.11.6
+ *  It has been AutoGen-ed  May  1, 2011 at 08:11:05 AM by AutoGen 5.11.9pre8
  *  From the definitions    sntp-opts.def
  *  and the template file   options
  *
- * Generated from AutoOpts 34:0:9 templates.
+ * Generated from AutoOpts 35:0:10 templates.
  *
  *  AutoOpts is a copyrighted work.  This source file is not encumbered
  *  by AutoOpts licensing, but is provided under the licensing terms chosen
  * sntp copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved
  *
  * see html/copyright.html
+ * 
  */
 
 #include <sys/types.h>
+
 #include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
-extern FILE * option_usage_fp;
 #define OPTION_CODE_COMPILE 1
 #include "sntp-opts.h"
 
 #ifdef  __cplusplus
 extern "C" {
 #endif
+extern FILE * option_usage_fp;
 
 /* TRANSLATORS: choose the translation for option names wisely because you
                 cannot ever change your mind. */
-tSCC zCopyright[] =
-       "sntp copyright (c) 1970-2011 David L. Mills and/or others, all rights reserved"
-/* extracted from copyright.def near line 8 */
-;
-tSCC zCopyrightNotice[24] =
-"see html/copyright.html";
+static char const zCopyright[40] =
+"sntp 4.2.7p160\n\
+see html/copyright.html\n";
+static char const zCopyrightNotice[25] =
+"see html/copyright.html\n";
 
 extern tUsageProc optionUsage;
 
@@ -58,12 +59,6 @@ extern tUsageProc optionUsage;
 #ifndef NULL
 #  define NULL 0
 #endif
-#ifndef EXIT_SUCCESS
-#  define  EXIT_SUCCESS 0
-#endif
-#ifndef EXIT_FAILURE
-#  define  EXIT_FAILURE 1
-#endif
 
 /*
  *  Debug_Level option description:
@@ -318,8 +313,8 @@ static tOptProc
 extern tOptProc
     optionBooleanVal,    optionNestedVal,     optionNumericVal,
     optionPagedUsage,    optionPrintVersion,  optionResetOpt,
-    optionStackArg,      optionTimeVal,       optionUnstackArg,
-    optionVersionStderr;
+    optionStackArg,      optionTimeDate,      optionTimeVal,
+    optionUnstackArg,    optionVersionStderr;
 static tOptProc
     doOptFilelog,         doOptKeyfile,         doOptKod,
     doOptNtpversion,      doOptSet_Debug_Level, doOptSteplimit,
@@ -342,7 +337,7 @@ static tOptProc
  *
  *  Define the Sntp Option Descriptions.
  */
-static tOptDesc optDesc[ OPTION_CT ] = {
+static tOptDesc optDesc[OPTION_CT] = {
   {  /* entry idx, value */ 0, VALUE_OPT_DEBUG_LEVEL,
      /* equiv idx, value */ 0, VALUE_OPT_DEBUG_LEVEL,
      /* equivalenced to  */ NO_EQUIVALENT,
@@ -642,7 +637,7 @@ static tOptDesc optDesc[ OPTION_CT ] = {
  */
 static char const zPROGNAME[5] = "SNTP";
 static char const zUsageTitle[154] =
-"sntp - standard Simple Network Time Protocol program - Ver. 4.2.7p159\n\
+"sntp - standard Simple Network Time Protocol program - Ver. 4.2.7p160\n\
 USAGE:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
 \t\t[ hostname-or-IP ...]\n";
 static char const zRcName[7] = ".ntprc";
@@ -661,7 +656,7 @@ It can be run interactively from the command line or as a cron job.\n\n\
 NTP and SNTP are defined by RFC 5905, which obsoletes RFC 4330 and RFC\n\
 1305.\n";
 static char const zFullVersion[] = SNTP_FULL_VERSION;
-/* extracted from optcode.tlib near line 504 */
+/* extracted from optcode.tlib near line 515 */
 
 #if defined(ENABLE_NLS)
 # define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -732,12 +727,10 @@ tOptions sntpOptions = {
  *  Create the static procedure(s) declared above.
  */
 static void
-doUsageOpt(
-    tOptions*   pOptions,
-    tOptDesc*   pOptDesc )
+doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
 {
     (void)pOptions;
-    USAGE(EXIT_SUCCESS);
+    USAGE(SNTP_EXIT_SUCCESS);
 }
 
 #if ! defined(TEST_SNTP_OPTS)
@@ -817,45 +810,28 @@ doOptSteplimit(tOptions* pOptions, tOptDesc* pOptDesc)
 {
     static const struct {long const rmin, rmax;} rng[1] = {
         { 0, LONG_MAX } };
-    long val;
     int  ix;
-    char * pzEnd;
 
     if (pOptions <= OPTPROC_EMIT_LIMIT)
         goto emit_ranges;
+    optionNumericVal(pOptions, pOptDesc);
 
-    errno = 0;
-    val = strtol(pOptDesc->optArg.argString, &pzEnd, 0);
-    if ((pOptDesc->optArg.argString == pzEnd) || (errno != 0))
-        goto bad_value;
-
-    if (*pzEnd != '\0')
-        goto bad_value;
     for (ix = 0; ix < 1; ix++) {
-        if (val < rng[ix].rmin)
+        if (pOptDesc->optArg.argInt < rng[ix].rmin)
             continue;  /* ranges need not be ordered. */
-        if (val == rng[ix].rmin)
-            goto valid_return;
+        if (pOptDesc->optArg.argInt == rng[ix].rmin)
+            return;
         if (rng[ix].rmax == LONG_MIN)
             continue;
-        if (val <= rng[ix].rmax)
-            goto valid_return;
+        if (pOptDesc->optArg.argInt <= rng[ix].rmax)
+            return;
     }
 
-  bad_value:
-
     option_usage_fp = stderr;
 
-  emit_ranges:
-    optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
-    return;
+emit_ranges:
 
-  valid_return:
-    if ((pOptDesc->fOptState & OPTST_ALLOC_ARG) != 0) {
-        free((void *)pOptDesc->optArg.argString);
-        pOptDesc->fOptState &= ~OPTST_ALLOC_ARG;
-    }
-    pOptDesc->optArg.argInt = val;
+    optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
 }
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -867,56 +843,39 @@ doOptNtpversion(tOptions* pOptions, tOptDesc* pOptDesc)
 {
     static const struct {long const rmin, rmax;} rng[1] = {
         { 0, 7 } };
-    long val;
     int  ix;
-    char * pzEnd;
 
     if (pOptions <= OPTPROC_EMIT_LIMIT)
         goto emit_ranges;
+    optionNumericVal(pOptions, pOptDesc);
 
-    errno = 0;
-    val = strtol(pOptDesc->optArg.argString, &pzEnd, 0);
-    if ((pOptDesc->optArg.argString == pzEnd) || (errno != 0))
-        goto bad_value;
-
-    if (*pzEnd != '\0')
-        goto bad_value;
     for (ix = 0; ix < 1; ix++) {
-        if (val < rng[ix].rmin)
+        if (pOptDesc->optArg.argInt < rng[ix].rmin)
             continue;  /* ranges need not be ordered. */
-        if (val == rng[ix].rmin)
-            goto valid_return;
+        if (pOptDesc->optArg.argInt == rng[ix].rmin)
+            return;
         if (rng[ix].rmax == LONG_MIN)
             continue;
-        if (val <= rng[ix].rmax)
-            goto valid_return;
+        if (pOptDesc->optArg.argInt <= rng[ix].rmax)
+            return;
     }
 
-  bad_value:
-
     option_usage_fp = stderr;
 
-  emit_ranges:
-    optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
-    return;
+emit_ranges:
 
-  valid_return:
-    if ((pOptDesc->fOptState & OPTST_ALLOC_ARG) != 0) {
-        free((void *)pOptDesc->optArg.argString);
-        pOptDesc->fOptState &= ~OPTST_ALLOC_ARG;
-    }
-    pOptDesc->optArg.argInt = val;
+    optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
 }
-/* extracted from optmain.tlib near line 107 */
+/* extracted from optmain.tlib near line 128 */
 
 #if defined(TEST_SNTP_OPTS) /* TEST MAIN PROCEDURE: */
 
 extern void optionPutShell(tOptions*);
 
 int
-main(int argc, char** argv)
+main(int argc, char ** argv)
 {
-    int res = EXIT_SUCCESS;
+    int res = SNTP_EXIT_SUCCESS;
     (void)optionProcess(&sntpOptions, argc, argv);
     optionPutShell(&sntpOptions);
     res = ferror(stdout);
@@ -925,7 +884,7 @@ main(int argc, char** argv)
     return res;
 }
 #endif  /* defined TEST_SNTP_OPTS */
-/* extracted from optcode.tlib near line 657 */
+/* extracted from optcode.tlib near line 666 */
 
 #if ENABLE_NLS
 #include <stdio.h>
@@ -949,14 +908,13 @@ AO_gettext(char const* pz)
     pzRes = strdup(pzRes);
     if (pzRes == NULL) {
         fputs(_("No memory for duping translated strings\n"), stderr);
-        exit(EXIT_FAILURE);
+        exit(SNTP_EXIT_FAILURE);
     }
     return pzRes;
 }
 
-static void coerce_it(void** s) { *s = AO_gettext(*s); }
-#define COERSION(_f) \
-  coerce_it((void*)&(sntpOptions._f))
+static void coerce_it(void** s) { *s = AO_gettext(*s);
+}
 
 /*
  *  This invokes the translation code (e.g. gettext(3)).
@@ -964,6 +922,8 @@ static void coerce_it(void** s) { *s = AO_gettext(*s); }
 static void
 translate_option_strings(void)
 {
+    tOptions * const pOpt = &sntpOptions;
+
     /*
      *  Guard against re-translation.  It won't work.  The strings will have
      *  been changed by the first pass through this code.  One shot only.
@@ -973,33 +933,33 @@ translate_option_strings(void)
          *  Do the translations.  The first pointer follows the field count
          *  field.  The field count field is the size of a pointer.
          */
-        tOptDesc* pOD = sntpOptions.pOptDesc;
-        char**    ppz = (char**)(void*)&(option_usage_text);
-        int       ix  = option_usage_text.field_ct;
+        tOptDesc * pOD = pOpt->pOptDesc;
+        char **    ppz = (char**)(void*)&(option_usage_text);
+        int        ix  = option_usage_text.field_ct;
 
         do {
             ppz++;
             *ppz = AO_gettext(*ppz);
         } while (--ix > 0);
 
-        COERSION(pzCopyright);
-        COERSION(pzCopyNotice);
-        COERSION(pzFullVersion);
-        COERSION(pzUsageTitle);
-        COERSION(pzExplain);
-        COERSION(pzDetail);
-        COERSION(pzPackager);
+        coerce_it((void*)&(pOpt->pzCopyright));
+        coerce_it((void*)&(pOpt->pzCopyNotice));
+        coerce_it((void*)&(pOpt->pzFullVersion));
+        coerce_it((void*)&(pOpt->pzUsageTitle));
+        coerce_it((void*)&(pOpt->pzExplain));
+        coerce_it((void*)&(pOpt->pzDetail));
+        coerce_it((void*)&(pOpt->pzPackager));
         option_usage_text.field_ct = 0;
 
-        for (ix = sntpOptions.optCt; ix > 0; ix--, pOD++)
+        for (ix = pOpt->optCt; ix > 0; ix--, pOD++)
             coerce_it((void*)&(pOD->pzText));
     }
 
-    if ((sntpOptions.fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
-        tOptDesc* pOD = sntpOptions.pOptDesc;
-        int       ix;
+    if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
+        tOptDesc * pOD = pOpt->pOptDesc;
+        int        ix;
 
-        for (ix = sntpOptions.optCt; ix > 0; ix--, pOD++) {
+        for (ix = pOpt->optCt; ix > 0; ix--, pOD++) {
             coerce_it((void*)&(pOD->pz_Name));
             coerce_it((void*)&(pOD->pz_DisableName));
             coerce_it((void*)&(pOD->pz_DisablePfx));
index 9c1f57c0079b3c7247193394b43330f9aa104f74..31e83d29ebb761788e122b89638a89b420a33162 100644 (file)
@@ -1,11 +1,11 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (sntp-opts.h)
  *  
- *  It has been AutoGen-ed  April 28, 2011 at 06:44:05 AM by AutoGen 5.11.6
+ *  It has been AutoGen-ed  May  1, 2011 at 08:11:05 AM by AutoGen 5.11.9pre8
  *  From the definitions    sntp-opts.def
  *  and the template file   options
  *
- * Generated from AutoOpts 34:0:9 templates.
+ * Generated from AutoOpts 35:0:10 templates.
  *
  *  AutoOpts is a copyrighted work.  This header file is not encumbered
  *  by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -20,6 +20,7 @@
  * sntp copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved
  *
  * see html/copyright.html
+ * 
  */
 /*
  *  This file contains the programmatic interface to the Automated
@@ -39,7 +40,7 @@
  *  tolerable version is at least as old as what was current when the header
  *  template was released.
  */
-#define AO_TEMPLATE_VERSION 139264
+#define AO_TEMPLATE_VERSION 143360
 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
  || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
 # error option template version mismatches autoopts/options.h header
@@ -77,8 +78,8 @@ typedef enum {
 } teOptIndex;
 
 #define OPTION_CT    24
-#define SNTP_VERSION       "4.2.7p159"
-#define SNTP_FULL_VERSION  "sntp - standard Simple Network Time Protocol program - Ver. 4.2.7p159"
+#define SNTP_VERSION       "4.2.7p160"
+#define SNTP_FULL_VERSION  "sntp 4.2.7p160"
 
 /*
  *  Interface defines for all options.  Replace "n" with the UPPER_CASED
@@ -109,7 +110,6 @@ typedef enum {
     SNTP_EXIT_SUCCESS = 0,
     SNTP_EXIT_FAILURE = 1
 } sntp_exit_code_t;
-
 /*
  *  Make sure there are no #define name conflicts with the option names
  */
@@ -276,17 +276,17 @@ typedef enum {
                 sntpOptions.pzCurOpt  = NULL)
 #define START_OPT       RESTART_OPT(1)
 #define USAGE(c)        (*sntpOptions.pUsageProc)(&sntpOptions, c)
-/* extracted from opthead.tlib near line 435 */
+/* extracted from opthead.tlib near line 451 */
 
-/* * * * * *
- *
- *  Declare the sntp option descriptor.
- */
 #ifdef  __cplusplus
 extern "C" {
 #endif
 
-extern tOptions   sntpOptions;
+/* * * * * *
+ *
+ *  Declare the sntp option descriptor.
+ */
+extern tOptions sntpOptions;
 
 #if defined(ENABLE_NLS)
 # ifndef _
index a1a2094b90325519a967dc55580a9f4f4628c81e..d13cce185dc6f4497475a5f6c426d1fdf3212e19 100644 (file)
@@ -6,7 +6,7 @@
 # 
 # EDIT THIS FILE WITH CAUTION  (sntp-opts.texi)
 # 
-# It has been AutoGen-ed  April 28, 2011 at 06:47:46 AM by AutoGen 5.11.6
+# It has been AutoGen-ed  May  1, 2011 at 04:29:47 AM by AutoGen 5.11.9pre8
 # From the definitions    sntp-opts.def
 # and the template file   aginfo.tpl
 @end ignore
@@ -76,7 +76,7 @@ This is the automatically generated usage text for sntp:
 
 @exampleindent 0
 @example
-sntp - standard Simple Network Time Protocol program - Ver. 4.2.7p159
+sntp - standard Simple Network Time Protocol program - Ver. 4.2.7p160
 USAGE:  sntp [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
                 [ hostname-or-IP ...]
   Flg Arg Option-Name    Description
@@ -101,9 +101,11 @@ USAGE:  sntp [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
    -k Fil keyfile        Look in this file for the key specified with -a
    -l Fil filelog        Log to specified logfile
    -M Num steplimit      Adjustments less than steplimit msec will be slewed.
-                                - it must be:  greater than or equal to 0
+                                - It must be in the range:
+                                  greater than or equal to 0
    -o Num ntpversion     Send <int> as our NTP version
-                                - it must be:  0 to 7
+                                - It must be in the range:
+                                  0 to 7
    -r no  usereservedport Use the NTP Reserved Port (port 123)
    -S no  step           OK to 'step' the time with settimeofday()
    -s no  slew           OK to 'slew' the time with adjtime()
index 1ab9b018b498ffd041a7497f72da722fd7d85f52..29ab363ffd6767749786df50ad064da1695dd1ac 100644 (file)
@@ -1,33 +1,27 @@
-.TH SNTP 1 2011-04-28 "( 4.2.7p159)" "Programmer's Manual"
-.\"  EDIT THIS FILE WITH CAUTION  (sntp.1)
+.TH sntp 1 "01 May 2011" "4.2.7p160" "User Commands"
+.\"
+.\"  EDIT THIS FILE WITH CAUTION  (sntp.man)
 .\"  
-.\"  It has been AutoGen-ed  April 28, 2011 at 06:47:46 AM by AutoGen 5.11.6
+.\"  It has been AutoGen-ed  May  1, 2011 at 04:29:46 AM by AutoGen 5.11.9pre8
 .\"  From the definitions    sntp-opts.def
-.\"  and the template file   agman1.tpl
+.\"  and the template file   agman-cmd.tpl
 .\"
 .SH NAME
 sntp \- standard Simple Network Time Protocol program
 .SH SYNOPSIS
 .B sntp
 .\" Mixture of short (flag) options and long options
-.RB [ \-\fIflag\fP " [\fIvalue\fP]]... [" \--\fIopt-name\fP " [[=| ]\fIvalue\fP]]..."
-.br
-.in +8
-[ hostname-or-IP ...]
+.RB [ \-\fIflag\fP " [\fIvalue\fP]]... [" \-\-\fIopt\-name\fP " [[=| ]\fIvalue\fP]]..." [ hostname-or-IP ...]
 .PP
-
-.SH "DESCRIPTION"
-This manual page briefly documents the \fBsntp\fP command.
+.SH DESCRIPTION
 .I sntp
 can be used as a SNTP client to query a NTP or SNTP server and either display
 the time or set the local system's time (given suitable privilege).  It can be
 run as an interactive command or in a
 .I cron
 job.
-
 NTP (the Network Time Protocol) and SNTP (the Simple Network Time Protocol)
 are defined and described by RFC 5905.
-
 .PP
 The default is to write the estimated correct local date and time (i.e. not
 UTC) to the standard output in a format like
@@ -47,20 +41,20 @@ is believed to be correct to within
 seconds.
 .SH OPTIONS
 .TP
-.BR \-d ", " \--debug-level
+.BR \-d ", " -\-debug\-level
 Increase output debug message level.
 This option may appear an unlimited number of times.
 .sp
 Increase the debugging message output level.
 .TP
-.BR \-D " \fIstring\fP, " \--set-debug-level "=" \fIstring\fP
+.BR \-D " \fIstring\fP, " \-\-set\-debug\-level "=" \fIstring\fP
 Set the output debug message level.
 This option may appear an unlimited number of times.
 .sp
 Set the output debugging level.  Can be supplied multiple times,
 but each overrides the previous value(s).
 .TP
-.BR \-4 ", " \--ipv4
+.BR \-4 ", " -\-ipv4
 Force IPv4 DNS name resolution.
 This option must not appear in combination with any of the following options:
 ipv6.
@@ -68,7 +62,7 @@ ipv6.
 Force DNS resolution of following host names on the command line
 to the IPv4 namespace.
 .TP
-.BR \-6 ", " \--ipv6
+.BR \-6 ", " -\-ipv6
 Force IPv6 DNS name resolution.
 This option must not appear in combination with any of the following options:
 ipv4.
@@ -76,7 +70,7 @@ ipv4.
 Force DNS resolution of following host names on the command line
 to the IPv6 namespace.
 .TP
-.BR \-a " \fIauth-keynumber\fP, " \--authentication "=" \fIauth-keynumber\fP
+.BR \-a " \fIauth\-keynumber\fP, " \-\-authentication "=" \fIauth\-keynumber\fP
 Enable authentication with the key auth-keynumber.
 This option takes an integer number as its argument.
 .sp
@@ -84,25 +78,25 @@ This option enables authentication using the key specified in this option's argu
 The argument of this option is the keyid, a number specified in the keyfile as this
 key's identifier. See the keyfile option (-k) for more details.
 .TP
-.BR \-B " \fIseconds\fP, " \--bctimeout "=" \fIseconds\fP
+.BR \-B " \fIseconds\fP, " \-\-bctimeout "=" \fIseconds\fP
 The number of seconds to wait for broadcasts.
 This option takes an integer number as its argument.
-The default \fIseconds\fP for this option is:
+The default \fIseconds\fP for this option is:
 .ti +4
  68
 .sp
 When waiting for a broadcast packet SNTP will wait the number
 of seconds specified before giving up.  Default 68 seconds.
 .TP
-.BR \-b " \fIbroadcast-address\fP, " \--broadcast "=" \fIbroadcast-address\fP
+.BR \-b " \fIbroadcast\-address\fP, " \-\-broadcast "=" \fIbroadcast\-address\fP
 Listen to the address specified for broadcast time sync.
 This option may appear an unlimited number of times.
 .sp
 If specified SNTP will listen to the specified address
 for NTP broadcasts.  The default maximum wait time,
-68 seconds, can be modified with \-B.
+68 seconds, can be modified with -B.
 .TP
-.BR \-c " \fIhost-name\fP, " \--concurrent "=" \fIhost-name\fP
+.BR \-c " \fIhost\-name\fP, " \-\-concurrent "=" \fIhost\-name\fP
 Concurrent query all IPs returned for host-name.
 This option may appear an unlimited number of times.
 .sp
@@ -111,15 +105,14 @@ more rapidly than one every 2 seconds.  By default, any IPs returned
 as part of a DNS lookup are assumed to be for a single instance of
 ntpd, and therefore sntp will send  queries to these IPs one after
 another, with a 2-second gap in between each query.
-
-The \-c or \--concurrent flag says that any IPs returned for the
+The -c or --concurrent flag says that any IPs returned for the
 DNS lookup of the supplied host-name are on different machines,
 so we can send concurrent queries.
 .TP
-.BR \-h " \fImilliseconds\fP, " \--headspace "=" \fImilliseconds\fP
+.BR \-h " \fImilliseconds\fP, " \-\-headspace "=" \fImilliseconds\fP
 The gap (in milliseconds) between time requests.
 This option takes an integer number as its argument.
-The default \fImilliseconds\fP for this option is:
+The default \fImilliseconds\fP for this option is:
 .ti +4
  10
 .sp
@@ -129,9 +122,9 @@ separate the queries we send out by the specified number of
 milliseconds.
 Default 10 milliseconds.
 .TP
-.BR \-K " \fIfile-name\fP, " \--kod "=" \fIfile-name\fP
+.BR \-K " \fIfile\-name\fP, " \-\-kod "=" \fIfile\-name\fP
 KoD history filename.
-The default \fIfile-name\fP for this option is:
+The default \fIfile\-name\fP for this option is:
 .ti +4
  /var/db/ntp-kod
 .sp
@@ -139,33 +132,30 @@ Specifies the filename to be used for the  persistent history of KoD
 responses received from servers.  The default is
 /var/db/ntp-kod.
 .TP
-.BR \-k " \fIfile-name\fP, " \--keyfile "=" \fIfile-name\fP
-Look in this file for the key specified with \-a.
+.BR \-k " \fIfile\-name\fP, " \-\-keyfile "=" \fIfile\-name\fP
+Look in this file for the key specified with -a.
 .sp
-This option specifies the keyfile. SNTP will search for the key specified with \-a keyno in this
+This option specifies the keyfile. SNTP will search for the key specified with -a keyno in this
 file. Key files follow the following format:
-
 keyid keytype key
-
 Where  keyid is a number identifying this key
 keytype is one of the follow:
 S  Key in 64 Bit hexadecimal number as specified in in the DES specification.
 N  Key in 64 Bit hexadecimal number as specified in the NTP standard.
 A  Key in a 1-to-8 character ASCII string.
 M  Key in a 1-to-8 character ASCII string using the MD5 authentication scheme.
-
 For more information see ntp.keys(5).
 .TP
-.BR \-l " \fIfile-name\fP, " \--filelog "=" \fIfile-name\fP
+.BR \-l " \fIfile\-name\fP, " \-\-filelog "=" \fIfile\-name\fP
 Log to specified logfile.
 .sp
 This option causes the client to write log messages to the specified
 logfile.
 .TP
-.BR \-M " \fInumber\fP, " \--steplimit "=" \fInumber\fP
+.BR \-M " \fInumber\fP, " \-\-steplimit "=" \fInumber\fP
 Adjustments less than steplimit msec will be slewed..
 This option takes an integer number as its argument.
-The value of \fInumber\fP is constrained to being:
+The value of \fInumber\fP is constrained to being:
 .in +4
 .nf
 .na
@@ -175,113 +165,102 @@ greater than or equal to 0
 .sp
 If the time adjustment is less than steplimit milliseconds, slew the amount using adjtime().  Otherwise, step the correction using settimeofday().
 .TP
-.BR \-o " \fInumber\fP, " \--ntpversion "=" \fInumber\fP
+.BR \-o " \fInumber\fP, " \-\-ntpversion "=" \fInumber\fP
 Send <int> as our NTP version.
 This option takes an integer number as its argument.
-The value of \fInumber\fP is constrained to being:
+The value of \fInumber\fP is constrained to being:
 .in +4
 .nf
 .na
 in the range  0 through 7
 .fi
 .in -4
-The default \fInumber\fP for this option is:
+The default \fInumber\fP for this option is:
 .ti +4
  4
 .sp
 When sending requests to a remote server, tell them we are running
 NTP protocol version <ntpversion> .
 .TP
-.BR \-r ", " \--usereservedport
+.BR \-r ", " -\-usereservedport
 Use the NTP Reserved Port (port 123).
 .sp
 Use port 123, which is reserved for NTP, for our network communications.
 .TP
-.BR \-S ", " \--step
+.BR \-S ", " -\-step
 OK to 'step' the time with settimeofday().
 .sp
-
 .TP
-.BR \-s ", " \--slew
+.BR \-s ", " -\-slew
 OK to 'slew' the time with adjtime().
 .sp
-
 .TP
-.BR \-u " \fIseconds\fP, " \--uctimeout "=" \fIseconds\fP
+.BR \-u " \fIseconds\fP, " \-\-uctimeout "=" \fIseconds\fP
 The number of seconds to wait for unicast responses.
 This option takes an integer number as its argument.
-The default \fIseconds\fP for this option is:
+The default \fIseconds\fP for this option is:
 .ti +4
  5
 .sp
 When waiting for a unicast reply, SNTP will wait the number
 of seconds specified before giving up.  Default 5 seconds.
 .TP
-.BR \--wait, " \fB--no-wait\fP"
+.BR \-\-wait, " \fB\-\-no\-wait\fP"
 Wait for pending replies (if not setting the time).
-The \fIno-wait\fP form will disable the option.
+The \fIno\-wait\fP form will disable the option.
 This option is enabled by default.
 .sp
 If we are not setting the time, wait for all pending responses.
 .TP
-.BR \-? , " \--help"
-Display extended usage information and exit.
+.BR \-? , " \-\-help"
+Display usage information and exit.
 .TP
-.BR \-! , " \--more-help"
-Extended usage information passed thru pager.
+.BR \-! , " \-\-more-help"
+Pass the extended usage information through a pager.
 .TP
-.BR \-> " [\fIrcfile\fP]," " \--save-opts" "[=\fIrcfile\fP]"
-Save the option state to \fIrcfile\fP.  The default is the \fIlast\fP
-configuration file listed in the \fBOPTION PRESETS\fP section, below.
+.BR \-> " [\fIrcfile\fP]," " \-\-save-opts" "[=\fIrcfile\fP]"
+Save the option state to \fIrcfile\fP.  The default is the \fIlast\fP
+configuration file listed in the \fBOPTION PRESETS\fP section, below.
 .TP
-.BR \-< " \fIrcfile\fP," " \--load-opts" "=\fIrcfile\fP," " \--no-load-opts"
-Load options from \fIrcfile\fP.
-The \fIno-load-opts\fP form will disable the loading
-of earlier RC/INI files.  \fI--no-load-opts\fP is handled early,
+.BR \-< " \fIrcfile\fP," " \-\-load-opts" "=\fIrcfile\fP," " \-\-no-load-opts"
+Load options from \fIrcfile\fP.
+The \fIno-load-opts\fP form will disable the loading
+of earlier RC/INI files.  \fI\-\-no-load-opts\fP is handled early,
 out of order.
 .TP
-.BR \- " [{\fIv|c|n\fP}]," " \--version" "[=\fI{v|c|n}\fP]"
+.BR \- " [{\fIv|c|n\fP}]," " \-\-version" "[=\fI{v|c|n}\fP]"
 Output version of program and exit.  The default mode is `v', a simple
 version.  The `c' mode will print copyright information and `n' will
 print the full copyright notice.
-.SH OPTION PRESETS
-Any option that is not marked as \fInot presettable\fP may be preset
+.SH "OPTION PRESETS"
+Any option that is not marked as \fInot presettable\fP may be preset
 by loading values from configuration ("RC" or ".INI") file(s) and values from
 environment variables named:
 .nf
-  \fBSNTP_<option-name>\fP or \fBSNTP\fP
+  \fBSNTP_<option-name>\fP or \fBSNTP\fP
 .fi
 .ad
 The environmental presets take precedence (are processed later than)
 the configuration files.
-The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
-If any of these are directories, then the file \fI.ntprc\fP
+The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
+If any of these are directories, then the file \fI.ntprc\fP
 is searched for within those directories.
-.SH USAGE
-The simplest use of this program is as an unprivileged command to check the
-current time and error in the local clock.  For example:
-.IP
-.B sntp ntpserver.somewhere
-.PP
-With suitable privilege, it can be run as a command or in a
-.I cron
-job to reset the local clock from a reliable server, like the
-.I ntpdate
-and
-.I rdate
-commands.  For example:
-.IP
-.B sntp \-a ntpserver.somewhere
-.SH RETURN VALUE
-The program returns a zero exit
-status for success, and a non-zero one otherwise.
-.SH BUGS
-Please report bugs to http://bugs.ntp.org .
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.BR 0
+Successful program execution.
+.TP
+.BR 1
+The operation failed or the command syntax was not valid.
+.SH ENVIRONMENT
+See \fBOPTION PRESETS\fP for configuration environment variables.
+.SH FILES
+See \fBOPTION PRESETS\fP for configuration files.
 .SH AUTHOR
 David L. Mills and/or others
 .br
 Please send bug reports to:  http://bugs.ntp.org, bugs@ntp.org
-
 .PP
 .nf
 .na
@@ -289,5 +268,5 @@ see html/copyright.html
 .fi
 .ad
 .PP
-This manual page was \fIAutoGen\fP-erated from the \fBsntp\fP
+This manual page was \fIAutoGen\fP-erated from the \fBsntp\fP
 option definitions.
index 89f728c6b457a4743e1e3eadc6132c852ed0f234..0e67f8ab3d8fea647a62f8bf28b6a3724079fbb4 100644 (file)
@@ -150,7 +150,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
 <p><a name="index-sntp-usage-3"></a>
 This is the automatically generated usage text for sntp:
 
-<pre class="example">sntp - standard Simple Network Time Protocol program - Ver. 4.2.7p159
+<pre class="example">sntp - standard Simple Network Time Protocol program - Ver. 4.2.7p160
 USAGE:  sntp [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... \
                 [ hostname-or-IP ...]
   Flg Arg Option-Name    Description
@@ -175,9 +175,11 @@ USAGE:  sntp [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ].
    -k Fil keyfile        Look in this file for the key specified with -a
    -l Fil filelog        Log to specified logfile
    -M Num steplimit      Adjustments less than steplimit msec will be slewed.
-                                - it must be:  greater than or equal to 0
+                                - It must be in the range:
+                                  greater than or equal to 0
    -o Num ntpversion     Send &lt;int&gt; as our NTP version
-                                - it must be:  0 to 7
+                                - It must be in the range:
+                                  0 to 7
    -r no  usereservedport Use the NTP Reserved Port (port 123)
    -S no  step           OK to 'step' the time with settimeofday()
    -s no  slew           OK to 'slew' the time with adjtime()
index 4ad7ba4e82c82309ea31c65a36a5dbcd81001dce..e2b72d21fff66c278d3742369abad17c47a5fd5a 100644 (file)
@@ -1,11 +1,11 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntp-keygen-opts.c)
  *  
- *  It has been AutoGen-ed  April 28, 2011 at 06:47:31 AM by AutoGen 5.11.6
+ *  It has been AutoGen-ed  May  1, 2011 at 04:29:19 AM by AutoGen 5.11.9pre8
  *  From the definitions    ntp-keygen-opts.def
  *  and the template file   options
  *
- * Generated from AutoOpts 34:0:9 templates.
+ * Generated from AutoOpts 35:0:10 templates.
  *
  *  AutoOpts is a copyrighted work.  This source file is not encumbered
  *  by AutoOpts licensing, but is provided under the licensing terms chosen
  * ntp-keygen copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved
  *
  * see html/copyright.html
+ * 
  */
 
 #include <sys/types.h>
+
 #include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
-extern FILE * option_usage_fp;
 #define OPTION_CODE_COMPILE 1
 #include "ntp-keygen-opts.h"
 
 #ifdef  __cplusplus
 extern "C" {
 #endif
+extern FILE * option_usage_fp;
 
 /* TRANSLATORS: choose the translation for option names wisely because you
                 cannot ever change your mind. */
-tSCC zCopyright[] =
-       "ntp-keygen copyright (c) 1970-2011 David L. Mills and/or others, all rights reserved"
-/* extracted from copyright.def near line 8 */
-;
-tSCC zCopyrightNotice[24] =
-"see html/copyright.html";
+static char const zCopyright[52] =
+"ntp-keygen (ntp) 4.2.7p160\n\
+see html/copyright.html\n";
+static char const zCopyrightNotice[25] =
+"see html/copyright.html\n";
 
 extern tUsageProc optionUsage;
 
@@ -59,12 +60,6 @@ extern tUsageProc optionUsage;
 #ifndef NULL
 #  define NULL 0
 #endif
-#ifndef EXIT_SUCCESS
-#  define  EXIT_SUCCESS 0
-#endif
-#ifndef EXIT_FAILURE
-#  define  EXIT_FAILURE 1
-#endif
 
 /*
  *  Certificate option description:
@@ -420,7 +415,7 @@ static char const zNotLoad_Opts_Pfx[]  = "no";
  *  if multiple copies are allowed.
  */
 static tOptProc
-    doOptModulus, doUsageOpt;
+    doUsageOpt;
 
 /*
  *  #define map the "normal" callout procs to the test ones...
@@ -435,8 +430,8 @@ static tOptProc
 extern tOptProc
     optionBooleanVal,    optionNestedVal,     optionNumericVal,
     optionPagedUsage,    optionPrintVersion,  optionResetOpt,
-    optionStackArg,      optionTimeVal,       optionUnstackArg,
-    optionVersionStderr;
+    optionStackArg,      optionTimeDate,      optionTimeVal,
+    optionUnstackArg,    optionVersionStderr;
 static tOptProc
     doOptSet_Debug_Level, doUsageOpt;
 
@@ -457,7 +452,7 @@ static tOptProc
  *
  *  Define the Ntp_Keygen Option Descriptions.
  */
-static tOptDesc optDesc[ OPTION_CT ] = {
+static tOptDesc optDesc[OPTION_CT] = {
   {  /* entry idx, value */ 0, VALUE_OPT_CERTIFICATE,
      /* equiv idx, value */ 0, VALUE_OPT_CERTIFICATE,
      /* equivalenced to  */ NO_EQUIVALENT,
@@ -757,7 +752,7 @@ static tOptDesc optDesc[ OPTION_CT ] = {
  */
 static char const zPROGNAME[11] = "NTP_KEYGEN";
 static char const zUsageTitle[116] =
-"ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.7p159\n\
+"ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.7p160\n\
 USAGE:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n";
 static char const zRcName[7] = ".ntprc";
 static char const * const apzHomeList[3] = {
@@ -771,7 +766,7 @@ static char const zDetail[99] = "\n\
 If there is no new host key, look for an existing one.  If one is not\n\
 found, create it.\n";
 static char const zFullVersion[] = NTP_KEYGEN_FULL_VERSION;
-/* extracted from optcode.tlib near line 504 */
+/* extracted from optcode.tlib near line 515 */
 
 #if defined(ENABLE_NLS)
 # define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -842,12 +837,10 @@ tOptions ntp_keygenOptions = {
  *  Create the static procedure(s) declared above.
  */
 static void
-doUsageOpt(
-    tOptions*   pOptions,
-    tOptDesc*   pOptDesc )
+doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
 {
     (void)pOptions;
-    USAGE(EXIT_SUCCESS);
+    USAGE(NTP_KEYGEN_EXIT_SUCCESS);
 }
 
 #if ! defined(TEST_NTP_KEYGEN_OPTS)
@@ -874,57 +867,40 @@ doOptModulus(tOptions* pOptions, tOptDesc* pOptDesc)
 {
     static const struct {long const rmin, rmax;} rng[1] = {
         { 256, 2048 } };
-    long val;
     int  ix;
-    char * pzEnd;
 
     if (pOptions <= OPTPROC_EMIT_LIMIT)
         goto emit_ranges;
+    optionNumericVal(pOptions, pOptDesc);
 
-    errno = 0;
-    val = strtol(pOptDesc->optArg.argString, &pzEnd, 0);
-    if ((pOptDesc->optArg.argString == pzEnd) || (errno != 0))
-        goto bad_value;
-
-    if (*pzEnd != '\0')
-        goto bad_value;
     for (ix = 0; ix < 1; ix++) {
-        if (val < rng[ix].rmin)
+        if (pOptDesc->optArg.argInt < rng[ix].rmin)
             continue;  /* ranges need not be ordered. */
-        if (val == rng[ix].rmin)
-            goto valid_return;
+        if (pOptDesc->optArg.argInt == rng[ix].rmin)
+            return;
         if (rng[ix].rmax == LONG_MIN)
             continue;
-        if (val <= rng[ix].rmax)
-            goto valid_return;
+        if (pOptDesc->optArg.argInt <= rng[ix].rmax)
+            return;
     }
 
-  bad_value:
-
     option_usage_fp = stderr;
 
-  emit_ranges:
-    optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
-    return;
+emit_ranges:
 
-  valid_return:
-    if ((pOptDesc->fOptState & OPTST_ALLOC_ARG) != 0) {
-        free((void *)pOptDesc->optArg.argString);
-        pOptDesc->fOptState &= ~OPTST_ALLOC_ARG;
-    }
-    pOptDesc->optArg.argInt = val;
+    optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
 }
 #endif /* defined AUTOKEY */
-/* extracted from optmain.tlib near line 107 */
+/* extracted from optmain.tlib near line 128 */
 
 #if defined(TEST_NTP_KEYGEN_OPTS) /* TEST MAIN PROCEDURE: */
 
 extern void optionPutShell(tOptions*);
 
 int
-main(int argc, char** argv)
+main(int argc, char ** argv)
 {
-    int res = EXIT_SUCCESS;
+    int res = NTP_KEYGEN_EXIT_SUCCESS;
     (void)optionProcess(&ntp_keygenOptions, argc, argv);
     optionPutShell(&ntp_keygenOptions);
     res = ferror(stdout);
@@ -933,7 +909,7 @@ main(int argc, char** argv)
     return res;
 }
 #endif  /* defined TEST_NTP_KEYGEN_OPTS */
-/* extracted from optcode.tlib near line 657 */
+/* extracted from optcode.tlib near line 666 */
 
 #if ENABLE_NLS
 #include <stdio.h>
@@ -957,14 +933,13 @@ AO_gettext(char const* pz)
     pzRes = strdup(pzRes);
     if (pzRes == NULL) {
         fputs(_("No memory for duping translated strings\n"), stderr);
-        exit(EXIT_FAILURE);
+        exit(NTP_KEYGEN_EXIT_FAILURE);
     }
     return pzRes;
 }
 
-static void coerce_it(void** s) { *s = AO_gettext(*s); }
-#define COERSION(_f) \
-  coerce_it((void*)&(ntp_keygenOptions._f))
+static void coerce_it(void** s) { *s = AO_gettext(*s);
+}
 
 /*
  *  This invokes the translation code (e.g. gettext(3)).
@@ -972,6 +947,8 @@ static void coerce_it(void** s) { *s = AO_gettext(*s); }
 static void
 translate_option_strings(void)
 {
+    tOptions * const pOpt = &ntp_keygenOptions;
+
     /*
      *  Guard against re-translation.  It won't work.  The strings will have
      *  been changed by the first pass through this code.  One shot only.
@@ -981,33 +958,33 @@ translate_option_strings(void)
          *  Do the translations.  The first pointer follows the field count
          *  field.  The field count field is the size of a pointer.
          */
-        tOptDesc* pOD = ntp_keygenOptions.pOptDesc;
-        char**    ppz = (char**)(void*)&(option_usage_text);
-        int       ix  = option_usage_text.field_ct;
+        tOptDesc * pOD = pOpt->pOptDesc;
+        char **    ppz = (char**)(void*)&(option_usage_text);
+        int        ix  = option_usage_text.field_ct;
 
         do {
             ppz++;
             *ppz = AO_gettext(*ppz);
         } while (--ix > 0);
 
-        COERSION(pzCopyright);
-        COERSION(pzCopyNotice);
-        COERSION(pzFullVersion);
-        COERSION(pzUsageTitle);
-        COERSION(pzExplain);
-        COERSION(pzDetail);
-        COERSION(pzPackager);
+        coerce_it((void*)&(pOpt->pzCopyright));
+        coerce_it((void*)&(pOpt->pzCopyNotice));
+        coerce_it((void*)&(pOpt->pzFullVersion));
+        coerce_it((void*)&(pOpt->pzUsageTitle));
+        coerce_it((void*)&(pOpt->pzExplain));
+        coerce_it((void*)&(pOpt->pzDetail));
+        coerce_it((void*)&(pOpt->pzPackager));
         option_usage_text.field_ct = 0;
 
-        for (ix = ntp_keygenOptions.optCt; ix > 0; ix--, pOD++)
+        for (ix = pOpt->optCt; ix > 0; ix--, pOD++)
             coerce_it((void*)&(pOD->pzText));
     }
 
-    if ((ntp_keygenOptions.fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
-        tOptDesc* pOD = ntp_keygenOptions.pOptDesc;
-        int       ix;
+    if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
+        tOptDesc * pOD = pOpt->pOptDesc;
+        int        ix;
 
-        for (ix = ntp_keygenOptions.optCt; ix > 0; ix--, pOD++) {
+        for (ix = pOpt->optCt; ix > 0; ix--, pOD++) {
             coerce_it((void*)&(pOD->pz_Name));
             coerce_it((void*)&(pOD->pz_DisableName));
             coerce_it((void*)&(pOD->pz_DisablePfx));
index 6343d876b6790431997dbb29a60b9cb1928b53b5..58c0b578e75af18e057986e7d3efaf9014bb5aea 100644 (file)
@@ -1,11 +1,11 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntp-keygen-opts.h)
  *  
- *  It has been AutoGen-ed  April 28, 2011 at 06:47:31 AM by AutoGen 5.11.6
+ *  It has been AutoGen-ed  May  1, 2011 at 04:29:18 AM by AutoGen 5.11.9pre8
  *  From the definitions    ntp-keygen-opts.def
  *  and the template file   options
  *
- * Generated from AutoOpts 34:0:9 templates.
+ * Generated from AutoOpts 35:0:10 templates.
  *
  *  AutoOpts is a copyrighted work.  This header file is not encumbered
  *  by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -20,6 +20,7 @@
  * ntp-keygen copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved
  *
  * see html/copyright.html
+ * 
  */
 /*
  *  This file contains the programmatic interface to the Automated
@@ -39,7 +40,7 @@
  *  tolerable version is at least as old as what was current when the header
  *  template was released.
  */
-#define AO_TEMPLATE_VERSION 139264
+#define AO_TEMPLATE_VERSION 143360
 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
  || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
 # error option template version mismatches autoopts/options.h header
@@ -77,8 +78,8 @@ typedef enum {
 } teOptIndex;
 
 #define OPTION_CT    24
-#define NTP_KEYGEN_VERSION       "4.2.7p159"
-#define NTP_KEYGEN_FULL_VERSION  "ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.7p159"
+#define NTP_KEYGEN_VERSION       "4.2.7p160"
+#define NTP_KEYGEN_FULL_VERSION  "ntp-keygen (ntp) 4.2.7p160"
 
 /*
  *  Interface defines for all options.  Replace "n" with the UPPER_CASED
@@ -109,7 +110,6 @@ typedef enum {
     NTP_KEYGEN_EXIT_SUCCESS = 0,
     NTP_KEYGEN_EXIT_FAILURE = 1
 } ntp_keygen_exit_code_t;
-
 /*
  *  Make sure there are no #define name conflicts with the option names
  */
@@ -270,17 +270,17 @@ typedef enum {
                 ntp_keygenOptions.pzCurOpt  = NULL)
 #define START_OPT       RESTART_OPT(1)
 #define USAGE(c)        (*ntp_keygenOptions.pUsageProc)(&ntp_keygenOptions, c)
-/* extracted from opthead.tlib near line 435 */
+/* extracted from opthead.tlib near line 451 */
 
-/* * * * * *
- *
- *  Declare the ntp-keygen option descriptor.
- */
 #ifdef  __cplusplus
 extern "C" {
 #endif
 
-extern tOptions   ntp_keygenOptions;
+/* * * * * *
+ *
+ *  Declare the ntp-keygen option descriptor.
+ */
+extern tOptions ntp_keygenOptions;
 
 #if defined(ENABLE_NLS)
 # ifndef _
index 102a4e45a08542aa2e1bab6af13c0cfa5e325548..a08551adc3275ecd4cd9c49e56898e89d63825db 100644 (file)
@@ -6,7 +6,7 @@
 # 
 # EDIT THIS FILE WITH CAUTION  (ntp-keygen-opts.texi)
 # 
-# It has been AutoGen-ed  April 28, 2011 at 06:47:40 AM by AutoGen 5.11.6
+# It has been AutoGen-ed  May  1, 2011 at 04:29:27 AM by AutoGen 5.11.9pre8
 # From the definitions    ntp-keygen-opts.def
 # and the template file   aginfo.tpl
 @end ignore
@@ -51,7 +51,7 @@ This is the automatically generated usage text for ntp-keygen:
 
 @exampleindent 0
 @example
-ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.7p159
+ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.7p160
 USAGE:  ntp-keygen [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
   Flg Arg Option-Name    Description
    -c Str certificate    certificate scheme
@@ -67,7 +67,8 @@ USAGE:  ntp-keygen [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
    -l Num lifetime       set certificate lifetime
    -M no  md5key         generate MD5 keys
    -m Num modulus        modulus
-                                - it must be:  256 to 2048
+                                - It must be in the range:
+                                  256 to 2048
    -P no  pvt-cert       generate PC private certificate
    -p Str pvt-passwd     output private password
    -q Str get-pvt-passwd input private password
index f42b7ca7098135fccab728f89df1b4e5df07e459..87b6756e5c8248b036276d694f9efc6bafc85f00 100644 (file)
@@ -1,7 +1,7 @@
-.TH NTP-KEYGEN 1 2011-04-28 "(ntp 4.2.7p159)" "Programmer's Manual"
+.TH NTP-KEYGEN 1 2011-05-01 "(ntp 4.2.7p160)" "Programmer's Manual"
 .\"  EDIT THIS FILE WITH CAUTION  (ntp-keygen.1)
 .\"  
-.\"  It has been AutoGen-ed  April 28, 2011 at 06:47:40 AM by AutoGen 5.11.6
+.\"  It has been AutoGen-ed  May  1, 2011 at 04:29:27 AM by AutoGen 5.11.9pre8
 .\"  From the definitions    ntp-keygen-opts.def
 .\"  and the template file   agman1.tpl
 .\"
@@ -188,6 +188,7 @@ Please send bug reports to:  http://bugs.ntp.org, bugs@ntp.org
 .nf
 .na
 see html/copyright.html
+
 .fi
 .ad
 .PP