From: Harlan Stenn Date: Sat, 9 Sep 2006 22:29:08 +0000 (-0400) Subject: autogen upgrade X-Git-Tag: NTP_4_2_3P42~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3f92eaaf983d728e3c791dcafecbcdd99efc676;p=thirdparty%2Fntp.git autogen upgrade bk: 45034034AaYVeaT86TPYVrIxfH87kA --- diff --git a/clockstuff/clktest-opts.c b/clockstuff/clktest-opts.c index 0ba573365..fe2e317ee 100644 --- a/clockstuff/clktest-opts.c +++ b/clockstuff/clktest-opts.c @@ -2,10 +2,28 @@ * * 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 #include #define OPTION_CODE_COMPILE 1 @@ -18,7 +36,7 @@ tSCC zCopyright[] = "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; @@ -176,17 +194,21 @@ tSCC zNotLoad_Opts_Pfx[] = "no"; /* * 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, @@ -211,8 +233,7 @@ static tOptProc extern tOptProc optionPagedUsage, optionPrintVersion; static tOptProc - doOptCrmod, doOptMagic1, doOptMagic2, doOptSpeed, doOptTimeout, - doUsageOpt; + doOptCrmod, doOptSpeed, doOptTimeout, doUsageOpt; /* * #define map the "normal" callout procs @@ -223,18 +244,6 @@ static tOptProc #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 @@ -412,7 +421,7 @@ static tOptDesc optDesc[ OPTION_CT ] = { */ 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 [ - [] | --[{=| }] ]... \n"; tSCC zRcName[] = ".ntprc"; tSCC* apzHomeList[] = { @@ -427,7 +436,7 @@ 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 optcode near line 321 */ +/* extracted from optcode near line 368 */ #if defined(ENABLE_NLS) # define OPTPROC_BASE OPTPROC_TRANSLATE @@ -743,14 +752,18 @@ main( int argc, char** argv ) return res; } #endif /* defined TEST_CLKTEST_OPTS */ -/* extracted from optcode near line 418 */ +/* extracted from optcode near line 465 */ #if ENABLE_NLS #include +#include #include #include #include +static char* AO_gettext( const char* pz ); +static void coerce_it(void** s); + static char* AO_gettext( const char* pz ) { @@ -768,6 +781,10 @@ 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)). */ @@ -810,12 +827,12 @@ translate_option_strings( void ) 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 */ diff --git a/clockstuff/clktest-opts.h b/clockstuff/clktest-opts.h index 47737d8ff..b59d2bd44 100644 --- a/clockstuff/clktest-opts.h +++ b/clockstuff/clktest-opts.h @@ -2,10 +2,26 @@ * * 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. @@ -14,12 +30,6 @@ */ #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 @@ -34,6 +44,7 @@ #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 /* @@ -56,15 +67,15 @@ typedef enum { } 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) @@ -80,6 +91,53 @@ typedef enum { 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. */ @@ -120,7 +178,7 @@ typedef enum { 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 */ /* * * * * * *