*
* DO NOT EDIT THIS FILE (clktest-opts.c)
*
- * It has been AutoGen-ed Tuesday June 27, 2006 at 10:16:45 PM EDT
+ * It has been AutoGen-ed Saturday September 9, 2006 at 05:39:57 PM EDT
* From the definitions clktest-opts.def
* and the template file options
*/
+
+/*
+ * 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.
+ *
+ * This source file is copyrighted and licensed under the following terms:
+ *
+ * clktest copyright 1970-2006 ntp.org - all rights reserved
+ *
+ * see html/copyright.html
+ */
+
+
#include <stdio.h>
#include <limits.h>
#define OPTION_CODE_COMPILE 1
"clktest copyright (c) 1970-2006 ntp.org, all rights reserved";
tSCC zCopyrightNotice[] =
-/* extracted from /backroom/ntp-dev-hms/include/copyright.def near line 8 */
+/* extracted from /backroom/ntp-dev/include/copyright.def near line 8 */
"see html/copyright.html";
extern tUsageProc optionUsage;
/*
* Declare option callback procedures
*/
-#ifndef CLKLDISC
-#define doOptMagic2 doUsageOpt
-#endif
-#ifndef CLKLDISC
-#define doOptMagic1 doUsageOpt
-#endif
-#ifndef STREAM
-#define doOptMagic1 doUsageOpt
-#endif
-/* extracted from optmain.tpl near line 586 */
-
+#ifdef CLKLDISC
+ static tOptProc doOptMagic2;
+#else /* not CLKLDISC */
+# define doOptMagic2 NULL
+#endif /* def/not CLKLDISC */
+#ifdef CLKLDISC
+ static tOptProc doOptMagic1;
+#else /* not CLKLDISC */
+# define doOptMagic1 NULL
+#endif /* def/not CLKLDISC */
+#ifdef STREAM
+ static tOptProc doOptMagic1;
+#else /* not STREAM */
+# define doOptMagic1 NULL
+#endif /* def/not STREAM */
#if defined(TEST_CLKTEST_OPTS)
/*
* Under test, omit argument processing, or call optionStackArg,
extern tOptProc
optionPagedUsage, optionPrintVersion;
static tOptProc
- doOptCrmod, doOptMagic1, doOptMagic2, doOptSpeed, doOptTimeout,
- doUsageOpt;
+ doOptCrmod, doOptSpeed, doOptTimeout, doUsageOpt;
/*
* #define map the "normal" callout procs
#define SPEED_OPT_PROC doOptSpeed
#define CRMOD_OPT_PROC doOptCrmod
#endif /* defined(TEST_CLKTEST_OPTS) */
-#ifndef CLKLDISC
-#undef doOptMagic2
-#define doOptMagic2 NULL
-#endif
-#ifndef CLKLDISC
-#undef doOptMagic1
-#define doOptMagic1 NULL
-#endif
-#ifndef STREAM
-#undef doOptMagic1
-#define doOptMagic1 NULL
-#endif
#ifdef TEST_CLKTEST_OPTS
# define DOVERPROC optionVersionStderr
#else
*/
tSCC zPROGNAME[] = "CLKTEST";
tSCC zUsageTitle[] =
-"clktest - test the clock line discipline - Ver. 4.2.3p12\n\
+"clktest - test the clock line discipline - Ver. 4.2.3p41\n\
USAGE: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... <tty_device>\n";
tSCC zRcName[] = ".ntprc";
tSCC* apzHomeList[] = {
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 optcode near line 321 */
+/* extracted from optcode near line 368 */
#if defined(ENABLE_NLS)
# define OPTPROC_BASE OPTPROC_TRANSLATE
return res;
}
#endif /* defined TEST_CLKTEST_OPTS */
-/* extracted from optcode near line 418 */
+/* extracted from optcode near line 465 */
#if ENABLE_NLS
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <autoopts/usage-txt.h>
+static char* AO_gettext( const char* pz );
+static void coerce_it(void** s);
+
static char*
AO_gettext( const char* pz )
{
return pzRes;
}
+static void coerce_it(void** s) { *s = AO_gettext(*s); }
+#define COERSION(_f) \
+ coerce_it((void*)&(clktestOptions._f))
+
/*
* This invokes the translation code (e.g. gettext(3)).
*/
pOD++;
}
}
- clktestOptions.pzCopyright = AO_gettext(clktestOptions.pzCopyright);
- clktestOptions.pzCopyNotice = AO_gettext(clktestOptions.pzCopyNotice);
- clktestOptions.pzFullVersion = AO_gettext(clktestOptions.pzFullVersion);
- clktestOptions.pzUsageTitle = AO_gettext(clktestOptions.pzUsageTitle);
- clktestOptions.pzExplain = AO_gettext(clktestOptions.pzExplain);
- clktestOptions.pzDetail = AO_gettext(clktestOptions.pzDetail);
+ COERSION(pzCopyright);
+ COERSION(pzCopyNotice);
+ COERSION(pzFullVersion);
+ COERSION(pzUsageTitle);
+ COERSION(pzExplain);
+ COERSION(pzDetail);
}
#endif /* ENABLE_NLS */
*
* DO NOT EDIT THIS FILE (clktest-opts.h)
*
- * It has been AutoGen-ed Tuesday June 27, 2006 at 10:16:45 PM EDT
+ * It has been AutoGen-ed Saturday September 9, 2006 at 05:39:56 PM EDT
* From the definitions clktest-opts.def
* and the template file options
*/
+
+/*
+ * 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.
+ *
+ * This source file is copyrighted and licensed under the following terms:
+ *
+ * clktest copyright 1970-2006 ntp.org - all rights reserved
+ *
+ * see html/copyright.html
+ */
/*
* This file contains the programmatic interface to the Automated
* Options generated for the clktest program.
*/
#ifndef AUTOOPTS_CLKTEST_OPTS_H_GUARD
#define AUTOOPTS_CLKTEST_OPTS_H_GUARD
-
-/*
- * clktest copyright 1970-2006 ntp.org - all rights reserved
- *
- * see html/copyright.html
- */
#include "config.h"
#include <autoopts/options.h>
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header
+ Choke Me.
#endif
/*
} teOptIndex;
#define OPTION_CT 13
-#define CLKTEST_VERSION "4.2.3p12"
-#define CLKTEST_FULL_VERSION "clktest - test the clock line discipline - Ver. 4.2.3p12"
+#define CLKTEST_VERSION "4.2.3p41"
+#define CLKTEST_FULL_VERSION "clktest - test the clock line discipline - Ver. 4.2.3p41"
/*
- * Interface defines for all options. Replace "n" with
- * the UPPER_CASED option name (as in the teOptIndex
- * enumeration above). e.g. HAVE_OPT( MAGIC2 )
+ * Interface defines for all options. Replace "n" with the UPPER_CASED
+ * option name (as in the teOptIndex enumeration above).
+ * e.g. HAVE_OPT( MAGIC2 )
*/
-#define DESC(n) clktestOptions.pOptDesc[INDEX_OPT_ ## n]
+#define DESC(n) clktestOptions.pOptDesc[INDEX_OPT_ ## n]
#define HAVE_OPT(n) (! UNUSED_OPT(& DESC(n)))
#define OPT_ARG(n) (DESC(n).pzLastArg)
#define STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK)
DESC(n).fOptState |= OPTST_DISABLED; \
DESC(n).optCookie = NULL )
+/*
+ * Make sure there are no #define name conflicts with the option names
+ */
+#ifndef NO_OPTION_NAME_WARNINGS
+# ifdef MAGIC2
+# warning undefining MAGIC2 due to option name conflict
+# undef MAGIC2
+# endif
+# ifdef MAGIC1
+# warning undefining MAGIC1 due to option name conflict
+# undef MAGIC1
+# endif
+# ifdef MAGIC1
+# warning undefining MAGIC1 due to option name conflict
+# undef MAGIC1
+# endif
+# ifdef SPEED
+# warning undefining SPEED due to option name conflict
+# undef SPEED
+# endif
+# ifdef DEBUG
+# warning undefining DEBUG due to option name conflict
+# undef DEBUG
+# endif
+# ifdef CRMOD
+# warning undefining CRMOD due to option name conflict
+# undef CRMOD
+# endif
+# ifdef COMMAND
+# warning undefining COMMAND due to option name conflict
+# undef COMMAND
+# endif
+# ifdef TIMEOUT
+# warning undefining TIMEOUT due to option name conflict
+# undef TIMEOUT
+# endif
+#else /* NO_OPTION_NAME_WARNINGS */
+# undef MAGIC2
+# undef MAGIC1
+# undef MAGIC1
+# undef SPEED
+# undef DEBUG
+# undef CRMOD
+# undef COMMAND
+# undef TIMEOUT
+#endif /* NO_OPTION_NAME_WARNINGS */
+
/*
* Interface defines for specific options.
*/
clktestOptions.pzCurOpt = NULL )
#define START_OPT RESTART_OPT(1)
#define USAGE(c) (*clktestOptions.pUsageProc)( &clktestOptions, c )
-/* extracted from opthead near line 289 */
+/* extracted from opthead near line 311 */
/* * * * * *
*