From: Harlan Stenn Date: Sat, 23 Aug 2014 00:23:55 +0000 (+0000) Subject: [Bug 2538] NTP programs print exit code in help/usage text X-Git-Tag: NTP_4_2_7P465~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b8b292b3f40b6bb128c65df5fc54e98e8586b53;p=thirdparty%2Fntp.git [Bug 2538] NTP programs print exit code in help/usage text bk: 53f7df1boU5PvQyrUneipFYwGtj3bw --- diff --git a/ChangeLog b/ChangeLog index 852cb021d..51c1d3e0d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +* [Bug 2538] NTP programs print exit code in help/usage text. * [Bug 2636] Clutter in syslog if gpsd not running - found (hopefully) last cause for clutter in protocol version - log GPSD revision and release numbers with protocol version diff --git a/ntpd/Makefile.am b/ntpd/Makefile.am index a7af593df..b3af52738 100644 --- a/ntpd/Makefile.am +++ b/ntpd/Makefile.am @@ -180,7 +180,7 @@ noinst_HEADERS = \ install-data-local: install-html -run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" \ +run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \ autogen -L ../sntp/include -L ../sntp/ag-tpl --writable std_def_list = \ $(top_srcdir)/sntp/include/debug-opt.def \ diff --git a/ntpd/ntpd-opts.c b/ntpd/ntpd-opts.c index 455beb815..6e94dcdd9 100644 --- a/ntpd/ntpd-opts.c +++ b/ntpd/ntpd-opts.c @@ -764,40 +764,13 @@ static int const aWait_SyncCantList[] = { /** * Declare option callback procedures */ -/* extracted from optmain.tlib near line 723 */ - -#if defined(TEST_NTPD_OPTS) -/* - * Under test, omit argument processing, or call optionStackArg, - * if multiple copies are allowed. - */ -static tOptProc - doUsageOpt; - -/* - * #define map the "normal" callout procs to the test ones... - */ -#define DEBUG_LEVEL_OPT_PROC optionStackArg - - -#else /* NOT defined TEST_NTPD_OPTS */ -/* - * When not under test, there are different procs to use - */ extern tOptProc ntpOptionPrintVersion, optionBooleanVal, optionNestedVal, optionNumericVal, optionPagedUsage, optionResetOpt, optionStackArg, optionTimeDate, optionTimeVal, - optionUnstackArg, optionVendorOption, optionVersionStderr; + optionUnstackArg, optionVendorOption; static tOptProc doOptDebug_Level, doUsageOpt; - -/** - * #define map the "normal" callout procs - */ -#define DEBUG_LEVEL_OPT_PROC doOptDebug_Level - -#endif /* TEST_NTPD_OPTS */ #define VER_PROC ntpOptionPrintVersion /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -887,7 +860,7 @@ static tOptDesc optDesc[OPTION_CT] = { /* last opt argumnt */ { NULL }, /* --debug-level */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, - /* option proc */ DEBUG_LEVEL_OPT_PROC, + /* option proc */ doOptDebug_Level, /* desc, NAME, name */ DEBUG_LEVEL_DESC, DEBUG_LEVEL_NAME, DEBUG_LEVEL_name, /* disablement strs */ NULL, NULL }, @@ -1309,8 +1282,6 @@ doUsageOpt(tOptions * opts, tOptDesc * od) (void)od; } -#if ! defined(TEST_NTPD_OPTS) - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the debug-level option. @@ -1332,33 +1303,6 @@ OPT_VALUE_SET_DEBUG_LEVEL++; (void)pOptDesc; (void)pOptions; } -#endif /* defined(TEST_NTPD_OPTS) */ -/* extracted from optmain.tlib near line 46 */ - -#if defined(TEST_NTPD_OPTS) /* TEST-MAIN-PROCEDURE: */ - -extern void optionPutShell(tOptions*); - -/** - * Generated main procedure. This will emit text that a Bourne shell can - * process to handle its command line arguments. - * - * @param[in] argc argument count - * @param[in] argv argument vector - * @returns program exit code - */ -int -main(int argc, char ** argv) -{ - int res = NTPD_EXIT_SUCCESS; - (void)optionProcess(&ntpdOptions, argc, argv); - optionPutShell(&ntpdOptions); - res = ferror(stdout); - if (res != 0) - fputs("output error writing to stdout\n", stderr); - return res; -} -#endif /* TEST_NTPD_OPTS END-TEST-MAIN-PROCEDURE */ /* extracted from optmain.tlib near line 1245 */ /** @@ -1404,8 +1348,7 @@ tOptions ntpdOptions = { + OPTPROC_LONGOPT + OPTPROC_NO_REQ_OPT + OPTPROC_ENVIRON - + OPTPROC_MISUSE - + OPTPROC_SHELL_OUTPUT ), + + OPTPROC_MISUSE ), 0, NULL, /* current option index, current option */ NULL, NULL, zPROGNAME, zRcName, zCopyright, zLicenseDescrip, diff --git a/ntpd/ntpdbase-opts.def b/ntpd/ntpdbase-opts.def index a396dce4e..110504e5c 100644 --- a/ntpd/ntpdbase-opts.def +++ b/ntpd/ntpdbase-opts.def @@ -8,8 +8,6 @@ include = <<- _EOF_ #endif _EOF_; -test-main; - flag = { name = ipv4; value = 4; diff --git a/ntpd/ntpdsim-opts.c b/ntpd/ntpdsim-opts.c index 6be63e57a..2e7ed3475 100644 --- a/ntpd/ntpdsim-opts.c +++ b/ntpd/ntpdsim-opts.c @@ -75,7 +75,7 @@ extern FILE * option_usage_fp; * static const strings for ntpdsim options */ static char const ntpdsim_opt_strs[3124] = -/* 0 */ "ntpdsim 4.2.7p459\n" +/* 0 */ "ntpdsim 4.2.7p464\n" "Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n" "This is free software. It is licensed for use, modification and\n" "redistribution under the terms of the NTP License, copies of which\n" @@ -207,14 +207,14 @@ static char const ntpdsim_opt_strs[3124] = /* 2916 */ "no-load-opts\0" /* 2929 */ "no\0" /* 2932 */ "NTPDSIM\0" -/* 2940 */ "ntpdsim - NTP daemon simulation program - Ver. 4.2.7p459\n" +/* 2940 */ "ntpdsim - NTP daemon simulation program - Ver. 4.2.7p464\n" "Usage: %s [ - [] | --[{=| }] ]...\n\0" /* 3055 */ "$HOME\0" /* 3061 */ ".\0" /* 3063 */ ".ntprc\0" /* 3070 */ "http://bugs.ntp.org, bugs@ntp.org\0" /* 3104 */ "\n\0" -/* 3106 */ "ntpdsim 4.2.7p459"; +/* 3106 */ "ntpdsim 4.2.7p464"; /** * ipv4 option description with @@ -779,40 +779,13 @@ static int const aWait_SyncCantList[] = { /** * Declare option callback procedures */ -/* extracted from optmain.tlib near line 723 */ - -#if defined(TEST_NTPDSIM_OPTS) -/* - * Under test, omit argument processing, or call optionStackArg, - * if multiple copies are allowed. - */ -static tOptProc - doUsageOpt; - -/* - * #define map the "normal" callout procs to the test ones... - */ -#define DEBUG_LEVEL_OPT_PROC optionStackArg - - -#else /* NOT defined TEST_NTPDSIM_OPTS */ -/* - * When not under test, there are different procs to use - */ extern tOptProc ntpOptionPrintVersion, optionBooleanVal, optionNestedVal, optionNumericVal, optionPagedUsage, optionResetOpt, optionStackArg, optionTimeDate, optionTimeVal, - optionUnstackArg, optionVendorOption, optionVersionStderr; + optionUnstackArg, optionVendorOption; static tOptProc doOptDebug_Level, doUsageOpt; - -/** - * #define map the "normal" callout procs - */ -#define DEBUG_LEVEL_OPT_PROC doOptDebug_Level - -#endif /* TEST_NTPDSIM_OPTS */ #define VER_PROC ntpOptionPrintVersion /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -902,7 +875,7 @@ static tOptDesc optDesc[OPTION_CT] = { /* last opt argumnt */ { NULL }, /* --debug-level */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, - /* option proc */ DEBUG_LEVEL_OPT_PROC, + /* option proc */ doOptDebug_Level, /* desc, NAME, name */ DEBUG_LEVEL_DESC, DEBUG_LEVEL_NAME, DEBUG_LEVEL_name, /* disablement strs */ NULL, NULL }, @@ -1353,8 +1326,6 @@ doUsageOpt(tOptions * opts, tOptDesc * od) (void)od; } -#if ! defined(TEST_NTPDSIM_OPTS) - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the debug-level option. @@ -1376,33 +1347,6 @@ OPT_VALUE_SET_DEBUG_LEVEL++; (void)pOptDesc; (void)pOptions; } -#endif /* defined(TEST_NTPDSIM_OPTS) */ -/* extracted from optmain.tlib near line 46 */ - -#if defined(TEST_NTPDSIM_OPTS) /* TEST-MAIN-PROCEDURE: */ - -extern void optionPutShell(tOptions*); - -/** - * Generated main procedure. This will emit text that a Bourne shell can - * process to handle its command line arguments. - * - * @param[in] argc argument count - * @param[in] argv argument vector - * @returns program exit code - */ -int -main(int argc, char ** argv) -{ - int res = NTPDSIM_EXIT_SUCCESS; - (void)optionProcess(&ntpdsimOptions, argc, argv); - optionPutShell(&ntpdsimOptions); - res = ferror(stdout); - if (res != 0) - fputs("output error writing to stdout\n", stderr); - return res; -} -#endif /* TEST_NTPDSIM_OPTS END-TEST-MAIN-PROCEDURE */ /* extracted from optmain.tlib near line 1245 */ /** @@ -1449,8 +1393,7 @@ tOptions ntpdsimOptions = { + OPTPROC_NO_REQ_OPT + OPTPROC_ENVIRON + OPTPROC_NO_ARGS - + OPTPROC_MISUSE - + OPTPROC_SHELL_OUTPUT ), + + OPTPROC_MISUSE ), 0, NULL, /* current option index, current option */ NULL, NULL, zPROGNAME, zRcName, zCopyright, zLicenseDescrip, @@ -1603,7 +1546,7 @@ static void bogus_function(void) { translate option names. */ /* referenced via ntpdsimOptions.pzCopyright */ - puts(_("ntpdsim 4.2.7p459\n\ + puts(_("ntpdsim 4.2.7p464\n\ Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n\ This is free software. It is licensed for use, modification and\n\ redistribution under the terms of the NTP License, copies of which\n\ @@ -1746,14 +1689,14 @@ provided \"as is\" without express or implied warranty.\n")); puts(_("load options from a config file")); /* referenced via ntpdsimOptions.pzUsageTitle */ - puts(_("ntpdsim - NTP daemon simulation program - Ver. 4.2.7p459\n\ + puts(_("ntpdsim - NTP daemon simulation program - Ver. 4.2.7p464\n\ Usage: %s [ - [] | --[{=| }] ]...\n")); /* referenced via ntpdsimOptions.pzDetail */ puts(_("\n")); /* referenced via ntpdsimOptions.pzFullVersion */ - puts(_("ntpdsim 4.2.7p459")); + puts(_("ntpdsim 4.2.7p464")); /* referenced via ntpdsimOptions.pzFullUsage */ puts(_("<<>>")); diff --git a/ntpd/ntpdsim-opts.h b/ntpd/ntpdsim-opts.h index 31546f349..d0ffe0815 100644 --- a/ntpd/ntpdsim-opts.h +++ b/ntpd/ntpdsim-opts.h @@ -107,9 +107,9 @@ typedef enum { /** count of all options for ntpdsim */ #define OPTION_CT 39 /** ntpdsim version */ -#define NTPDSIM_VERSION "4.2.7p459" +#define NTPDSIM_VERSION "4.2.7p464" /** Full ntpdsim version text */ -#define NTPDSIM_FULL_VERSION "ntpdsim 4.2.7p459" +#define NTPDSIM_FULL_VERSION "ntpdsim 4.2.7p464" /** * Interface defines for all options. Replace "n" with the UPPER_CASED diff --git a/ntpdc/Makefile.am b/ntpdc/Makefile.am index 116a6cf4b..a61dab99d 100644 --- a/ntpdc/Makefile.am +++ b/ntpdc/Makefile.am @@ -64,7 +64,7 @@ noinst_DATA= \ install-data-local: install-html -run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" \ +run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \ autogen -L ../sntp/include -L ../sntp/ag-tpl --writable std_def_list = \ diff --git a/ntpdc/ntpdc-opts.c b/ntpdc/ntpdc-opts.c index 9cf2b372b..f83b6b73b 100644 --- a/ntpdc/ntpdc-opts.c +++ b/ntpdc/ntpdc-opts.c @@ -317,40 +317,13 @@ static int const aShowpeersCantList[] = { /** * Declare option callback procedures */ -/* extracted from optmain.tlib near line 723 */ - -#if defined(TEST_NTPDC_OPTS) -/* - * Under test, omit argument processing, or call optionStackArg, - * if multiple copies are allowed. - */ -static tOptProc - doUsageOpt; - -/* - * #define map the "normal" callout procs to the test ones... - */ -#define DEBUG_LEVEL_OPT_PROC optionStackArg - - -#else /* NOT defined TEST_NTPDC_OPTS */ -/* - * When not under test, there are different procs to use - */ extern tOptProc ntpOptionPrintVersion, optionBooleanVal, optionNestedVal, optionNumericVal, optionPagedUsage, optionResetOpt, optionStackArg, optionTimeDate, optionTimeVal, - optionUnstackArg, optionVendorOption, optionVersionStderr; + optionUnstackArg, optionVendorOption; static tOptProc doOptDebug_Level, doUsageOpt; - -/** - * #define map the "normal" callout procs - */ -#define DEBUG_LEVEL_OPT_PROC doOptDebug_Level - -#endif /* TEST_NTPDC_OPTS */ #define VER_PROC ntpOptionPrintVersion /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -404,7 +377,7 @@ static tOptDesc optDesc[OPTION_CT] = { /* last opt argumnt */ { NULL }, /* --debug-level */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, - /* option proc */ DEBUG_LEVEL_OPT_PROC, + /* option proc */ doOptDebug_Level, /* desc, NAME, name */ DEBUG_LEVEL_DESC, DEBUG_LEVEL_NAME, DEBUG_LEVEL_name, /* disablement strs */ NULL, NULL }, @@ -603,8 +576,6 @@ doUsageOpt(tOptions * opts, tOptDesc * od) (void)od; } -#if ! defined(TEST_NTPDC_OPTS) - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the debug-level option. @@ -626,33 +597,6 @@ OPT_VALUE_SET_DEBUG_LEVEL++; (void)pOptDesc; (void)pOptions; } -#endif /* defined(TEST_NTPDC_OPTS) */ -/* extracted from optmain.tlib near line 46 */ - -#if defined(TEST_NTPDC_OPTS) /* TEST-MAIN-PROCEDURE: */ - -extern void optionPutShell(tOptions*); - -/** - * Generated main procedure. This will emit text that a Bourne shell can - * process to handle its command line arguments. - * - * @param[in] argc argument count - * @param[in] argv argument vector - * @returns program exit code - */ -int -main(int argc, char ** argv) -{ - int res = NTPDC_EXIT_SUCCESS; - (void)optionProcess(&ntpdcOptions, argc, argv); - optionPutShell(&ntpdcOptions); - res = ferror(stdout); - if (res != 0) - fputs("output error writing to stdout\n", stderr); - return res; -} -#endif /* TEST_NTPDC_OPTS END-TEST-MAIN-PROCEDURE */ /* extracted from optmain.tlib near line 1245 */ /** @@ -698,8 +642,7 @@ tOptions ntpdcOptions = { + OPTPROC_LONGOPT + OPTPROC_NO_REQ_OPT + OPTPROC_ENVIRON - + OPTPROC_MISUSE - + OPTPROC_SHELL_OUTPUT ), + + OPTPROC_MISUSE ), 0, NULL, /* current option index, current option */ NULL, NULL, zPROGNAME, zRcName, zCopyright, zLicenseDescrip, diff --git a/ntpdc/ntpdc-opts.def b/ntpdc/ntpdc-opts.def index a7429411c..df3350eb8 100644 --- a/ntpdc/ntpdc-opts.def +++ b/ntpdc/ntpdc-opts.def @@ -11,8 +11,6 @@ argument = '[ host ...]'; #include homerc.def -test-main; - flag = { name = ipv4; value = 4; diff --git a/ntpq/Makefile.am b/ntpq/Makefile.am index 9fac3f5df..50c072a0f 100644 --- a/ntpq/Makefile.am +++ b/ntpq/Makefile.am @@ -55,7 +55,7 @@ man1_MANS= man8_MANS= man_MANS= ntpq.$(NTPQ_MS) -run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" \ +run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \ autogen -L ../sntp/include -L ../sntp/ag-tpl --writable std_def_list = \ $(top_srcdir)/sntp/include/debug-opt.def \ diff --git a/ntpq/ntpq-opts.c b/ntpq/ntpq-opts.c index 6daee3649..ac6879417 100644 --- a/ntpq/ntpq-opts.c +++ b/ntpq/ntpq-opts.c @@ -307,47 +307,13 @@ static int const aPeersCantList[] = { /** * Declare option callback procedures */ -/* extracted from optmain.tlib near line 723 */ - -#if defined(TEST_NTPQ_OPTS) -/* - * Under test, omit argument processing, or call optionStackArg, - * if multiple copies are allowed. - */ -extern tOptProc - optionStackArg; -static tOptProc - doUsageOpt; - -/* - * #define map the "normal" callout procs to the test ones... - */ -#define COMMAND_OPT_PROC optionStackArg -#define DEBUG_LEVEL_OPT_PROC optionStackArg -#define PEERS_OPT_PROC optionStackArg - - -#else /* NOT defined TEST_NTPQ_OPTS */ -/* - * When not under test, there are different procs to use - */ extern tOptProc ntpOptionPrintVersion, ntpq_custom_opt_handler, optionBooleanVal, optionNestedVal, optionNumericVal, optionPagedUsage, optionResetOpt, optionStackArg, optionTimeDate, - optionTimeVal, optionUnstackArg, optionVendorOption, - optionVersionStderr; + optionTimeVal, optionUnstackArg, optionVendorOption; static tOptProc doOptDebug_Level, doUsageOpt; - -/** - * #define map the "normal" callout procs - */ -#define COMMAND_OPT_PROC ntpq_custom_opt_handler -#define DEBUG_LEVEL_OPT_PROC doOptDebug_Level -#define PEERS_OPT_PROC ntpq_custom_opt_handler - -#endif /* TEST_NTPQ_OPTS */ #define VER_PROC ntpOptionPrintVersion /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -389,7 +355,7 @@ static tOptDesc optDesc[OPTION_CT] = { /* last opt argumnt */ { NULL }, /* --command */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, - /* option proc */ COMMAND_OPT_PROC, + /* option proc */ ntpq_custom_opt_handler, /* desc, NAME, name */ COMMAND_DESC, COMMAND_NAME, COMMAND_name, /* disablement strs */ NULL, NULL }, @@ -401,7 +367,7 @@ static tOptDesc optDesc[OPTION_CT] = { /* last opt argumnt */ { NULL }, /* --debug-level */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, - /* option proc */ DEBUG_LEVEL_OPT_PROC, + /* option proc */ doOptDebug_Level, /* desc, NAME, name */ DEBUG_LEVEL_DESC, DEBUG_LEVEL_NAME, DEBUG_LEVEL_name, /* disablement strs */ NULL, NULL }, @@ -461,7 +427,7 @@ static tOptDesc optDesc[OPTION_CT] = { /* last opt argumnt */ { NULL }, /* --peers */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, aPeersCantList, - /* option proc */ PEERS_OPT_PROC, + /* option proc */ ntpq_custom_opt_handler, /* desc, NAME, name */ PEERS_DESC, PEERS_NAME, PEERS_name, /* disablement strs */ NULL, NULL }, @@ -600,8 +566,6 @@ doUsageOpt(tOptions * opts, tOptDesc * od) (void)od; } -#if ! defined(TEST_NTPQ_OPTS) - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the debug-level option. @@ -623,33 +587,6 @@ OPT_VALUE_SET_DEBUG_LEVEL++; (void)pOptDesc; (void)pOptions; } -#endif /* defined(TEST_NTPQ_OPTS) */ -/* extracted from optmain.tlib near line 46 */ - -#if defined(TEST_NTPQ_OPTS) /* TEST-MAIN-PROCEDURE: */ - -extern void optionPutShell(tOptions*); - -/** - * Generated main procedure. This will emit text that a Bourne shell can - * process to handle its command line arguments. - * - * @param[in] argc argument count - * @param[in] argv argument vector - * @returns program exit code - */ -int -main(int argc, char ** argv) -{ - int res = NTPQ_EXIT_SUCCESS; - (void)optionProcess(&ntpqOptions, argc, argv); - optionPutShell(&ntpqOptions); - res = ferror(stdout); - if (res != 0) - fputs("output error writing to stdout\n", stderr); - return res; -} -#endif /* TEST_NTPQ_OPTS END-TEST-MAIN-PROCEDURE */ /* extracted from optmain.tlib near line 1245 */ /** @@ -695,8 +632,7 @@ tOptions ntpqOptions = { + OPTPROC_LONGOPT + OPTPROC_NO_REQ_OPT + OPTPROC_ENVIRON - + OPTPROC_MISUSE - + OPTPROC_SHELL_OUTPUT ), + + OPTPROC_MISUSE ), 0, NULL, /* current option index, current option */ NULL, NULL, zPROGNAME, zRcName, zCopyright, zLicenseDescrip, diff --git a/ntpq/ntpq-opts.def b/ntpq/ntpq-opts.def index a3054f669..7a63879a9 100644 --- a/ntpq/ntpq-opts.def +++ b/ntpq/ntpq-opts.def @@ -10,8 +10,6 @@ prog-name = "ntpq"; prog-title = "standard NTP query program"; argument = '[ host ...]'; -test-main; - flag = { name = ipv4; flags-cant = ipv6; diff --git a/ntpsnmpd/Makefile.am b/ntpsnmpd/Makefile.am index dcaf5f0b0..11ecf1b0d 100644 --- a/ntpsnmpd/Makefile.am +++ b/ntpsnmpd/Makefile.am @@ -57,7 +57,7 @@ man1_MANS= man8_MANS= man_MANS= ntpsnmpd.$(NTPSNMPD_MS) -run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" \ +run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \ autogen -L ../sntp/include -L ../sntp/ag-tpl --writable std_def_list = \ $(top_srcdir)/sntp/include/debug-opt.def \ diff --git a/ntpsnmpd/ntpsnmpd-opts.c b/ntpsnmpd/ntpsnmpd-opts.c index 2282e534c..9270fc77f 100644 --- a/ntpsnmpd/ntpsnmpd-opts.c +++ b/ntpsnmpd/ntpsnmpd-opts.c @@ -180,28 +180,13 @@ static char const ntpsnmpd_opt_strs[1560] = /** * Declare option callback procedures */ -/* extracted from optmain.tlib near line 723 */ - -#if defined(TEST_NTPSNMPD_OPTS) -/* - * Under test, omit argument processing, or call optionStackArg, - * if multiple copies are allowed. - */ -static tOptProc - doUsageOpt; - -#else /* NOT defined TEST_NTPSNMPD_OPTS */ -/* - * When not under test, there are different procs to use - */ extern tOptProc ntpOptionPrintVersion, optionBooleanVal, optionNestedVal, optionNumericVal, optionPagedUsage, optionResetOpt, optionStackArg, optionTimeDate, optionTimeVal, - optionUnstackArg, optionVendorOption, optionVersionStderr; + optionUnstackArg, optionVendorOption; static tOptProc doUsageOpt; -#endif /* TEST_NTPSNMPD_OPTS */ #define VER_PROC ntpOptionPrintVersion /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -369,32 +354,6 @@ doUsageOpt(tOptions * opts, tOptDesc * od) (void)opts; (void)od; } -/* extracted from optmain.tlib near line 46 */ - -#if defined(TEST_NTPSNMPD_OPTS) /* TEST-MAIN-PROCEDURE: */ - -extern void optionPutShell(tOptions*); - -/** - * Generated main procedure. This will emit text that a Bourne shell can - * process to handle its command line arguments. - * - * @param[in] argc argument count - * @param[in] argv argument vector - * @returns program exit code - */ -int -main(int argc, char ** argv) -{ - int res = NTPSNMPD_EXIT_SUCCESS; - (void)optionProcess(&ntpsnmpdOptions, argc, argv); - optionPutShell(&ntpsnmpdOptions); - res = ferror(stdout); - if (res != 0) - fputs("output error writing to stdout\n", stderr); - return res; -} -#endif /* TEST_NTPSNMPD_OPTS END-TEST-MAIN-PROCEDURE */ /* extracted from optmain.tlib near line 1245 */ /** @@ -441,8 +400,7 @@ tOptions ntpsnmpdOptions = { + OPTPROC_NO_REQ_OPT + OPTPROC_ENVIRON + OPTPROC_NO_ARGS - + OPTPROC_MISUSE - + OPTPROC_SHELL_OUTPUT ), + + OPTPROC_MISUSE ), 0, NULL, /* current option index, current option */ NULL, NULL, zPROGNAME, zRcName, zCopyright, zLicenseDescrip, diff --git a/ntpsnmpd/ntpsnmpd-opts.def b/ntpsnmpd/ntpsnmpd-opts.def index 62712d949..b3162e58e 100644 --- a/ntpsnmpd/ntpsnmpd-opts.def +++ b/ntpsnmpd/ntpsnmpd-opts.def @@ -9,8 +9,6 @@ autogen definitions options; prog-name = "ntpsnmpd"; prog-title = "NTP SNMP MIB agent"; -test-main; - flag = { name = nofork; value = n; diff --git a/scripts/build/Makefile.am b/scripts/build/Makefile.am index a9c42c4ca..51a1bbccf 100644 --- a/scripts/build/Makefile.am +++ b/scripts/build/Makefile.am @@ -1,4 +1,4 @@ -run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" \ +run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \ autogen -L ../sntp/include -L ../sntp/ag-tpl noinst_SCRIPTS = mkver diff --git a/scripts/calc_tickadj/Makefile.am b/scripts/calc_tickadj/Makefile.am index 45fe0753e..b98bc8771 100644 --- a/scripts/calc_tickadj/Makefile.am +++ b/scripts/calc_tickadj/Makefile.am @@ -1,5 +1,5 @@ NULL= -run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" \ +run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \ autogen -L ../../sntp/include -L ../../sntp/ag-tpl \ --writable std_def_list = \ diff --git a/scripts/calc_tickadj/calc_tickadj-opts b/scripts/calc_tickadj/calc_tickadj-opts index 46108b3e1..2957c8bc9 100644 --- a/scripts/calc_tickadj/calc_tickadj-opts +++ b/scripts/calc_tickadj/calc_tickadj-opts @@ -1,6 +1,6 @@ # EDIT THIS FILE WITH CAUTION (calc_tickadj-opts) # -# It has been AutoGen-ed August 13, 2014 at 10:09:13 AM by AutoGen 5.18.4pre14 +# It has been AutoGen-ed # From the definitions calc_tickadj-opts.def # and the template file perlopt @@ -39,7 +39,7 @@ sub processOptions { 'help|?', 'more-help')); $usage = <<'USAGE'; -calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.7p459 +calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.7p464 USAGE: calc_tickadj [ - [] | --[{=| }] ]... -d, --drift-file=str Ntp drift file to use diff --git a/scripts/calc_tickadj/calc_tickadj.html b/scripts/calc_tickadj/calc_tickadj.html index 42c5bbc12..fa171c766 100644 --- a/scripts/calc_tickadj/calc_tickadj.html +++ b/scripts/calc_tickadj/calc_tickadj.html @@ -3,7 +3,7 @@ calc_tickadj User's Manual - + @@ -14,18 +14,20 @@ pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } - span.sc { font-variant:small-caps } - span.roman { font-family: serif; font-weight: normal; } + span.sc { font-variant:small-caps } + span.roman { font-family:serif; font-weight:normal; } + span.sansserif { font-family:sans-serif; font-weight:normal; } -->

calc_tickadj User's Manual

+


-Next: , +Next: , Previous: (dir), Up: (dir) -
+

calc_tickadj User's Manual

@@ -46,10 +48,12 @@ This document applies to version 4.2.7p464 of calc_tickadj.
+ +


-Previous: calc_tickadj Description, +Previous: calc_tickadj Description, Up: Top -
+

Invoking calc_tickadj

@@ -82,33 +86,35 @@ current tick manually on command line. using the agtexi-cmd template and the option descriptions for the calc_tickadj program. -

calc_tickadj help/usage (--help)

+

calc_tickadj help/usage (--help)

This is the automatically generated usage text for calc_tickadj.

The text printed is the same whether selected with the help option -(--help) or the more-help option (--more-help). more-help will print +(--help) or the more-help option (--more-help). more-help will print the usage text by passing it through a pager program. more-help is disabled on platforms without a working fork(2) function. The PAGER environment variable is -used to select the program, defaulting to more. Both will exit +used to select the program, defaulting to more. Both will exit with a status code of 0. -

calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.7p459
+
calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.7p464
 USAGE: calc_tickadj [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
 
     -d, --drift-file=str         Ntp drift file to use
@@ -120,11 +126,13 @@ Options are specified by doubled hyphens and their name or by a single
 hyphen and the flag character.
 

drift-file option (-d)

@@ -134,11 +142,13 @@ This is the “ntp drift file to use” option. This option takes a string argument. Use the specified drift file for calculations

tick option (-t)

@@ -148,18 +158,20 @@ This is the “tick value of this host” option. This option takes a number argument. The current tick which to adjustment will be calculated
+ +


-Previous: calc_tickadj tick, +Previous: calc_tickadj tick, Up: calc_tickadj Invocation -
+

calc_tickadj exit status

One of the following exit values will be returned:

-
0 (EXIT_SUCCESS)
Successful program execution. -
1 (EXIT_FAILURE)
The operation failed or the command syntax was not valid. +
0 (EXIT_SUCCESS)
Successful program execution. +
1 (EXIT_FAILURE)
The operation failed or the command syntax was not valid.
diff --git a/scripts/calc_tickadj/invoke-calc_tickadj.texi b/scripts/calc_tickadj/invoke-calc_tickadj.texi index c0608531c..135413531 100644 --- a/scripts/calc_tickadj/invoke-calc_tickadj.texi +++ b/scripts/calc_tickadj/invoke-calc_tickadj.texi @@ -6,7 +6,7 @@ # # EDIT THIS FILE WITH CAUTION (invoke-calc_tickadj.texi) # -# It has been AutoGen-ed August 22, 2014 at 08:51:13 AM by AutoGen 5.18.4pre14 +# It has been AutoGen-ed August 22, 2014 at 11:50:04 PM by AutoGen 5.18.4pre24 # From the definitions calc_tickadj-opts.def # and the template file agtexi-cmd.tpl @end ignore @@ -63,7 +63,7 @@ with a status code of 0. @exampleindent 0 @example -calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.7p459 +calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.7p464 USAGE: calc_tickadj [ - [] | --[@{=| @}] ]... -d, --drift-file=str Ntp drift file to use diff --git a/scripts/invoke-plot_summary.texi b/scripts/invoke-plot_summary.texi index 0456df7dd..6b7f54e8d 100644 --- a/scripts/invoke-plot_summary.texi +++ b/scripts/invoke-plot_summary.texi @@ -6,7 +6,7 @@ # # EDIT THIS FILE WITH CAUTION (invoke-plot_summary.texi) # -# It has been AutoGen-ed August 22, 2014 at 08:51:48 AM by AutoGen 5.18.4pre14 +# It has been AutoGen-ed # From the definitions plot_summary-opts.def # and the template file agtexi-cmd.tpl @end ignore diff --git a/scripts/invoke-summary.texi b/scripts/invoke-summary.texi index 43342b7bc..777e9d4f8 100644 --- a/scripts/invoke-summary.texi +++ b/scripts/invoke-summary.texi @@ -6,7 +6,7 @@ # # EDIT THIS FILE WITH CAUTION (invoke-summary.texi) # -# It has been AutoGen-ed August 22, 2014 at 08:51:54 AM by AutoGen 5.18.4pre14 +# It has been AutoGen-ed # From the definitions summary-opts.def # and the template file agtexi-cmd.tpl @end ignore diff --git a/scripts/ntp-wait/Makefile.am b/scripts/ntp-wait/Makefile.am index c57551aa7..b819329ea 100644 --- a/scripts/ntp-wait/Makefile.am +++ b/scripts/ntp-wait/Makefile.am @@ -8,7 +8,7 @@ man1_MANS= man8_MANS= man_MANS= ntp-wait.$(NTP_WAIT_MS) -run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" PERL5LIB="$(abs_top_srcdir)/scripts/lib" \ +run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" PERL5LIB="$(abs_top_srcdir)/scripts/lib" AUTOGEN_DNE_DATE=-D \ autogen -L ../../sntp/include -L ../../sntp/ag-tpl \ --writable std_def_list = \ diff --git a/scripts/ntp-wait/invoke-ntp-wait.texi b/scripts/ntp-wait/invoke-ntp-wait.texi index 9521b93b8..13e2b5c16 100644 --- a/scripts/ntp-wait/invoke-ntp-wait.texi +++ b/scripts/ntp-wait/invoke-ntp-wait.texi @@ -6,7 +6,7 @@ # # EDIT THIS FILE WITH CAUTION (invoke-ntp-wait.texi) # -# It has been AutoGen-ed August 22, 2014 at 08:51:21 AM by AutoGen 5.18.4pre14 +# It has been AutoGen-ed August 22, 2014 at 11:50:21 PM by AutoGen 5.18.4pre24 # From the definitions ntp-wait-opts.def # and the template file agtexi-cmd.tpl @end ignore diff --git a/scripts/ntp-wait/ntp-wait-opts b/scripts/ntp-wait/ntp-wait-opts index c0d9ac349..058c5050c 100644 --- a/scripts/ntp-wait/ntp-wait-opts +++ b/scripts/ntp-wait/ntp-wait-opts @@ -1,6 +1,6 @@ # EDIT THIS FILE WITH CAUTION (ntp-wait-opts) # -# It has been AutoGen-ed August 22, 2014 at 08:51:15 AM by AutoGen 5.18.4pre14 +# It has been AutoGen-ed # From the definitions ntp-wait-opts.def # and the template file perlopt diff --git a/scripts/ntp-wait/ntp-wait-opts.def b/scripts/ntp-wait/ntp-wait-opts.def index 2a022a2b3..14eebbc91 100644 --- a/scripts/ntp-wait/ntp-wait-opts.def +++ b/scripts/ntp-wait/ntp-wait-opts.def @@ -11,8 +11,6 @@ package = ntp; long-opts; gnu-usage; -test-main; - flag = { name = tries; value = n; diff --git a/scripts/ntp-wait/ntp-wait.html b/scripts/ntp-wait/ntp-wait.html index e0b1ee6d3..9e931588e 100644 --- a/scripts/ntp-wait/ntp-wait.html +++ b/scripts/ntp-wait/ntp-wait.html @@ -3,7 +3,7 @@ Ntp-wait User's Manual - + @@ -14,18 +14,20 @@ pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } - span.sc { font-variant:small-caps } - span.roman { font-family: serif; font-weight: normal; } + span.sc { font-variant:small-caps } + span.roman { font-family:serif; font-weight:normal; } + span.sansserif { font-family:sans-serif; font-weight:normal; } -->

Ntp-wait User's Manual

+


-Next: , +Next: , Previous: (dir), Up: (dir) -
+

This document describes the use of the NTP Project's ntp-wait program. @@ -53,9 +55,11 @@ accurate and stable time.

-


+ -
+


+ +

0.1 Invoking ntp-wait

@@ -85,7 +89,7 @@ has set the time. using the agtexi-cmd template and the option descriptions for the ntp-wait program.
+ +


-Next: , +Next: , Up: ntp-wait Invocation -
+
-

0.1.1 ntp-wait help/usage (--help)

+

0.1.1 ntp-wait help/usage (--help)

This is the automatically generated usage text for ntp-wait.

The text printed is the same whether selected with the help option -(--help) or the more-help option (--more-help). more-help will print +(--help) or the more-help option (--more-help). more-help will print the usage text by passing it through a pager program. more-help is disabled on platforms without a working fork(2) function. The PAGER environment variable is -used to select the program, defaulting to more. Both will exit +used to select the program, defaulting to more. Both will exit with a status code of 0.

ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.7p464
@@ -127,11 +133,13 @@ Options are specified by doubled hyphens and their name or by a single
 hyphen and the flag character.
 
+ +


-Next: , +Next: , Previous: ntp-wait usage, Up: ntp-wait Invocation -
+

0.1.2 tries option (-n)

@@ -142,26 +150,30 @@ This option takes a number argument. The maximum number of times we will check ntpd to see if it has been able to synchronize and stabilize the system clock.
+ +


-Next: , +Next: , Previous: ntp-wait tries, Up: ntp-wait Invocation -
+

0.1.3 sleep option (-s)

This is the “how long to sleep between tries” option. -This option takes a number argument secs-between-tries. - We will sleep for secs-between-tries after each query +This option takes a number argument secs-between-tries. + We will sleep for secs-between-tries after each query of ntpd that returns "the time is not yet stable".

0.1.4 verbose option (-v)

@@ -171,35 +183,41 @@ This is the “be verbose” option. By default, ntp-wait is silent. With this option, ntp-wait will provide status information.
+ +


-Next: , +Next: , Previous: ntp-wait verbose, Up: ntp-wait Invocation -
+

0.1.5 ntp-wait exit status

One of the following exit values will be returned:

-
0 (EXIT_SUCCESS)
Successful program execution. -
1 (EXIT_FAILURE)
The operation failed or the command syntax was not valid. +
0 (EXIT_SUCCESS)
Successful program execution. +
1 (EXIT_FAILURE)
The operation failed or the command syntax was not valid.
+ +


-Next: , +Next: , Previous: ntp-wait exit status, Up: ntp-wait Invocation -
+

0.1.6 ntp-wait Authors

+ +


-Previous: ntp-wait Authors, +Previous: ntp-wait Authors, Up: ntp-wait Invocation -
+

0.1.7 ntp-wait Notes

diff --git a/scripts/ntpsweep/Makefile.am b/scripts/ntpsweep/Makefile.am index e3e8e3e28..7ecc23bd5 100644 --- a/scripts/ntpsweep/Makefile.am +++ b/scripts/ntpsweep/Makefile.am @@ -1,5 +1,5 @@ NULL= -run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" PERL5LIB="$(abs_top_srcdir)/scripts/lib" \ +run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" PERL5LIB="$(abs_top_srcdir)/scripts/lib" AUTOGEN_DNE_DATE=-D \ autogen -L ../../sntp/include -L ../../sntp/ag-tpl \ --writable std_def_list = \ diff --git a/scripts/ntpsweep/invoke-ntpsweep.texi b/scripts/ntpsweep/invoke-ntpsweep.texi index fd7d3528e..861758d84 100644 --- a/scripts/ntpsweep/invoke-ntpsweep.texi +++ b/scripts/ntpsweep/invoke-ntpsweep.texi @@ -6,7 +6,7 @@ # # EDIT THIS FILE WITH CAUTION (invoke-ntpsweep.texi) # -# It has been AutoGen-ed August 22, 2014 at 08:51:28 AM by AutoGen 5.18.4pre14 +# It has been AutoGen-ed August 22, 2014 at 11:50:33 PM by AutoGen 5.18.4pre24 # From the definitions ntpsweep-opts.def # and the template file agtexi-cmd.tpl @end ignore diff --git a/scripts/ntpsweep/ntpsweep-opts b/scripts/ntpsweep/ntpsweep-opts index 67cc2ae3b..d48064173 100644 --- a/scripts/ntpsweep/ntpsweep-opts +++ b/scripts/ntpsweep/ntpsweep-opts @@ -1,6 +1,6 @@ # EDIT THIS FILE WITH CAUTION (ntpsweep-opts) # -# It has been AutoGen-ed August 22, 2014 at 08:51:26 AM by AutoGen 5.18.4pre14 +# It has been AutoGen-ed # From the definitions ntpsweep-opts.def # and the template file perlopt diff --git a/scripts/ntpsweep/ntpsweep.html b/scripts/ntpsweep/ntpsweep.html index c6057ac60..72919c456 100644 --- a/scripts/ntpsweep/ntpsweep.html +++ b/scripts/ntpsweep/ntpsweep.html @@ -3,7 +3,7 @@ ntpsweep User's Manual - + @@ -14,18 +14,20 @@ pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } - span.sc { font-variant:small-caps } - span.roman { font-family: serif; font-weight: normal; } + span.sc { font-variant:small-caps } + span.roman { font-family:serif; font-weight:normal; } + span.sansserif { font-family:sans-serif; font-weight:normal; } -->

ntpsweep User's Manual

+


-Next: , +Next: , Previous: (dir), Up: (dir) -
+

This document describes the use of the NTP Project's ntpsweep program. @@ -44,9 +46,10 @@ Up: (dir)

-


-
+


+ +

0.1 Invoking ntpsweep

@@ -61,7 +64,7 @@ all peers. using the agtexi-cmd template and the option descriptions for the ntpsweep program. -

0.1.1 ntpsweep help/usage (--help)

+

0.1.1 ntpsweep help/usage (--help)

This is the automatically generated usage text for ntpsweep.

The text printed is the same whether selected with the help option -(--help) or the more-help option (--more-help). more-help will print +(--help) or the more-help option (--more-help). more-help will print the usage text by passing it through a pager program. more-help is disabled on platforms without a working fork(2) function. The PAGER environment variable is -used to select the program, defaulting to more. Both will exit +used to select the program, defaulting to more. Both will exit with a status code of 0.

ntpsweep - Print various informations about given ntp servers - Ver. 4.2.7p464
@@ -105,11 +109,13 @@ Options are specified by doubled hyphens and their name or by a single
 hyphen and the flag character.
 
+ +


-Next: , +Next: , Previous: ntpsweep usage, Up: ntpsweep Invocation -
+

0.1.2 host-list option (-l)

@@ -126,24 +132,26 @@ This option takes a string argument.

Use this option to specify the host on which this script operates. May appear multiple times.

0.1.3 peers option (-p)

This is the “recursively list all peers a host synchronizes to” option. -This option has no doc documentation. +This option has no ‘doc’ documentation.

+


-Next: , +Next: , Previous: ntpsweep peers, Up: ntpsweep Invocation -
+

0.1.4 maxlevel option (-m)

@@ -151,13 +159,14 @@ Up: ntpsweep Invocati

This is the “traverse peers up to this level (4 is a reasonable number)” option. This option takes a number argument. -This option has no doc documentation. +This option has no ‘doc’ documentation.

+


-Next: , +Next: , Previous: ntpsweep maxlevel, Up: ntpsweep Invocation -
+

0.1.5 strip option (-s)

@@ -165,13 +174,14 @@ Up: ntpsweep Invocati

This is the “strip this string from hostnames” option. This option takes a string argument. -This option has no doc documentation. +This option has no ‘doc’ documentation.

0.1.6 host option (-h)

@@ -179,22 +189,23 @@ Up: ntpsweep Invocati

This is the “specify a single host” option. This option takes a string argument. -This option has no doc documentation. +This option has no ‘doc’ documentation.

NOTE: THIS OPTION IS DEPRECATED

+


-Previous: ntpsweep host, +Previous: ntpsweep host, Up: ntpsweep Invocation -
+

0.1.7 ntpsweep exit status

One of the following exit values will be returned:

-
0 (EXIT_SUCCESS)
Successful program execution. -
1 (EXIT_FAILURE)
The operation failed or the command syntax was not valid. +
0 (EXIT_SUCCESS)
Successful program execution. +
1 (EXIT_FAILURE)
The operation failed or the command syntax was not valid.
diff --git a/scripts/ntptrace/Makefile.am b/scripts/ntptrace/Makefile.am index 30b4adc66..19300e8cb 100644 --- a/scripts/ntptrace/Makefile.am +++ b/scripts/ntptrace/Makefile.am @@ -7,7 +7,7 @@ bin_SCRIPTS = $(NTPTRACE_DB) libexec_SCRIPTS = $(NTPTRACE_DL) sbin_SCRIPTS = $(NTPTRACE_DS) -run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" PERL5LIB="$(abs_top_srcdir)/scripts/lib" \ +run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" PERL5LIB="$(abs_top_srcdir)/scripts/lib" AUTOGEN_DNE_DATE=-D \ autogen -L ../../sntp/include -L ../../sntp/ag-tpl \ --writable std_def_list = \ diff --git a/scripts/ntptrace/invoke-ntptrace.texi b/scripts/ntptrace/invoke-ntptrace.texi index 2b4add085..b0a5564f4 100644 --- a/scripts/ntptrace/invoke-ntptrace.texi +++ b/scripts/ntptrace/invoke-ntptrace.texi @@ -6,7 +6,7 @@ # # EDIT THIS FILE WITH CAUTION (invoke-ntptrace.texi) # -# It has been AutoGen-ed August 22, 2014 at 08:51:41 AM by AutoGen 5.18.4pre14 +# It has been AutoGen-ed August 22, 2014 at 11:50:50 PM by AutoGen 5.18.4pre24 # From the definitions ntptrace-opts.def # and the template file agtexi-cmd.tpl @end ignore diff --git a/scripts/ntptrace/ntptrace-opts b/scripts/ntptrace/ntptrace-opts index d7061da4a..b89343f49 100644 --- a/scripts/ntptrace/ntptrace-opts +++ b/scripts/ntptrace/ntptrace-opts @@ -1,6 +1,6 @@ # EDIT THIS FILE WITH CAUTION (ntptrace-opts) # -# It has been AutoGen-ed August 22, 2014 at 08:51:35 AM by AutoGen 5.18.4pre14 +# It has been AutoGen-ed # From the definitions ntptrace-opts.def # and the template file perlopt diff --git a/scripts/ntptrace/ntptrace.html b/scripts/ntptrace/ntptrace.html index 32e99a89d..cdeb016dc 100644 --- a/scripts/ntptrace/ntptrace.html +++ b/scripts/ntptrace/ntptrace.html @@ -3,7 +3,7 @@ Ntptrace User's Manual - + @@ -14,18 +14,20 @@ pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } - span.sc { font-variant:small-caps } - span.roman { font-family: serif; font-weight: normal; } + span.sc { font-variant:small-caps } + span.roman { font-family:serif; font-weight:normal; } + span.sansserif { font-family:sans-serif; font-weight:normal; } -->

Ntptrace User's Manual

+


-Next: , +Next: , Previous: (dir), Up: (dir) -
+

Simple Network Time Protocol User Manual

@@ -46,10 +48,11 @@ This document applies to version 4.2.7p464 of ntptrace.
+


-Previous: ntptrace Description, +Previous: ntptrace Description, Up: Top -
+

Invoking ntptrace

@@ -80,7 +83,7 @@ defined in RFC-1305. using the agtexi-cmd template and the option descriptions for the ntptrace program. -

ntptrace help/usage (--help)

+

ntptrace help/usage (--help)

This is the automatically generated usage text for ntptrace.

The text printed is the same whether selected with the help option -(--help) or the more-help option (--more-help). more-help will print +(--help) or the more-help option (--more-help). more-help will print the usage text by passing it through a pager program. more-help is disabled on platforms without a working fork(2) function. The PAGER environment variable is -used to select the program, defaulting to more. Both will exit +used to select the program, defaulting to more. Both will exit with a status code of 0.

ntptrace - Trace peers of an NTP server - Ver. 4.2.7p464
@@ -120,11 +124,12 @@ Options are specified by doubled hyphens and their name or by a single
 hyphen and the flag character.
 
+


-Next: , +Next: , Previous: ntptrace usage, Up: ntptrace Invocation -
+

numeric option (-n)

@@ -134,11 +139,13 @@ This is the “print ip addresses instead of hostnames” option. Output hosts as dotted-quad numeric format rather than converting to the canonical host names.
+ +


-Next: , +Next: , Previous: ntptrace numeric, Up: ntptrace Invocation -
+

max-hosts option (-m)

@@ -146,13 +153,14 @@ Up: ntptrace Invocati

This is the “maximum number of peers to trace” option. This option takes a number argument. -This option has no doc documentation. +This option has no ‘doc’ documentation.

host option (-r)

@@ -160,20 +168,21 @@ Up: ntptrace Invocati

This is the “single remote host” option. This option takes a string argument. -This option has no doc documentation. +This option has no ‘doc’ documentation.

+


-Previous: ntptrace host, +Previous: ntptrace host, Up: ntptrace Invocation -
+

ntptrace exit status

One of the following exit values will be returned:

-
0 (EXIT_SUCCESS)
Successful program execution. -
1 (EXIT_FAILURE)
The operation failed or the command syntax was not valid. +
0 (EXIT_SUCCESS)
Successful program execution. +
1 (EXIT_FAILURE)
The operation failed or the command syntax was not valid.
diff --git a/scripts/plot_summary-opts b/scripts/plot_summary-opts index 08fe6b21d..c8df0b2c1 100644 --- a/scripts/plot_summary-opts +++ b/scripts/plot_summary-opts @@ -1,6 +1,6 @@ # EDIT THIS FILE WITH CAUTION (plot_summary-opts) # -# It has been AutoGen-ed August 22, 2014 at 08:51:44 AM by AutoGen 5.18.4pre14 +# It has been AutoGen-ed # From the definitions plot_summary-opts.def # and the template file perlopt diff --git a/scripts/plot_summary.html b/scripts/plot_summary.html index 1d42e687e..1a881e817 100644 --- a/scripts/plot_summary.html +++ b/scripts/plot_summary.html @@ -3,7 +3,7 @@ Plot_summary User's Manual - + @@ -14,18 +14,20 @@ pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } - span.sc { font-variant:small-caps } - span.roman { font-family: serif; font-weight: normal; } + span.sc { font-variant:small-caps } + span.roman { font-family:serif; font-weight:normal; } + span.sansserif { font-family:sans-serif; font-weight:normal; } -->

Plot_summary User's Manual

+


-Next: , +Next: , Previous: (dir), Up: (dir) -
+

Plot_summary User Manual

@@ -46,10 +48,12 @@ This document applies to version 4.2.7p464 of plot_summary.
+ +


-Previous: plot_summary Description, +Previous: plot_summary Description, Up: Top -
+

Invoking plot_summary

@@ -60,7 +64,7 @@ Up: Top using the agtexi-cmd template and the option descriptions for the plot_summary program. -

plot_summary help/usage (--help)

+

plot_summary help/usage (--help)

This is the automatically generated usage text for plot_summary.

The text printed is the same whether selected with the help option -(--help) or the more-help option (--more-help). more-help will print +(--help) or the more-help option (--more-help). more-help will print the usage text by passing it through a pager program. more-help is disabled on platforms without a working fork(2) function. The PAGER environment variable is -used to select the program, defaulting to more. Both will exit +used to select the program, defaulting to more. Both will exit with a status code of 0.

plot_summary - plot statistics generated by summary script - Ver. 4.2.7p464
@@ -107,11 +113,13 @@ Options are specified by doubled hyphens and their name or by a single
 hyphen and the flag character.
 

directory option

@@ -122,11 +130,13 @@ This option takes a string argument. The directory where the plot_summary will search for the *_summary files generated by summary script.

identifier option

@@ -137,11 +147,13 @@ This option takes a string argument. Where does the plotted data come from, default to string "host" plus current hostname

peer option

@@ -158,11 +170,13 @@ This option takes a string argument.

By default the peer_summary plots are not generated. Use this option to specify list of peers if you want to generate plots for them.

plot-term option

@@ -175,11 +189,13 @@ This option takes a string argument. dumb is it's not'. See output from -e "set terminal") for the list of avalaible options.

output-file option

@@ -189,18 +205,20 @@ This is the “output file” option. This option takes a str argument. Output file for gnuplot, default to stdout.

plot_summary exit status

One of the following exit values will be returned:

-
0 (EXIT_SUCCESS)
Successful program execution. -
1 (EXIT_FAILURE)
The operation failed or the command syntax was not valid. +
0 (EXIT_SUCCESS)
Successful program execution. +
1 (EXIT_FAILURE)
The operation failed or the command syntax was not valid.
diff --git a/scripts/summary-opts b/scripts/summary-opts index 23e904585..55b6a0db1 100644 --- a/scripts/summary-opts +++ b/scripts/summary-opts @@ -1,6 +1,6 @@ # EDIT THIS FILE WITH CAUTION (summary-opts) # -# It has been AutoGen-ed August 22, 2014 at 08:51:46 AM by AutoGen 5.18.4pre14 +# It has been AutoGen-ed # From the definitions summary-opts.def # and the template file perlopt diff --git a/scripts/summary.html b/scripts/summary.html index 28a5b5f59..fb0e3b309 100644 --- a/scripts/summary.html +++ b/scripts/summary.html @@ -3,7 +3,7 @@ Summary User's Manual - + @@ -14,18 +14,20 @@ pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } - span.sc { font-variant:small-caps } - span.roman { font-family: serif; font-weight: normal; } + span.sc { font-variant:small-caps } + span.roman { font-family:serif; font-weight:normal; } + span.sansserif { font-family:sans-serif; font-weight:normal; } -->

Summary User's Manual

+


-Next: , +Next: , Previous: (dir), Up: (dir) -
+

Summary User Manual

@@ -46,10 +48,11 @@ This document applies to version 4.2.7p464 of summary.
+


-Previous: summary Description, +Previous: summary Description, Up: Top -
+

Invoking summary

@@ -60,7 +63,7 @@ Up: Top using the agtexi-cmd template and the option descriptions for the summary program. -

summary help/usage (--help)

+

summary help/usage (--help)

This is the automatically generated usage text for summary.

The text printed is the same whether selected with the help option -(--help) or the more-help option (--more-help). more-help will print +(--help) or the more-help option (--more-help). more-help will print the usage text by passing it through a pager program. more-help is disabled on platforms without a working fork(2) function. The PAGER environment variable is -used to select the program, defaulting to more. Both will exit +used to select the program, defaulting to more. Both will exit with a status code of 0.

summary - compute various stastics from NTP stat files - Ver. 4.2.7p464
@@ -104,11 +108,12 @@ Options are specified by doubled hyphens and their name or by a single
 hyphen and the flag character.
 
+


-Next: , +Next: , Previous: summary usage, Up: summary Invocation -
+

directory option

@@ -119,11 +124,13 @@ This option takes a string argument. The directory where ntpd will search for .stat files generated by ntpd.

end-date option

@@ -135,11 +142,13 @@ This option takes a number argument. option. Defaults to today minus one day (Use date -u +%Y%m%d) to get the timestamp.
+ +


-Next: , +Next: , Previous: summary end-date, Up: summary Invocation -
+

output-directory option

@@ -149,11 +158,13 @@ This is the “output directory” option. This option takes a str argument. The output directory summary will write all output files to.

start-date option

@@ -164,18 +175,19 @@ This option takes a num argument. Process all files with the date suffix more or equal to value of this option. Defaults to 197000101.
+


-Previous: summary start-date, +Previous: summary start-date, Up: summary Invocation -
+

summary exit status

One of the following exit values will be returned:

-
0 (EXIT_SUCCESS)
Successful program execution. -
1 (EXIT_FAILURE)
The operation failed or the command syntax was not valid. +
0 (EXIT_SUCCESS)
Successful program execution. +
1 (EXIT_FAILURE)
The operation failed or the command syntax was not valid.
diff --git a/sntp/Makefile.am b/sntp/Makefile.am index bc0dcd411..81a137a33 100644 --- a/sntp/Makefile.am +++ b/sntp/Makefile.am @@ -21,7 +21,7 @@ LDADD += ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) LDADD += $(PTHREAD_LIBS) LDADD += $(LDADD_NTP) -run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" \ +run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \ autogen -L include -L ag-tpl --writable std_def_list = \ $(srcdir)/include/debug-opt.def \ diff --git a/sntp/sntp-opts.c b/sntp/sntp-opts.c index 19a2c11c1..6a21b05e2 100644 --- a/sntp/sntp-opts.c +++ b/sntp/sntp-opts.c @@ -443,42 +443,14 @@ static int const aIpv6CantList[] = { /** * Declare option callback procedures */ -/* extracted from optmain.tlib near line 723 */ - -#if defined(TEST_SNTP_OPTS) -/* - * Under test, omit argument processing, or call optionStackArg, - * if multiple copies are allowed. - */ -static tOptProc - doOptKeyfile, doOptKod, doOptLogfile, doOptNtpversion, - doOptSteplimit, doUsageOpt; - -/* - * #define map the "normal" callout procs to the test ones... - */ -#define DEBUG_LEVEL_OPT_PROC optionStackArg - - -#else /* NOT defined TEST_SNTP_OPTS */ -/* - * When not under test, there are different procs to use - */ extern tOptProc ntpOptionPrintVersion, optionBooleanVal, optionNestedVal, optionNumericVal, optionPagedUsage, optionResetOpt, optionStackArg, optionTimeDate, optionTimeVal, - optionUnstackArg, optionVendorOption, optionVersionStderr; + optionUnstackArg, optionVendorOption; static tOptProc doOptDebug_Level, doOptKeyfile, doOptKod, doOptLogfile, doOptNtpversion, doOptSteplimit, doUsageOpt; - -/** - * #define map the "normal" callout procs - */ -#define DEBUG_LEVEL_OPT_PROC doOptDebug_Level - -#endif /* TEST_SNTP_OPTS */ #define VER_PROC ntpOptionPrintVersion /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -556,7 +528,7 @@ static tOptDesc optDesc[OPTION_CT] = { /* last opt argumnt */ { NULL }, /* --debug-level */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, - /* option proc */ DEBUG_LEVEL_OPT_PROC, + /* option proc */ doOptDebug_Level, /* desc, NAME, name */ DEBUG_LEVEL_DESC, DEBUG_LEVEL_NAME, DEBUG_LEVEL_name, /* disablement strs */ NULL, NULL }, @@ -827,8 +799,6 @@ doUsageOpt(tOptions * opts, tOptDesc * od) (void)od; } -#if ! defined(TEST_SNTP_OPTS) - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the debug-level option. @@ -850,7 +820,6 @@ OPT_VALUE_SET_DEBUG_LEVEL++; (void)pOptDesc; (void)pOptions; } -#endif /* defined(TEST_SNTP_OPTS) */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** @@ -1001,32 +970,6 @@ doOptNtpversion(tOptions* pOptions, tOptDesc* pOptDesc) emit_ranges: optionShowRange(pOptions, pOptDesc, (void *)rng, 1); } -/* extracted from optmain.tlib near line 46 */ - -#if defined(TEST_SNTP_OPTS) /* TEST-MAIN-PROCEDURE: */ - -extern void optionPutShell(tOptions*); - -/** - * Generated main procedure. This will emit text that a Bourne shell can - * process to handle its command line arguments. - * - * @param[in] argc argument count - * @param[in] argv argument vector - * @returns program exit code - */ -int -main(int argc, char ** argv) -{ - int res = SNTP_EXIT_SUCCESS; - (void)optionProcess(&sntpOptions, argc, argv); - optionPutShell(&sntpOptions); - res = ferror(stdout); - if (res != 0) - fputs("output error writing to stdout\n", stderr); - return res; -} -#endif /* TEST_SNTP_OPTS END-TEST-MAIN-PROCEDURE */ /* extracted from optmain.tlib near line 1245 */ /** @@ -1073,8 +1016,7 @@ tOptions sntpOptions = { + OPTPROC_NO_REQ_OPT + OPTPROC_NEGATIONS + OPTPROC_ENVIRON - + OPTPROC_MISUSE - + OPTPROC_SHELL_OUTPUT ), + + OPTPROC_MISUSE ), 0, NULL, /* current option index, current option */ NULL, NULL, zPROGNAME, zRcName, zCopyright, zLicenseDescrip, diff --git a/sntp/sntp-opts.def b/sntp/sntp-opts.def index 15025dd4e..86e17c929 100644 --- a/sntp/sntp-opts.def +++ b/sntp/sntp-opts.def @@ -19,8 +19,6 @@ environrc; #include version.def -test-main; - flag = { name = ipv4; value = 4; diff --git a/util/Makefile.am b/util/Makefile.am index f9942907a..4265e0b4b 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -57,7 +57,7 @@ man1_MANS= man8_MANS= man_MANS= ntp-keygen.$(NTP_KEYGEN_MS) -run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" \ +run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \ autogen -L ../sntp/include -L ../sntp/ag-tpl --writable std_def_list = \ $(top_srcdir)/sntp/include/debug-opt.def \ diff --git a/util/ntp-keygen-opts.c b/util/ntp-keygen-opts.c index 6b5d3516a..d39b5c881 100644 --- a/util/ntp-keygen-opts.c +++ b/util/ntp-keygen-opts.c @@ -623,40 +623,13 @@ static char const ntp_keygen_opt_strs[2369] = #else /* not AUTOKEY */ # define doOptModulus NULL #endif /* def/not AUTOKEY */ -/* extracted from optmain.tlib near line 723 */ - -#if defined(TEST_NTP_KEYGEN_OPTS) -/* - * Under test, omit argument processing, or call optionStackArg, - * if multiple copies are allowed. - */ -static tOptProc - doUsageOpt; - -/* - * #define map the "normal" callout procs to the test ones... - */ -#define DEBUG_LEVEL_OPT_PROC optionStackArg - - -#else /* NOT defined TEST_NTP_KEYGEN_OPTS */ -/* - * When not under test, there are different procs to use - */ extern tOptProc ntpOptionPrintVersion, optionBooleanVal, optionNestedVal, optionNumericVal, optionPagedUsage, optionResetOpt, optionStackArg, optionTimeDate, optionTimeVal, - optionUnstackArg, optionVendorOption, optionVersionStderr; + optionUnstackArg, optionVendorOption; static tOptProc doOptDebug_Level, doUsageOpt; - -/** - * #define map the "normal" callout procs - */ -#define DEBUG_LEVEL_OPT_PROC doOptDebug_Level - -#endif /* TEST_NTP_KEYGEN_OPTS */ #define VER_PROC ntpOptionPrintVersion /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -710,7 +683,7 @@ static tOptDesc optDesc[OPTION_CT] = { /* last opt argumnt */ { NULL }, /* --debug-level */ /* arg list/cookie */ NULL, /* must/cannot opts */ NULL, NULL, - /* option proc */ DEBUG_LEVEL_OPT_PROC, + /* option proc */ doOptDebug_Level, /* desc, NAME, name */ DEBUG_LEVEL_DESC, DEBUG_LEVEL_NAME, DEBUG_LEVEL_name, /* disablement strs */ NULL, NULL }, @@ -1078,8 +1051,6 @@ doOptImbits(tOptions* pOptions, tOptDesc* pOptDesc) } #endif /* defined AUTOKEY */ -#if ! defined(TEST_NTP_KEYGEN_OPTS) - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Code to handle the debug-level option. @@ -1101,7 +1072,6 @@ OPT_VALUE_SET_DEBUG_LEVEL++; (void)pOptDesc; (void)pOptions; } -#endif /* defined(TEST_NTP_KEYGEN_OPTS) */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** @@ -1139,32 +1109,6 @@ doOptModulus(tOptions* pOptions, tOptDesc* pOptDesc) optionShowRange(pOptions, pOptDesc, (void *)rng, 1); } #endif /* defined AUTOKEY */ -/* extracted from optmain.tlib near line 46 */ - -#if defined(TEST_NTP_KEYGEN_OPTS) /* TEST-MAIN-PROCEDURE: */ - -extern void optionPutShell(tOptions*); - -/** - * Generated main procedure. This will emit text that a Bourne shell can - * process to handle its command line arguments. - * - * @param[in] argc argument count - * @param[in] argv argument vector - * @returns program exit code - */ -int -main(int argc, char ** argv) -{ - int res = NTP_KEYGEN_EXIT_SUCCESS; - (void)optionProcess(&ntp_keygenOptions, argc, argv); - optionPutShell(&ntp_keygenOptions); - res = ferror(stdout); - if (res != 0) - fputs("output error writing to stdout\n", stderr); - return res; -} -#endif /* TEST_NTP_KEYGEN_OPTS END-TEST-MAIN-PROCEDURE */ /* extracted from optmain.tlib near line 1245 */ /** @@ -1211,8 +1155,7 @@ tOptions ntp_keygenOptions = { + OPTPROC_NO_REQ_OPT + OPTPROC_ENVIRON + OPTPROC_NO_ARGS - + OPTPROC_MISUSE - + OPTPROC_SHELL_OUTPUT ), + + OPTPROC_MISUSE ), 0, NULL, /* current option index, current option */ NULL, NULL, zPROGNAME, zRcName, zCopyright, zLicenseDescrip, diff --git a/util/ntp-keygen-opts.def b/util/ntp-keygen-opts.def index 505ec8fca..3088cf528 100644 --- a/util/ntp-keygen-opts.def +++ b/util/ntp-keygen-opts.def @@ -10,8 +10,6 @@ prog-name = "ntp-keygen"; prog-title = "Create a NTP host key"; package = ntp; -test-main; - include = '#include '; #include version.def