]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
upgrade to libopts-34.0.9
authorHarlan Stenn <stenn@ntp.org>
Tue, 22 Feb 2011 05:38:53 +0000 (00:38 -0500)
committerHarlan Stenn <stenn@ntp.org>
Tue, 22 Feb 2011 05:38:53 +0000 (00:38 -0500)
bk: 4d634bed7iVUnVkyyxfJWW2605chNA

59 files changed:
clockstuff/clktest-opts.c
clockstuff/clktest-opts.h
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
ntpsnmpd/ntpsnmpd-opts.c
ntpsnmpd/ntpsnmpd-opts.h
sntp/libopts/COPYING.gplv3
sntp/libopts/COPYING.lgplv3
sntp/libopts/Makefile.am
sntp/libopts/README
sntp/libopts/ag-char-map.h
sntp/libopts/autoopts.c
sntp/libopts/autoopts.h
sntp/libopts/autoopts/options.h
sntp/libopts/autoopts/usage-txt.h
sntp/libopts/boolean.c
sntp/libopts/compat/compat.h
sntp/libopts/compat/windows-config.h
sntp/libopts/configfile.c
sntp/libopts/cook.c
sntp/libopts/enumeration.c
sntp/libopts/environment.c
sntp/libopts/file.c
sntp/libopts/genshell.c
sntp/libopts/genshell.h
sntp/libopts/load.c
sntp/libopts/m4/libopts.m4
sntp/libopts/m4/liboptschk.m4
sntp/libopts/makeshell.c
sntp/libopts/nested.c
sntp/libopts/numeric.c
sntp/libopts/parse-duration.c
sntp/libopts/parse-duration.h
sntp/libopts/pgusage.c
sntp/libopts/proto.h
sntp/libopts/putshell.c
sntp/libopts/reset.c
sntp/libopts/restore.c
sntp/libopts/save.c
sntp/libopts/sort.c
sntp/libopts/stack.c
sntp/libopts/streqvcmp.c
sntp/libopts/text_mmap.c
sntp/libopts/time.c
sntp/libopts/tokenize.c
sntp/libopts/usage.c
sntp/libopts/value-type.h
sntp/libopts/version.c
sntp/libopts/xat-attribute.h
sntp/sntp-opts.c
sntp/sntp-opts.h
util/ntp-keygen-opts.c
util/ntp-keygen-opts.h

index 0bbf9b5498955e3dfa32f5ba2d96cdde0deef652..a08f4e9a9381a5e5ebffd6aba4eca63b64ef343f 100644 (file)
@@ -1,25 +1,23 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (clktest-opts.c)
  *  
- *  It has been AutoGen-ed  November 17, 2009 at 06:37:09 AM by AutoGen 5.10
+ *  It has been AutoGen-ed  February 22, 2011 at 12:28:58 AM by AutoGen 5.11.6
  *  From the definitions    clktest-opts.def
  *  and the template file   options
  *
- * Generated from AutoOpts 33:0:8 templates.
- */
-
-/*
- *  This file was produced by an AutoOpts template.  AutoOpts is a
- *  copyrighted work.  This source file is not encumbered by AutoOpts
- *  licensing, but is provided under the licensing terms chosen by the
- *  clktest author or copyright holder.  AutoOpts is licensed under
- *  the terms of the LGPL.  The redistributable library (``libopts'') is
- *  licensed under the terms of either the LGPL or, at the users discretion,
- *  the BSD license.  See the AutoOpts and/or libopts sources for details.
+ * Generated from AutoOpts 34:0:9 templates.
+ *
+ *  AutoOpts is a copyrighted work.  This source file is not encumbered
+ *  by AutoOpts licensing, but is provided under the licensing terms chosen
+ *  by the clktest author or copyright holder.  AutoOpts is
+ *  licensed under the terms of the LGPL.  The redistributable library
+ *  (``libopts'') is licensed under the terms of either the LGPL or, at the
+ *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
+ *  for details.
  *
  * This source file is copyrighted and licensed under the following terms:
  *
- * clktest copyright (c) 1970-2009 David L. Mills and/or others - all rights reserved
+ * clktest copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved
  *
  * see html/copyright.html
  */
@@ -40,8 +38,8 @@ extern "C" {
 /* TRANSLATORS: choose the translation for option names wisely because you
                 cannot ever change your mind. */
 tSCC zCopyright[] =
-       "clktest copyright (c) 1970-2009 David L. Mills and/or others, all rights reserved"
-/* extracted from /deacon/backroom/ntp-dev/include/copyright.def near line 8 */
+       "clktest 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";
@@ -67,39 +65,39 @@ extern int ttflags;
 /*
  *  Speed option description:
  */
-tSCC    zSpeedText[] =
+static char const zSpeedText[] =
         "Set the rate according to the speed";
-tSCC    zSpeed_NAME[]              = "SPEED";
-tSCC    zSpeed_Name[]              = "speed";
+static char const zSpeed_NAME[]              = "SPEED";
+static char const zSpeed_Name[]              = "speed";
 #define SPEED_FLAGS       (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 /*
  *  Debug option description:
  */
-tSCC    zDebugText[] =
+static char const zDebugText[] =
         "Turn on debugging output";
-tSCC    zDebug_NAME[]              = "DEBUG";
-tSCC    zDebug_Name[]              = "debug";
+static char const zDebug_NAME[]              = "DEBUG";
+static char const zDebug_Name[]              = "debug";
 #define DEBUG_FLAGS       (OPTST_DISABLED)
 
 /*
  *  Crmod option description:
  */
-tSCC    zCrmodText[] =
+static char const zCrmodText[] =
         "Turn on CRMOD flag";
-tSCC    zCrmod_NAME[]              = "CRMOD";
-tSCC    zCrmod_Name[]              = "crmod";
+static char const zCrmod_NAME[]              = "CRMOD";
+static char const zCrmod_Name[]              = "crmod";
 #define CRMOD_FLAGS       (OPTST_DISABLED)
 
 /*
  *  Command option description with
  *  "Must also have options" and "Incompatible options":
  */
-tSCC    zCommandText[] =
+static char const zCommandText[] =
         "";
-tSCC    zCommand_NAME[]            = "COMMAND";
-tSCC    zCommand_Name[]            = "command";
+static char const zCommand_NAME[]            = "COMMAND";
+static char const zCommand_Name[]            = "command";
 static const int
     aCommandMustList[] = {
     INDEX_OPT_TIMEOUT, NO_EQUIVALENT };
@@ -109,22 +107,22 @@ static const int
 /*
  *  Timeout option description:
  */
-tSCC    zTimeoutText[] =
+static char const zTimeoutText[] =
         "Limit wait for command completion";
-tSCC    zTimeout_NAME[]            = "TIMEOUT";
-tSCC    zTimeout_Name[]            = "timeout";
+static char const zTimeout_NAME[]            = "TIMEOUT";
+static char const zTimeout_Name[]            = "timeout";
 #define TIMEOUT_FLAGS       (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
 
 /*
  *  Help/More_Help/Version option descriptions:
  */
-tSCC zHelpText[]          = "Display extended usage information and exit";
-tSCC zHelp_Name[]         = "help";
+static char const zHelpText[]          = "Display extended usage information and exit";
+static char const zHelp_Name[]         = "help";
 #ifdef HAVE_WORKING_FORK
 #define OPTST_MORE_HELP_FLAGS   (OPTST_IMM | OPTST_NO_INIT)
-tSCC zMore_Help_Name[]    = "more-help";
-tSCC zMore_HelpText[]     = "Extended usage information passed thru pager";
+static char const zMore_Help_Name[]    = "more-help";
+static char const zMore_HelpText[]     = "Extended usage information passed thru pager";
 #else
 #define OPTST_MORE_HELP_FLAGS   (OPTST_OMITTED | OPTST_NO_INIT)
 #define zMore_Help_Name   NULL
@@ -137,14 +135,14 @@ tSCC zMore_HelpText[]     = "Extended usage information passed thru pager";
                                 OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT
 #endif
 
-tSCC zVersionText[]       = "Output version information and exit";
-tSCC zVersion_Name[]      = "version";
-tSCC zSave_OptsText[]     = "Save the option state to a config file";
-tSCC zSave_Opts_Name[]    = "save-opts";
-tSCC zLoad_OptsText[]     = "Load options from a config file";
-tSCC zLoad_Opts_NAME[]    = "LOAD_OPTS";
-tSCC zNotLoad_Opts_Name[] = "no-load-opts";
-tSCC zNotLoad_Opts_Pfx[]  = "no";
+static char const zVersionText[]       = "Output version information and exit";
+static char const zVersion_Name[]      = "version";
+static char const zSave_OptsText[]     = "Save the option state to a config file";
+static char const zSave_Opts_Name[]    = "save-opts";
+static char const zLoad_OptsText[]     = "Load options from a config file";
+static char const zLoad_Opts_NAME[]    = "LOAD_OPTS";
+static char const zNotLoad_Opts_Name[] = "no-load-opts";
+static char const zNotLoad_Opts_Pfx[]  = "no";
 #define zLoad_Opts_Name   (zNotLoad_Opts_Name + 3)
 /*
  *  Declare option callback procedures
@@ -154,8 +152,6 @@ tSCC zNotLoad_Opts_Pfx[]  = "no";
  *  Under test, omit argument processing, or call optionStackArg,
  *  if multiple copies are allowed.
  */
-extern tOptProc
-    optionPagedUsage, optionVersionStderr;
 static tOptProc
     doOptTimeout, doUsageOpt;
 
@@ -171,7 +167,10 @@ static tOptProc
  *  When not under test, there are different procs to use
  */
 extern tOptProc
-    optionPagedUsage, optionPrintVersion;
+    optionBooleanVal,    optionNestedVal,     optionNumericVal,
+    optionPagedUsage,    optionPrintVersion,  optionResetOpt,
+    optionStackArg,      optionTimeVal,       optionUnstackArg,
+    optionVersionStderr;
 static tOptProc
     doOptCrmod, doOptSpeed, doOptTimeout, doUsageOpt;
 
@@ -324,24 +323,24 @@ static tOptDesc optDesc[ OPTION_CT ] = {
  *
  *  Define the Clktest Option Environment
  */
-tSCC   zPROGNAME[]   = "CLKTEST";
-tSCC   zUsageTitle[] =
-"clktest - test the clock line discipline - Ver. 4.2.5p245-RC\n\
+static char const zPROGNAME[8] = "CLKTEST";
+static char const zUsageTitle[127] =
+"clktest - test the clock line discipline - Ver. 4.2.6p3\n\
 USAGE:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... <tty_device>\n";
-tSCC   zRcName[]     = ".ntprc";
-tSCC*  apzHomeList[] = {
-       "$HOME",
-       ".",
-       NULL };
+static char const zRcName[7] = ".ntprc";
+static char const * const apzHomeList[3] = {
+    "$HOME",
+    ".",
+    NULL };
 
-tSCC   zBugsAddr[]    = "http://bugs.ntp.org, bugs@ntp.org";
+static char const zBugsAddr[34]    = "http://bugs.ntp.org, bugs@ntp.org";
 #define zExplain NULL
-tSCC    zDetail[]     = "\n\
-Clktest can be used to test the clock line discipline (CLKLDISC,\n\
-it must be available), and to take a look at radio clocks attached\n\
-to a serial port.\n";
-tSCC    zFullVersion[] = CLKTEST_FULL_VERSION;
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 495 */
+static char const zDetail[164] = "\n\
+Clktest can be used to test the clock line discipline (CLKLDISC, it must\n\
+be available), and to take a look at radio clocks attached to a serial\n\
+port.\n";
+static char const zFullVersion[] = CLKTEST_FULL_VERSION;
+/* extracted from optcode.tlib near line 504 */
 
 #if defined(ENABLE_NLS)
 # define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -354,6 +353,26 @@ tSCC    zFullVersion[] = CLKTEST_FULL_VERSION;
 
 #define clktest_full_usage NULL
 #define clktest_short_usage NULL
+#ifndef  PKGDATADIR
+# define PKGDATADIR ""
+#endif
+
+#ifndef  WITH_PACKAGER
+# define clktest_packager_info NULL
+#else
+static char const clktest_packager_info[] =
+    "Packaged by " WITH_PACKAGER
+
+# ifdef WITH_PACKAGER_VERSION
+        " ("WITH_PACKAGER_VERSION")"
+# endif
+
+# ifdef WITH_PACKAGER_BUG_REPORTS
+    "\nReport clktest bugs to " WITH_PACKAGER_BUG_REPORTS
+# endif
+    "\n";
+#endif
+
 tOptions clktestOptions = {
     OPTIONS_STRUCT_VERSION,
     0, NULL,                    /* original argc + argv    */
@@ -363,7 +382,8 @@ tOptions clktestOptions = {
     + OPTPROC_LONGOPT
     + OPTPROC_NO_REQ_OPT
     + OPTPROC_ENVIRON
-    + OPTPROC_ARGS_REQ ),
+    + OPTPROC_ARGS_REQ
+    + OPTPROC_MISUSE ),
     0, NULL,                    /* current option index, current option */
     NULL,         NULL,         zPROGNAME,
     zRcName,      zCopyright,   zCopyrightNotice,
@@ -371,7 +391,7 @@ tOptions clktestOptions = {
     zExplain,     zDetail,      optDesc,
     zBugsAddr,                  /* address to send bugs to */
     NULL, NULL,                 /* extensions/saved state  */
-    optionUsage,       /* usage procedure */
+    optionUsage, /* usage procedure */
     translate_option_strings,   /* translation procedure */
     /*
      *  Indexes to special options
@@ -383,7 +403,8 @@ tOptions clktestOptions = {
     },
     10 /* full option count */, 5 /* user option count */,
     clktest_full_usage, clktest_short_usage,
-    NULL, NULL
+    NULL, NULL,
+    PKGDATADIR, clktest_packager_info
 };
 
 /*
@@ -395,7 +416,7 @@ doUsageOpt(
     tOptDesc*   pOptDesc )
 {
     (void)pOptions;
-    USAGE( EXIT_SUCCESS );
+    USAGE(EXIT_SUCCESS);
 }
 
 #if ! defined(TEST_CLKTEST_OPTS)
@@ -510,22 +531,25 @@ doOptTimeout(tOptions* pOptions, tOptDesc* pOptDesc)
     }
     pOptDesc->optArg.argInt = val;
 }
-/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 109 */
+/* extracted from optmain.tlib near line 107 */
 
 #if defined(TEST_CLKTEST_OPTS) /* TEST MAIN PROCEDURE: */
 
-extern void optionPutShell( tOptions* );
+extern void optionPutShell(tOptions*);
 
 int
 main(int argc, char** argv)
 {
     int res = EXIT_SUCCESS;
-    (void)optionProcess( &clktestOptions, argc, argv );
-    optionPutShell( &clktestOptions );
+    (void)optionProcess(&clktestOptions, argc, argv);
+    optionPutShell(&clktestOptions);
+    res = ferror(stdout);
+    if (res != 0)
+        fputs("output error writing to stdout\n", stderr);
     return res;
 }
 #endif  /* defined TEST_CLKTEST_OPTS */
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 627 */
+/* extracted from optcode.tlib near line 657 */
 
 #if ENABLE_NLS
 #include <stdio.h>
@@ -534,11 +558,11 @@ main(int argc, char** argv)
 #include <unistd.h>
 #include <autoopts/usage-txt.h>
 
-static char* AO_gettext( char const* pz );
+static char* AO_gettext(char const* pz);
 static void  coerce_it(void** s);
 
 static char*
-AO_gettext( char const* pz )
+AO_gettext(char const* pz)
 {
     char* pzRes;
     if (pz == NULL)
@@ -546,10 +570,10 @@ AO_gettext( char const* pz )
     pzRes = _(pz);
     if (pzRes == pz)
         return pzRes;
-    pzRes = strdup( pzRes );
+    pzRes = strdup(pzRes);
     if (pzRes == NULL) {
-        fputs( _("No memory for duping translated strings\n"), stderr );
-        exit( EXIT_FAILURE );
+        fputs(_("No memory for duping translated strings\n"), stderr);
+        exit(EXIT_FAILURE);
     }
     return pzRes;
 }
@@ -562,14 +586,13 @@ static void coerce_it(void** s) { *s = AO_gettext(*s); }
  *  This invokes the translation code (e.g. gettext(3)).
  */
 static void
-translate_option_strings( void )
+translate_option_strings(void)
 {
     /*
      *  Guard against re-translation.  It won't work.  The strings will have
      *  been changed by the first pass through this code.  One shot only.
      */
     if (option_usage_text.field_ct != 0) {
-
         /*
          *  Do the translations.  The first pointer follows the field count
          *  field.  The field count field is the size of a pointer.
@@ -589,6 +612,7 @@ translate_option_strings( void )
         COERSION(pzUsageTitle);
         COERSION(pzExplain);
         COERSION(pzDetail);
+        COERSION(pzPackager);
         option_usage_text.field_ct = 0;
 
         for (ix = clktestOptions.optCt; ix > 0; ix--, pOD++)
index a2ae555c3c0f467782f6bb5bd84634c3d98febe1..43f44236ee0b62d7c50b11cc0149e54dc2a98dcb 100644 (file)
@@ -1,25 +1,23 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (clktest-opts.h)
  *  
- *  It has been AutoGen-ed  November 17, 2009 at 06:37:09 AM by AutoGen 5.10
+ *  It has been AutoGen-ed  February 22, 2011 at 12:28:58 AM by AutoGen 5.11.6
  *  From the definitions    clktest-opts.def
  *  and the template file   options
  *
- * Generated from AutoOpts 33:0:8 templates.
- */
-
-/*
- *  This file was produced by an AutoOpts template.  AutoOpts is a
- *  copyrighted work.  This header file is not encumbered by AutoOpts
- *  licensing, but is provided under the licensing terms chosen by the
- *  clktest author or copyright holder.  AutoOpts is licensed under
- *  the terms of the LGPL.  The redistributable library (``libopts'') is
- *  licensed under the terms of either the LGPL or, at the users discretion,
- *  the BSD license.  See the AutoOpts and/or libopts sources for details.
+ * Generated from AutoOpts 34:0:9 templates.
+ *
+ *  AutoOpts is a copyrighted work.  This header file is not encumbered
+ *  by AutoOpts licensing, but is provided under the licensing terms chosen
+ *  by the clktest author or copyright holder.  AutoOpts is
+ *  licensed under the terms of the LGPL.  The redistributable library
+ *  (``libopts'') is licensed under the terms of either the LGPL or, at the
+ *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
+ *  for details.
  *
  * This source file is copyrighted and licensed under the following terms:
  *
- * clktest copyright (c) 1970-2009 David L. Mills and/or others - all rights reserved
+ * clktest copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved
  *
  * see html/copyright.html
  */
@@ -41,7 +39,7 @@
  *  tolerable version is at least as old as what was current when the header
  *  template was released.
  */
-#define AO_TEMPLATE_VERSION 135168
+#define AO_TEMPLATE_VERSION 139264
 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
  || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
 # error option template version mismatches autoopts/options.h header
@@ -65,13 +63,13 @@ typedef enum {
 } teOptIndex;
 
 #define OPTION_CT    10
-#define CLKTEST_VERSION       "4.2.5p245-RC"
-#define CLKTEST_FULL_VERSION  "clktest - test the clock line discipline - Ver. 4.2.5p245-RC"
+#define CLKTEST_VERSION       "4.2.6p3"
+#define CLKTEST_FULL_VERSION  "clktest - test the clock line discipline - Ver. 4.2.6p3"
 
 /*
  *  Interface defines for all options.  Replace "n" with the UPPER_CASED
  *  option name (as in the teOptIndex enumeration above).
- *  e.g. HAVE_OPT( SPEED )
+ *  e.g. HAVE_OPT(SPEED)
  */
 #define         DESC(n) (clktestOptions.pOptDesc[INDEX_OPT_## n])
 #define     HAVE_OPT(n) (! UNUSED_OPT(& DESC(n)))
@@ -85,10 +83,19 @@ typedef enum {
 #define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
 #define    CLEAR_OPT(n) STMTS( \
                 DESC(n).fOptState &= OPTST_PERSISTENT_MASK;   \
-                if ( (DESC(n).fOptState & OPTST_INITENABLED) == 0) \
+                if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \
                     DESC(n).fOptState |= OPTST_DISABLED; \
                 DESC(n).optCookie = NULL )
 
+/* * * * * *
+ *
+ *  Enumeration of clktest exit codes
+ */
+typedef enum {
+    CLKTEST_EXIT_SUCCESS = 0,
+    CLKTEST_EXIT_FAILURE = 1
+} clktest_exit_code_t;
+
 /* * * * * *
  *
  *  Globals exported from the test the clock line discipline option definitions
@@ -178,14 +185,14 @@ typedef enum {
 /*
  *  Interface defines not associated with particular options
  */
-#define ERRSKIP_OPTERR  STMTS( clktestOptions.fOptSet &= ~OPTPROC_ERRSTOP )
-#define ERRSTOP_OPTERR  STMTS( clktestOptions.fOptSet |= OPTPROC_ERRSTOP )
+#define ERRSKIP_OPTERR  STMTS(clktestOptions.fOptSet &= ~OPTPROC_ERRSTOP)
+#define ERRSTOP_OPTERR  STMTS(clktestOptions.fOptSet |= OPTPROC_ERRSTOP)
 #define RESTART_OPT(n)  STMTS( \
                 clktestOptions.curOptIdx = (n); \
-                clktestOptions.pzCurOpt  = NULL )
+                clktestOptions.pzCurOpt  = NULL)
 #define START_OPT       RESTART_OPT(1)
-#define USAGE(c)        (*clktestOptions.pUsageProc)( &clktestOptions, c )
-/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 409 */
+#define USAGE(c)        (*clktestOptions.pUsageProc)(&clktestOptions, c)
+/* extracted from opthead.tlib near line 435 */
 
 /* * * * * *
  *
@@ -200,9 +207,9 @@ extern tOptions   clktestOptions;
 #if defined(ENABLE_NLS)
 # ifndef _
 #   include <stdio.h>
-    static inline char* aoGetsText( char const* pz ) {
+    static inline char* aoGetsText(char const* pz) {
         if (pz == NULL) return NULL;
-        return (char*)gettext( pz );
+        return (char*)gettext(pz);
     }
 #   define _(s)  aoGetsText(s)
 # endif /* _() */
index eacd4da5d02a53014fefd613542e40d745285f45..98fa6fccfcf747074783eaa30ca835aafdf08994 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpd-opts.c)
  *  
- *  It has been AutoGen-ed  January  3, 2011 at 09:15:35 PM by AutoGen 5.11.6pre7
+ *  It has been AutoGen-ed  February 22, 2011 at 12:28:59 AM by AutoGen 5.11.6
  *  From the definitions    ntpd-opts.def
  *  and the template file   options
  *
@@ -38,7 +38,7 @@ extern "C" {
                 cannot ever change your mind. */
 tSCC zCopyright[] =
        "ntpd copyright (c) 1970-2011 David L. Mills and/or others, all rights reserved"
-/* extracted from ../include/copyright.def near line 8 */
+/* extracted from copyright.def near line 8 */
 ;
 tSCC zCopyrightNotice[24] =
 "see html/copyright.html";
@@ -963,7 +963,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 /usr/local/gnu/share/autogen/optcode.tpl near line 504 */
+/* extracted from optcode.tlib near line 504 */
 
 #if defined(ENABLE_NLS)
 # define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -980,6 +980,22 @@ static char const zFullVersion[] = NTPD_FULL_VERSION;
 # define PKGDATADIR ""
 #endif
 
+#ifndef  WITH_PACKAGER
+# define ntpd_packager_info NULL
+#else
+static char const ntpd_packager_info[] =
+    "Packaged by " WITH_PACKAGER
+
+# ifdef WITH_PACKAGER_VERSION
+        " ("WITH_PACKAGER_VERSION")"
+# endif
+
+# ifdef WITH_PACKAGER_BUG_REPORTS
+    "\nReport ntpd bugs to " WITH_PACKAGER_BUG_REPORTS
+# endif
+    "\n";
+#endif
+
 tOptions ntpdOptions = {
     OPTIONS_STRUCT_VERSION,
     0, NULL,                    /* original argc + argv    */
@@ -998,7 +1014,7 @@ tOptions ntpdOptions = {
     zExplain,     zDetail,      optDesc,
     zBugsAddr,                  /* address to send bugs to */
     NULL, NULL,                 /* extensions/saved state  */
-    optionUsage,       /* usage procedure */
+    optionUsage, /* usage procedure */
     translate_option_strings,   /* translation procedure */
     /*
      *  Indexes to special options
@@ -1011,7 +1027,7 @@ tOptions ntpdOptions = {
     35 /* full option count */, 32 /* user option count */,
     ntpd_full_usage, ntpd_short_usage,
     NULL, NULL,
-    PKGDATADIR
+    PKGDATADIR, ntpd_packager_info
 };
 
 /*
@@ -1041,7 +1057,7 @@ DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
 }
 #endif /* defined DEBUG */
 #endif /* defined(TEST_NTPD_OPTS) */
-/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 107 */
+/* extracted from optmain.tlib near line 107 */
 
 #if defined(TEST_NTPD_OPTS) /* TEST MAIN PROCEDURE: */
 
@@ -1059,7 +1075,7 @@ main(int argc, char** argv)
     return res;
 }
 #endif  /* defined TEST_NTPD_OPTS */
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 641 */
+/* extracted from optcode.tlib near line 657 */
 
 #if ENABLE_NLS
 #include <stdio.h>
@@ -1103,7 +1119,6 @@ translate_option_strings(void)
      *  been changed by the first pass through this code.  One shot only.
      */
     if (option_usage_text.field_ct != 0) {
-
         /*
          *  Do the translations.  The first pointer follows the field count
          *  field.  The field count field is the size of a pointer.
@@ -1123,6 +1138,7 @@ translate_option_strings(void)
         COERSION(pzUsageTitle);
         COERSION(pzExplain);
         COERSION(pzDetail);
+        COERSION(pzPackager);
         option_usage_text.field_ct = 0;
 
         for (ix = ntpdOptions.optCt; ix > 0; ix--, pOD++)
index 29cfd109977d9db4ac847eb2a226978426c2c87d..c217160ce65cd7d06935d3792ba35034c85ae5ea 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpd-opts.h)
  *  
- *  It has been AutoGen-ed  January  3, 2011 at 09:15:35 PM by AutoGen 5.11.6pre7
+ *  It has been AutoGen-ed  February 22, 2011 at 12:28:59 AM by AutoGen 5.11.6
  *  From the definitions    ntpd-opts.def
  *  and the template file   options
  *
@@ -341,7 +341,7 @@ typedef enum {
                 ntpdOptions.pzCurOpt  = NULL)
 #define START_OPT       RESTART_OPT(1)
 #define USAGE(c)        (*ntpdOptions.pUsageProc)(&ntpdOptions, c)
-/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 435 */
+/* extracted from opthead.tlib near line 435 */
 
 /* * * * * *
  *
index 64451771a917b11a2515d0631e2d02eb65c83b17..3f8f7064a748bd31f974a3275f07cc44869a0dca 100644 (file)
@@ -1,25 +1,23 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpdsim-opts.c)
  *  
- *  It has been AutoGen-ed  November 17, 2009 at 06:37:12 AM by AutoGen 5.10
+ *  It has been AutoGen-ed  February 22, 2011 at 12:29:00 AM by AutoGen 5.11.6
  *  From the definitions    ntpdsim-opts.def
  *  and the template file   options
  *
- * Generated from AutoOpts 33:0:8 templates.
- */
-
-/*
- *  This file was produced by an AutoOpts template.  AutoOpts is a
- *  copyrighted work.  This source file is not encumbered by AutoOpts
- *  licensing, but is provided under the licensing terms chosen by the
- *  ntpdsim author or copyright holder.  AutoOpts is licensed under
- *  the terms of the LGPL.  The redistributable library (``libopts'') is
- *  licensed under the terms of either the LGPL or, at the users discretion,
- *  the BSD license.  See the AutoOpts and/or libopts sources for details.
+ * Generated from AutoOpts 34:0:9 templates.
+ *
+ *  AutoOpts is a copyrighted work.  This source file is not encumbered
+ *  by AutoOpts licensing, but is provided under the licensing terms chosen
+ *  by the ntpdsim author or copyright holder.  AutoOpts is
+ *  licensed under the terms of the LGPL.  The redistributable library
+ *  (``libopts'') is licensed under the terms of either the LGPL or, at the
+ *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
+ *  for details.
  *
  * This source file is copyrighted and licensed under the following terms:
  *
- * ntpdsim copyright (c) 1970-2009 David L. Mills and/or others - all rights reserved
+ * ntpdsim copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved
  *
  * see html/copyright.html
  */
@@ -39,8 +37,8 @@ extern "C" {
 /* TRANSLATORS: choose the translation for option names wisely because you
                 cannot ever change your mind. */
 tSCC zCopyright[] =
-       "ntpdsim copyright (c) 1970-2009 David L. Mills and/or others, all rights reserved"
-/* extracted from /deacon/backroom/ntp-dev/include/copyright.def near line 8 */
+       "ntpdsim 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";
@@ -67,31 +65,39 @@ extern tUsageProc optionUsage;
 #endif
 
 /*
- *  Ipv4 option description:
+ *  Ipv4 option description with
+ *  "Must also have options" and "Incompatible options":
  */
-tSCC    zIpv4Text[] =
+static char const zIpv4Text[] =
         "Force IPv4 DNS name resolution";
-tSCC    zIpv4_NAME[]               = "IPV4";
-tSCC    zIpv4_Name[]               = "ipv4";
+static char const zIpv4_NAME[]               = "IPV4";
+static char const zIpv4_Name[]               = "ipv4";
+static const int
+    aIpv4CantList[] = {
+    INDEX_OPT_IPV6, NO_EQUIVALENT };
 #define IPV4_FLAGS       (OPTST_DISABLED)
 
 /*
- *  Ipv6 option description:
+ *  Ipv6 option description with
+ *  "Must also have options" and "Incompatible options":
  */
-tSCC    zIpv6Text[] =
+static char const zIpv6Text[] =
         "Force IPv6 DNS name resolution";
-tSCC    zIpv6_NAME[]               = "IPV6";
-tSCC    zIpv6_Name[]               = "ipv6";
+static char const zIpv6_NAME[]               = "IPV6";
+static char const zIpv6_Name[]               = "ipv6";
+static const int
+    aIpv6CantList[] = {
+    INDEX_OPT_IPV4, NO_EQUIVALENT };
 #define IPV6_FLAGS       (OPTST_DISABLED)
 
 /*
  *  Authreq option description with
  *  "Must also have options" and "Incompatible options":
  */
-tSCC    zAuthreqText[] =
+static char const zAuthreqText[] =
         "Require crypto authentication";
-tSCC    zAuthreq_NAME[]            = "AUTHREQ";
-tSCC    zAuthreq_Name[]            = "authreq";
+static char const zAuthreq_NAME[]            = "AUTHREQ";
+static char const zAuthreq_Name[]            = "authreq";
 static const int
     aAuthreqCantList[] = {
     INDEX_OPT_AUTHNOREQ, NO_EQUIVALENT };
@@ -101,10 +107,10 @@ static const int
  *  Authnoreq option description with
  *  "Must also have options" and "Incompatible options":
  */
-tSCC    zAuthnoreqText[] =
+static char const zAuthnoreqText[] =
         "Do not require crypto authentication";
-tSCC    zAuthnoreq_NAME[]          = "AUTHNOREQ";
-tSCC    zAuthnoreq_Name[]          = "authnoreq";
+static char const zAuthnoreq_NAME[]          = "AUTHNOREQ";
+static char const zAuthnoreq_Name[]          = "authnoreq";
 static const int
     aAuthnoreqCantList[] = {
     INDEX_OPT_AUTHREQ, NO_EQUIVALENT };
@@ -113,19 +119,19 @@ static const int
 /*
  *  Bcastsync option description:
  */
-tSCC    zBcastsyncText[] =
+static char const zBcastsyncText[] =
         "Allow us to sync to broadcast servers";
-tSCC    zBcastsync_NAME[]          = "BCASTSYNC";
-tSCC    zBcastsync_Name[]          = "bcastsync";
+static char const zBcastsync_NAME[]          = "BCASTSYNC";
+static char const zBcastsync_Name[]          = "bcastsync";
 #define BCASTSYNC_FLAGS       (OPTST_DISABLED)
 
 /*
  *  Configfile option description:
  */
-tSCC    zConfigfileText[] =
+static char const zConfigfileText[] =
         "configuration file name";
-tSCC    zConfigfile_NAME[]         = "CONFIGFILE";
-tSCC    zConfigfile_Name[]         = "configfile";
+static char const zConfigfile_NAME[]         = "CONFIGFILE";
+static char const zConfigfile_Name[]         = "configfile";
 #define CONFIGFILE_FLAGS       (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
@@ -133,121 +139,121 @@ tSCC    zConfigfile_Name[]         = "configfile";
  *  Debug_Level option description:
  */
 #ifdef DEBUG
-tSCC    zDebug_LevelText[] =
+static char const zDebug_LevelText[] =
         "Increase output debug message level";
-tSCC    zDebug_Level_NAME[]        = "DEBUG_LEVEL";
-tSCC    zDebug_Level_Name[]        = "debug-level";
+static char const zDebug_Level_NAME[]        = "DEBUG_LEVEL";
+static char const zDebug_Level_Name[]        = "debug-level";
 #define DEBUG_LEVEL_FLAGS       (OPTST_DISABLED)
 
 #else   /* disable Debug_Level */
 #define DEBUG_LEVEL_FLAGS       (OPTST_OMITTED | OPTST_NO_INIT)
 #define zDebug_Level_NAME      NULL
-#define zDebug_LevelText       NULL
-#define zDebug_Level_Name      NULL
+static char const zDebug_Level_Name[] = "debug-level";
+static char const zDebug_LevelText[]  = "this package was built using 'configure --disable--debug'";
 #endif  /* DEBUG */
 
 /*
  *  Set_Debug_Level option description:
  */
 #ifdef DEBUG
-tSCC    zSet_Debug_LevelText[] =
+static char const zSet_Debug_LevelText[] =
         "Set the output debug message level";
-tSCC    zSet_Debug_Level_NAME[]    = "SET_DEBUG_LEVEL";
-tSCC    zSet_Debug_Level_Name[]    = "set-debug-level";
+static char const zSet_Debug_Level_NAME[]    = "SET_DEBUG_LEVEL";
+static char const zSet_Debug_Level_Name[]    = "set-debug-level";
 #define SET_DEBUG_LEVEL_FLAGS       (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 #else   /* disable Set_Debug_Level */
 #define SET_DEBUG_LEVEL_FLAGS       (OPTST_OMITTED | OPTST_NO_INIT)
 #define zSet_Debug_Level_NAME      NULL
-#define zSet_Debug_LevelText       NULL
-#define zSet_Debug_Level_Name      NULL
+static char const zSet_Debug_Level_Name[] = "set-debug-level";
+static char const zSet_Debug_LevelText[]  = "this package was built using 'configure --disable--debug'";
 #endif  /* DEBUG */
 
 /*
  *  Driftfile option description:
  */
-tSCC    zDriftfileText[] =
+static char const zDriftfileText[] =
         "frequency drift file name";
-tSCC    zDriftfile_NAME[]          = "DRIFTFILE";
-tSCC    zDriftfile_Name[]          = "driftfile";
+static char const zDriftfile_NAME[]          = "DRIFTFILE";
+static char const zDriftfile_Name[]          = "driftfile";
 #define DRIFTFILE_FLAGS       (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 /*
  *  Panicgate option description:
  */
-tSCC    zPanicgateText[] =
+static char const zPanicgateText[] =
         "Allow the first adjustment to be Big";
-tSCC    zPanicgate_NAME[]          = "PANICGATE";
-tSCC    zPanicgate_Name[]          = "panicgate";
+static char const zPanicgate_NAME[]          = "PANICGATE";
+static char const zPanicgate_Name[]          = "panicgate";
 #define PANICGATE_FLAGS       (OPTST_DISABLED)
 
 /*
  *  Jaildir option description:
  */
 #ifdef HAVE_DROPROOT
-tSCC    zJaildirText[] =
+static char const zJaildirText[] =
         "Jail directory";
-tSCC    zJaildir_NAME[]            = "JAILDIR";
-tSCC    zJaildir_Name[]            = "jaildir";
+static char const zJaildir_NAME[]            = "JAILDIR";
+static char const zJaildir_Name[]            = "jaildir";
 #define JAILDIR_FLAGS       (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 #else   /* disable Jaildir */
 #define JAILDIR_FLAGS       (OPTST_OMITTED | OPTST_NO_INIT)
 #define zJaildir_NAME      NULL
-#define zJaildirText       NULL
-#define zJaildir_Name      NULL
+static char const zJaildir_Name[] = "jaildir";
+static char const zJaildirText[]  = "built without --enable-clockctl or --enable-linuxcaps";
 #endif  /* HAVE_DROPROOT */
 
 /*
  *  Interface option description:
  */
-tSCC    zInterfaceText[] =
+static char const zInterfaceText[] =
         "Listen on an interface name or address";
-tSCC    zInterface_NAME[]          = "INTERFACE";
-tSCC    zInterface_Name[]          = "interface";
+static char const zInterface_NAME[]          = "INTERFACE";
+static char const zInterface_Name[]          = "interface";
 #define INTERFACE_FLAGS       (OPTST_DISABLED | OPTST_STACKED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 /*
  *  Keyfile option description:
  */
-tSCC    zKeyfileText[] =
+static char const zKeyfileText[] =
         "path to symmetric keys";
-tSCC    zKeyfile_NAME[]            = "KEYFILE";
-tSCC    zKeyfile_Name[]            = "keyfile";
+static char const zKeyfile_NAME[]            = "KEYFILE";
+static char const zKeyfile_Name[]            = "keyfile";
 #define KEYFILE_FLAGS       (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 /*
  *  Logfile option description:
  */
-tSCC    zLogfileText[] =
+static char const zLogfileText[] =
         "path to the log file";
-tSCC    zLogfile_NAME[]            = "LOGFILE";
-tSCC    zLogfile_Name[]            = "logfile";
+static char const zLogfile_NAME[]            = "LOGFILE";
+static char const zLogfile_Name[]            = "logfile";
 #define LOGFILE_FLAGS       (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 /*
  *  Novirtualips option description:
  */
-tSCC    zNovirtualipsText[] =
+static char const zNovirtualipsText[] =
         "Do not listen to virtual interfaces";
-tSCC    zNovirtualips_NAME[]       = "NOVIRTUALIPS";
-tSCC    zNovirtualips_Name[]       = "novirtualips";
+static char const zNovirtualips_NAME[]       = "NOVIRTUALIPS";
+static char const zNovirtualips_Name[]       = "novirtualips";
 #define NOVIRTUALIPS_FLAGS       (OPTST_DISABLED)
 
 /*
  *  Modifymmtimer option description:
  */
 #ifdef SYS_WINNT
-tSCC    zModifymmtimerText[] =
+static char const zModifymmtimerText[] =
         "Modify Multimedia Timer (Windows only)";
-tSCC    zModifymmtimer_NAME[]      = "MODIFYMMTIMER";
-tSCC    zModifymmtimer_Name[]      = "modifymmtimer";
+static char const zModifymmtimer_NAME[]      = "MODIFYMMTIMER";
+static char const zModifymmtimer_Name[]      = "modifymmtimer";
 #define MODIFYMMTIMER_FLAGS       (OPTST_DISABLED)
 
 #else   /* disable Modifymmtimer */
@@ -260,57 +266,57 @@ tSCC    zModifymmtimer_Name[]      = "modifymmtimer";
 /*
  *  Nofork option description:
  */
-tSCC    zNoforkText[] =
+static char const zNoforkText[] =
         "Do not fork";
-tSCC    zNofork_NAME[]             = "NOFORK";
-tSCC    zNofork_Name[]             = "nofork";
+static char const zNofork_NAME[]             = "NOFORK";
+static char const zNofork_Name[]             = "nofork";
 #define NOFORK_FLAGS       (OPTST_DISABLED)
 
 /*
  *  Nice option description:
  */
-tSCC    zNiceText[] =
+static char const zNiceText[] =
         "Run at high priority";
-tSCC    zNice_NAME[]               = "NICE";
-tSCC    zNice_Name[]               = "nice";
+static char const zNice_NAME[]               = "NICE";
+static char const zNice_Name[]               = "nice";
 #define NICE_FLAGS       (OPTST_DISABLED)
 
 /*
  *  Pidfile option description:
  */
-tSCC    zPidfileText[] =
+static char const zPidfileText[] =
         "path to the PID file";
-tSCC    zPidfile_NAME[]            = "PIDFILE";
-tSCC    zPidfile_Name[]            = "pidfile";
+static char const zPidfile_NAME[]            = "PIDFILE";
+static char const zPidfile_Name[]            = "pidfile";
 #define PIDFILE_FLAGS       (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 /*
  *  Priority option description:
  */
-tSCC    zPriorityText[] =
+static char const zPriorityText[] =
         "Process priority";
-tSCC    zPriority_NAME[]           = "PRIORITY";
-tSCC    zPriority_Name[]           = "priority";
+static char const zPriority_NAME[]           = "PRIORITY";
+static char const zPriority_Name[]           = "priority";
 #define PRIORITY_FLAGS       (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
 
 /*
  *  Quit option description:
  */
-tSCC    zQuitText[] =
+static char const zQuitText[] =
         "Set the time and quit";
-tSCC    zQuit_NAME[]               = "QUIT";
-tSCC    zQuit_Name[]               = "quit";
+static char const zQuit_NAME[]               = "QUIT";
+static char const zQuit_Name[]               = "quit";
 #define QUIT_FLAGS       (OPTST_DISABLED)
 
 /*
  *  Propagationdelay option description:
  */
-tSCC    zPropagationdelayText[] =
+static char const zPropagationdelayText[] =
         "Broadcast/propagation delay";
-tSCC    zPropagationdelay_NAME[]   = "PROPAGATIONDELAY";
-tSCC    zPropagationdelay_Name[]   = "propagationdelay";
+static char const zPropagationdelay_NAME[]   = "PROPAGATIONDELAY";
+static char const zPropagationdelay_Name[]   = "propagationdelay";
 #define PROPAGATIONDELAY_FLAGS       (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
@@ -318,10 +324,10 @@ tSCC    zPropagationdelay_Name[]   = "propagationdelay";
  *  Saveconfigquit option description:
  */
 #ifdef SAVECONFIG
-tSCC    zSaveconfigquitText[] =
+static char const zSaveconfigquitText[] =
         "Save parsed configuration and quit";
-tSCC    zSaveconfigquit_NAME[]     = "SAVECONFIGQUIT";
-tSCC    zSaveconfigquit_Name[]     = "saveconfigquit";
+static char const zSaveconfigquit_NAME[]     = "SAVECONFIGQUIT";
+static char const zSaveconfigquit_Name[]     = "saveconfigquit";
 #define SAVECONFIGQUIT_FLAGS       (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
@@ -335,20 +341,20 @@ tSCC    zSaveconfigquit_Name[]     = "saveconfigquit";
 /*
  *  Statsdir option description:
  */
-tSCC    zStatsdirText[] =
+static char const zStatsdirText[] =
         "Statistics file location";
-tSCC    zStatsdir_NAME[]           = "STATSDIR";
-tSCC    zStatsdir_Name[]           = "statsdir";
+static char const zStatsdir_NAME[]           = "STATSDIR";
+static char const zStatsdir_Name[]           = "statsdir";
 #define STATSDIR_FLAGS       (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 /*
  *  Trustedkey option description:
  */
-tSCC    zTrustedkeyText[] =
+static char const zTrustedkeyText[] =
         "Trusted key number";
-tSCC    zTrustedkey_NAME[]         = "TRUSTEDKEY";
-tSCC    zTrustedkey_Name[]         = "trustedkey";
+static char const zTrustedkey_NAME[]         = "TRUSTEDKEY";
+static char const zTrustedkey_Name[]         = "trustedkey";
 #define TRUSTEDKEY_FLAGS       (OPTST_DISABLED | OPTST_STACKED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
@@ -356,67 +362,67 @@ tSCC    zTrustedkey_Name[]         = "trustedkey";
  *  User option description:
  */
 #ifdef HAVE_DROPROOT
-tSCC    zUserText[] =
+static char const zUserText[] =
         "Run as userid (or userid:groupid)";
-tSCC    zUser_NAME[]               = "USER";
-tSCC    zUser_Name[]               = "user";
+static char const zUser_NAME[]               = "USER";
+static char const zUser_Name[]               = "user";
 #define USER_FLAGS       (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 #else   /* disable User */
 #define USER_FLAGS       (OPTST_OMITTED | OPTST_NO_INIT)
 #define zUser_NAME      NULL
-#define zUserText       NULL
-#define zUser_Name      NULL
+static char const zUser_Name[] = "user";
+static char const zUserText[]  = "built without --enable-clockctl or --enable-linuxcaps";
 #endif  /* HAVE_DROPROOT */
 
 /*
  *  Updateinterval option description:
  */
-tSCC    zUpdateintervalText[] =
+static char const zUpdateintervalText[] =
         "interval in seconds between scans for new or dropped interfaces";
-tSCC    zUpdateinterval_NAME[]     = "UPDATEINTERVAL";
-tSCC    zUpdateinterval_Name[]     = "updateinterval";
+static char const zUpdateinterval_NAME[]     = "UPDATEINTERVAL";
+static char const zUpdateinterval_Name[]     = "updateinterval";
 #define UPDATEINTERVAL_FLAGS       (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
 
 /*
  *  Var option description:
  */
-tSCC    zVarText[] =
+static char const zVarText[] =
         "make ARG an ntp variable (RW)";
-tSCC    zVar_NAME[]                = "VAR";
-tSCC    zVar_Name[]                = "var";
+static char const zVar_NAME[]                = "VAR";
+static char const zVar_Name[]                = "var";
 #define VAR_FLAGS       (OPTST_DISABLED | OPTST_STACKED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 /*
  *  Dvar option description:
  */
-tSCC    zDvarText[] =
+static char const zDvarText[] =
         "make ARG an ntp variable (RW|DEF)";
-tSCC    zDvar_NAME[]               = "DVAR";
-tSCC    zDvar_Name[]               = "dvar";
+static char const zDvar_NAME[]               = "DVAR";
+static char const zDvar_Name[]               = "dvar";
 #define DVAR_FLAGS       (OPTST_DISABLED | OPTST_STACKED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 /*
  *  Slew option description:
  */
-tSCC    zSlewText[] =
+static char const zSlewText[] =
         "Slew up to 600 seconds";
-tSCC    zSlew_NAME[]               = "SLEW";
-tSCC    zSlew_Name[]               = "slew";
+static char const zSlew_NAME[]               = "SLEW";
+static char const zSlew_Name[]               = "slew";
 #define SLEW_FLAGS       (OPTST_DISABLED)
 
 /*
  *  Usepcc option description:
  */
 #ifdef SYS_WINNT
-tSCC    zUsepccText[] =
+static char const zUsepccText[] =
         "Use CPU cycle counter (Windows only)";
-tSCC    zUsepcc_NAME[]             = "USEPCC";
-tSCC    zUsepcc_Name[]             = "usepcc";
+static char const zUsepcc_NAME[]             = "USEPCC";
+static char const zUsepcc_Name[]             = "usepcc";
 #define USEPCC_FLAGS       (OPTST_DISABLED)
 
 #else   /* disable Usepcc */
@@ -430,10 +436,10 @@ tSCC    zUsepcc_Name[]             = "usepcc";
  *  Pccfreq option description:
  */
 #ifdef SYS_WINNT
-tSCC    zPccfreqText[] =
+static char const zPccfreqText[] =
         "Force CPU cycle counter use (Windows only)";
-tSCC    zPccfreq_NAME[]            = "PCCFREQ";
-tSCC    zPccfreq_Name[]            = "pccfreq";
+static char const zPccfreq_NAME[]            = "PCCFREQ";
+static char const zPccfreq_Name[]            = "pccfreq";
 #define PCCFREQ_FLAGS       (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
@@ -447,12 +453,12 @@ tSCC    zPccfreq_Name[]            = "pccfreq";
 /*
  *  Help/More_Help/Version option descriptions:
  */
-tSCC zHelpText[]          = "Display extended usage information and exit";
-tSCC zHelp_Name[]         = "help";
+static char const zHelpText[]          = "Display extended usage information and exit";
+static char const zHelp_Name[]         = "help";
 #ifdef HAVE_WORKING_FORK
 #define OPTST_MORE_HELP_FLAGS   (OPTST_IMM | OPTST_NO_INIT)
-tSCC zMore_Help_Name[]    = "more-help";
-tSCC zMore_HelpText[]     = "Extended usage information passed thru pager";
+static char const zMore_Help_Name[]    = "more-help";
+static char const zMore_HelpText[]     = "Extended usage information passed thru pager";
 #else
 #define OPTST_MORE_HELP_FLAGS   (OPTST_OMITTED | OPTST_NO_INIT)
 #define zMore_Help_Name   NULL
@@ -465,14 +471,14 @@ tSCC zMore_HelpText[]     = "Extended usage information passed thru pager";
                                 OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT
 #endif
 
-tSCC zVersionText[]       = "Output version information and exit";
-tSCC zVersion_Name[]      = "version";
-tSCC zSave_OptsText[]     = "Save the option state to a config file";
-tSCC zSave_Opts_Name[]    = "save-opts";
-tSCC zLoad_OptsText[]     = "Load options from a config file";
-tSCC zLoad_Opts_NAME[]    = "LOAD_OPTS";
-tSCC zNotLoad_Opts_Name[] = "no-load-opts";
-tSCC zNotLoad_Opts_Pfx[]  = "no";
+static char const zVersionText[]       = "Output version information and exit";
+static char const zVersion_Name[]      = "version";
+static char const zSave_OptsText[]     = "Save the option state to a config file";
+static char const zSave_Opts_Name[]    = "save-opts";
+static char const zLoad_OptsText[]     = "Load options from a config file";
+static char const zLoad_Opts_NAME[]    = "LOAD_OPTS";
+static char const zNotLoad_Opts_Name[] = "no-load-opts";
+static char const zNotLoad_Opts_Pfx[]  = "no";
 #define zLoad_Opts_Name   (zNotLoad_Opts_Name + 3)
 /*
  *  Declare option callback procedures
@@ -487,9 +493,6 @@ tSCC zNotLoad_Opts_Pfx[]  = "no";
  *  Under test, omit argument processing, or call optionStackArg,
  *  if multiple copies are allowed.
  */
-extern tOptProc
-    optionNumericVal,    optionPagedUsage,    optionStackArg,
-    optionVersionStderr;
 static tOptProc
     doUsageOpt;
 
@@ -504,7 +507,10 @@ static tOptProc
  *  When not under test, there are different procs to use
  */
 extern tOptProc
-    optionNumericVal, optionPagedUsage, optionPrintVersion, optionStackArg;
+    optionBooleanVal,    optionNestedVal,     optionNumericVal,
+    optionPagedUsage,    optionPrintVersion,  optionResetOpt,
+    optionStackArg,      optionTimeVal,       optionUnstackArg,
+    optionVersionStderr;
 static tOptProc
     doUsageOpt;
 
@@ -527,25 +533,25 @@ static tOptProc
  */
 static tOptDesc optDesc[ OPTION_CT ] = {
   {  /* entry idx, value */ 0, VALUE_OPT_IPV4,
-     /* equiv idx, value */ NO_EQUIVALENT, 0,
+     /* equiv idx, value */ 0, VALUE_OPT_IPV4,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ IPV4_FLAGS, 0,
      /* last opt argumnt */ { NULL },
      /* arg list/cookie  */ NULL,
-     /* must/cannot opts */ NULL, NULL,
+     /* must/cannot opts */ NULL, aIpv4CantList,
      /* option proc      */ NULL,
      /* desc, NAME, name */ zIpv4Text, zIpv4_NAME, zIpv4_Name,
      /* disablement strs */ NULL, NULL },
 
   {  /* entry idx, value */ 1, VALUE_OPT_IPV6,
-     /* equiv idx, value */ NOLIMIT, NOLIMIT,
-     /* equivalenced to  */ INDEX_OPT_IPV4,
+     /* equiv idx, value */ 1, VALUE_OPT_IPV6,
+     /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ IPV6_FLAGS, 0,
      /* last opt argumnt */ { NULL },
      /* arg list/cookie  */ NULL,
-     /* must/cannot opts */ NULL, NULL,
+     /* must/cannot opts */ NULL, aIpv6CantList,
      /* option proc      */ NULL,
      /* desc, NAME, name */ zIpv6Text, zIpv6_NAME, zIpv6_Name,
      /* disablement strs */ NULL, NULL },
@@ -979,21 +985,21 @@ static tOptDesc optDesc[ OPTION_CT ] = {
  *
  *  Define the Ntpdsim Option Environment
  */
-tSCC   zPROGNAME[]   = "NTPDSIM";
-tSCC   zUsageTitle[] =
-"ntpdsim - NTP daemon simulation program - Ver. 4.2.5p245-RC\n\
+static char const zPROGNAME[8] = "NTPDSIM";
+static char const zUsageTitle[113] =
+"ntpdsim - NTP daemon simulation program - Ver. 4.2.6p3\n\
 USAGE:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n";
-tSCC   zRcName[]     = ".ntprc";
-tSCC*  apzHomeList[] = {
-       "$HOME",
-       ".",
-       NULL };
+static char const zRcName[7] = ".ntprc";
+static char const * const apzHomeList[3] = {
+    "$HOME",
+    ".",
+    NULL };
 
-tSCC   zBugsAddr[]    = "http://bugs.ntp.org, bugs@ntp.org";
+static char const zBugsAddr[34]    = "http://bugs.ntp.org, bugs@ntp.org";
 #define zExplain NULL
-tSCC    zDetail[]     = "\n\n";
-tSCC    zFullVersion[] = NTPDSIM_FULL_VERSION;
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 495 */
+static char const zDetail[7] = "\n\n";
+static char const zFullVersion[] = NTPDSIM_FULL_VERSION;
+/* extracted from optcode.tlib near line 504 */
 
 #if defined(ENABLE_NLS)
 # define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -1006,6 +1012,26 @@ tSCC    zFullVersion[] = NTPDSIM_FULL_VERSION;
 
 #define ntpdsim_full_usage NULL
 #define ntpdsim_short_usage NULL
+#ifndef  PKGDATADIR
+# define PKGDATADIR ""
+#endif
+
+#ifndef  WITH_PACKAGER
+# define ntpdsim_packager_info NULL
+#else
+static char const ntpdsim_packager_info[] =
+    "Packaged by " WITH_PACKAGER
+
+# ifdef WITH_PACKAGER_VERSION
+        " ("WITH_PACKAGER_VERSION")"
+# endif
+
+# ifdef WITH_PACKAGER_BUG_REPORTS
+    "\nReport ntpdsim bugs to " WITH_PACKAGER_BUG_REPORTS
+# endif
+    "\n";
+#endif
+
 tOptions ntpdsimOptions = {
     OPTIONS_STRUCT_VERSION,
     0, NULL,                    /* original argc + argv    */
@@ -1015,7 +1041,8 @@ tOptions ntpdsimOptions = {
     + OPTPROC_LONGOPT
     + OPTPROC_NO_REQ_OPT
     + OPTPROC_ENVIRON
-    + OPTPROC_NO_ARGS ),
+    + OPTPROC_NO_ARGS
+    + OPTPROC_MISUSE ),
     0, NULL,                    /* current option index, current option */
     NULL,         NULL,         zPROGNAME,
     zRcName,      zCopyright,   zCopyrightNotice,
@@ -1023,7 +1050,7 @@ tOptions ntpdsimOptions = {
     zExplain,     zDetail,      optDesc,
     zBugsAddr,                  /* address to send bugs to */
     NULL, NULL,                 /* extensions/saved state  */
-    optionUsage,       /* usage procedure */
+    optionUsage, /* usage procedure */
     translate_option_strings,   /* translation procedure */
     /*
      *  Indexes to special options
@@ -1035,7 +1062,8 @@ tOptions ntpdsimOptions = {
     },
     37 /* full option count */, 32 /* user option count */,
     ntpdsim_full_usage, ntpdsim_short_usage,
-    NULL, NULL
+    NULL, NULL,
+    PKGDATADIR, ntpdsim_packager_info
 };
 
 /*
@@ -1047,7 +1075,7 @@ doUsageOpt(
     tOptDesc*   pOptDesc )
 {
     (void)pOptions;
-    USAGE( EXIT_SUCCESS );
+    USAGE(EXIT_SUCCESS);
 }
 
 #if ! defined(TEST_NTPDSIM_OPTS)
@@ -1060,27 +1088,30 @@ doUsageOpt(
 static void
 doOptSet_Debug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
 {
-    /* extracted from ntpdbase-opts.def, line 98 */
+    /* extracted from ntpdbase-opts.def, line 100 */
 DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
 }
 #endif /* defined DEBUG */
 #endif /* defined(TEST_NTPDSIM_OPTS) */
-/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 109 */
+/* extracted from optmain.tlib near line 107 */
 
 #if defined(TEST_NTPDSIM_OPTS) /* TEST MAIN PROCEDURE: */
 
-extern void optionPutShell( tOptions* );
+extern void optionPutShell(tOptions*);
 
 int
 main(int argc, char** argv)
 {
     int res = EXIT_SUCCESS;
-    (void)optionProcess( &ntpdsimOptions, argc, argv );
-    optionPutShell( &ntpdsimOptions );
+    (void)optionProcess(&ntpdsimOptions, argc, argv);
+    optionPutShell(&ntpdsimOptions);
+    res = ferror(stdout);
+    if (res != 0)
+        fputs("output error writing to stdout\n", stderr);
     return res;
 }
 #endif  /* defined TEST_NTPDSIM_OPTS */
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 627 */
+/* extracted from optcode.tlib near line 657 */
 
 #if ENABLE_NLS
 #include <stdio.h>
@@ -1089,11 +1120,11 @@ main(int argc, char** argv)
 #include <unistd.h>
 #include <autoopts/usage-txt.h>
 
-static char* AO_gettext( char const* pz );
+static char* AO_gettext(char const* pz);
 static void  coerce_it(void** s);
 
 static char*
-AO_gettext( char const* pz )
+AO_gettext(char const* pz)
 {
     char* pzRes;
     if (pz == NULL)
@@ -1101,10 +1132,10 @@ AO_gettext( char const* pz )
     pzRes = _(pz);
     if (pzRes == pz)
         return pzRes;
-    pzRes = strdup( pzRes );
+    pzRes = strdup(pzRes);
     if (pzRes == NULL) {
-        fputs( _("No memory for duping translated strings\n"), stderr );
-        exit( EXIT_FAILURE );
+        fputs(_("No memory for duping translated strings\n"), stderr);
+        exit(EXIT_FAILURE);
     }
     return pzRes;
 }
@@ -1117,14 +1148,13 @@ static void coerce_it(void** s) { *s = AO_gettext(*s); }
  *  This invokes the translation code (e.g. gettext(3)).
  */
 static void
-translate_option_strings( void )
+translate_option_strings(void)
 {
     /*
      *  Guard against re-translation.  It won't work.  The strings will have
      *  been changed by the first pass through this code.  One shot only.
      */
     if (option_usage_text.field_ct != 0) {
-
         /*
          *  Do the translations.  The first pointer follows the field count
          *  field.  The field count field is the size of a pointer.
@@ -1144,6 +1174,7 @@ translate_option_strings( void )
         COERSION(pzUsageTitle);
         COERSION(pzExplain);
         COERSION(pzDetail);
+        COERSION(pzPackager);
         option_usage_text.field_ct = 0;
 
         for (ix = ntpdsimOptions.optCt; ix > 0; ix--, pOD++)
index 9ba1197e432f61dd13038cb5d99017bd69724440..9ee9264b916c5b103eb5a4bd9a84d7f590403df8 100644 (file)
@@ -1,25 +1,23 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpdsim-opts.h)
  *  
- *  It has been AutoGen-ed  November 17, 2009 at 06:37:12 AM by AutoGen 5.10
+ *  It has been AutoGen-ed  February 22, 2011 at 12:29:00 AM by AutoGen 5.11.6
  *  From the definitions    ntpdsim-opts.def
  *  and the template file   options
  *
- * Generated from AutoOpts 33:0:8 templates.
- */
-
-/*
- *  This file was produced by an AutoOpts template.  AutoOpts is a
- *  copyrighted work.  This header file is not encumbered by AutoOpts
- *  licensing, but is provided under the licensing terms chosen by the
- *  ntpdsim author or copyright holder.  AutoOpts is licensed under
- *  the terms of the LGPL.  The redistributable library (``libopts'') is
- *  licensed under the terms of either the LGPL or, at the users discretion,
- *  the BSD license.  See the AutoOpts and/or libopts sources for details.
+ * Generated from AutoOpts 34:0:9 templates.
+ *
+ *  AutoOpts is a copyrighted work.  This header file is not encumbered
+ *  by AutoOpts licensing, but is provided under the licensing terms chosen
+ *  by the ntpdsim author or copyright holder.  AutoOpts is
+ *  licensed under the terms of the LGPL.  The redistributable library
+ *  (``libopts'') is licensed under the terms of either the LGPL or, at the
+ *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
+ *  for details.
  *
  * This source file is copyrighted and licensed under the following terms:
  *
- * ntpdsim copyright (c) 1970-2009 David L. Mills and/or others - all rights reserved
+ * ntpdsim copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved
  *
  * see html/copyright.html
  */
@@ -41,7 +39,7 @@
  *  tolerable version is at least as old as what was current when the header
  *  template was released.
  */
-#define AO_TEMPLATE_VERSION 135168
+#define AO_TEMPLATE_VERSION 139264
 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
  || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
 # error option template version mismatches autoopts/options.h header
@@ -92,13 +90,13 @@ typedef enum {
 } teOptIndex;
 
 #define OPTION_CT    37
-#define NTPDSIM_VERSION       "4.2.5p245-RC"
-#define NTPDSIM_FULL_VERSION  "ntpdsim - NTP daemon simulation program - Ver. 4.2.5p245-RC"
+#define NTPDSIM_VERSION       "4.2.6p3"
+#define NTPDSIM_FULL_VERSION  "ntpdsim - NTP daemon simulation program - Ver. 4.2.6p3"
 
 /*
  *  Interface defines for all options.  Replace "n" with the UPPER_CASED
  *  option name (as in the teOptIndex enumeration above).
- *  e.g. HAVE_OPT( IPV4 )
+ *  e.g. HAVE_OPT(IPV4)
  */
 #define         DESC(n) (ntpdsimOptions.pOptDesc[INDEX_OPT_## n])
 #define     HAVE_OPT(n) (! UNUSED_OPT(& DESC(n)))
@@ -112,10 +110,19 @@ typedef enum {
 #define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
 #define    CLEAR_OPT(n) STMTS( \
                 DESC(n).fOptState &= OPTST_PERSISTENT_MASK;   \
-                if ( (DESC(n).fOptState & OPTST_INITENABLED) == 0) \
+                if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \
                     DESC(n).fOptState |= OPTST_DISABLED; \
                 DESC(n).optCookie = NULL )
 
+/* * * * * *
+ *
+ *  Enumeration of ntpdsim exit codes
+ */
+typedef enum {
+    NTPDSIM_EXIT_SUCCESS = 0,
+    NTPDSIM_EXIT_FAILURE = 1
+} ntpdsim_exit_code_t;
+
 /*
  *  Make sure there are no #define name conflicts with the option names
  */
@@ -288,9 +295,6 @@ typedef enum {
  *  Interface defines for specific options.
  */
 #define VALUE_OPT_IPV4           '4'
-
-#define WHICH_OPT_IPV4           (DESC(IPV4).optActualValue)
-#define WHICH_IDX_IPV4           (DESC(IPV4).optActualIndex)
 #define VALUE_OPT_IPV6           '6'
 #define VALUE_OPT_AUTHREQ        'a'
 #define VALUE_OPT_AUTHNOREQ      'A'
@@ -338,14 +342,14 @@ typedef enum {
 /*
  *  Interface defines not associated with particular options
  */
-#define ERRSKIP_OPTERR  STMTS( ntpdsimOptions.fOptSet &= ~OPTPROC_ERRSTOP )
-#define ERRSTOP_OPTERR  STMTS( ntpdsimOptions.fOptSet |= OPTPROC_ERRSTOP )
+#define ERRSKIP_OPTERR  STMTS(ntpdsimOptions.fOptSet &= ~OPTPROC_ERRSTOP)
+#define ERRSTOP_OPTERR  STMTS(ntpdsimOptions.fOptSet |= OPTPROC_ERRSTOP)
 #define RESTART_OPT(n)  STMTS( \
                 ntpdsimOptions.curOptIdx = (n); \
-                ntpdsimOptions.pzCurOpt  = NULL )
+                ntpdsimOptions.pzCurOpt  = NULL)
 #define START_OPT       RESTART_OPT(1)
-#define USAGE(c)        (*ntpdsimOptions.pUsageProc)( &ntpdsimOptions, c )
-/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 409 */
+#define USAGE(c)        (*ntpdsimOptions.pUsageProc)(&ntpdsimOptions, c)
+/* extracted from opthead.tlib near line 435 */
 
 /* * * * * *
  *
@@ -360,9 +364,9 @@ extern tOptions   ntpdsimOptions;
 #if defined(ENABLE_NLS)
 # ifndef _
 #   include <stdio.h>
-    static inline char* aoGetsText( char const* pz ) {
+    static inline char* aoGetsText(char const* pz) {
         if (pz == NULL) return NULL;
-        return (char*)gettext( pz );
+        return (char*)gettext(pz);
     }
 #   define _(s)  aoGetsText(s)
 # endif /* _() */
index 05ce3d9afa5e2a5cc2ade86eb67ac5aee1e03860..d8ec791b77b6e3b2ebd5e09bc3de2d8bc381c796 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpdc-opts.c)
  *  
- *  It has been AutoGen-ed  January  3, 2011 at 09:18:12 PM by AutoGen 5.11.6pre7
+ *  It has been AutoGen-ed  February 22, 2011 at 12:29:00 AM by AutoGen 5.11.6
  *  From the definitions    ntpdc-opts.def
  *  and the template file   options
  *
@@ -38,7 +38,7 @@ extern "C" {
                 cannot ever change your mind. */
 tSCC zCopyright[] =
        "ntpdc copyright (c) 1970-2011 David L. Mills and/or others, all rights reserved"
-/* extracted from ../include/copyright.def near line 8 */
+/* extracted from copyright.def near line 8 */
 ;
 tSCC zCopyrightNotice[24] =
 "see html/copyright.html";
@@ -461,25 +461,18 @@ static char const * const apzHomeList[3] = {
 
 static char const zBugsAddr[34]    = "http://bugs.ntp.org, bugs@ntp.org";
 #define zExplain NULL
-static char const zDetail[618] = "\n\
-The\n\
-[= prog-name =]\n\
-utility program is used to query an NTP daemon about its\n\
-current state and to request changes in that state.\n\
-It uses NTP mode 7 control message formats described in the source code.\n\
-The program may\n\
+static char const zDetail[601] = "\n\
+The [= prog-name =] utility program is used to query an NTP daemon about\n\
+its current state and to request changes in that state.  It uses NTP mode\n\
+7 control message formats described in the source code.  The program may\n\
 be run either in interactive mode or controlled using command line\n\
-arguments.\n\
-Extensive state and statistics information is available\n\
-through the\n\
-[= prog-name =]\n\
-interface.\n\
-In addition, nearly all the\n\
-configuration options which can be specified at startup using\n\
-ntpd's configuration file may also be specified at run time using\n\
-[= prog-name =] .\n";
+arguments.  Extensive state and statistics information is available\n\
+through the [= prog-name =] interface.  In addition, nearly all the\n\
+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 /usr/local/gnu/share/autogen/optcode.tpl near line 504 */
+/* extracted from optcode.tlib near line 504 */
 
 #if defined(ENABLE_NLS)
 # define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -496,6 +489,22 @@ static char const zFullVersion[] = NTPDC_FULL_VERSION;
 # define PKGDATADIR ""
 #endif
 
+#ifndef  WITH_PACKAGER
+# define ntpdc_packager_info NULL
+#else
+static char const ntpdc_packager_info[] =
+    "Packaged by " WITH_PACKAGER
+
+# ifdef WITH_PACKAGER_VERSION
+        " ("WITH_PACKAGER_VERSION")"
+# endif
+
+# ifdef WITH_PACKAGER_BUG_REPORTS
+    "\nReport ntpdc bugs to " WITH_PACKAGER_BUG_REPORTS
+# endif
+    "\n";
+#endif
+
 tOptions ntpdcOptions = {
     OPTIONS_STRUCT_VERSION,
     0, NULL,                    /* original argc + argv    */
@@ -513,7 +522,7 @@ tOptions ntpdcOptions = {
     zExplain,     zDetail,      optDesc,
     zBugsAddr,                  /* address to send bugs to */
     NULL, NULL,                 /* extensions/saved state  */
-    optionUsage,       /* usage procedure */
+    optionUsage, /* usage procedure */
     translate_option_strings,   /* translation procedure */
     /*
      *  Indexes to special options
@@ -526,7 +535,7 @@ tOptions ntpdcOptions = {
     15 /* full option count */, 10 /* user option count */,
     ntpdc_full_usage, ntpdc_short_usage,
     NULL, NULL,
-    PKGDATADIR
+    PKGDATADIR, ntpdc_packager_info
 };
 
 /*
@@ -550,11 +559,11 @@ doUsageOpt(
 static void
 doOptSet_Debug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
 {
-    /* extracted from ../include/debug-opt.def, line 27 */
+    /* extracted from debug-opt.def, line 27 */
 DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
 }
 #endif /* defined(TEST_NTPDC_OPTS) */
-/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 107 */
+/* extracted from optmain.tlib near line 107 */
 
 #if defined(TEST_NTPDC_OPTS) /* TEST MAIN PROCEDURE: */
 
@@ -572,7 +581,7 @@ main(int argc, char** argv)
     return res;
 }
 #endif  /* defined TEST_NTPDC_OPTS */
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 641 */
+/* extracted from optcode.tlib near line 657 */
 
 #if ENABLE_NLS
 #include <stdio.h>
@@ -616,7 +625,6 @@ translate_option_strings(void)
      *  been changed by the first pass through this code.  One shot only.
      */
     if (option_usage_text.field_ct != 0) {
-
         /*
          *  Do the translations.  The first pointer follows the field count
          *  field.  The field count field is the size of a pointer.
@@ -636,6 +644,7 @@ translate_option_strings(void)
         COERSION(pzUsageTitle);
         COERSION(pzExplain);
         COERSION(pzDetail);
+        COERSION(pzPackager);
         option_usage_text.field_ct = 0;
 
         for (ix = ntpdcOptions.optCt; ix > 0; ix--, pOD++)
index f4146cfa7ac23df15dee43fc210cfc2e667551c5..02f8d92520da112f736cf17f8351c86996652d2d 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpdc-opts.h)
  *  
- *  It has been AutoGen-ed  January  3, 2011 at 09:18:12 PM by AutoGen 5.11.6pre7
+ *  It has been AutoGen-ed  February 22, 2011 at 12:29:00 AM by AutoGen 5.11.6
  *  From the definitions    ntpdc-opts.def
  *  and the template file   options
  *
@@ -191,7 +191,7 @@ typedef enum {
                 ntpdcOptions.pzCurOpt  = NULL)
 #define START_OPT       RESTART_OPT(1)
 #define USAGE(c)        (*ntpdcOptions.pUsageProc)(&ntpdcOptions, c)
-/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 435 */
+/* extracted from opthead.tlib near line 435 */
 
 /* * * * * *
  *
index a9d5cb997318d90aa160d68e7f77d265681d9557..f4b96278489a25a93477d63ddc615df83bfa829f 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpq-opts.c)
  *  
- *  It has been AutoGen-ed  January  3, 2011 at 09:18:23 PM by AutoGen 5.11.6pre7
+ *  It has been AutoGen-ed  February 22, 2011 at 12:29:01 AM by AutoGen 5.11.6
  *  From the definitions    ntpq-opts.def
  *  and the template file   options
  *
@@ -38,7 +38,7 @@ extern "C" {
                 cannot ever change your mind. */
 tSCC zCopyright[] =
        "ntpq copyright (c) 1970-2011 David L. Mills and/or others, all rights reserved"
-/* extracted from ../include/copyright.def near line 8 */
+/* extracted from copyright.def near line 8 */
 ;
 tSCC zCopyrightNotice[24] =
 "see html/copyright.html";
@@ -438,17 +438,15 @@ static char const * const apzHomeList[3] = {
 
 static char const zBugsAddr[34]    = "http://bugs.ntp.org, bugs@ntp.org";
 #define zExplain NULL
-static char const zDetail[389] = "\n\
-The\n\
-[= prog-name =]\n\
-utility program is used to query NTP servers which\n\
-implement the standard NTP mode 6 control message formats defined\n\
-in Appendix B of the NTPv3 specification RFC1305, requesting\n\
-information about current state and/or changes in that state.\n\
-The same formats are used in NTPv4, although some of the\n\
-variables have changed and new ones added.\n";
+static char const zDetail[384] = "\n\
+The [= prog-name =] utility program is used to query NTP servers which\n\
+implement the standard NTP mode 6 control message formats defined in\n\
+Appendix B of the NTPv3 specification RFC1305, requesting information\n\
+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 /usr/local/gnu/share/autogen/optcode.tpl near line 504 */
+/* extracted from optcode.tlib near line 504 */
 
 #if defined(ENABLE_NLS)
 # define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -465,6 +463,22 @@ static char const zFullVersion[] = NTPQ_FULL_VERSION;
 # define PKGDATADIR ""
 #endif
 
+#ifndef  WITH_PACKAGER
+# define ntpq_packager_info NULL
+#else
+static char const ntpq_packager_info[] =
+    "Packaged by " WITH_PACKAGER
+
+# ifdef WITH_PACKAGER_VERSION
+        " ("WITH_PACKAGER_VERSION")"
+# endif
+
+# ifdef WITH_PACKAGER_BUG_REPORTS
+    "\nReport ntpq bugs to " WITH_PACKAGER_BUG_REPORTS
+# endif
+    "\n";
+#endif
+
 tOptions ntpqOptions = {
     OPTIONS_STRUCT_VERSION,
     0, NULL,                    /* original argc + argv    */
@@ -482,7 +496,7 @@ tOptions ntpqOptions = {
     zExplain,     zDetail,      optDesc,
     zBugsAddr,                  /* address to send bugs to */
     NULL, NULL,                 /* extensions/saved state  */
-    optionUsage,       /* usage procedure */
+    optionUsage, /* usage procedure */
     translate_option_strings,   /* translation procedure */
     /*
      *  Indexes to special options
@@ -495,7 +509,7 @@ tOptions ntpqOptions = {
     14 /* full option count */, 9 /* user option count */,
     ntpq_full_usage, ntpq_short_usage,
     NULL, NULL,
-    PKGDATADIR
+    PKGDATADIR, ntpq_packager_info
 };
 
 /*
@@ -519,11 +533,11 @@ doUsageOpt(
 static void
 doOptSet_Debug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
 {
-    /* extracted from ../include/debug-opt.def, line 27 */
+    /* extracted from debug-opt.def, line 27 */
 DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
 }
 #endif /* defined(TEST_NTPQ_OPTS) */
-/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 107 */
+/* extracted from optmain.tlib near line 107 */
 
 #if defined(TEST_NTPQ_OPTS) /* TEST MAIN PROCEDURE: */
 
@@ -541,7 +555,7 @@ main(int argc, char** argv)
     return res;
 }
 #endif  /* defined TEST_NTPQ_OPTS */
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 641 */
+/* extracted from optcode.tlib near line 657 */
 
 #if ENABLE_NLS
 #include <stdio.h>
@@ -585,7 +599,6 @@ translate_option_strings(void)
      *  been changed by the first pass through this code.  One shot only.
      */
     if (option_usage_text.field_ct != 0) {
-
         /*
          *  Do the translations.  The first pointer follows the field count
          *  field.  The field count field is the size of a pointer.
@@ -605,6 +618,7 @@ translate_option_strings(void)
         COERSION(pzUsageTitle);
         COERSION(pzExplain);
         COERSION(pzDetail);
+        COERSION(pzPackager);
         option_usage_text.field_ct = 0;
 
         for (ix = ntpqOptions.optCt; ix > 0; ix--, pOD++)
index bec8e2b395feed61dbf93c8062fdab462118126a..eb6c526791ae2bd43e532c2cff62e4c868ca12c1 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpq-opts.h)
  *  
- *  It has been AutoGen-ed  January  3, 2011 at 09:18:22 PM by AutoGen 5.11.6pre7
+ *  It has been AutoGen-ed  February 22, 2011 at 12:29:01 AM by AutoGen 5.11.6
  *  From the definitions    ntpq-opts.def
  *  and the template file   options
  *
@@ -184,7 +184,7 @@ typedef enum {
                 ntpqOptions.pzCurOpt  = NULL)
 #define START_OPT       RESTART_OPT(1)
 #define USAGE(c)        (*ntpqOptions.pUsageProc)(&ntpqOptions, c)
-/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 435 */
+/* extracted from opthead.tlib near line 435 */
 
 /* * * * * *
  *
index 4ac2cbb2178c5b2d466495882ef58559d03d41d7..99ac89ade0f32af853bb74af9204c9eaada2aff3 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpsnmpd-opts.c)
  *  
- *  It has been AutoGen-ed  January  3, 2011 at 09:18:39 PM by AutoGen 5.11.6pre7
+ *  It has been AutoGen-ed  February 22, 2011 at 12:29:02 AM by AutoGen 5.11.6
  *  From the definitions    ntpsnmpd-opts.def
  *  and the template file   options
  *
@@ -38,7 +38,7 @@ extern "C" {
                 cannot ever change your mind. */
 tSCC zCopyright[] =
        "ntpsnmpd copyright (c) 1970-2011 David L. Mills and/or others, all rights reserved"
-/* extracted from ../include/copyright.def near line 8 */
+/* extracted from copyright.def near line 8 */
 ;
 tSCC zCopyrightNotice[24] =
 "see html/copyright.html";
@@ -267,7 +267,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 /usr/local/gnu/share/autogen/optcode.tpl near line 504 */
+/* extracted from optcode.tlib near line 504 */
 
 #if defined(ENABLE_NLS)
 # define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -284,6 +284,22 @@ static char const zFullVersion[] = NTPSNMPD_FULL_VERSION;
 # define PKGDATADIR ""
 #endif
 
+#ifndef  WITH_PACKAGER
+# define ntpsnmpd_packager_info NULL
+#else
+static char const ntpsnmpd_packager_info[] =
+    "Packaged by " WITH_PACKAGER
+
+# ifdef WITH_PACKAGER_VERSION
+        " ("WITH_PACKAGER_VERSION")"
+# endif
+
+# ifdef WITH_PACKAGER_BUG_REPORTS
+    "\nReport ntpsnmpd bugs to " WITH_PACKAGER_BUG_REPORTS
+# endif
+    "\n";
+#endif
+
 tOptions ntpsnmpdOptions = {
     OPTIONS_STRUCT_VERSION,
     0, NULL,                    /* original argc + argv    */
@@ -302,7 +318,7 @@ tOptions ntpsnmpdOptions = {
     zExplain,     zDetail,      optDesc,
     zBugsAddr,                  /* address to send bugs to */
     NULL, NULL,                 /* extensions/saved state  */
-    optionUsage,       /* usage procedure */
+    optionUsage, /* usage procedure */
     translate_option_strings,   /* translation procedure */
     /*
      *  Indexes to special options
@@ -315,7 +331,7 @@ tOptions ntpsnmpdOptions = {
     8 /* full option count */, 3 /* user option count */,
     ntpsnmpd_full_usage, ntpsnmpd_short_usage,
     NULL, NULL,
-    PKGDATADIR
+    PKGDATADIR, ntpsnmpd_packager_info
 };
 
 /*
@@ -329,7 +345,7 @@ doUsageOpt(
     (void)pOptions;
     USAGE(EXIT_SUCCESS);
 }
-/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 107 */
+/* extracted from optmain.tlib near line 107 */
 
 #if defined(TEST_NTPSNMPD_OPTS) /* TEST MAIN PROCEDURE: */
 
@@ -347,7 +363,7 @@ main(int argc, char** argv)
     return res;
 }
 #endif  /* defined TEST_NTPSNMPD_OPTS */
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 641 */
+/* extracted from optcode.tlib near line 657 */
 
 #if ENABLE_NLS
 #include <stdio.h>
@@ -391,7 +407,6 @@ translate_option_strings(void)
      *  been changed by the first pass through this code.  One shot only.
      */
     if (option_usage_text.field_ct != 0) {
-
         /*
          *  Do the translations.  The first pointer follows the field count
          *  field.  The field count field is the size of a pointer.
@@ -411,6 +426,7 @@ translate_option_strings(void)
         COERSION(pzUsageTitle);
         COERSION(pzExplain);
         COERSION(pzDetail);
+        COERSION(pzPackager);
         option_usage_text.field_ct = 0;
 
         for (ix = ntpsnmpdOptions.optCt; ix > 0; ix--, pOD++)
index 334bd30ddafd588eac1475344588365b27a0db32..8b66bac2d3fdb651e0a32abda676fde08bb8ade9 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpsnmpd-opts.h)
  *  
- *  It has been AutoGen-ed  January  3, 2011 at 09:18:38 PM by AutoGen 5.11.6pre7
+ *  It has been AutoGen-ed  February 22, 2011 at 12:29:02 AM by AutoGen 5.11.6
  *  From the definitions    ntpsnmpd-opts.def
  *  and the template file   options
  *
@@ -142,7 +142,7 @@ typedef enum {
                 ntpsnmpdOptions.pzCurOpt  = NULL)
 #define START_OPT       RESTART_OPT(1)
 #define USAGE(c)        (*ntpsnmpdOptions.pUsageProc)(&ntpsnmpdOptions, c)
-/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 435 */
+/* extracted from opthead.tlib near line 435 */
 
 /* * * * * *
  *
index d02ad3c8e35c12c0b5748a5663647917e44de4d1..6c1b848d6b2835ded13e0d1aa6a3cd72a977933b 100644 (file)
@@ -1,7 +1,7 @@
                     GNU GENERAL PUBLIC LICENSE
                        Version 3, 29 June 2007
 
- Copyright (c) 2010 by Bruce Korb - all rights reserved
+ Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
 
index e2e0cec821c28528e1bd34da30dea04561e601ce..c7759a01b2c80303aa954144aed41142c0ee0f2a 100644 (file)
@@ -1,7 +1,7 @@
                   GNU LESSER GENERAL PUBLIC LICENSE
                        Version 3, 29 June 2007
 
- Copyright (c) 2010 by Bruce Korb - all rights reserved
+ Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
 
index e99ce89d186daf96285c6a841fc3ddf85a57db72..5241c6b656ea1670e3c05d9e43832dcee6105220 100644 (file)
@@ -12,9 +12,9 @@ EXTRA_DIST              = \
     COPYING.gplv3           COPYING.lgplv3          COPYING.mbsd  \
     MakeDefs.inc            README                  ag-char-map.h  \
     autoopts/options.h      autoopts/usage-txt.h    autoopts.c  \
-    autoopts.h              boolean.c               compat/snprintf.c  \
-    compat/windows-config.h compat/strdup.c         compat/compat.h  \
-    compat/pathfind.c       compat/strchr.c         configfile.c  \
+    autoopts.h              boolean.c               compat/strchr.c  \
+    compat/strdup.c         compat/compat.h         compat/snprintf.c  \
+    compat/pathfind.c       compat/windows-config.h configfile.c  \
     cook.c                  enumeration.c           environment.c  \
     file.c                  genshell.c              genshell.h  \
     load.c                  m4/liboptschk.m4        m4/libopts.m4  \
index 0d09595b5dc0bc2198f7f7770de3e0d7c745dd1c..afa540987412431a49b10823b1ca9213bc6adda5 100644 (file)
@@ -1,11 +1,11 @@
         THIS TARBALL IS NOT A FULL DISTRIBUTION.
 
 The contents of this tarball is designed to be incorporated into
-software packages that utilize the AutoOpts option automation
-package and are intended to be installed on systems that may not
-have libopts installed.  It is redistributable under the terms
-of either the LGPL (see COPYING.lgpl) or under the terms of
-the advertising clause free BSD license (see COPYING.mbsd).
+software packages that utilize the AutoOpts option automation package
+and are intended to be installed on systems that may not have libopts
+installed.  It is redistributable under the terms of either the LGPL
+(see COPYING.lgpl) or under the terms of the advertising clause free BSD
+license (see COPYING.mbsd).
 
 Usage Instructions for autoconf/automake/libtoolized projects:
 
@@ -28,20 +28,8 @@ Usage Instructions for autoconf/automake/libtoolized projects:
    This is one macro where you *MUST* remember to *NOT* quote
    the argument.  If you do, automake will get lost.
 
-2. Add the following to your ``configure.ac'' file:
-
-      LIBOPTS_CHECK
-
-   or:
-
-      LIBOPTS_CHECK([relative/path/to/libopts])
-
-   This macro will automatically invoke
-
-      AC_CONFIG_FILES( [relative/path/to/libopts/Makefile] )
-
-   The default ``relative/path/to/libopts'' is simply
-   ``libopts''.
+2. Add an invocation of either LIBOPTS_CHECK or LIBOPTS_CHECK_NOBUILD
+   to your configure.ac file.  See LIBOPTS_CHECK: below for details.
 
 3. Add the following to your top level ``Makefile.am'' file:
 
@@ -49,13 +37,13 @@ Usage Instructions for autoconf/automake/libtoolized projects:
          SUBDIRS += $(LIBOPTS_DIR)
       endif
 
-   where ``<...>'' can be whatever other files or directories
-   you may need.  The SUBDIRS must be properly ordered.
-   *PLEASE NOTE* it is crucial that the SUBDIRS be set under the
-   control of an automake conditional.  To work correctly,
-   automake has to know the range of possible values of SUBDIRS.
-   It's a magical name with magical properties.  ``NEED_LIBOPTS''
-   will be correctly set by the ``LIBOPTS_CHECK'' macro, above.
+   where ``<...>'' can be whatever other files or directories you may
+   need.  The SUBDIRS must be properly ordered.  *PLEASE NOTE* it is
+   crucial that the SUBDIRS be set under the control of an automake
+   conditional.  To work correctly, automake has to know the range of
+   possible values of SUBDIRS.  It's a magical name with magical
+   properties.  ``NEED_LIBOPTS'' will be correctly set by the
+   ``LIBOPTS_CHECK'' macro, above.
 
 4. Add ``$(LIBOPTS_CFLAGS)'' to relevant compiler flags and
    ``$(LIBOPTS_LDADD)'' to relevant link options whereever
@@ -77,17 +65,58 @@ Usage Instructions for autoconf/automake/libtoolized projects:
      prog.1 : prog-opts.def
          autogen -Tagman-cmd.tpl -bprog prog-opts.def
 
-     prog-invoke.texi : prog-opts.def
-         autogen -Taginfo.tpl -bprog-invoke prog-opts.def
+     invoke-prog.texi : prog-opts.def
+         autogen -Tagtexi-cmd.tpl prog-opts.def
 
 If your package does not utilize the auto* tools, then you
 will need to hand craft the rules for building the library.
 
+LIBOPTS_CHECK:
+
+The arguments to both macro are a relative path to the directory with
+the libopts source code.  It is optional and defaults to "libopts".
+These macros work as follows:
+
+1.  LIBOPTS_CHECK([libopts/rel/path/optional])
+
+    Adds two command-line options to the generated configure script,
+    --enable-local-libopts and --disable-libopts-install.  AC_SUBST's
+    LIBOPTS_CFLAGS, LIBOPTS_LDADD, and LIBOPTS_DIR for use in
+    Makefile.am files.  Adds Automake conditional NEED_LIBOPTS which
+    will be true when the local copy of libopts should be built.  Uses
+    AC_CONFIG_FILES([$libopts-dir/Makefile]) to cause the local libopts
+    into the package build.  If the optional relative path to libopts is
+    not provided, it defaults to simply "libopts".
+
+2.  LIBOPTS_CHECK_NOBUILD([libopts/rel/path/optional])
+
+    This variant of LIBOPTS_CHECK is useful when multiple configure.ac
+    files in a package make use of a single libopts tearoff.  In that
+    case, only one of the configure.ac files should build libopts and
+    others should simply use it.  Consider this package arrangment:
+
+    all-tools/
+      configure.ac
+      common-tools/
+        configure.ac
+        libopts/
+
+    The parent package all-tools contains a subpackage common-tools
+    which can be torn off and used independently.  Programs configured
+    by both configure.ac files link against the common-tools/libopts
+    tearoff, when not using the system's libopts.  The top-level
+    configure.ac uses LIBOPTS_CHECK_NOBUILD([common-tools/libopts]),
+    while common-tools/configure.ac uses LIBOPTS_CHECK.  The difference
+    is LIBOPTS_CHECK_NOBUILD will never build the libopts tearoff,
+    leaving that to the subpackage configure.ac's LIBOPTS_CHECK.
+    Specifically, LIBOPTS_CHECK_NOBUILD always results in the
+    NEED_LIBOPTS Automake conditional being false, and does not invoke
+    AC_CONFIG_FILES(path-to-libopts/Makefile).
+
 LICENSING:
 
-This material is Copyright (c) 1993-2010 by Bruce Korb.
-You are licensed to use this under the terms of either
-the GNU Lesser General Public License (see: COPYING.lgpl), or,
-at your option, the modified Berkeley Software Distribution
-License (see:  COPYING.mbsd).  Both of these files should be
-included with this tarball.
+This material is Copyright (c) 1992-2011 by Bruce Korb.  You are
+licensed to use this under the terms of either the GNU Lesser General
+Public License (see: COPYING.lgpl), or, at your option, the modified
+Berkeley Software Distribution License (see: COPYING.mbsd).  Both of
+these files should be included with this tarball.
index d35fc97eab0a39bf966dc6e265641b6f41c85bd1..da53091b4f8b9eaabafd1348c41b660e3296939e 100644 (file)
@@ -1,10 +1,10 @@
 /*
- *   Character mapping generated 12/18/10 12:13:30
+ *   Character mapping generated 02/17/11 16:58:35
  *
  *  This file contains the character classifications
  *  used by AutoGen and AutoOpts for identifying tokens.
  *  This file is part of AutoGen.
- *  AutoGen Copyright (c) 1992-2010 by Bruce Korb - all rights reserved
+ *  AutoGen Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
  *  AutoGen is free software: you can redistribute it and/or modify it under the
  *  terms of the GNU General Public License as published by the Free Software
  *  Foundation, either version 3 of the License, or (at your option) any later
@@ -77,7 +77,7 @@
 //   used by AutoGen and AutoOpts for identifying tokens.
 // 
 //   This file is part of AutoGen.
-//   AutoGen Copyright (c) 1992-2010 by Bruce Korb - all rights reserved
+//   AutoGen Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
 // 
 //   AutoGen is free software: you can redistribute it and/or modify it under the
 //   terms of the GNU General Public License as published by the Free Software
index 6b75f4a5fe664a72fa05817b54f76dd3071e598f..ad03df685ccd4eb3149c2affdf4c02dd4821c7bf 100644 (file)
@@ -2,7 +2,7 @@
 /**
  * \file autoopts.c
  *
- *  Time-stamp:      "2010-12-18 12:09:04 bkorb"
+ *  Time-stamp:      "2011-01-06 12:44:21 bkorb"
  *
  *  This file contains all of the routines that must be linked into
  *  an executable to use the generated option processing.  The optional
@@ -11,7 +11,7 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (c) 1992-2010 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -805,8 +805,9 @@ nextOption(tOptions* pOpts, tOptState* pOptState)
  *  line arguments.
  */
 
-/*
- *  doImmediateOpts - scan the command line for immediate action options
+/**
+ *  scan the command line for immediate action options.
+ *  This is only called the first time through.
  */
 LOCAL tSuccess
 doImmediateOpts(tOptions* pOpts)
@@ -822,65 +823,68 @@ doImmediateOpts(tOptions* pOpts)
         tOptState optState = OPTSTATE_INITIALIZER(PRESET);
 
         switch (nextOption(pOpts, &optState)) {
-        case FAILURE: goto optionsDone;
+        case FAILURE: goto   failed_option;
         case PROBLEM: return SUCCESS; /* no more args */
         case SUCCESS: break;
         }
 
         /*
-         *  IF this *is* an immediate-attribute option, then do it.
+         *  IF this is an immediate-attribute option, then do it.
          */
         if (! DO_IMMEDIATELY(optState.flags))
             continue;
 
         if (! SUCCESSFUL(handle_opt(pOpts, &optState)))
             break;
-    } optionsDone:;
+    } failed_option:;
 
     if ((pOpts->fOptSet & OPTPROC_ERRSTOP) != 0)
         (*pOpts->pUsageProc)(pOpts, EXIT_FAILURE);
+
     return FAILURE;
 }
 
-
+/**
+ * Process all the options from our current position onward.  (This allows
+ * interspersed options and arguments for the few non-standard programs that
+ * require it.)  Thus, do not rewind option indexes because some programs
+ * choose to re-invoke after a non-option.
+ */
 LOCAL tSuccess
 doRegularOpts(tOptions* pOpts)
 {
-    /*
-     *  Now, process all the options from our current position onward.
-     *  (This allows interspersed options and arguments for the few
-     *  non-standard programs that require it.)
-     */
     for (;;) {
         tOptState optState = OPTSTATE_INITIALIZER(DEFINED);
 
         switch (nextOption(pOpts, &optState)) {
-        case FAILURE: goto optionsDone;
+        case FAILURE: goto   failed_option;
         case PROBLEM: return SUCCESS; /* no more args */
         case SUCCESS: break;
         }
 
         /*
-         *  IF this is not being processed normally (i.e. is immediate action)
+         *  IF this is an immediate action option,
          *  THEN skip it (unless we are supposed to do it a second time).
          */
         if (! DO_NORMALLY(optState.flags)) {
             if (! DO_SECOND_TIME(optState.flags))
                 continue;
-            optState.pOD->optOccCt--; /* don't count last time */
+            optState.pOD->optOccCt--; /* don't count this repetition */
         }
 
         if (! SUCCESSFUL(handle_opt(pOpts, &optState)))
             break;
-    } optionsDone:;
+    } failed_option:;
+
     if ((pOpts->fOptSet & OPTPROC_ERRSTOP) != 0)
         (*pOpts->pUsageProc)(pOpts, EXIT_FAILURE);
+
     return FAILURE;
 }
 
 
-/*
- *  doPresets - check for preset values from a config file or the envrionment
+/**
+ *  check for preset values from a config files or envrionment variables
  */
 static tSuccess
 doPresets(tOptions* pOpts)
index 56eb1ec15ecaa7f2a562df56bf450ce3d22f267c..2aaadf19cdf0d458e3c73bb97c708bbcdf9de0fe 100644 (file)
@@ -9,7 +9,7 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (c) 1992-2010 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
index a03e271c4138ffdc9f75dd07b1e347e4d097c484..af60c44a290a5cf49fc5031797406c19ebd3459a 100644 (file)
@@ -2,14 +2,14 @@
  *  
  *  DO NOT EDIT THIS FILE   (options.h)
  *  
- *  It has been AutoGen-ed  December 18, 2010 at 12:13:34 PM by AutoGen 5.11.6pre4
+ *  It has been AutoGen-ed  February 17, 2011 at 04:58:38 PM by AutoGen 5.11.6
  *  From the definitions    funcs.def
  *  and the template file   options_h
  *
  *  This file defines all the global structures and special values
  *  used in the automated option processing library.
  *
- *  Automated Options copyright (c) 1992-Y by Bruce Korb
+ *  Automated Options Copyright (C) 1992-2011 by Bruce Korb
  *
  *  AutoOpts is free software: you can redistribute it and/or modify it
  *  under the terms of the GNU Lesser General Public License as published
@@ -455,6 +455,7 @@ struct options {
     optArgBucket_t const * const originalOptArgArray;
     void * const * const originalOptArgCookie;
     char const * const  pzPkgDataDir;
+    char const * const  pzPackager;
 };
 
 /*
@@ -565,7 +566,7 @@ extern "C" {
 extern token_list_t* ao_string_tokenize(char const*);
 
 
-/* From: configfile.c line 71
+/* From: configfile.c line 80
  *
  * configFileLoad - parse a configuration file
  *
@@ -585,7 +586,7 @@ extern token_list_t* ao_string_tokenize(char const*);
 extern const tOptionValue* configFileLoad(char const*);
 
 
-/* From: configfile.c line 936
+/* From: configfile.c line 1059
  *
  * optionFileLoad - Load the locatable config files, in order
  *
@@ -615,7 +616,7 @@ extern const tOptionValue* configFileLoad(char const*);
 extern int optionFileLoad(tOptions*, char const*);
 
 
-/* From: configfile.c line 203
+/* From: configfile.c line 212
  *
  * optionFindNextValue - find a hierarcicaly valued option instance
  *
@@ -634,7 +635,7 @@ extern int optionFileLoad(tOptions*, char const*);
 extern const tOptionValue* optionFindNextValue(const tOptDesc*, const tOptionValue*, char const*, char const*);
 
 
-/* From: configfile.c line 129
+/* From: configfile.c line 138
  *
  * optionFindValue - find a hierarcicaly valued option instance
  *
@@ -664,7 +665,7 @@ extern const tOptionValue* optionFindValue(const tOptDesc*, char const*, char co
 extern void optionFree(tOptions*);
 
 
-/* From: configfile.c line 272
+/* From: configfile.c line 281
  *
  * optionGetValue - get a specific value from a hierarcical list
  *
@@ -706,7 +707,7 @@ extern const tOptionValue* optionGetValue(const tOptionValue*, char const*);
 extern void optionLoadLine(tOptions*, char const*);
 
 
-/* From: configfile.c line 331
+/* From: configfile.c line 340
  *
  * optionNextValue - get the next value from a hierarchical list
  *
@@ -740,7 +741,7 @@ extern const tOptionValue* optionNextValue(const tOptionValue*, const tOptionVal
 extern void optionOnlyUsage(tOptions*, int);
 
 
-/* From: autoopts.c line 1071
+/* From: autoopts.c line 1075
  *
  * optionProcess - this is the main option processing routine
  *
@@ -848,7 +849,7 @@ extern void optionSaveState(tOptions*);
 extern void optionUnloadNested(tOptionValue const *);
 
 
-/* From: version.c line 36
+/* From: version.c line 31
  *
  * optionVersion - return the compiled AutoOpts version number
  *
index c797eb7a7432ead0c8ad245a3e19e21335dc5a1d..41edba7cde37e579f092500b1d3c6762e2cd62d8 100644 (file)
@@ -2,7 +2,7 @@
  *  
  *  DO NOT EDIT THIS FILE   (usage-txt.h)
  *  
- *  It has been AutoGen-ed  December 18, 2010 at 12:13:32 PM by AutoGen 5.11.6pre4
+ *  It has been AutoGen-ed  February 17, 2011 at 04:58:36 PM by AutoGen 5.11.6
  *  From the definitions    usage-txt.def
  *  and the template file   usage-txt.tpl
  *
@@ -221,7 +221,7 @@ static char const usage_txt[4326] =
     "\tThis is less than the minimum library version:  \0"
     "strdup of %d byte string failed\n\0"
     "Automated Options version %s\n"
-    "\tcopyright (c) 1999-2010 by Bruce Korb - all rights reserved\n\0"
+    "\tcopyright (c) 1999-2011 by Bruce Korb - all rights reserved\n\0"
     "AutoOpts lib error: defaulted to option with optional arg\n\0"
     "(AutoOpts bug):  Aliasing option is out of range.\0"
     "all\0"
@@ -250,8 +250,8 @@ static char const usage_txt[4326] =
     "ERROR:  only \0"
     " - examining environment variables named %s_*\n\0"
     "     \0"
-    "Options are specified by doubled hyphens and their name\n"
-    "or by a single hyphen and the flag character.\n\0"
+    "Options are specified by doubled hyphens and their name or by a single\n"
+    "hyphen and the flag character.\n\0"
     "%%-%ds %%s\n\0"
     "fs error %d (%s) on fork - cannot obtain %s usage\n\0"
     "fs error %d (%s) on freopen\n\0"
index 335949f335071a6c43ddf6177585d5ea57a68745..8079231105d81765be35a67b2f870793e8b32e6a 100644 (file)
@@ -11,7 +11,7 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (c) 1992-2010 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
index 7945129dee4490d8e09f5c39a00b6c58fe45ce07..230aef9cb3520eed6c5b936aebf146427d85df86 100644 (file)
@@ -8,7 +8,7 @@
  *  compat.h is free software.
  *  This file is part of AutoGen.
  *
- *  AutoGen Copyright (c) 1992-2010 by Bruce Korb - all rights reserved
+ *  AutoGen Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
  *
  *  AutoGen is free software: you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
index 356eb1101cd8cd4d02e97d3d78ecb6e4912f3c34..360af1098cd00f89338ffdf506df97c971c28f08 100644 (file)
@@ -4,7 +4,7 @@
  *
  *  This file is part of AutoGen.
  *
- *  AutoGen Copyright (c) 1992-2010 by Bruce Korb - all rights reserved
+ *  AutoGen Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
  *
  *  AutoGen is free software: you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
index 80eaff895a0cde0d667dde69cf8a0042caa53de2..b07c043b90d4c58512c2dbcccd81adae0b84aba1 100644 (file)
@@ -1,13 +1,13 @@
 /**
  * \file configfile.c
  *
- *  Time-stamp:      "2010-12-16 14:03:06 bkorb"
+ *  Time-stamp:      "2011-01-06 16:11:24 bkorb"
  *
  *  configuration/rc/ini file handling.
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (c) 1992-2010 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -51,6 +51,15 @@ program_directive(tOptions * pOpts, char * pzText);
 static char *
 handle_section(tOptions * pOpts, char * pzText);
 
+static int
+parse_xml_encoding(char ** ppz);
+
+static char *
+trim_xml_text(char * pztxt, char const * pznm, tOptionLoadMode mode);
+
+static void
+cook_xml_text(char * pzData);
+
 static char *
 handle_struct(tOptions * pOpts, tOptState * pOS, char * pzText, int dir);
 
@@ -709,6 +718,161 @@ handle_section(tOptions * pOpts, char * pzText)
     return pzText;
 }
 
+/**
+ * parse XML encodings
+ */
+static int
+parse_xml_encoding(char ** ppz)
+{
+#   define XMLTABLE             \
+        _xmlNm_(amp,   '&')     \
+        _xmlNm_(lt,    '<')     \
+        _xmlNm_(gt,    '>')     \
+        _xmlNm_(ff,    '\f')    \
+        _xmlNm_(ht,    '\t')    \
+        _xmlNm_(cr,    '\r')    \
+        _xmlNm_(vt,    '\v')    \
+        _xmlNm_(bel,   '\a')    \
+        _xmlNm_(nl,    '\n')    \
+        _xmlNm_(space, ' ')     \
+        _xmlNm_(quot,  '"')     \
+        _xmlNm_(apos,  '\'')
+
+    static struct {
+        char const * const  nm_str;
+        unsigned short      nm_len;
+        short               nm_val;
+    } const xml_names[] = {
+#   define _xmlNm_(_n, _v) { #_n ";", sizeof(#_n), _v },
+        XMLTABLE
+#   undef  _xmlNm_
+#   undef XMLTABLE
+    };
+
+    static int const nm_ct = sizeof(xml_names) / sizeof(xml_names[0]);
+    int    base = 10;
+
+    char * pz = *ppz;
+
+    if (*pz == '#') {
+        pz++;
+        goto parse_number;
+    }
+
+    if (IS_DEC_DIGIT_CHAR(*pz)) {
+        unsigned long v;
+
+    parse_number:
+        switch (*pz) {
+        case 'x': case 'X':
+            /*
+             * Some forms specify hex with:  &#xNN;
+             */
+            base = 16;
+            pz++;
+            break;
+
+        case '0':
+            /*
+             *  &#0022; is hex and &#22; is decimal.  Cool.
+             *  Ya gotta love it.
+             */
+            if (pz[1] == '0')
+                base = 16;
+            break;
+        }
+
+        v = strtoul(pz, &pz, base);
+        if ((*pz != ';') || (v > 0x7F))
+            return NUL;
+        *ppz = pz + 1;
+        return (int)v;
+    }
+
+    {
+        int ix = 0;
+        do  {
+            if (strncmp(pz, xml_names[ix].nm_str, xml_names[ix].nm_len)
+                == 0) {
+                *ppz = pz + xml_names[ix].nm_len;
+                return xml_names[ix].nm_val;
+            }
+        } while (++ix < nm_ct);
+    }
+
+    return NUL;
+}
+
+/**
+ * Find the end marker for the named section of XML.
+ * Trim that text there, trimming trailing white space for all modes
+ * except for OPTION_LOAD_UNCOOKED.
+ */
+static char *
+trim_xml_text(char * pztxt, char const * pznm, tOptionLoadMode mode)
+{
+    static char const fmt[] = "</%s>";
+    char   z[64], *pz = z;
+    size_t len = strlen(pznm) + sizeof(fmt) - 2 /* for %s */;
+
+    if (len > sizeof(z))
+        pz = AGALOC(len, "scan name");
+
+    sprintf(pz, fmt, pznm);
+    *pztxt = ' ';
+    pztxt = strstr(pztxt, pz);
+    if (pz != z) AGFREE(pz);
+
+    if (pztxt == NULL)
+        return pztxt;
+
+    if (mode != OPTION_LOAD_UNCOOKED)
+        while (IS_WHITESPACE_CHAR(pztxt[-1]))   len++, pztxt--;
+
+    *pztxt = NUL;
+    return pztxt + len - 1 /* for NUL byte */;
+}
+
+/**
+ */
+static void
+cook_xml_text(char * pzData)
+{
+    char * pzs = pzData;
+    char * pzd = pzData;
+    char   bf[4];
+    bf[2] = NUL;
+
+    for (;;) {
+        int ch = ((int)*(pzs++)) & 0xFF;
+        switch (ch) {
+        case NUL:
+            *pzd = NUL;
+            return;
+
+        case '&':
+            *(pzd++) = \
+                ch = parse_xml_encoding(&pzs);
+            if (ch == NUL)
+                return;
+            break;
+
+        case '%':
+            bf[0] = *(pzs++);
+            bf[1] = *(pzs++);
+            if ((bf[0] == NUL) || (bf[1] == NUL)) {
+                *pzd = NUL;
+                return;
+            }
+
+            ch = strtoul(bf, NULL, 16);
+            /* FALLTHROUGH */
+
+        default:
+            *(pzd++) = ch;
+        }
+    }
+}
 
 /**
  *  "pzText" points to a '<' character, followed by an alpha.
@@ -763,28 +927,9 @@ handle_struct(tOptions * pOpts, tOptState * pOS, char * pzText, int dir)
      */
     *pcNulPoint = NUL;
     pzData = ++pzText;
-
-    /*
-     *  Find the end of the option text and NUL terminate it
-     */
-    {
-        char   z[64], *pz = z;
-        size_t len = strlen(pzName) + 4;
-        if (len > sizeof(z))
-            pz = AGALOC(len, "scan name");
-
-        sprintf(pz, "</%s>", pzName);
-        *pzText = ' ';
-        pzText = strstr(pzText, pz);
-        if (pz != z) AGFREE(pz);
-
-        if (pzText == NULL)
-            return pzText;
-
-        *pzText = NUL;
-
-        pzText += len-1;
-    }
+    pzText = trim_xml_text(pzText, pzName, mode);
+    if (pzText == NULL)
+        return pzText;
 
     /*
      *  Rejoin the name and value for parsing by "loadOptionLine()".
@@ -793,34 +938,12 @@ handle_struct(tOptions * pOpts, tOptState * pOS, char * pzText, int dir)
     memset(pcNulPoint, ' ', pzData - pcNulPoint);
 
     /*
-     *  If we are getting a "string" value, the process the XML-ish
-     *  %XX hex characters.
+     *  If we are getting a "string" value that is to be cooked,
+     *  then process the XML-ish &xx; XML-ish and %XX hex characters.
      */
-    if (valu.valType == OPARG_TYPE_STRING) {
-        char * pzSrc = pzData;
-        char * pzDst = pzData;
-        char bf[4];
-        bf[2] = NUL;
-
-        for (;;) {
-            int ch = ((int)*(pzSrc++)) & 0xFF;
-            switch (ch) {
-            case NUL: goto string_fixup_done;
-
-            case '%':
-                bf[0] = *(pzSrc++);
-                bf[1] = *(pzSrc++);
-                if ((bf[0] == NUL) || (bf[1] == NUL))
-                    goto string_fixup_done;
-                ch = strtoul(bf, NULL, 16);
-                /* FALLTHROUGH */
-
-            default:
-                *(pzDst++) = ch;
-            }
-        } string_fixup_done:;
-        *pzDst = NUL;
-    }
+    if (  (valu.valType == OPARG_TYPE_STRING)
+       && (mode == OPTION_LOAD_COOKED))
+        cook_xml_text(pzData);
 
     /*
      *  "pzName" points to what looks like text for one option/configurable.
index 1c95de6da648b40e4d0679c57f4d85584fecd752..6c57b04d3ac6d6f949f64a3fa5ac5f7a7fa017ed 100644 (file)
@@ -8,7 +8,7 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (c) 1992-2010 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
index 231f0e990e2f08f431d8466dd42c8049605e7c9f..5244e2d651fb6cb678f1f0db35bd778eddcd3dcb 100644 (file)
@@ -11,7 +11,7 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (c) 1992-2010 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
index bc205f6ceeec2205b6fb61a4be86be48e06c1dea..63a90c590749e355a83ee634b61f6b4ddf593195 100644 (file)
@@ -11,7 +11,7 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (c) 1992-2010 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
index 447253567e46d0a9a653af3e1ad8b1bc77180ec7..bd06b1e1a851069aed597e20fc77f158774a8941 100644 (file)
@@ -6,7 +6,7 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (c) 1992-2010 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
index f61d025ee42ba0840ccc81b71109c59808c45cce..6146514671af18301b905dc078fa7d611dbbc1c2 100644 (file)
@@ -2,7 +2,7 @@
  *  
  *  DO NOT EDIT THIS FILE   (genshell.c)
  *  
- *  It has been AutoGen-ed  December 18, 2010 at 12:13:31 PM by AutoGen 5.11.6pre4
+ *  It has been AutoGen-ed  February 17, 2011 at 04:58:35 PM by AutoGen 5.11.6
  *  From the definitions    genshell.def
  *  and the template file   options
  *
@@ -18,7 +18,7 @@
  *
  * This source file is copyrighted and licensed under the following terms:
  *
- * genshellopt copyright (c) 1999-2009 Bruce Korb - all rights reserved
+ * genshellopt copyright (c) 1999-2011 Bruce Korb - all rights reserved
  *
  * genshellopt is free software: you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
@@ -49,7 +49,7 @@ extern "C" {
 /* TRANSLATORS: choose the translation for option names wisely because you
                 cannot ever change your mind. */
 tSCC zCopyright[] =
-       "genshellopt copyright (c) 1999-2009 Bruce Korb, all rights reserved";
+       "genshellopt copyright (c) 1999-2011 Bruce Korb, all rights reserved";
 tSCC zCopyrightNotice[610] =
 "genshellopt is free software: you can redistribute it and/or modify it under\n\
 the terms of the GNU General Public License as published by the Free Software\n\
@@ -210,15 +210,15 @@ USAGE:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n";
 
 static char const zBugsAddr[36]    = "autogen-users@lists.sourceforge.net";
 static char const zExplain[] = "\n\
-Note that `shell' is only useful if the output file does not already\n\
-exist.  If it does, then the shell name and optional first argument\n\
-will be extracted from the script file.\n";
-static char const zDetail[234] = "\n\
+Note that ``shell'' is only useful if the output file does not already\n\
+exist.  If it does, then the shell name and optional first argument will\n\
+be extracted from the script file.\n";
+static char const zDetail[237] = "\n\
 If the script file already exists and contains Automated Option Processing\n\
 text, the second line of the file through the ending tag will be replaced\n\
-by the newly generated text.  The first `#!' line will be regenerated.\n";
+by the newly generated text.  The first ``#!''  line will be regenerated.\n";
 static char const zFullVersion[] = GENSHELLOPT_FULL_VERSION;
-/* extracted from /old-home/bkorb/ag/ag/autoopts/tpl/optcode.tpl near line 504 */
+/* extracted from optcode.tlib near line 504 */
 
 #if defined(ENABLE_NLS)
 # define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -235,6 +235,22 @@ static char const zFullVersion[] = GENSHELLOPT_FULL_VERSION;
 # define PKGDATADIR ""
 #endif
 
+#ifndef  WITH_PACKAGER
+# define genshellopt_packager_info NULL
+#else
+static char const genshellopt_packager_info[] =
+    "Packaged by " WITH_PACKAGER
+
+# ifdef WITH_PACKAGER_VERSION
+        " ("WITH_PACKAGER_VERSION")"
+# endif
+
+# ifdef WITH_PACKAGER_BUG_REPORTS
+    "\nReport genshellopt bugs to " WITH_PACKAGER_BUG_REPORTS
+# endif
+    "\n";
+#endif
+
 tOptions genshelloptOptions = {
     OPTIONS_STRUCT_VERSION,
     0, NULL,                    /* original argc + argv    */
@@ -252,7 +268,7 @@ tOptions genshelloptOptions = {
     zExplain,     zDetail,      optDesc,
     zBugsAddr,                  /* address to send bugs to */
     NULL, NULL,                 /* extensions/saved state  */
-    genshelloptUsage,       /* usage procedure */
+    genshelloptUsage, /* usage procedure */
     translate_option_strings,   /* translation procedure */
     /*
      *  Indexes to special options
@@ -265,7 +281,7 @@ tOptions genshelloptOptions = {
     5 /* full option count */, 2 /* user option count */,
     genshellopt_full_usage, genshellopt_short_usage,
     NULL, NULL,
-    PKGDATADIR
+    PKGDATADIR, genshellopt_packager_info
 };
 
 /*
@@ -279,7 +295,7 @@ doUsageOpt(
     (void)pOptions;
     USAGE(EXIT_SUCCESS);
 }
-/* extracted from /old-home/bkorb/ag/ag/autoopts/tpl/optcode.tpl near line 641 */
+/* extracted from optcode.tlib near line 657 */
 
 #if ENABLE_NLS
 #include <stdio.h>
@@ -323,7 +339,6 @@ translate_option_strings(void)
      *  been changed by the first pass through this code.  One shot only.
      */
     if (option_usage_text.field_ct != 0) {
-
         /*
          *  Do the translations.  The first pointer follows the field count
          *  field.  The field count field is the size of a pointer.
@@ -343,6 +358,7 @@ translate_option_strings(void)
         COERSION(pzUsageTitle);
         COERSION(pzExplain);
         COERSION(pzDetail);
+        COERSION(pzPackager);
         option_usage_text.field_ct = 0;
 
         for (ix = genshelloptOptions.optCt; ix > 0; ix--, pOD++)
index 90e415a47c56ab56e258eac5003334efb6bce1b0..583233b822759f933cfcf3e39bb52fa02161690f 100644 (file)
@@ -2,7 +2,7 @@
  *  
  *  DO NOT EDIT THIS FILE   (genshell.h)
  *  
- *  It has been AutoGen-ed  December 18, 2010 at 12:13:31 PM by AutoGen 5.11.6pre4
+ *  It has been AutoGen-ed  February 17, 2011 at 04:58:35 PM by AutoGen 5.11.6
  *  From the definitions    genshell.def
  *  and the template file   options
  *
@@ -18,7 +18,7 @@
  *
  * This source file is copyrighted and licensed under the following terms:
  *
- * genshellopt copyright (c) 1999-2009 Bruce Korb - all rights reserved
+ * genshellopt copyright (c) 1999-2011 Bruce Korb - all rights reserved
  *
  * genshellopt is free software: you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
@@ -121,7 +121,7 @@ typedef enum {
                 genshelloptOptions.pzCurOpt  = NULL)
 #define START_OPT       RESTART_OPT(1)
 #define USAGE(c)        (*genshelloptOptions.pUsageProc)(&genshelloptOptions, c)
-/* extracted from /old-home/bkorb/ag/ag/autoopts/tpl/opthead.tpl near line 435 */
+/* extracted from opthead.tlib near line 435 */
 
 /* * * * * *
  *
index 204209348fa7ba0f33a7b1906856a69d149ea40b..024dce9301a87915465fd191e981a9d0de3071bd 100644 (file)
@@ -9,7 +9,7 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (c) 1992-2010 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
index d26975d3d5521244180b61fa9a7c7f8a19d2edf5..db4bb06c9a9a55a2f3cc95fadc7d9bf1921da0ee 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  December 21, 2010 at 02:20:29 PM by AutoGen 5.11.6pre6
+dnl It has been AutoGen-ed  February 17, 2011 at 04:58:33 PM by AutoGen 5.11.6
 dnl From the definitions    libopts.def
 dnl and the template file   conftest.tpl
 dnl
@@ -115,12 +115,11 @@ dnl  that have not been disabled with "omit-invocation".
 dnl
 AC_DEFUN([LIBOPTS_WITH_REGEX_HEADER],[
   AC_ARG_WITH([regex-header],
-    AC_HELP_STRING([--with-regex-header], [a reg expr header is specified]),
+    AS_HELP_STRING([--with-regex-header], [a reg expr header is specified]),
     [libopts_cv_with_regex_header=${with_regex_header}],
     AC_CACHE_CHECK([whether a reg expr header is specified], libopts_cv_with_regex_header,
       libopts_cv_with_regex_header=no)
   ) # end of AC_ARG_WITH
-
   if test "X${libopts_cv_with_regex_header}" != Xno
   then
     AC_DEFINE_UNQUOTED([REGEX_HEADER],[<${libopts_cv_with_regex_header}>])
@@ -133,13 +132,13 @@ AC_DEFUN([LIBOPTS_WITH_REGEX_HEADER],[
 
 AC_DEFUN([LIBOPTS_WITHLIB_REGEX],[
   AC_ARG_WITH([libregex],
-    AC_HELP_STRING([--with-libregex], [libregex installation prefix]),
+    AS_HELP_STRING([--with-libregex], [libregex installation prefix]),
     [libopts_cv_with_libregex_root=${with_libregex}],
     AC_CACHE_CHECK([whether with-libregex was specified], libopts_cv_with_libregex_root,
       libopts_cv_with_libregex_root=no)
   ) # end of AC_ARG_WITH libregex
 
-  if test "${with_libguile+set}" = set && \
+  if test "${with_libregex+set}" = set && \
      test "${withval}" = no
   then ## disabled by request
     libopts_cv_with_libregex_root=no
@@ -148,14 +147,14 @@ AC_DEFUN([LIBOPTS_WITHLIB_REGEX],[
   else
 
   AC_ARG_WITH([libregex-cflags],
-    AC_HELP_STRING([--with-libregex-cflags], [libregex compile flags]),
+    AS_HELP_STRING([--with-libregex-cflags], [libregex compile flags]),
     [libopts_cv_with_libregex_cflags=${with_regex_cflags}],
     AC_CACHE_CHECK([whether with-libregex-cflags was specified], libopts_cv_with_libregex_cflags,
       libopts_cv_with_libregex_cflags=no)
   ) # end of AC_ARG_WITH libregex-cflags
 
   AC_ARG_WITH([libregex-libs],
-    AC_HELP_STRING([--with-libregex-libs], [libregex link command arguments]),
+    AS_HELP_STRING([--with-libregex-libs], [libregex link command arguments]),
     [libopts_cv_with_libregex_libs=${with_regex_libs}],
     AC_CACHE_CHECK([whether with-libregex-libs was specified], libopts_cv_with_libregex_libs,
       libopts_cv_with_libregex_libs=no)
@@ -218,7 +217,6 @@ int main() {
     [libopts_cv_with_libregex=no]) # end of AC_TRY_RUN 
   ]) # end of AC_CACHE_VAL for libopts_cv_with_libregex
   AC_MSG_RESULT([${libopts_cv_with_libregex}])
-
   if test "X${libopts_cv_with_libregex}" != Xno
   then
     AC_DEFINE([WITH_LIBREGEX],[1],
@@ -244,7 +242,6 @@ int main (int argc, char** argv) {
   ) # end of TRY_RUN
   ]) # end of AC_CACHE_VAL for libopts_cv_run_pathfind
   AC_MSG_RESULT([${libopts_cv_run_pathfind}])
-
   if test "X${libopts_cv_run_pathfind}" != Xno
   then
     AC_DEFINE([HAVE_PATHFIND],[1],
@@ -261,14 +258,11 @@ AC_DEFUN([LIBOPTS_TEST_DEV_ZERO],[
 dzero=\`ls -lL /dev/zero | egrep ^c......r\`
 test -z "${dzero}" && exit 1
 echo ${dzero}`
-    if test $? -ne 0
-    then libopts_cv_test_dev_zero=no
-    elif test -z "$libopts_cv_test_dev_zero"
+    if test $? -ne 0 || test -z "$libopts_cv_test_dev_zero"
     then libopts_cv_test_dev_zero=no
     fi
   ]) # end of CACHE_VAL of libopts_cv_test_dev_zero
   AC_MSG_RESULT([${libopts_cv_test_dev_zero}])
-
   if test "X${libopts_cv_test_dev_zero}" != Xno
   then
     AC_DEFINE([HAVE_DEV_ZERO],[1],
@@ -296,7 +290,6 @@ choke me!!
   ) # end of TRY_RUN
   ]) # end of AC_CACHE_VAL for libopts_cv_run_realpath
   AC_MSG_RESULT([${libopts_cv_run_realpath}])
-
   if test "X${libopts_cv_run_realpath}" != Xno
   then
     AC_DEFINE([HAVE_REALPATH],[1],
@@ -330,7 +323,6 @@ int main() {
   ) # end of TRY_RUN
   ]) # end of AC_CACHE_VAL for libopts_cv_run_strftime
   AC_MSG_RESULT([${libopts_cv_run_strftime}])
-
   if test "X${libopts_cv_run_strftime}" != Xno
   then
     AC_DEFINE([HAVE_STRFTIME],[1],
@@ -351,7 +343,6 @@ return (fp == NULL) ? 1 : fclose(fp); }],
   ) # end of TRY_RUN
   ]) # end of AC_CACHE_VAL for libopts_cv_run_fopen_binary
   AC_MSG_RESULT([${libopts_cv_run_fopen_binary}])
-
   if test "X${libopts_cv_run_fopen_binary}" != Xno
   then
     AC_DEFINE([FOPEN_BINARY_FLAG],"b",
@@ -375,7 +366,6 @@ return (fp == NULL) ? 1 : fclose(fp); }],
   ) # end of TRY_RUN
   ]) # end of AC_CACHE_VAL for libopts_cv_run_fopen_text
   AC_MSG_RESULT([${libopts_cv_run_fopen_text}])
-
   if test "X${libopts_cv_run_fopen_text}" != Xno
   then
     AC_DEFINE([FOPEN_TEXT_FLAG],"t",
@@ -390,12 +380,11 @@ return (fp == NULL) ? 1 : fclose(fp); }],
 
 AC_DEFUN([LIBOPTS_DISABLE_OPTIONAL_ARGS],[
   AC_ARG_ENABLE([optional-args],
-    AC_HELP_STRING([--disable-optional-args], [not wanting optional option args]),
+    AS_HELP_STRING([--disable-optional-args], [not wanting optional option args]),
     [libopts_cv_enable_optional_args=${enable_optional_args}],
     AC_CACHE_CHECK([whether not wanting optional option args], libopts_cv_enable_optional_args,
       libopts_cv_enable_optional_args=yes)
   ) # end of AC_ARG_ENABLE
-
   if test "X${libopts_cv_enable_optional_args}" = Xno
   then
     AC_DEFINE([NO_OPTIONAL_OPT_ARGS], [1],
@@ -446,7 +435,7 @@ dnl the config tests that the library needs.  Invoke the
 dnl "INVOKE_LIBOPTS_MACROS" macro iff we are building libopts.
 dnl
 dnl  This file is part of AutoGen.
-dnl  AutoGen Copyright (c) 1992-2010 by Bruce Korb - all rights reserved
+dnl  AutoGen Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
 dnl
 dnl  AutoGen is free software: you can redistribute it and/or modify it
 dnl  under the terms of the GNU General Public License as published by the
@@ -537,7 +526,7 @@ AC_DEFUN([LIBOPTS_CHECK_COMMON],[
 ])
 dnl AC_CONFIG_FILES conditionalization requires using AM_COND_IF, however
 dnl AM_COND_IF is new to Automake 1.11.  To use it on new Automake without
-dnl requiring same, a fallback implementation for older Autoconf is provided.
+dnl requiring same, a fallback implementation for older Automake is provided.
 dnl Note that disabling of AC_CONFIG_FILES requires Automake 1.11, this code
 dnl is correct only in terms of m4sh generated script.
 m4_ifndef([AM_COND_IF], [AC_DEFUN([AM_COND_IF], [
index 5d0eb9f44dd49ae96912e3c7b2ba9b3ba25046a2..48e4ceb7a1081f5232f983954f3be893a61243ff 100644 (file)
@@ -1,5 +1,5 @@
 # liboptschk.m4 serial 2 (autogen - 5.11.4)
-dnl Copyright (c) 2005-2010 by Bruce Korb - all rights reserved
+dnl Copyright (c) 2005-2011 by Bruce Korb - all rights reserved
 dnl
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
index f8f08eff26b601fcceeedb481224b2bf2dff4425..4c52a807cdfbc4025137232cfc516cb52c6d806e 100644 (file)
@@ -9,7 +9,7 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (c) 1992-2010 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
index b965c67ec33d376040b19c3dbda964c6182f3bca..f9f7e7ae7b80571690b593286e4129fffe26c71f 100644 (file)
@@ -8,7 +8,7 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (c) 1992-2010 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
index f2d5ddc467ffb48257be4118cc64ca0654f1df84..db3648e3a9ac5e73c8df9468289dfb4f43574cf2 100644 (file)
@@ -6,7 +6,7 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (c) 1992-2010 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
index 35891d03c8b66f3427b068f8cbf371b22bad4e67..2570299d48887c8c2d1c8912aadb1d3ca8ab5c78 100644 (file)
@@ -1,5 +1,5 @@
 /* Parse a time duration and return a seconds count
-   Copyright (C) 2008-2010 Free Software Foundation, Inc.
+   Copyright (C) 2008-2011 Free Software Foundation, Inc.
    Written by Bruce Korb <bkorb@gnu.org>, 2008.
 
    This program is free software: you can redistribute it and/or modify
index 9dfbbbd7214d1293025877372c14832f098670dd..583adc726e68edf8cb4a2750c5b1de06dd081460 100644 (file)
@@ -1,5 +1,5 @@
 /* Parse a time duration and return a seconds count
-   Copyright (C) 2008-2010 Free Software Foundation, Inc.
+   Copyright (C) 2008-2011 Free Software Foundation, Inc.
    Written by Bruce Korb <bkorb@gnu.org>, 2008.
 
    This program is free software: you can redistribute it and/or modify
index 6fa7bee45d46038bc8e33df8aa20d23a11b7f515..aa897e10363a170026616887a680f2ad490727a9 100644 (file)
@@ -11,7 +11,7 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (c) 1992-2010 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
index c18b4f7a173ce41bb5e4b4b63a433a1e7f024d54..80dacd163b038ad40cf0c5d38f86e4e5e5ae96ca 100644 (file)
@@ -1,7 +1,7 @@
 /* -*- buffer-read-only: t -*- vi: set ro:
  *
  * Prototypes for autoopts
- * Generated Sat Dec 18 12:13:39 PST 2010
+ * Generated Thu Feb 17 16:58:43 PST 2011
  */
 #ifndef AUTOOPTS_PROTO_H_GUARD
 #define AUTOOPTS_PROTO_H_GUARD 1
index 8f292757131343dec2623316007fd528081d0ac4..f15284f6b99640bf52f522b05c5234705fc20ccc 100644 (file)
@@ -10,7 +10,7 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (c) 1992-2010 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
index efc48db35443c5aa168c73e1f727a173dd65b18d..2959db664c3af46c3553f6abc6449e8f369404b5 100644 (file)
@@ -6,7 +6,7 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (c) 1992-2010 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
index f8d4c1dce950831b16b2e1c8374dc50c480bb7d1..f55f3d2499d1282f701737d75cded3faf1626ccc 100644 (file)
@@ -10,7 +10,7 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (c) 1992-2010 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
index 42abefe99cd0786e37da1367ba33ffdcae942824..b9f154bf5ff92e9c2e22bf401d79128d1445649d 100644 (file)
@@ -10,7 +10,7 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (c) 1992-2010 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
index c1c64015f86377a2c6f53d09733a9b3db0f2442a..6291db1cc6ca6a97842b15fa143aa1465e0b80c9 100644 (file)
@@ -8,7 +8,7 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (c) 1992-2010 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
index 525adc670ecb7612a70a688b29c76417117a7e0f..d930772b7dd6aa799883df4a6c2a2b7825cd3c74 100644 (file)
@@ -9,7 +9,7 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (c) 1992-2010 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
index 5719bdaad957a2fef7660a294969a3f592b497ba..d2cb65de6346aefeb4594232e6c4a58feb4896b6 100644 (file)
@@ -13,7 +13,7 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (c) 1992-2010 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
index 57aa227fbc52ca8b0d9cf89dc5ea62862fe0f539..01aa7d8212553b67e7e12c22f9dc6299bd581ffc 100644 (file)
@@ -5,7 +5,7 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (c) 1992-2010 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
index ea32e4d388e0d342943cea31fbbebb07bcac2805..e8e4d8d78a314c352081c70f40ebc7c7ff8e7329 100644 (file)
@@ -6,7 +6,7 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (c) 1992-2010 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
index d93f7a1d7c6124cb0b69eaa8e5b883dbcbe618ce..4ca1245cf0661387d37f6e91338b3a59ab644b0e 100644 (file)
@@ -4,7 +4,7 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (c) 1992-2010 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
index b65ff135ef73bebf7abd9c5821de782c0072eec9..4d106675c30436de062deadd8f8fbb8d4813ec91 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * \file usage.c
  *
- * Time-stamp:      "2010-12-18 11:41:41 bkorb"
+ * Time-stamp:      "2011-02-01 14:42:37 bkorb"
  *
  *  This module implements the default usage procedure for
  *  Automated Options.  It may be overridden, of course.
@@ -16,7 +16,7 @@
 /*
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (c) 1992-2010 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -274,13 +274,11 @@ print_usage_details(tOptions * opts, int exit_code)
     case 0:                 fputs(zOptsOnly, option_usage_fp); break;
     }
 
-    if ((opts->fOptSet & OPTPROC_NUM_OPT) != 0) {
+    if ((opts->fOptSet & OPTPROC_NUM_OPT) != 0)
         fputs(zNumberOpt, option_usage_fp);
-    }
 
-    if ((opts->fOptSet & OPTPROC_REORDER) != 0) {
+    if ((opts->fOptSet & OPTPROC_REORDER) != 0)
         fputs(zReorder, option_usage_fp);
-    }
 
     if (opts->pzExplain != NULL)
         fputs(opts->pzExplain, option_usage_fp);
@@ -292,7 +290,13 @@ print_usage_details(tOptions * opts, int exit_code)
     if (exit_code == EXIT_SUCCESS)
         prt_prog_detail(opts);
 
-    if (opts->pzBugAddr != NULL)
+    /*
+     * Give bug notification preference to the packager information
+     */
+    if (HAS_pzPkgDataDir(opts) && (opts->pzPackager != NULL))
+        fputs(opts->pzPackager, option_usage_fp);
+
+    else if (opts->pzBugAddr != NULL)
         fprintf(option_usage_fp, zPlsSendBugs, opts->pzBugAddr);
 
     fflush(option_usage_fp);
index f67a397ecd3bb94814d424c7c000961b36cbd5e4..2a95f7b9068c0d56a905ac55747749255959c97f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Generated header for gperf generated source Sat Dec 18 12:13:31 PST 2010
+ *  Generated header for gperf generated source Thu Feb 17 16:58:35 PST 2011
  *  This file enumerates the list of names and declares the
  *  procedure for mapping string names to the enum value.
  */
index a6dfb3abbb4deff85098df6bebfb30e1c1fe3c7a..b819f3e54ee482a464a50311fa9853edd769b49b 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * Time-stamp:      "2010-09-05 05:53:20 bkorb"
+ * Time-stamp:      "2011-02-01 13:20:14 bkorb"
  *
  *  This module implements the default usage procedure for
  *  Automated Options.  It may be overridden, of course.
@@ -9,7 +9,7 @@
 /*
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (c) 1992-2010 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
  *  66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd
  */
 
-/* = = = START-STATIC-FORWARD = = = */
-static void
-printVersion(tOptions* pOpts, tOptDesc* pOD, FILE* fp);
-/* = = = END-STATIC-FORWARD = = = */
-
 /*=export_func  optionVersion
  *
  * what:     return the compiled AutoOpts version number
@@ -51,9 +46,8 @@ optionVersion(void)
     return zVersion;
 }
 
-
 static void
-printVersion(tOptions* pOpts, tOptDesc* pOD, FILE* fp)
+print_ver(tOptions* pOpts, tOptDesc* pOD, FILE* fp)
 {
     char swCh;
 
@@ -103,7 +97,10 @@ printVersion(tOptions* pOpts, tOptDesc* pOD, FILE* fp)
         }
 
         fprintf(fp, zAO_Ver, optionVersion());
-        if (pOpts->pzBugAddr != NULL)
+
+        if (HAS_pzPkgDataDir(pOpts) && (pOpts->pzPackager != NULL))
+            fputs(pOpts->pzPackager, fp);
+        else if (pOpts->pzBugAddr != NULL)
             fprintf(fp, zPlsSendBugs, pOpts->pzBugAddr);
         break;
 
@@ -133,7 +130,7 @@ printVersion(tOptions* pOpts, tOptDesc* pOD, FILE* fp)
 void
 optionPrintVersion(tOptions*  pOpts, tOptDesc*  pOD)
 {
-    printVersion(pOpts, pOD, stdout);
+    print_ver(pOpts, pOD, stdout);
 }
 
 /*=export_func  optionVersionStderr
@@ -149,7 +146,7 @@ optionPrintVersion(tOptions*  pOpts, tOptDesc*  pOD)
 void
 optionVersionStderr(tOptions*  pOpts, tOptDesc*  pOD)
 {
-    printVersion(pOpts, pOD, stderr);
+    print_ver(pOpts, pOD, stderr);
 }
 
 /*
index e9360f1755bde97bafad1b71969fc5d37e5d609f..d8e09318240e1dfd5e611d78ebc1736e0b54ff3a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Generated header for gperf generated source Sat Dec 18 12:13:30 PST 2010
+ *  Generated header for gperf generated source Thu Feb 17 16:58:35 PST 2011
  *  This file enumerates the list of names and declares the
  *  procedure for mapping string names to the enum value.
  */
index ba701ff009fab305e016bd86d86a62e5f803be01..f916525d91297c97339a89e607bbcccb95cd9f5e 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (sntp-opts.c)
  *  
- *  It has been AutoGen-ed  January  3, 2011 at 09:07:39 PM by AutoGen 5.11.6pre7
+ *  It has been AutoGen-ed  February 22, 2011 at 12:29:02 AM by AutoGen 5.11.6
  *  From the definitions    sntp-opts.def
  *  and the template file   options
  *
@@ -38,7 +38,7 @@ extern "C" {
                 cannot ever change your mind. */
 tSCC zCopyright[] =
        "sntp copyright (c) 1970-2011 David L. Mills and/or others, all rights reserved"
-/* extracted from ../include/copyright.def near line 8 */
+/* extracted from copyright.def near line 8 */
 ;
 tSCC zCopyrightNotice[24] =
 "see html/copyright.html";
@@ -484,14 +484,14 @@ static char const * const apzHomeList[3] = {
 static char const zBugsAddr[34]    = "http://bugs.ntp.org, bugs@ntp.org";
 static char const zExplain[] = "\n\n";
 static char const zDetail[352] = "\n\
-sntp implements the Simple Network Time Protocol, and is used to query\n\
-an NTP or SNTP server and either display the time or set the local\n\
-system's time (given suitable privilege).\n\n\
+sntp implements the Simple Network Time Protocol, and is used to query an\n\
+NTP or SNTP server and either display the time or set the local system's\n\
+time (given suitable privilege).\n\n\
 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 /usr/local/gnu/share/autogen/optcode.tpl near line 504 */
+/* extracted from optcode.tlib near line 504 */
 
 #if defined(ENABLE_NLS)
 # define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -508,6 +508,22 @@ static char const zFullVersion[] = SNTP_FULL_VERSION;
 # define PKGDATADIR ""
 #endif
 
+#ifndef  WITH_PACKAGER
+# define sntp_packager_info NULL
+#else
+static char const sntp_packager_info[] =
+    "Packaged by " WITH_PACKAGER
+
+# ifdef WITH_PACKAGER_VERSION
+        " ("WITH_PACKAGER_VERSION")"
+# endif
+
+# ifdef WITH_PACKAGER_BUG_REPORTS
+    "\nReport sntp bugs to " WITH_PACKAGER_BUG_REPORTS
+# endif
+    "\n";
+#endif
+
 tOptions sntpOptions = {
     OPTIONS_STRUCT_VERSION,
     0, NULL,                    /* original argc + argv    */
@@ -526,7 +542,7 @@ tOptions sntpOptions = {
     zExplain,     zDetail,      optDesc,
     zBugsAddr,                  /* address to send bugs to */
     NULL, NULL,                 /* extensions/saved state  */
-    optionUsage,       /* usage procedure */
+    optionUsage, /* usage procedure */
     translate_option_strings,   /* translation procedure */
     /*
      *  Indexes to special options
@@ -539,7 +555,7 @@ tOptions sntpOptions = {
     17 /* full option count */, 12 /* user option count */,
     sntp_full_usage, sntp_short_usage,
     NULL, NULL,
-    PKGDATADIR
+    PKGDATADIR, sntp_packager_info
 };
 
 /*
@@ -553,7 +569,7 @@ doUsageOpt(
     (void)pOptions;
     USAGE(EXIT_SUCCESS);
 }
-/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 107 */
+/* extracted from optmain.tlib near line 107 */
 
 #if defined(TEST_SNTP_OPTS) /* TEST MAIN PROCEDURE: */
 
@@ -571,7 +587,7 @@ main(int argc, char** argv)
     return res;
 }
 #endif  /* defined TEST_SNTP_OPTS */
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 641 */
+/* extracted from optcode.tlib near line 657 */
 
 #if ENABLE_NLS
 #include <stdio.h>
@@ -615,7 +631,6 @@ translate_option_strings(void)
      *  been changed by the first pass through this code.  One shot only.
      */
     if (option_usage_text.field_ct != 0) {
-
         /*
          *  Do the translations.  The first pointer follows the field count
          *  field.  The field count field is the size of a pointer.
@@ -635,6 +650,7 @@ translate_option_strings(void)
         COERSION(pzUsageTitle);
         COERSION(pzExplain);
         COERSION(pzDetail);
+        COERSION(pzPackager);
         option_usage_text.field_ct = 0;
 
         for (ix = sntpOptions.optCt; ix > 0; ix--, pOD++)
index 85d4ebb3925da769892a29efa65e910659771331..f7cd84262e5ba0be91f2b1804659fe4e3eeb9eae 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (sntp-opts.h)
  *  
- *  It has been AutoGen-ed  January  3, 2011 at 09:07:39 PM by AutoGen 5.11.6pre7
+ *  It has been AutoGen-ed  February 22, 2011 at 12:29:02 AM by AutoGen 5.11.6
  *  From the definitions    sntp-opts.def
  *  and the template file   options
  *
@@ -209,7 +209,7 @@ typedef enum {
                 sntpOptions.pzCurOpt  = NULL)
 #define START_OPT       RESTART_OPT(1)
 #define USAGE(c)        (*sntpOptions.pUsageProc)(&sntpOptions, c)
-/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 435 */
+/* extracted from opthead.tlib near line 435 */
 
 /* * * * * *
  *
index 6248df8de3bdeee46684c0907b3344430d3e575f..f4a981bbfd7b563de9b4147709aae006f8d0e310 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntp-keygen-opts.c)
  *  
- *  It has been AutoGen-ed  January  3, 2011 at 09:18:50 PM by AutoGen 5.11.6pre7
+ *  It has been AutoGen-ed  February 22, 2011 at 12:29:04 AM by AutoGen 5.11.6
  *  From the definitions    ntp-keygen-opts.def
  *  and the template file   options
  *
@@ -39,7 +39,7 @@ extern "C" {
                 cannot ever change your mind. */
 tSCC zCopyright[] =
        "ntp-keygen copyright (c) 1970-2011 David L. Mills and/or others, all rights reserved"
-/* extracted from ../include/copyright.def near line 8 */
+/* extracted from copyright.def near line 8 */
 ;
 tSCC zCopyrightNotice[24] =
 "see html/copyright.html";
@@ -737,11 +737,11 @@ static char const * const apzHomeList[3] = {
 
 static char const zBugsAddr[34]    = "http://bugs.ntp.org, bugs@ntp.org";
 #define zExplain NULL
-static char const zDetail[98] = "\n\
-If there is no new host key, look for an existing one.\n\
-If one is not found, create it.\n";
+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 /usr/local/gnu/share/autogen/optcode.tpl near line 504 */
+/* extracted from optcode.tlib near line 504 */
 
 #if defined(ENABLE_NLS)
 # define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -758,6 +758,22 @@ static char const zFullVersion[] = NTP_KEYGEN_FULL_VERSION;
 # define PKGDATADIR ""
 #endif
 
+#ifndef  WITH_PACKAGER
+# define ntp_keygen_packager_info NULL
+#else
+static char const ntp_keygen_packager_info[] =
+    "Packaged by " WITH_PACKAGER
+
+# ifdef WITH_PACKAGER_VERSION
+        " ("WITH_PACKAGER_VERSION")"
+# endif
+
+# ifdef WITH_PACKAGER_BUG_REPORTS
+    "\nReport ntp_keygen bugs to " WITH_PACKAGER_BUG_REPORTS
+# endif
+    "\n";
+#endif
+
 tOptions ntp_keygenOptions = {
     OPTIONS_STRUCT_VERSION,
     0, NULL,                    /* original argc + argv    */
@@ -776,7 +792,7 @@ tOptions ntp_keygenOptions = {
     zExplain,     zDetail,      optDesc,
     zBugsAddr,                  /* address to send bugs to */
     NULL, NULL,                 /* extensions/saved state  */
-    optionUsage,       /* usage procedure */
+    optionUsage, /* usage procedure */
     translate_option_strings,   /* translation procedure */
     /*
      *  Indexes to special options
@@ -789,7 +805,7 @@ tOptions ntp_keygenOptions = {
     23 /* full option count */, 18 /* user option count */,
     ntp_keygen_full_usage, ntp_keygen_short_usage,
     NULL, NULL,
-    PKGDATADIR
+    PKGDATADIR, ntp_keygen_packager_info
 };
 
 /*
@@ -813,7 +829,7 @@ doUsageOpt(
 static void
 doOptSet_Debug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
 {
-    /* extracted from ../include/debug-opt.def, line 27 */
+    /* extracted from debug-opt.def, line 27 */
 DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
 }
 #endif /* defined(TEST_NTP_KEYGEN_OPTS) */
@@ -869,7 +885,7 @@ doOptModulus(tOptions* pOptions, tOptDesc* pOptDesc)
     pOptDesc->optArg.argInt = val;
 }
 #endif /* defined OPENSSL */
-/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 107 */
+/* extracted from optmain.tlib near line 107 */
 
 #if defined(TEST_NTP_KEYGEN_OPTS) /* TEST MAIN PROCEDURE: */
 
@@ -887,7 +903,7 @@ main(int argc, char** argv)
     return res;
 }
 #endif  /* defined TEST_NTP_KEYGEN_OPTS */
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 641 */
+/* extracted from optcode.tlib near line 657 */
 
 #if ENABLE_NLS
 #include <stdio.h>
@@ -931,7 +947,6 @@ translate_option_strings(void)
      *  been changed by the first pass through this code.  One shot only.
      */
     if (option_usage_text.field_ct != 0) {
-
         /*
          *  Do the translations.  The first pointer follows the field count
          *  field.  The field count field is the size of a pointer.
@@ -951,6 +966,7 @@ translate_option_strings(void)
         COERSION(pzUsageTitle);
         COERSION(pzExplain);
         COERSION(pzDetail);
+        COERSION(pzPackager);
         option_usage_text.field_ct = 0;
 
         for (ix = ntp_keygenOptions.optCt; ix > 0; ix--, pOD++)
index 01a3839d67c7b3eabdd96561badda82c6670003c..5a17d3c1a453cf35eb24568e8c7cbd183591c8f4 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntp-keygen-opts.h)
  *  
- *  It has been AutoGen-ed  January  3, 2011 at 09:18:50 PM by AutoGen 5.11.6pre7
+ *  It has been AutoGen-ed  February 22, 2011 at 12:29:03 AM by AutoGen 5.11.6
  *  From the definitions    ntp-keygen-opts.def
  *  and the template file   options
  *
@@ -259,7 +259,7 @@ typedef enum {
                 ntp_keygenOptions.pzCurOpt  = NULL)
 #define START_OPT       RESTART_OPT(1)
 #define USAGE(c)        (*ntp_keygenOptions.pUsageProc)(&ntp_keygenOptions, c)
-/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 435 */
+/* extracted from opthead.tlib near line 435 */
 
 /* * * * * *
  *