From: Harlan Stenn Date: Mon, 16 May 2011 04:25:03 +0000 (+0000) Subject: NTP_4_2_6P4_BETA1 X-Git-Tag: NTP_4_2_6P4_BETA1^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbcae48205372a72633c7b9a70e33dd9f875718f;p=thirdparty%2Fntp.git NTP_4_2_6P4_BETA1 bk: 4dd0a71fmncezTjJVWz4hKf-0JpQag --- diff --git a/ChangeLog b/ChangeLog index 360c13d5f..199c4d471 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,5 @@ --- +(4.2.6p4-beta1) 2011/05/16 Released by Harlan Stenn * [Bug 1554] peer may stay selected as system peer after becoming unreachable. diff --git a/ntpd/ntpd-opts.c b/ntpd/ntpd-opts.c index 98fa6fccf..f6fbd004c 100644 --- a/ntpd/ntpd-opts.c +++ b/ntpd/ntpd-opts.c @@ -1,11 +1,11 @@ /* * EDIT THIS FILE WITH CAUTION (ntpd-opts.c) * - * It has been AutoGen-ed February 22, 2011 at 12:28:59 AM by AutoGen 5.11.6 + * It has been AutoGen-ed May 16, 2011 at 04:23:35 AM by AutoGen 5.11.9 * From the definitions ntpd-opts.def * and the template file options * - * Generated from AutoOpts 34:0:9 templates. + * Generated from AutoOpts 35:0:10 templates. * * AutoOpts is a copyrighted work. This source file is not encumbered * by AutoOpts licensing, but is provided under the licensing terms chosen @@ -20,9 +20,11 @@ * ntpd copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved * * see html/copyright.html + * */ #include + #include #include #include @@ -33,15 +35,15 @@ #ifdef __cplusplus extern "C" { #endif +extern FILE * option_usage_fp; /* TRANSLATORS: choose the translation for option names wisely because you cannot ever change your mind. */ -tSCC zCopyright[] = - "ntpd copyright (c) 1970-2011 David L. Mills and/or others, all rights reserved" -/* extracted from copyright.def near line 8 */ -; -tSCC zCopyrightNotice[24] = -"see html/copyright.html"; +static char const zCopyright[44] = +"ntpd 4.2.6p4-beta1\n\ +see html/copyright.html\n"; +static char const zLicenseDescrip[25] = +"see html/copyright.html\n"; extern tUsageProc optionUsage; @@ -57,12 +59,6 @@ extern tUsageProc optionUsage; #ifndef NULL # define NULL 0 #endif -#ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -#endif -#ifndef EXIT_FAILURE -# define EXIT_FAILURE 1 -#endif /* * Ipv4 option description with @@ -502,8 +498,8 @@ static tOptProc extern tOptProc optionBooleanVal, optionNestedVal, optionNumericVal, optionPagedUsage, optionPrintVersion, optionResetOpt, - optionStackArg, optionTimeVal, optionUnstackArg, - optionVersionStderr; + optionStackArg, optionTimeDate, optionTimeVal, + optionUnstackArg, optionVersionStderr; static tOptProc doUsageOpt; @@ -524,7 +520,7 @@ static tOptProc * * Define the Ntpd Option Descriptions. */ -static tOptDesc optDesc[ OPTION_CT ] = { +static tOptDesc optDesc[OPTION_CT] = { { /* entry idx, value */ 0, VALUE_OPT_IPV4, /* equiv idx, value */ 0, VALUE_OPT_IPV4, /* equivalenced to */ NO_EQUIVALENT, @@ -953,8 +949,8 @@ static tOptDesc optDesc[ OPTION_CT ] = { * Define the Ntpd Option Environment */ static char const zPROGNAME[5] = "NTPD"; -static char const zUsageTitle[99] = -"ntpd - NTP daemon program - Ver. 4.2.6p3\n\ +static char const zUsageTitle[105] = +"ntpd - NTP daemon program - Ver. 4.2.6p4-beta1\n\ USAGE: %s [ - [] | --[{=| }] ]...\n"; #define zRcName NULL #define apzHomeList NULL @@ -963,7 +959,7 @@ static char const zBugsAddr[34] = "http://bugs.ntp.org, bugs@ntp.org"; #define zExplain NULL static char const zDetail[7] = "\n\n"; static char const zFullVersion[] = NTPD_FULL_VERSION; -/* extracted from optcode.tlib near line 504 */ +/* extracted from optcode.tlib near line 515 */ #if defined(ENABLE_NLS) # define OPTPROC_BASE OPTPROC_TRANSLATE @@ -1009,7 +1005,7 @@ tOptions ntpdOptions = { + OPTPROC_MISUSE ), 0, NULL, /* current option index, current option */ NULL, NULL, zPROGNAME, - zRcName, zCopyright, zCopyrightNotice, + zRcName, zCopyright, zLicenseDescrip, zFullVersion, apzHomeList, zUsageTitle, zExplain, zDetail, optDesc, zBugsAddr, /* address to send bugs to */ @@ -1034,12 +1030,10 @@ tOptions ntpdOptions = { * Create the static procedure(s) declared above. */ static void -doUsageOpt( - tOptions* pOptions, - tOptDesc* pOptDesc ) +doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc) { (void)pOptions; - USAGE(EXIT_SUCCESS); + USAGE(NTPD_EXIT_SUCCESS); } #if ! defined(TEST_NTPD_OPTS) @@ -1057,16 +1051,16 @@ DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg ); } #endif /* defined DEBUG */ #endif /* defined(TEST_NTPD_OPTS) */ -/* extracted from optmain.tlib near line 107 */ +/* extracted from optmain.tlib near line 128 */ #if defined(TEST_NTPD_OPTS) /* TEST MAIN PROCEDURE: */ extern void optionPutShell(tOptions*); int -main(int argc, char** argv) +main(int argc, char ** argv) { - int res = EXIT_SUCCESS; + int res = NTPD_EXIT_SUCCESS; (void)optionProcess(&ntpdOptions, argc, argv); optionPutShell(&ntpdOptions); res = ferror(stdout); @@ -1075,7 +1069,7 @@ main(int argc, char** argv) return res; } #endif /* defined TEST_NTPD_OPTS */ -/* extracted from optcode.tlib near line 657 */ +/* extracted from optcode.tlib near line 666 */ #if ENABLE_NLS #include @@ -1099,14 +1093,13 @@ AO_gettext(char const* pz) pzRes = strdup(pzRes); if (pzRes == NULL) { fputs(_("No memory for duping translated strings\n"), stderr); - exit(EXIT_FAILURE); + exit(NTPD_EXIT_FAILURE); } return pzRes; } -static void coerce_it(void** s) { *s = AO_gettext(*s); } -#define COERSION(_f) \ - coerce_it((void*)&(ntpdOptions._f)) +static void coerce_it(void** s) { *s = AO_gettext(*s); +} /* * This invokes the translation code (e.g. gettext(3)). @@ -1114,6 +1107,8 @@ static void coerce_it(void** s) { *s = AO_gettext(*s); } static void translate_option_strings(void) { + tOptions * const pOpt = &ntpdOptions; + /* * Guard against re-translation. It won't work. The strings will have * been changed by the first pass through this code. One shot only. @@ -1123,33 +1118,33 @@ translate_option_strings(void) * Do the translations. The first pointer follows the field count * field. The field count field is the size of a pointer. */ - tOptDesc* pOD = ntpdOptions.pOptDesc; - char** ppz = (char**)(void*)&(option_usage_text); - int ix = option_usage_text.field_ct; + tOptDesc * pOD = pOpt->pOptDesc; + char ** ppz = (char**)(void*)&(option_usage_text); + int ix = option_usage_text.field_ct; do { ppz++; *ppz = AO_gettext(*ppz); } while (--ix > 0); - COERSION(pzCopyright); - COERSION(pzCopyNotice); - COERSION(pzFullVersion); - COERSION(pzUsageTitle); - COERSION(pzExplain); - COERSION(pzDetail); - COERSION(pzPackager); + coerce_it((void*)&(pOpt->pzCopyright)); + coerce_it((void*)&(pOpt->pzCopyNotice)); + coerce_it((void*)&(pOpt->pzFullVersion)); + coerce_it((void*)&(pOpt->pzUsageTitle)); + coerce_it((void*)&(pOpt->pzExplain)); + coerce_it((void*)&(pOpt->pzDetail)); + coerce_it((void*)&(pOpt->pzPackager)); option_usage_text.field_ct = 0; - for (ix = ntpdOptions.optCt; ix > 0; ix--, pOD++) + for (ix = pOpt->optCt; ix > 0; ix--, pOD++) coerce_it((void*)&(pOD->pzText)); } - if ((ntpdOptions.fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) { - tOptDesc* pOD = ntpdOptions.pOptDesc; - int ix; + if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) { + tOptDesc * pOD = pOpt->pOptDesc; + int ix; - for (ix = ntpdOptions.optCt; ix > 0; ix--, pOD++) { + for (ix = pOpt->optCt; ix > 0; ix--, pOD++) { coerce_it((void*)&(pOD->pz_Name)); coerce_it((void*)&(pOD->pz_DisableName)); coerce_it((void*)&(pOD->pz_DisablePfx)); diff --git a/ntpd/ntpd-opts.h b/ntpd/ntpd-opts.h index c217160ce..ea33feaae 100644 --- a/ntpd/ntpd-opts.h +++ b/ntpd/ntpd-opts.h @@ -1,11 +1,11 @@ /* * EDIT THIS FILE WITH CAUTION (ntpd-opts.h) * - * It has been AutoGen-ed February 22, 2011 at 12:28:59 AM by AutoGen 5.11.6 + * It has been AutoGen-ed May 16, 2011 at 04:23:34 AM by AutoGen 5.11.9 * From the definitions ntpd-opts.def * and the template file options * - * Generated from AutoOpts 34:0:9 templates. + * Generated from AutoOpts 35:0:10 templates. * * AutoOpts is a copyrighted work. This header file is not encumbered * by AutoOpts licensing, but is provided under the licensing terms chosen @@ -20,6 +20,7 @@ * ntpd copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved * * see html/copyright.html + * */ /* * This file contains the programmatic interface to the Automated @@ -39,7 +40,7 @@ * tolerable version is at least as old as what was current when the header * template was released. */ -#define AO_TEMPLATE_VERSION 139264 +#define AO_TEMPLATE_VERSION 143360 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \ || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION) # error option template version mismatches autoopts/options.h header @@ -88,8 +89,8 @@ typedef enum { } teOptIndex; #define OPTION_CT 35 -#define NTPD_VERSION "4.2.6p3" -#define NTPD_FULL_VERSION "ntpd - NTP daemon program - Ver. 4.2.6p3" +#define NTPD_VERSION "4.2.6p4-beta1" +#define NTPD_FULL_VERSION "ntpd 4.2.6p4-beta1" /* * Interface defines for all options. Replace "n" with the UPPER_CASED @@ -120,7 +121,6 @@ typedef enum { NTPD_EXIT_SUCCESS = 0, NTPD_EXIT_FAILURE = 1 } ntpd_exit_code_t; - /* * Make sure there are no #define name conflicts with the option names */ @@ -341,17 +341,17 @@ typedef enum { ntpdOptions.pzCurOpt = NULL) #define START_OPT RESTART_OPT(1) #define USAGE(c) (*ntpdOptions.pUsageProc)(&ntpdOptions, c) -/* extracted from opthead.tlib near line 435 */ +/* extracted from opthead.tlib near line 451 */ -/* * * * * * - * - * Declare the ntpd option descriptor. - */ #ifdef __cplusplus extern "C" { #endif -extern tOptions ntpdOptions; +/* * * * * * + * + * Declare the ntpd option descriptor. + */ +extern tOptions ntpdOptions; #if defined(ENABLE_NLS) # ifndef _ diff --git a/ntpd/ntpd-opts.texi b/ntpd/ntpd-opts.texi index e33f82a6e..84656389d 100644 --- a/ntpd/ntpd-opts.texi +++ b/ntpd/ntpd-opts.texi @@ -6,7 +6,7 @@ # # EDIT THIS FILE WITH CAUTION (ntpd-opts.texi) # -# It has been AutoGen-ed January 3, 2011 at 09:18:03 PM by AutoGen 5.11.6pre7 +# It has been AutoGen-ed May 16, 2011 at 04:24:04 AM by AutoGen 5.11.9 # From the definitions ntpd-opts.def # and the template file aginfo.tpl @end ignore @@ -63,7 +63,7 @@ This is the automatically generated usage text for ntpd: @exampleindent 0 @example -ntpd - NTP daemon program - Ver. 4.2.6p3 +ntpd - NTP daemon program - Ver. 4.2.6p4-beta1 USAGE: ntpd [ - [] | --[@{=| @}] ]... Flg Arg Option-Name Description -4 no ipv4 Force IPv4 DNS name resolution @@ -114,8 +114,8 @@ USAGE: ntpd [ - [] | --[@{=| @}] ]... -? no help Display extended usage information and exit -! no more-help Extended usage information passed thru pager -Options are specified by doubled hyphens and their name -or by a single hyphen and the flag character. +Options are specified by doubled hyphens and their name or by a single +hyphen and the flag character. The following option preset mechanisms are supported: - examining environment variables named NTPD_* diff --git a/ntpd/ntpd.1 b/ntpd/ntpd.1 index bc3a73bb4..eb042ded1 100644 --- a/ntpd/ntpd.1 +++ b/ntpd/ntpd.1 @@ -1,7 +1,7 @@ -.TH NTPD 1 2011-01-03 "( 4.2.6p3)" "Programmer's Manual" +.TH NTPD 1 2011-05-16 "( 4.2.6p4-beta1)" "Programmer's Manual" .\" EDIT THIS FILE WITH CAUTION (ntpd.1) .\" -.\" It has been AutoGen-ed January 3, 2011 at 09:18:03 PM by AutoGen 5.11.6pre7 +.\" It has been AutoGen-ed May 16, 2011 at 04:24:03 AM by AutoGen 5.11.9 .\" From the definitions ntpd-opts.def .\" and the template file agman1.tpl .\" @@ -331,6 +331,7 @@ Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org .nf .na see html/copyright.html + .fi .ad .PP diff --git a/ntpdc/ntpdc-opts.c b/ntpdc/ntpdc-opts.c index d8ec791b7..4c51ae6fb 100644 --- a/ntpdc/ntpdc-opts.c +++ b/ntpdc/ntpdc-opts.c @@ -1,11 +1,11 @@ /* * EDIT THIS FILE WITH CAUTION (ntpdc-opts.c) * - * It has been AutoGen-ed February 22, 2011 at 12:29:00 AM by AutoGen 5.11.6 + * It has been AutoGen-ed May 16, 2011 at 04:24:13 AM by AutoGen 5.11.9 * From the definitions ntpdc-opts.def * and the template file options * - * Generated from AutoOpts 34:0:9 templates. + * Generated from AutoOpts 35:0:10 templates. * * AutoOpts is a copyrighted work. This source file is not encumbered * by AutoOpts licensing, but is provided under the licensing terms chosen @@ -20,9 +20,11 @@ * ntpdc copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved * * see html/copyright.html + * */ #include + #include #include #include @@ -33,15 +35,15 @@ #ifdef __cplusplus extern "C" { #endif +extern FILE * option_usage_fp; /* TRANSLATORS: choose the translation for option names wisely because you cannot ever change your mind. */ -tSCC zCopyright[] = - "ntpdc copyright (c) 1970-2011 David L. Mills and/or others, all rights reserved" -/* extracted from copyright.def near line 8 */ -; -tSCC zCopyrightNotice[24] = -"see html/copyright.html"; +static char const zCopyright[45] = +"ntpdc 4.2.6p4-beta1\n\ +see html/copyright.html\n"; +static char const zLicenseDescrip[25] = +"see html/copyright.html\n"; extern tUsageProc optionUsage; @@ -57,12 +59,6 @@ extern tUsageProc optionUsage; #ifndef NULL # define NULL 0 #endif -#ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -#endif -#ifndef EXIT_FAILURE -# define EXIT_FAILURE 1 -#endif /* * Ipv4 option description with @@ -237,8 +233,8 @@ static tOptProc extern tOptProc optionBooleanVal, optionNestedVal, optionNumericVal, optionPagedUsage, optionPrintVersion, optionResetOpt, - optionStackArg, optionTimeVal, optionUnstackArg, - optionVersionStderr; + optionStackArg, optionTimeDate, optionTimeVal, + optionUnstackArg, optionVersionStderr; static tOptProc doOptSet_Debug_Level, doUsageOpt; @@ -259,7 +255,7 @@ static tOptProc * * Define the Ntpdc Option Descriptions. */ -static tOptDesc optDesc[ OPTION_CT ] = { +static tOptDesc optDesc[OPTION_CT] = { { /* entry idx, value */ 0, VALUE_OPT_IPV4, /* equiv idx, value */ 0, VALUE_OPT_IPV4, /* equivalenced to */ NO_EQUIVALENT, @@ -450,8 +446,8 @@ static tOptDesc optDesc[ OPTION_CT ] = { * Define the Ntpdc Option Environment */ static char const zPROGNAME[6] = "NTPDC"; -static char const zUsageTitle[127] = -"ntpdc - vendor-specific NTP query program - Ver. 4.2.6p3\n\ +static char const zUsageTitle[133] = +"ntpdc - vendor-specific NTP query program - Ver. 4.2.6p4-beta1\n\ USAGE: %s [ - [] | --[{=| }] ]... [ host ...]\n"; static char const zRcName[7] = ".ntprc"; static char const * const apzHomeList[3] = { @@ -472,7 +468,7 @@ configuration options which can be specified at startup using ntpd's\n\ configuration file may also be specified at run time using [= prog-name =]\n\ .\n"; static char const zFullVersion[] = NTPDC_FULL_VERSION; -/* extracted from optcode.tlib near line 504 */ +/* extracted from optcode.tlib near line 515 */ #if defined(ENABLE_NLS) # define OPTPROC_BASE OPTPROC_TRANSLATE @@ -517,7 +513,7 @@ tOptions ntpdcOptions = { + OPTPROC_MISUSE ), 0, NULL, /* current option index, current option */ NULL, NULL, zPROGNAME, - zRcName, zCopyright, zCopyrightNotice, + zRcName, zCopyright, zLicenseDescrip, zFullVersion, apzHomeList, zUsageTitle, zExplain, zDetail, optDesc, zBugsAddr, /* address to send bugs to */ @@ -542,12 +538,10 @@ tOptions ntpdcOptions = { * Create the static procedure(s) declared above. */ static void -doUsageOpt( - tOptions* pOptions, - tOptDesc* pOptDesc ) +doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc) { (void)pOptions; - USAGE(EXIT_SUCCESS); + USAGE(NTPDC_EXIT_SUCCESS); } #if ! defined(TEST_NTPDC_OPTS) @@ -563,16 +557,16 @@ doOptSet_Debug_Level(tOptions* pOptions, tOptDesc* pOptDesc) DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg ); } #endif /* defined(TEST_NTPDC_OPTS) */ -/* extracted from optmain.tlib near line 107 */ +/* extracted from optmain.tlib near line 128 */ #if defined(TEST_NTPDC_OPTS) /* TEST MAIN PROCEDURE: */ extern void optionPutShell(tOptions*); int -main(int argc, char** argv) +main(int argc, char ** argv) { - int res = EXIT_SUCCESS; + int res = NTPDC_EXIT_SUCCESS; (void)optionProcess(&ntpdcOptions, argc, argv); optionPutShell(&ntpdcOptions); res = ferror(stdout); @@ -581,7 +575,7 @@ main(int argc, char** argv) return res; } #endif /* defined TEST_NTPDC_OPTS */ -/* extracted from optcode.tlib near line 657 */ +/* extracted from optcode.tlib near line 666 */ #if ENABLE_NLS #include @@ -605,14 +599,13 @@ AO_gettext(char const* pz) pzRes = strdup(pzRes); if (pzRes == NULL) { fputs(_("No memory for duping translated strings\n"), stderr); - exit(EXIT_FAILURE); + exit(NTPDC_EXIT_FAILURE); } return pzRes; } -static void coerce_it(void** s) { *s = AO_gettext(*s); } -#define COERSION(_f) \ - coerce_it((void*)&(ntpdcOptions._f)) +static void coerce_it(void** s) { *s = AO_gettext(*s); +} /* * This invokes the translation code (e.g. gettext(3)). @@ -620,6 +613,8 @@ static void coerce_it(void** s) { *s = AO_gettext(*s); } static void translate_option_strings(void) { + tOptions * const pOpt = &ntpdcOptions; + /* * Guard against re-translation. It won't work. The strings will have * been changed by the first pass through this code. One shot only. @@ -629,33 +624,33 @@ translate_option_strings(void) * Do the translations. The first pointer follows the field count * field. The field count field is the size of a pointer. */ - tOptDesc* pOD = ntpdcOptions.pOptDesc; - char** ppz = (char**)(void*)&(option_usage_text); - int ix = option_usage_text.field_ct; + tOptDesc * pOD = pOpt->pOptDesc; + char ** ppz = (char**)(void*)&(option_usage_text); + int ix = option_usage_text.field_ct; do { ppz++; *ppz = AO_gettext(*ppz); } while (--ix > 0); - COERSION(pzCopyright); - COERSION(pzCopyNotice); - COERSION(pzFullVersion); - COERSION(pzUsageTitle); - COERSION(pzExplain); - COERSION(pzDetail); - COERSION(pzPackager); + coerce_it((void*)&(pOpt->pzCopyright)); + coerce_it((void*)&(pOpt->pzCopyNotice)); + coerce_it((void*)&(pOpt->pzFullVersion)); + coerce_it((void*)&(pOpt->pzUsageTitle)); + coerce_it((void*)&(pOpt->pzExplain)); + coerce_it((void*)&(pOpt->pzDetail)); + coerce_it((void*)&(pOpt->pzPackager)); option_usage_text.field_ct = 0; - for (ix = ntpdcOptions.optCt; ix > 0; ix--, pOD++) + for (ix = pOpt->optCt; ix > 0; ix--, pOD++) coerce_it((void*)&(pOD->pzText)); } - if ((ntpdcOptions.fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) { - tOptDesc* pOD = ntpdcOptions.pOptDesc; - int ix; + if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) { + tOptDesc * pOD = pOpt->pOptDesc; + int ix; - for (ix = ntpdcOptions.optCt; ix > 0; ix--, pOD++) { + for (ix = pOpt->optCt; ix > 0; ix--, pOD++) { coerce_it((void*)&(pOD->pz_Name)); coerce_it((void*)&(pOD->pz_DisableName)); coerce_it((void*)&(pOD->pz_DisablePfx)); diff --git a/ntpdc/ntpdc-opts.h b/ntpdc/ntpdc-opts.h index 02f8d9252..a4881b8c7 100644 --- a/ntpdc/ntpdc-opts.h +++ b/ntpdc/ntpdc-opts.h @@ -1,11 +1,11 @@ /* * EDIT THIS FILE WITH CAUTION (ntpdc-opts.h) * - * It has been AutoGen-ed February 22, 2011 at 12:29:00 AM by AutoGen 5.11.6 + * It has been AutoGen-ed May 16, 2011 at 04:24:13 AM by AutoGen 5.11.9 * From the definitions ntpdc-opts.def * and the template file options * - * Generated from AutoOpts 34:0:9 templates. + * Generated from AutoOpts 35:0:10 templates. * * AutoOpts is a copyrighted work. This header file is not encumbered * by AutoOpts licensing, but is provided under the licensing terms chosen @@ -20,6 +20,7 @@ * ntpdc copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved * * see html/copyright.html + * */ /* * This file contains the programmatic interface to the Automated @@ -39,7 +40,7 @@ * tolerable version is at least as old as what was current when the header * template was released. */ -#define AO_TEMPLATE_VERSION 139264 +#define AO_TEMPLATE_VERSION 143360 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \ || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION) # error option template version mismatches autoopts/options.h header @@ -68,8 +69,8 @@ typedef enum { } teOptIndex; #define OPTION_CT 15 -#define NTPDC_VERSION "4.2.6p3" -#define NTPDC_FULL_VERSION "ntpdc - vendor-specific NTP query program - Ver. 4.2.6p3" +#define NTPDC_VERSION "4.2.6p4-beta1" +#define NTPDC_FULL_VERSION "ntpdc 4.2.6p4-beta1" /* * Interface defines for all options. Replace "n" with the UPPER_CASED @@ -100,7 +101,6 @@ typedef enum { NTPDC_EXIT_SUCCESS = 0, NTPDC_EXIT_FAILURE = 1 } ntpdc_exit_code_t; - /* * Make sure there are no #define name conflicts with the option names */ @@ -191,17 +191,17 @@ typedef enum { ntpdcOptions.pzCurOpt = NULL) #define START_OPT RESTART_OPT(1) #define USAGE(c) (*ntpdcOptions.pUsageProc)(&ntpdcOptions, c) -/* extracted from opthead.tlib near line 435 */ +/* extracted from opthead.tlib near line 451 */ -/* * * * * * - * - * Declare the ntpdc option descriptor. - */ #ifdef __cplusplus extern "C" { #endif -extern tOptions ntpdcOptions; +/* * * * * * + * + * Declare the ntpdc option descriptor. + */ +extern tOptions ntpdcOptions; #if defined(ENABLE_NLS) # ifndef _ diff --git a/ntpdc/ntpdc-opts.texi b/ntpdc/ntpdc-opts.texi index 9a58bf475..52fd14556 100644 --- a/ntpdc/ntpdc-opts.texi +++ b/ntpdc/ntpdc-opts.texi @@ -6,7 +6,7 @@ # # EDIT THIS FILE WITH CAUTION (ntpdc-opts.texi) # -# It has been AutoGen-ed January 3, 2011 at 09:18:22 PM by AutoGen 5.11.6pre7 +# It has been AutoGen-ed May 16, 2011 at 04:24:22 AM by AutoGen 5.11.9 # From the definitions ntpdc-opts.def # and the template file aginfo.tpl @end ignore @@ -58,7 +58,7 @@ This is the automatically generated usage text for ntpdc: @exampleindent 0 @example -ntpdc - vendor-specific NTP query program - Ver. 4.2.6p3 +ntpdc - vendor-specific NTP query program - Ver. 4.2.6p4-beta1 USAGE: ntpdc [ - [] | --[@{=| @}] ]... [ host ...] Flg Arg Option-Name Description -4 no ipv4 Force IPv4 DNS name resolution @@ -97,30 +97,23 @@ USAGE: ntpdc [ - [] | --[@{=| @}] ]... [ host ...] - disabled as --no-load-opts - may appear multiple times -Options are specified by doubled hyphens and their name -or by a single hyphen and the flag character. +Options are specified by doubled hyphens and their name or by a single +hyphen and the flag character. The following option preset mechanisms are supported: - reading file $HOME/.ntprc - reading file ./.ntprc - examining environment variables named NTPDC_* -The -[= prog-name =] -utility program is used to query an NTP daemon about its -current state and to request changes in that state. -It uses NTP mode 7 control message formats described in the source code. -The program may +The [= prog-name =] utility program is used to query an NTP daemon about +its current state and to request changes in that state. It uses NTP mode +7 control message formats described in the source code. The program may be run either in interactive mode or controlled using command line -arguments. -Extensive state and statistics information is available -through the -[= prog-name =] -interface. -In addition, nearly all the -configuration options which can be specified at startup using -ntpd's configuration file may also be specified at run time using -[= prog-name =] . +arguments. Extensive state and statistics information is available +through the [= prog-name =] interface. In addition, nearly all the +configuration options which can be specified at startup using ntpd's +configuration file may also be specified at run time using [= prog-name =] +. please send bug reports to: http://bugs.ntp.org, bugs@@ntp.org @end example diff --git a/ntpdc/ntpdc.1 b/ntpdc/ntpdc.1 index 5aa029800..5b890f3f6 100644 --- a/ntpdc/ntpdc.1 +++ b/ntpdc/ntpdc.1 @@ -1,7 +1,7 @@ -.TH NTPDC 1 2011-01-03 "( 4.2.6p3)" "Programmer's Manual" +.TH NTPDC 1 2011-05-16 "( 4.2.6p4-beta1)" "Programmer's Manual" .\" EDIT THIS FILE WITH CAUTION (ntpdc.1) .\" -.\" It has been AutoGen-ed January 3, 2011 at 09:18:22 PM by AutoGen 5.11.6pre7 +.\" It has been AutoGen-ed May 16, 2011 at 04:24:22 AM by AutoGen 5.11.9 .\" From the definitions ntpdc-opts.def .\" and the template file agman1.tpl .\" @@ -153,6 +153,7 @@ Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org .nf .na see html/copyright.html + .fi .ad .PP diff --git a/ntpq/ntpq-opts.c b/ntpq/ntpq-opts.c index f4b962784..080fef3a5 100644 --- a/ntpq/ntpq-opts.c +++ b/ntpq/ntpq-opts.c @@ -1,11 +1,11 @@ /* * EDIT THIS FILE WITH CAUTION (ntpq-opts.c) * - * It has been AutoGen-ed February 22, 2011 at 12:29:01 AM by AutoGen 5.11.6 + * It has been AutoGen-ed May 16, 2011 at 04:24:23 AM by AutoGen 5.11.9 * From the definitions ntpq-opts.def * and the template file options * - * Generated from AutoOpts 34:0:9 templates. + * Generated from AutoOpts 35:0:10 templates. * * AutoOpts is a copyrighted work. This source file is not encumbered * by AutoOpts licensing, but is provided under the licensing terms chosen @@ -20,9 +20,11 @@ * ntpq copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved * * see html/copyright.html + * */ #include + #include #include #include @@ -33,15 +35,15 @@ #ifdef __cplusplus extern "C" { #endif +extern FILE * option_usage_fp; /* TRANSLATORS: choose the translation for option names wisely because you cannot ever change your mind. */ -tSCC zCopyright[] = - "ntpq copyright (c) 1970-2011 David L. Mills and/or others, all rights reserved" -/* extracted from copyright.def near line 8 */ -; -tSCC zCopyrightNotice[24] = -"see html/copyright.html"; +static char const zCopyright[44] = +"ntpq 4.2.6p4-beta1\n\ +see html/copyright.html\n"; +static char const zLicenseDescrip[25] = +"see html/copyright.html\n"; extern tUsageProc optionUsage; @@ -57,12 +59,6 @@ extern tUsageProc optionUsage; #ifndef NULL # define NULL 0 #endif -#ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -#endif -#ifndef EXIT_FAILURE -# define EXIT_FAILURE 1 -#endif /* * Ipv4 option description with @@ -222,8 +218,8 @@ static tOptProc extern tOptProc ntpq_custom_opt_handler, optionBooleanVal, optionNestedVal, optionNumericVal, optionPagedUsage, optionPrintVersion, - optionResetOpt, optionStackArg, optionTimeVal, - optionUnstackArg, optionVersionStderr; + optionResetOpt, optionStackArg, optionTimeDate, + optionTimeVal, optionUnstackArg, optionVersionStderr; static tOptProc doOptSet_Debug_Level, doUsageOpt; @@ -248,7 +244,7 @@ static tOptProc * * Define the Ntpq Option Descriptions. */ -static tOptDesc optDesc[ OPTION_CT ] = { +static tOptDesc optDesc[OPTION_CT] = { { /* entry idx, value */ 0, VALUE_OPT_IPV4, /* equiv idx, value */ 0, VALUE_OPT_IPV4, /* equivalenced to */ NO_EQUIVALENT, @@ -427,8 +423,8 @@ static tOptDesc optDesc[ OPTION_CT ] = { * Define the Ntpq Option Environment */ static char const zPROGNAME[5] = "NTPQ"; -static char const zUsageTitle[119] = -"ntpq - standard NTP query program - Ver. 4.2.6p3\n\ +static char const zUsageTitle[125] = +"ntpq - standard NTP query program - Ver. 4.2.6p4-beta1\n\ USAGE: %s [ - [] | --[{=| }] ]... [ host ...]\n"; static char const zRcName[7] = ".ntprc"; static char const * const apzHomeList[3] = { @@ -446,7 +442,7 @@ about current state and/or changes in that state. The same formats are\n\ used in NTPv4, although some of the variables have changed and new ones\n\ added.\n"; static char const zFullVersion[] = NTPQ_FULL_VERSION; -/* extracted from optcode.tlib near line 504 */ +/* extracted from optcode.tlib near line 515 */ #if defined(ENABLE_NLS) # define OPTPROC_BASE OPTPROC_TRANSLATE @@ -491,7 +487,7 @@ tOptions ntpqOptions = { + OPTPROC_MISUSE ), 0, NULL, /* current option index, current option */ NULL, NULL, zPROGNAME, - zRcName, zCopyright, zCopyrightNotice, + zRcName, zCopyright, zLicenseDescrip, zFullVersion, apzHomeList, zUsageTitle, zExplain, zDetail, optDesc, zBugsAddr, /* address to send bugs to */ @@ -516,12 +512,10 @@ tOptions ntpqOptions = { * Create the static procedure(s) declared above. */ static void -doUsageOpt( - tOptions* pOptions, - tOptDesc* pOptDesc ) +doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc) { (void)pOptions; - USAGE(EXIT_SUCCESS); + USAGE(NTPQ_EXIT_SUCCESS); } #if ! defined(TEST_NTPQ_OPTS) @@ -537,16 +531,16 @@ doOptSet_Debug_Level(tOptions* pOptions, tOptDesc* pOptDesc) DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg ); } #endif /* defined(TEST_NTPQ_OPTS) */ -/* extracted from optmain.tlib near line 107 */ +/* extracted from optmain.tlib near line 128 */ #if defined(TEST_NTPQ_OPTS) /* TEST MAIN PROCEDURE: */ extern void optionPutShell(tOptions*); int -main(int argc, char** argv) +main(int argc, char ** argv) { - int res = EXIT_SUCCESS; + int res = NTPQ_EXIT_SUCCESS; (void)optionProcess(&ntpqOptions, argc, argv); optionPutShell(&ntpqOptions); res = ferror(stdout); @@ -555,7 +549,7 @@ main(int argc, char** argv) return res; } #endif /* defined TEST_NTPQ_OPTS */ -/* extracted from optcode.tlib near line 657 */ +/* extracted from optcode.tlib near line 666 */ #if ENABLE_NLS #include @@ -579,14 +573,13 @@ AO_gettext(char const* pz) pzRes = strdup(pzRes); if (pzRes == NULL) { fputs(_("No memory for duping translated strings\n"), stderr); - exit(EXIT_FAILURE); + exit(NTPQ_EXIT_FAILURE); } return pzRes; } -static void coerce_it(void** s) { *s = AO_gettext(*s); } -#define COERSION(_f) \ - coerce_it((void*)&(ntpqOptions._f)) +static void coerce_it(void** s) { *s = AO_gettext(*s); +} /* * This invokes the translation code (e.g. gettext(3)). @@ -594,6 +587,8 @@ static void coerce_it(void** s) { *s = AO_gettext(*s); } static void translate_option_strings(void) { + tOptions * const pOpt = &ntpqOptions; + /* * Guard against re-translation. It won't work. The strings will have * been changed by the first pass through this code. One shot only. @@ -603,33 +598,33 @@ translate_option_strings(void) * Do the translations. The first pointer follows the field count * field. The field count field is the size of a pointer. */ - tOptDesc* pOD = ntpqOptions.pOptDesc; - char** ppz = (char**)(void*)&(option_usage_text); - int ix = option_usage_text.field_ct; + tOptDesc * pOD = pOpt->pOptDesc; + char ** ppz = (char**)(void*)&(option_usage_text); + int ix = option_usage_text.field_ct; do { ppz++; *ppz = AO_gettext(*ppz); } while (--ix > 0); - COERSION(pzCopyright); - COERSION(pzCopyNotice); - COERSION(pzFullVersion); - COERSION(pzUsageTitle); - COERSION(pzExplain); - COERSION(pzDetail); - COERSION(pzPackager); + coerce_it((void*)&(pOpt->pzCopyright)); + coerce_it((void*)&(pOpt->pzCopyNotice)); + coerce_it((void*)&(pOpt->pzFullVersion)); + coerce_it((void*)&(pOpt->pzUsageTitle)); + coerce_it((void*)&(pOpt->pzExplain)); + coerce_it((void*)&(pOpt->pzDetail)); + coerce_it((void*)&(pOpt->pzPackager)); option_usage_text.field_ct = 0; - for (ix = ntpqOptions.optCt; ix > 0; ix--, pOD++) + for (ix = pOpt->optCt; ix > 0; ix--, pOD++) coerce_it((void*)&(pOD->pzText)); } - if ((ntpqOptions.fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) { - tOptDesc* pOD = ntpqOptions.pOptDesc; - int ix; + if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) { + tOptDesc * pOD = pOpt->pOptDesc; + int ix; - for (ix = ntpqOptions.optCt; ix > 0; ix--, pOD++) { + for (ix = pOpt->optCt; ix > 0; ix--, pOD++) { coerce_it((void*)&(pOD->pz_Name)); coerce_it((void*)&(pOD->pz_DisableName)); coerce_it((void*)&(pOD->pz_DisablePfx)); diff --git a/ntpq/ntpq-opts.h b/ntpq/ntpq-opts.h index eb6c52679..70cc10d61 100644 --- a/ntpq/ntpq-opts.h +++ b/ntpq/ntpq-opts.h @@ -1,11 +1,11 @@ /* * EDIT THIS FILE WITH CAUTION (ntpq-opts.h) * - * It has been AutoGen-ed February 22, 2011 at 12:29:01 AM by AutoGen 5.11.6 + * It has been AutoGen-ed May 16, 2011 at 04:24:22 AM by AutoGen 5.11.9 * From the definitions ntpq-opts.def * and the template file options * - * Generated from AutoOpts 34:0:9 templates. + * Generated from AutoOpts 35:0:10 templates. * * AutoOpts is a copyrighted work. This header file is not encumbered * by AutoOpts licensing, but is provided under the licensing terms chosen @@ -20,6 +20,7 @@ * ntpq copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved * * see html/copyright.html + * */ /* * This file contains the programmatic interface to the Automated @@ -39,7 +40,7 @@ * tolerable version is at least as old as what was current when the header * template was released. */ -#define AO_TEMPLATE_VERSION 139264 +#define AO_TEMPLATE_VERSION 143360 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \ || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION) # error option template version mismatches autoopts/options.h header @@ -67,8 +68,8 @@ typedef enum { } teOptIndex; #define OPTION_CT 14 -#define NTPQ_VERSION "4.2.6p3" -#define NTPQ_FULL_VERSION "ntpq - standard NTP query program - Ver. 4.2.6p3" +#define NTPQ_VERSION "4.2.6p4-beta1" +#define NTPQ_FULL_VERSION "ntpq 4.2.6p4-beta1" /* * Interface defines for all options. Replace "n" with the UPPER_CASED @@ -99,7 +100,6 @@ typedef enum { NTPQ_EXIT_SUCCESS = 0, NTPQ_EXIT_FAILURE = 1 } ntpq_exit_code_t; - /* * Make sure there are no #define name conflicts with the option names */ @@ -184,17 +184,17 @@ typedef enum { ntpqOptions.pzCurOpt = NULL) #define START_OPT RESTART_OPT(1) #define USAGE(c) (*ntpqOptions.pUsageProc)(&ntpqOptions, c) -/* extracted from opthead.tlib near line 435 */ +/* extracted from opthead.tlib near line 451 */ -/* * * * * * - * - * Declare the ntpq option descriptor. - */ #ifdef __cplusplus extern "C" { #endif -extern tOptions ntpqOptions; +/* * * * * * + * + * Declare the ntpq option descriptor. + */ +extern tOptions ntpqOptions; #if defined(ENABLE_NLS) # ifndef _ diff --git a/ntpq/ntpq-opts.texi b/ntpq/ntpq-opts.texi index 65d318f5e..c58e3ce5c 100644 --- a/ntpq/ntpq-opts.texi +++ b/ntpq/ntpq-opts.texi @@ -6,7 +6,7 @@ # # EDIT THIS FILE WITH CAUTION (ntpq-opts.texi) # -# It has been AutoGen-ed January 3, 2011 at 09:18:38 PM by AutoGen 5.11.6pre7 +# It has been AutoGen-ed May 16, 2011 at 04:24:31 AM by AutoGen 5.11.9 # From the definitions ntpq-opts.def # and the template file aginfo.tpl @end ignore @@ -47,7 +47,7 @@ This is the automatically generated usage text for ntpq: @exampleindent 0 @example -ntpq - standard NTP query program - Ver. 4.2.6p3 +ntpq - standard NTP query program - Ver. 4.2.6p4-beta1 USAGE: ntpq [ - [] | --[@{=| @}] ]... [ host ...] Flg Arg Option-Name Description -4 no ipv4 Force IPv4 DNS name resolution @@ -79,22 +79,20 @@ USAGE: ntpq [ - [] | --[@{=| @}] ]... [ host ...] - disabled as --no-load-opts - may appear multiple times -Options are specified by doubled hyphens and their name -or by a single hyphen and the flag character. +Options are specified by doubled hyphens and their name or by a single +hyphen and the flag character. The following option preset mechanisms are supported: - reading file $HOME/.ntprc - reading file ./.ntprc - examining environment variables named NTPQ_* -The -[= prog-name =] -utility program is used to query NTP servers which -implement the standard NTP mode 6 control message formats defined -in Appendix B of the NTPv3 specification RFC1305, requesting -information about current state and/or changes in that state. -The same formats are used in NTPv4, although some of the -variables have changed and new ones added. +The [= prog-name =] utility program is used to query NTP servers which +implement the standard NTP mode 6 control message formats defined in +Appendix B of the NTPv3 specification RFC1305, requesting information +about current state and/or changes in that state. The same formats are +used in NTPv4, although some of the variables have changed and new ones +added. please send bug reports to: http://bugs.ntp.org, bugs@@ntp.org @end example diff --git a/ntpq/ntpq.1 b/ntpq/ntpq.1 index 1dea6e07e..6d8b9bd6e 100644 --- a/ntpq/ntpq.1 +++ b/ntpq/ntpq.1 @@ -1,7 +1,7 @@ -.TH NTPQ 1 2011-01-03 "( 4.2.6p3)" "Programmer's Manual" +.TH NTPQ 1 2011-05-16 "( 4.2.6p4-beta1)" "Programmer's Manual" .\" EDIT THIS FILE WITH CAUTION (ntpq.1) .\" -.\" It has been AutoGen-ed January 3, 2011 at 09:18:38 PM by AutoGen 5.11.6pre7 +.\" It has been AutoGen-ed May 16, 2011 at 04:24:30 AM by AutoGen 5.11.9 .\" From the definitions ntpq-opts.def .\" and the template file agman1.tpl .\" @@ -391,6 +391,7 @@ Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org .nf .na see html/copyright.html + .fi .ad .PP diff --git a/ntpsnmpd/ntpsnmpd-opts.c b/ntpsnmpd/ntpsnmpd-opts.c index 99ac89ade..993bd3c92 100644 --- a/ntpsnmpd/ntpsnmpd-opts.c +++ b/ntpsnmpd/ntpsnmpd-opts.c @@ -1,11 +1,11 @@ /* * EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.c) * - * It has been AutoGen-ed February 22, 2011 at 12:29:02 AM by AutoGen 5.11.6 + * It has been AutoGen-ed May 16, 2011 at 04:24:31 AM by AutoGen 5.11.9 * From the definitions ntpsnmpd-opts.def * and the template file options * - * Generated from AutoOpts 34:0:9 templates. + * Generated from AutoOpts 35:0:10 templates. * * AutoOpts is a copyrighted work. This source file is not encumbered * by AutoOpts licensing, but is provided under the licensing terms chosen @@ -20,9 +20,11 @@ * ntpsnmpd copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved * * see html/copyright.html + * */ #include + #include #include #include @@ -33,27 +35,21 @@ #ifdef __cplusplus extern "C" { #endif +extern FILE * option_usage_fp; /* TRANSLATORS: choose the translation for option names wisely because you cannot ever change your mind. */ -tSCC zCopyright[] = - "ntpsnmpd copyright (c) 1970-2011 David L. Mills and/or others, all rights reserved" -/* extracted from copyright.def near line 8 */ -; -tSCC zCopyrightNotice[24] = -"see html/copyright.html"; +static char const zCopyright[48] = +"ntpsnmpd 4.2.6p4-beta1\n\ +see html/copyright.html\n"; +static char const zLicenseDescrip[25] = +"see html/copyright.html\n"; extern tUsageProc optionUsage; #ifndef NULL # define NULL 0 #endif -#ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -#endif -#ifndef EXIT_FAILURE -# define EXIT_FAILURE 1 -#endif /* * Nofork option description: @@ -132,8 +128,8 @@ static tOptProc extern tOptProc optionBooleanVal, optionNestedVal, optionNumericVal, optionPagedUsage, optionPrintVersion, optionResetOpt, - optionStackArg, optionTimeVal, optionUnstackArg, - optionVersionStderr; + optionStackArg, optionTimeDate, optionTimeVal, + optionUnstackArg, optionVersionStderr; static tOptProc doUsageOpt; #endif /* defined(TEST_NTPSNMPD_OPTS) */ @@ -147,7 +143,7 @@ static tOptProc * * Define the Ntpsnmpd Option Descriptions. */ -static tOptDesc optDesc[ OPTION_CT ] = { +static tOptDesc optDesc[OPTION_CT] = { { /* entry idx, value */ 0, VALUE_OPT_NOFORK, /* equiv idx, value */ 0, VALUE_OPT_NOFORK, /* equivalenced to */ NO_EQUIVALENT, @@ -254,8 +250,8 @@ static tOptDesc optDesc[ OPTION_CT ] = { * Define the Ntpsnmpd Option Environment */ static char const zPROGNAME[9] = "NTPSNMPD"; -static char const zUsageTitle[103] = -"ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.6p3\n\ +static char const zUsageTitle[109] = +"ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.6p4-beta1\n\ USAGE: %s [ - [] | --[{=| }] ]...\n"; static char const zRcName[7] = ".ntprc"; static char const * const apzHomeList[3] = { @@ -267,7 +263,7 @@ static char const zBugsAddr[34] = "http://bugs.ntp.org, bugs@ntp.org"; #define zExplain NULL #define zDetail NULL static char const zFullVersion[] = NTPSNMPD_FULL_VERSION; -/* extracted from optcode.tlib near line 504 */ +/* extracted from optcode.tlib near line 515 */ #if defined(ENABLE_NLS) # define OPTPROC_BASE OPTPROC_TRANSLATE @@ -313,7 +309,7 @@ tOptions ntpsnmpdOptions = { + OPTPROC_MISUSE ), 0, NULL, /* current option index, current option */ NULL, NULL, zPROGNAME, - zRcName, zCopyright, zCopyrightNotice, + zRcName, zCopyright, zLicenseDescrip, zFullVersion, apzHomeList, zUsageTitle, zExplain, zDetail, optDesc, zBugsAddr, /* address to send bugs to */ @@ -338,23 +334,21 @@ tOptions ntpsnmpdOptions = { * Create the static procedure(s) declared above. */ static void -doUsageOpt( - tOptions* pOptions, - tOptDesc* pOptDesc ) +doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc) { (void)pOptions; - USAGE(EXIT_SUCCESS); + USAGE(NTPSNMPD_EXIT_SUCCESS); } -/* extracted from optmain.tlib near line 107 */ +/* extracted from optmain.tlib near line 128 */ #if defined(TEST_NTPSNMPD_OPTS) /* TEST MAIN PROCEDURE: */ extern void optionPutShell(tOptions*); int -main(int argc, char** argv) +main(int argc, char ** argv) { - int res = EXIT_SUCCESS; + int res = NTPSNMPD_EXIT_SUCCESS; (void)optionProcess(&ntpsnmpdOptions, argc, argv); optionPutShell(&ntpsnmpdOptions); res = ferror(stdout); @@ -363,7 +357,7 @@ main(int argc, char** argv) return res; } #endif /* defined TEST_NTPSNMPD_OPTS */ -/* extracted from optcode.tlib near line 657 */ +/* extracted from optcode.tlib near line 666 */ #if ENABLE_NLS #include @@ -387,14 +381,13 @@ AO_gettext(char const* pz) pzRes = strdup(pzRes); if (pzRes == NULL) { fputs(_("No memory for duping translated strings\n"), stderr); - exit(EXIT_FAILURE); + exit(NTPSNMPD_EXIT_FAILURE); } return pzRes; } -static void coerce_it(void** s) { *s = AO_gettext(*s); } -#define COERSION(_f) \ - coerce_it((void*)&(ntpsnmpdOptions._f)) +static void coerce_it(void** s) { *s = AO_gettext(*s); +} /* * This invokes the translation code (e.g. gettext(3)). @@ -402,6 +395,8 @@ static void coerce_it(void** s) { *s = AO_gettext(*s); } static void translate_option_strings(void) { + tOptions * const pOpt = &ntpsnmpdOptions; + /* * Guard against re-translation. It won't work. The strings will have * been changed by the first pass through this code. One shot only. @@ -411,33 +406,33 @@ translate_option_strings(void) * Do the translations. The first pointer follows the field count * field. The field count field is the size of a pointer. */ - tOptDesc* pOD = ntpsnmpdOptions.pOptDesc; - char** ppz = (char**)(void*)&(option_usage_text); - int ix = option_usage_text.field_ct; + tOptDesc * pOD = pOpt->pOptDesc; + char ** ppz = (char**)(void*)&(option_usage_text); + int ix = option_usage_text.field_ct; do { ppz++; *ppz = AO_gettext(*ppz); } while (--ix > 0); - COERSION(pzCopyright); - COERSION(pzCopyNotice); - COERSION(pzFullVersion); - COERSION(pzUsageTitle); - COERSION(pzExplain); - COERSION(pzDetail); - COERSION(pzPackager); + coerce_it((void*)&(pOpt->pzCopyright)); + coerce_it((void*)&(pOpt->pzCopyNotice)); + coerce_it((void*)&(pOpt->pzFullVersion)); + coerce_it((void*)&(pOpt->pzUsageTitle)); + coerce_it((void*)&(pOpt->pzExplain)); + coerce_it((void*)&(pOpt->pzDetail)); + coerce_it((void*)&(pOpt->pzPackager)); option_usage_text.field_ct = 0; - for (ix = ntpsnmpdOptions.optCt; ix > 0; ix--, pOD++) + for (ix = pOpt->optCt; ix > 0; ix--, pOD++) coerce_it((void*)&(pOD->pzText)); } - if ((ntpsnmpdOptions.fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) { - tOptDesc* pOD = ntpsnmpdOptions.pOptDesc; - int ix; + if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) { + tOptDesc * pOD = pOpt->pOptDesc; + int ix; - for (ix = ntpsnmpdOptions.optCt; ix > 0; ix--, pOD++) { + for (ix = pOpt->optCt; ix > 0; ix--, pOD++) { coerce_it((void*)&(pOD->pz_Name)); coerce_it((void*)&(pOD->pz_DisableName)); coerce_it((void*)&(pOD->pz_DisablePfx)); diff --git a/ntpsnmpd/ntpsnmpd-opts.h b/ntpsnmpd/ntpsnmpd-opts.h index 8b66bac2d..ed226201a 100644 --- a/ntpsnmpd/ntpsnmpd-opts.h +++ b/ntpsnmpd/ntpsnmpd-opts.h @@ -1,11 +1,11 @@ /* * EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.h) * - * It has been AutoGen-ed February 22, 2011 at 12:29:02 AM by AutoGen 5.11.6 + * It has been AutoGen-ed May 16, 2011 at 04:24:31 AM by AutoGen 5.11.9 * From the definitions ntpsnmpd-opts.def * and the template file options * - * Generated from AutoOpts 34:0:9 templates. + * Generated from AutoOpts 35:0:10 templates. * * AutoOpts is a copyrighted work. This header file is not encumbered * by AutoOpts licensing, but is provided under the licensing terms chosen @@ -20,6 +20,7 @@ * ntpsnmpd copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved * * see html/copyright.html + * */ /* * This file contains the programmatic interface to the Automated @@ -39,7 +40,7 @@ * tolerable version is at least as old as what was current when the header * template was released. */ -#define AO_TEMPLATE_VERSION 139264 +#define AO_TEMPLATE_VERSION 143360 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \ || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION) # error option template version mismatches autoopts/options.h header @@ -61,8 +62,8 @@ typedef enum { } teOptIndex; #define OPTION_CT 8 -#define NTPSNMPD_VERSION "4.2.6p3" -#define NTPSNMPD_FULL_VERSION "ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.6p3" +#define NTPSNMPD_VERSION "4.2.6p4-beta1" +#define NTPSNMPD_FULL_VERSION "ntpsnmpd 4.2.6p4-beta1" /* * Interface defines for all options. Replace "n" with the UPPER_CASED @@ -93,7 +94,6 @@ typedef enum { NTPSNMPD_EXIT_SUCCESS = 0, NTPSNMPD_EXIT_FAILURE = 1 } ntpsnmpd_exit_code_t; - /* * Make sure there are no #define name conflicts with the option names */ @@ -142,17 +142,17 @@ typedef enum { ntpsnmpdOptions.pzCurOpt = NULL) #define START_OPT RESTART_OPT(1) #define USAGE(c) (*ntpsnmpdOptions.pUsageProc)(&ntpsnmpdOptions, c) -/* extracted from opthead.tlib near line 435 */ +/* extracted from opthead.tlib near line 451 */ -/* * * * * * - * - * Declare the ntpsnmpd option descriptor. - */ #ifdef __cplusplus extern "C" { #endif -extern tOptions ntpsnmpdOptions; +/* * * * * * + * + * Declare the ntpsnmpd option descriptor. + */ +extern tOptions ntpsnmpdOptions; #if defined(ENABLE_NLS) # ifndef _ diff --git a/ntpsnmpd/ntpsnmpd-opts.texi b/ntpsnmpd/ntpsnmpd-opts.texi index 55acec8d8..86a91cc04 100644 --- a/ntpsnmpd/ntpsnmpd-opts.texi +++ b/ntpsnmpd/ntpsnmpd-opts.texi @@ -6,7 +6,7 @@ # # EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.texi) # -# It has been AutoGen-ed January 3, 2011 at 09:18:49 PM by AutoGen 5.11.6pre7 +# It has been AutoGen-ed May 16, 2011 at 04:24:36 AM by AutoGen 5.11.9 # From the definitions ntpsnmpd-opts.def # and the template file aginfo.tpl @end ignore @@ -34,7 +34,7 @@ This is the automatically generated usage text for ntpsnmpd: @exampleindent 0 @example -ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.6p3 +ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.6p4-beta1 USAGE: ntpsnmpd [ - [] | --[@{=| @}] ]... Flg Arg Option-Name Description -n no nofork Do not fork @@ -48,8 +48,8 @@ USAGE: ntpsnmpd [ - [] | --[@{=| @}] ]... - disabled as --no-load-opts - may appear multiple times -Options are specified by doubled hyphens and their name -or by a single hyphen and the flag character. +Options are specified by doubled hyphens and their name or by a single +hyphen and the flag character. The following option preset mechanisms are supported: - reading file $HOME/.ntprc diff --git a/ntpsnmpd/ntpsnmpd.1 b/ntpsnmpd/ntpsnmpd.1 index e2b467a01..d3f9f8632 100644 --- a/ntpsnmpd/ntpsnmpd.1 +++ b/ntpsnmpd/ntpsnmpd.1 @@ -1,7 +1,7 @@ -.TH NTPSNMPD 1 2011-01-03 "( 4.2.6p3)" "Programmer's Manual" +.TH NTPSNMPD 1 2011-05-16 "( 4.2.6p4-beta1)" "Programmer's Manual" .\" EDIT THIS FILE WITH CAUTION (ntpsnmpd.1) .\" -.\" It has been AutoGen-ed January 3, 2011 at 09:18:48 PM by AutoGen 5.11.6pre7 +.\" It has been AutoGen-ed May 16, 2011 at 04:24:35 AM by AutoGen 5.11.9 .\" From the definitions ntpsnmpd-opts.def .\" and the template file agman1.tpl .\" @@ -79,6 +79,7 @@ Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org .nf .na see html/copyright.html + .fi .ad .PP diff --git a/packageinfo.sh b/packageinfo.sh index 7b0fa74d3..c9d6fff96 100644 --- a/packageinfo.sh +++ b/packageinfo.sh @@ -60,7 +60,7 @@ version=${proto}.${major}.${minor} special= # prerelease can be empty, 'beta', or 'rc'. -prerelease= +prerelease=beta # ChangeLog starting tag (see also CommitLog-4.1.0) CLTAG=NTP_4_2_0 @@ -70,14 +70,14 @@ CLTAG=NTP_4_2_0 # - Numeric values increment # - empty 'increments' to 1 # - NEW 'increments' to empty -point=3 +point=4 ### betapoint is normally modified by script. # ntp-stable Beta number (betapoint) # Should be zeroed at release, and left at zero until first beta. # The first beta is -beta1. # betapoint is always zero in ntp-dev. -betapoint=0 +betapoint=1 ### rcpoint is normally modified by script except for GO. # RC number (rcpoint) diff --git a/sntp/sntp-opts.c b/sntp/sntp-opts.c index f916525d9..0f40a1fb9 100644 --- a/sntp/sntp-opts.c +++ b/sntp/sntp-opts.c @@ -1,11 +1,11 @@ /* * EDIT THIS FILE WITH CAUTION (sntp-opts.c) * - * It has been AutoGen-ed February 22, 2011 at 12:29:02 AM by AutoGen 5.11.6 + * It has been AutoGen-ed May 16, 2011 at 04:23:15 AM by AutoGen 5.11.9 * From the definitions sntp-opts.def * and the template file options * - * Generated from AutoOpts 34:0:9 templates. + * Generated from AutoOpts 35:0:10 templates. * * AutoOpts is a copyrighted work. This source file is not encumbered * by AutoOpts licensing, but is provided under the licensing terms chosen @@ -20,9 +20,11 @@ * sntp copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved * * see html/copyright.html + * */ #include + #include #include #include @@ -33,27 +35,21 @@ #ifdef __cplusplus extern "C" { #endif +extern FILE * option_usage_fp; /* TRANSLATORS: choose the translation for option names wisely because you cannot ever change your mind. */ -tSCC zCopyright[] = - "sntp copyright (c) 1970-2011 David L. Mills and/or others, all rights reserved" -/* extracted from copyright.def near line 8 */ -; -tSCC zCopyrightNotice[24] = -"see html/copyright.html"; +static char const zCopyright[44] = +"sntp 4.2.6p4-beta1\n\ +see html/copyright.html\n"; +static char const zLicenseDescrip[25] = +"see html/copyright.html\n"; extern tUsageProc optionUsage; #ifndef NULL # define NULL 0 #endif -#ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -#endif -#ifndef EXIT_FAILURE -# define EXIT_FAILURE 1 -#endif /* * Ipv4 option description with @@ -242,8 +238,8 @@ static tOptProc extern tOptProc optionBooleanVal, optionNestedVal, optionNumericVal, optionPagedUsage, optionPrintVersion, optionResetOpt, - optionStackArg, optionTimeVal, optionUnstackArg, - optionVersionStderr; + optionStackArg, optionTimeDate, optionTimeVal, + optionUnstackArg, optionVersionStderr; static tOptProc doUsageOpt; #endif /* defined(TEST_SNTP_OPTS) */ @@ -257,7 +253,7 @@ static tOptProc * * Define the Sntp Option Descriptions. */ -static tOptDesc optDesc[ OPTION_CT ] = { +static tOptDesc optDesc[OPTION_CT] = { { /* entry idx, value */ 0, VALUE_OPT_IPV4, /* equiv idx, value */ 0, VALUE_OPT_IPV4, /* equivalenced to */ NO_EQUIVALENT, @@ -472,8 +468,8 @@ static tOptDesc optDesc[ OPTION_CT ] = { * Define the Sntp Option Environment */ static char const zPROGNAME[5] = "SNTP"; -static char const zUsageTitle[121] = -"sntp - standard SNTP program - Ver. 4.2.6p3\n\ +static char const zUsageTitle[127] = +"sntp - standard SNTP program - Ver. 4.2.6p4-beta1\n\ USAGE: %s [ - [] | --[{=| }] ]... hostname-or-IP ...\n"; static char const zRcName[7] = ".ntprc"; static char const * const apzHomeList[3] = { @@ -491,7 +487,7 @@ It can be run interactively from the command line or as a cron job.\n\n\ NTP and SNTP are defined by RFC 5905, which obsoletes RFC 4330 and RFC\n\ 1305.\n"; static char const zFullVersion[] = SNTP_FULL_VERSION; -/* extracted from optcode.tlib near line 504 */ +/* extracted from optcode.tlib near line 515 */ #if defined(ENABLE_NLS) # define OPTPROC_BASE OPTPROC_TRANSLATE @@ -537,7 +533,7 @@ tOptions sntpOptions = { + OPTPROC_MISUSE ), 0, NULL, /* current option index, current option */ NULL, NULL, zPROGNAME, - zRcName, zCopyright, zCopyrightNotice, + zRcName, zCopyright, zLicenseDescrip, zFullVersion, apzHomeList, zUsageTitle, zExplain, zDetail, optDesc, zBugsAddr, /* address to send bugs to */ @@ -562,23 +558,21 @@ tOptions sntpOptions = { * Create the static procedure(s) declared above. */ static void -doUsageOpt( - tOptions* pOptions, - tOptDesc* pOptDesc ) +doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc) { (void)pOptions; - USAGE(EXIT_SUCCESS); + USAGE(SNTP_EXIT_SUCCESS); } -/* extracted from optmain.tlib near line 107 */ +/* extracted from optmain.tlib near line 128 */ #if defined(TEST_SNTP_OPTS) /* TEST MAIN PROCEDURE: */ extern void optionPutShell(tOptions*); int -main(int argc, char** argv) +main(int argc, char ** argv) { - int res = EXIT_SUCCESS; + int res = SNTP_EXIT_SUCCESS; (void)optionProcess(&sntpOptions, argc, argv); optionPutShell(&sntpOptions); res = ferror(stdout); @@ -587,7 +581,7 @@ main(int argc, char** argv) return res; } #endif /* defined TEST_SNTP_OPTS */ -/* extracted from optcode.tlib near line 657 */ +/* extracted from optcode.tlib near line 666 */ #if ENABLE_NLS #include @@ -611,14 +605,13 @@ AO_gettext(char const* pz) pzRes = strdup(pzRes); if (pzRes == NULL) { fputs(_("No memory for duping translated strings\n"), stderr); - exit(EXIT_FAILURE); + exit(SNTP_EXIT_FAILURE); } return pzRes; } -static void coerce_it(void** s) { *s = AO_gettext(*s); } -#define COERSION(_f) \ - coerce_it((void*)&(sntpOptions._f)) +static void coerce_it(void** s) { *s = AO_gettext(*s); +} /* * This invokes the translation code (e.g. gettext(3)). @@ -626,6 +619,8 @@ static void coerce_it(void** s) { *s = AO_gettext(*s); } static void translate_option_strings(void) { + tOptions * const pOpt = &sntpOptions; + /* * Guard against re-translation. It won't work. The strings will have * been changed by the first pass through this code. One shot only. @@ -635,33 +630,33 @@ translate_option_strings(void) * Do the translations. The first pointer follows the field count * field. The field count field is the size of a pointer. */ - tOptDesc* pOD = sntpOptions.pOptDesc; - char** ppz = (char**)(void*)&(option_usage_text); - int ix = option_usage_text.field_ct; + tOptDesc * pOD = pOpt->pOptDesc; + char ** ppz = (char**)(void*)&(option_usage_text); + int ix = option_usage_text.field_ct; do { ppz++; *ppz = AO_gettext(*ppz); } while (--ix > 0); - COERSION(pzCopyright); - COERSION(pzCopyNotice); - COERSION(pzFullVersion); - COERSION(pzUsageTitle); - COERSION(pzExplain); - COERSION(pzDetail); - COERSION(pzPackager); + coerce_it((void*)&(pOpt->pzCopyright)); + coerce_it((void*)&(pOpt->pzCopyNotice)); + coerce_it((void*)&(pOpt->pzFullVersion)); + coerce_it((void*)&(pOpt->pzUsageTitle)); + coerce_it((void*)&(pOpt->pzExplain)); + coerce_it((void*)&(pOpt->pzDetail)); + coerce_it((void*)&(pOpt->pzPackager)); option_usage_text.field_ct = 0; - for (ix = sntpOptions.optCt; ix > 0; ix--, pOD++) + for (ix = pOpt->optCt; ix > 0; ix--, pOD++) coerce_it((void*)&(pOD->pzText)); } - if ((sntpOptions.fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) { - tOptDesc* pOD = sntpOptions.pOptDesc; - int ix; + if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) { + tOptDesc * pOD = pOpt->pOptDesc; + int ix; - for (ix = sntpOptions.optCt; ix > 0; ix--, pOD++) { + for (ix = pOpt->optCt; ix > 0; ix--, pOD++) { coerce_it((void*)&(pOD->pz_Name)); coerce_it((void*)&(pOD->pz_DisableName)); coerce_it((void*)&(pOD->pz_DisablePfx)); diff --git a/sntp/sntp-opts.h b/sntp/sntp-opts.h index f7cd84262..bd12e641b 100644 --- a/sntp/sntp-opts.h +++ b/sntp/sntp-opts.h @@ -1,11 +1,11 @@ /* * EDIT THIS FILE WITH CAUTION (sntp-opts.h) * - * It has been AutoGen-ed February 22, 2011 at 12:29:02 AM by AutoGen 5.11.6 + * It has been AutoGen-ed May 16, 2011 at 04:23:15 AM by AutoGen 5.11.9 * From the definitions sntp-opts.def * and the template file options * - * Generated from AutoOpts 34:0:9 templates. + * Generated from AutoOpts 35:0:10 templates. * * AutoOpts is a copyrighted work. This header file is not encumbered * by AutoOpts licensing, but is provided under the licensing terms chosen @@ -20,6 +20,7 @@ * sntp copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved * * see html/copyright.html + * */ /* * This file contains the programmatic interface to the Automated @@ -39,7 +40,7 @@ * tolerable version is at least as old as what was current when the header * template was released. */ -#define AO_TEMPLATE_VERSION 139264 +#define AO_TEMPLATE_VERSION 143360 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \ || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION) # error option template version mismatches autoopts/options.h header @@ -70,8 +71,8 @@ typedef enum { } teOptIndex; #define OPTION_CT 17 -#define SNTP_VERSION "4.2.6p3" -#define SNTP_FULL_VERSION "sntp - standard SNTP program - Ver. 4.2.6p3" +#define SNTP_VERSION "4.2.6p4-beta1" +#define SNTP_FULL_VERSION "sntp 4.2.6p4-beta1" /* * Interface defines for all options. Replace "n" with the UPPER_CASED @@ -102,7 +103,6 @@ typedef enum { SNTP_EXIT_SUCCESS = 0, SNTP_EXIT_FAILURE = 1 } sntp_exit_code_t; - /* * Make sure there are no #define name conflicts with the option names */ @@ -209,17 +209,17 @@ typedef enum { sntpOptions.pzCurOpt = NULL) #define START_OPT RESTART_OPT(1) #define USAGE(c) (*sntpOptions.pUsageProc)(&sntpOptions, c) -/* extracted from opthead.tlib near line 435 */ +/* extracted from opthead.tlib near line 451 */ -/* * * * * * - * - * Declare the sntp option descriptor. - */ #ifdef __cplusplus extern "C" { #endif -extern tOptions sntpOptions; +/* * * * * * + * + * Declare the sntp option descriptor. + */ +extern tOptions sntpOptions; #if defined(ENABLE_NLS) # ifndef _ diff --git a/sntp/sntp-opts.texi b/sntp/sntp-opts.texi index 0d0252c4c..e3981e37d 100644 --- a/sntp/sntp-opts.texi +++ b/sntp/sntp-opts.texi @@ -6,7 +6,7 @@ # # EDIT THIS FILE WITH CAUTION (sntp-opts.texi) # -# It has been AutoGen-ed January 3, 2011 at 09:15:34 PM by AutoGen 5.11.6pre7 +# It has been AutoGen-ed May 16, 2011 at 04:23:33 AM by AutoGen 5.11.9 # From the definitions sntp-opts.def # and the template file aginfo.tpl @end ignore @@ -69,7 +69,7 @@ This is the automatically generated usage text for sntp: @exampleindent 0 @example -sntp - standard SNTP program - Ver. 4.2.6p3 +sntp - standard SNTP program - Ver. 4.2.6p4-beta1 USAGE: sntp [ - [] | --[@{=| @}] ]... hostname-or-IP ... Flg Arg Option-Name Description -4 no ipv4 Force IPv4 DNS name resolution @@ -104,8 +104,8 @@ USAGE: sntp [ - [] | --[@{=| @}] ]... hostname-or-IP ... - disabled as --no-load-opts - may appear multiple times -Options are specified by doubled hyphens and their name -or by a single hyphen and the flag character. +Options are specified by doubled hyphens and their name or by a single +hyphen and the flag character. @@ -114,9 +114,9 @@ The following option preset mechanisms are supported: - reading file ./.ntprc - examining environment variables named SNTP_* -sntp implements the Simple Network Time Protocol, and is used to query -an NTP or SNTP server and either display the time or set the local -system's time (given suitable privilege). +sntp implements the Simple Network Time Protocol, and is used to query an +NTP or SNTP server and either display the time or set the local system's +time (given suitable privilege). It can be run interactively from the command line or as a cron job. diff --git a/sntp/sntp.1 b/sntp/sntp.1 index d64953ae9..b89e8c399 100644 --- a/sntp/sntp.1 +++ b/sntp/sntp.1 @@ -1,7 +1,7 @@ -.TH SNTP 1 2011-01-03 "( 4.2.6p3)" "Programmer's Manual" +.TH SNTP 1 2011-05-16 "( 4.2.6p4-beta1)" "Programmer's Manual" .\" EDIT THIS FILE WITH CAUTION (sntp.1) .\" -.\" It has been AutoGen-ed January 3, 2011 at 09:07:46 PM by AutoGen 5.11.6pre7 +.\" It has been AutoGen-ed May 16, 2011 at 04:23:31 AM by AutoGen 5.11.9 .\" From the definitions sntp-opts.def .\" and the template file agman1.tpl .\" @@ -211,6 +211,7 @@ Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org .nf .na see html/copyright.html + .fi .ad .PP diff --git a/sntp/sntp.html b/sntp/sntp.html index 6216dad26..2ba7a2df9 100644 --- a/sntp/sntp.html +++ b/sntp/sntp.html @@ -36,7 +36,7 @@ display the time offset of the system clock relative to the server clock. Run as root, it can correct the system clock to this offset as well. It can be run as an interactive command or from a cron job. -

This document applies to version 4.2.6p3 of sntp. +

This document applies to version 4.2.6p4-beta1 of sntp.

The program implements the SNTP protocol as defined by RFC 5905, the NTPv4 IETF specification. @@ -139,7 +139,7 @@ Up: sntp Invocation

This is the automatically generated usage text for sntp: -

sntp - standard SNTP program - Ver. 4.2.6p3
+
sntp - standard SNTP program - Ver. 4.2.6p4-beta1
 USAGE:  sntp [ -<flag> [<val>] | --<name>[{=| }<val>] ]... hostname-or-IP ...
   Flg Arg Option-Name    Description
    -4 no  ipv4           Force IPv4 DNS name resolution
@@ -174,8 +174,8 @@ USAGE:  sntp [ -<flag> [<val>] | --<name>[{=| }<val>] ].
                                 - disabled as --no-load-opts
                                 - may appear multiple times
 
-Options are specified by doubled hyphens and their name
-or by a single hyphen and the flag character.
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
 
 
 
@@ -184,9 +184,9 @@ The following option preset mechanisms are supported:
  - reading file ./.ntprc
  - examining environment variables named SNTP_*
 
-sntp implements the Simple Network Time Protocol, and is used to query
-an NTP or SNTP server and either display the time or set the local
-system's time (given suitable privilege).
+sntp implements the Simple Network Time Protocol, and is used to query an
+NTP or SNTP server and either display the time or set the local system's
+time (given suitable privilege).
 
 It can be run interactively from the command line or as a cron job.
 
diff --git a/util/ntp-keygen-opts.c b/util/ntp-keygen-opts.c
index f4a981bbf..89dfb9fa6 100644
--- a/util/ntp-keygen-opts.c
+++ b/util/ntp-keygen-opts.c
@@ -1,11 +1,11 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntp-keygen-opts.c)
  *  
- *  It has been AutoGen-ed  February 22, 2011 at 12:29:04 AM by AutoGen 5.11.6
+ *  It has been AutoGen-ed  May 16, 2011 at 04:24:37 AM by AutoGen 5.11.9
  *  From the definitions    ntp-keygen-opts.def
  *  and the template file   options
  *
- * Generated from AutoOpts 34:0:9 templates.
+ * Generated from AutoOpts 35:0:10 templates.
  *
  *  AutoOpts is a copyrighted work.  This source file is not encumbered
  *  by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -20,29 +20,30 @@
  * ntp-keygen copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved
  *
  * see html/copyright.html
+ * 
  */
 
 #include 
+
 #include 
 #include 
 #include 
 #include 
-extern FILE * option_usage_fp;
 #define OPTION_CODE_COMPILE 1
 #include "ntp-keygen-opts.h"
 
 #ifdef  __cplusplus
 extern "C" {
 #endif
+extern FILE * option_usage_fp;
 
 /* TRANSLATORS: choose the translation for option names wisely because you
                 cannot ever change your mind. */
-tSCC zCopyright[] =
-       "ntp-keygen copyright (c) 1970-2011 David L. Mills and/or others, all rights reserved"
-/* extracted from copyright.def near line 8 */
-;
-tSCC zCopyrightNotice[24] =
-"see html/copyright.html";
+static char const zCopyright[56] =
+"ntp-keygen (ntp) 4.2.6p4-beta1\n\
+see html/copyright.html\n";
+static char const zLicenseDescrip[25] =
+"see html/copyright.html\n";
 
 extern tUsageProc optionUsage;
 
@@ -59,12 +60,6 @@ extern tUsageProc optionUsage;
 #ifndef NULL
 #  define NULL 0
 #endif
-#ifndef EXIT_SUCCESS
-#  define  EXIT_SUCCESS 0
-#endif
-#ifndef EXIT_FAILURE
-#  define  EXIT_FAILURE 1
-#endif
 
 /*
  *  Certificate option description:
@@ -402,7 +397,7 @@ static char const zNotLoad_Opts_Pfx[]  = "no";
  *  if multiple copies are allowed.
  */
 static tOptProc
-    doOptModulus, doUsageOpt;
+    doUsageOpt;
 
 /*
  *  #define map the "normal" callout procs to the test ones...
@@ -417,8 +412,8 @@ static tOptProc
 extern tOptProc
     optionBooleanVal,    optionNestedVal,     optionNumericVal,
     optionPagedUsage,    optionPrintVersion,  optionResetOpt,
-    optionStackArg,      optionTimeVal,       optionUnstackArg,
-    optionVersionStderr;
+    optionStackArg,      optionTimeDate,      optionTimeVal,
+    optionUnstackArg,    optionVersionStderr;
 static tOptProc
     doOptSet_Debug_Level, doUsageOpt;
 
@@ -439,7 +434,7 @@ static tOptProc
  *
  *  Define the Ntp_Keygen Option Descriptions.
  */
-static tOptDesc optDesc[ OPTION_CT ] = {
+static tOptDesc optDesc[OPTION_CT] = {
   {  /* entry idx, value */ 0, VALUE_OPT_CERTIFICATE,
      /* equiv idx, value */ 0, VALUE_OPT_CERTIFICATE,
      /* equivalenced to  */ NO_EQUIVALENT,
@@ -726,8 +721,8 @@ static tOptDesc optDesc[ OPTION_CT ] = {
  *  Define the Ntp_Keygen Option Environment
  */
 static char const zPROGNAME[11] = "NTP_KEYGEN";
-static char const zUsageTitle[114] =
-"ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.6p3\n\
+static char const zUsageTitle[120] =
+"ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.6p4-beta1\n\
 USAGE:  %s [ - [] | --[{=| }] ]...\n";
 static char const zRcName[7] = ".ntprc";
 static char const * const apzHomeList[3] = {
@@ -741,7 +736,7 @@ static char const zDetail[99] = "\n\
 If there is no new host key, look for an existing one.  If one is not\n\
 found, create it.\n";
 static char const zFullVersion[] = NTP_KEYGEN_FULL_VERSION;
-/* extracted from optcode.tlib near line 504 */
+/* extracted from optcode.tlib near line 515 */
 
 #if defined(ENABLE_NLS)
 # define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -787,7 +782,7 @@ tOptions ntp_keygenOptions = {
     + OPTPROC_MISUSE ),
     0, NULL,                    /* current option index, current option */
     NULL,         NULL,         zPROGNAME,
-    zRcName,      zCopyright,   zCopyrightNotice,
+    zRcName,      zCopyright,   zLicenseDescrip,
     zFullVersion, apzHomeList,  zUsageTitle,
     zExplain,     zDetail,      optDesc,
     zBugsAddr,                  /* address to send bugs to */
@@ -812,12 +807,10 @@ tOptions ntp_keygenOptions = {
  *  Create the static procedure(s) declared above.
  */
 static void
-doUsageOpt(
-    tOptions*   pOptions,
-    tOptDesc*   pOptDesc )
+doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
 {
     (void)pOptions;
-    USAGE(EXIT_SUCCESS);
+    USAGE(NTP_KEYGEN_EXIT_SUCCESS);
 }
 
 #if ! defined(TEST_NTP_KEYGEN_OPTS)
@@ -844,57 +837,40 @@ doOptModulus(tOptions* pOptions, tOptDesc* pOptDesc)
 {
     static const struct {long const rmin, rmax;} rng[1] = {
         { 256, 2048 } };
-    long val;
     int  ix;
-    char * pzEnd;
 
     if (pOptions <= OPTPROC_EMIT_LIMIT)
         goto emit_ranges;
+    optionNumericVal(pOptions, pOptDesc);
 
-    errno = 0;
-    val = strtol(pOptDesc->optArg.argString, &pzEnd, 0);
-    if ((pOptDesc->optArg.argString == pzEnd) || (errno != 0))
-        goto bad_value;
-
-    if (*pzEnd != '\0')
-        goto bad_value;
     for (ix = 0; ix < 1; ix++) {
-        if (val < rng[ix].rmin)
+        if (pOptDesc->optArg.argInt < rng[ix].rmin)
             continue;  /* ranges need not be ordered. */
-        if (val == rng[ix].rmin)
-            goto valid_return;
+        if (pOptDesc->optArg.argInt == rng[ix].rmin)
+            return;
         if (rng[ix].rmax == LONG_MIN)
             continue;
-        if (val <= rng[ix].rmax)
-            goto valid_return;
+        if (pOptDesc->optArg.argInt <= rng[ix].rmax)
+            return;
     }
 
-  bad_value:
-
     option_usage_fp = stderr;
 
-  emit_ranges:
-    optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
-    return;
+emit_ranges:
 
-  valid_return:
-    if ((pOptDesc->fOptState & OPTST_ALLOC_ARG) != 0) {
-        free((void *)pOptDesc->optArg.argString);
-        pOptDesc->fOptState &= ~OPTST_ALLOC_ARG;
-    }
-    pOptDesc->optArg.argInt = val;
+    optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
 }
 #endif /* defined OPENSSL */
-/* extracted from optmain.tlib near line 107 */
+/* extracted from optmain.tlib near line 128 */
 
 #if defined(TEST_NTP_KEYGEN_OPTS) /* TEST MAIN PROCEDURE: */
 
 extern void optionPutShell(tOptions*);
 
 int
-main(int argc, char** argv)
+main(int argc, char ** argv)
 {
-    int res = EXIT_SUCCESS;
+    int res = NTP_KEYGEN_EXIT_SUCCESS;
     (void)optionProcess(&ntp_keygenOptions, argc, argv);
     optionPutShell(&ntp_keygenOptions);
     res = ferror(stdout);
@@ -903,7 +879,7 @@ main(int argc, char** argv)
     return res;
 }
 #endif  /* defined TEST_NTP_KEYGEN_OPTS */
-/* extracted from optcode.tlib near line 657 */
+/* extracted from optcode.tlib near line 666 */
 
 #if ENABLE_NLS
 #include 
@@ -927,14 +903,13 @@ AO_gettext(char const* pz)
     pzRes = strdup(pzRes);
     if (pzRes == NULL) {
         fputs(_("No memory for duping translated strings\n"), stderr);
-        exit(EXIT_FAILURE);
+        exit(NTP_KEYGEN_EXIT_FAILURE);
     }
     return pzRes;
 }
 
-static void coerce_it(void** s) { *s = AO_gettext(*s); }
-#define COERSION(_f) \
-  coerce_it((void*)&(ntp_keygenOptions._f))
+static void coerce_it(void** s) { *s = AO_gettext(*s);
+}
 
 /*
  *  This invokes the translation code (e.g. gettext(3)).
@@ -942,6 +917,8 @@ static void coerce_it(void** s) { *s = AO_gettext(*s); }
 static void
 translate_option_strings(void)
 {
+    tOptions * const pOpt = &ntp_keygenOptions;
+
     /*
      *  Guard against re-translation.  It won't work.  The strings will have
      *  been changed by the first pass through this code.  One shot only.
@@ -951,33 +928,33 @@ translate_option_strings(void)
          *  Do the translations.  The first pointer follows the field count
          *  field.  The field count field is the size of a pointer.
          */
-        tOptDesc* pOD = ntp_keygenOptions.pOptDesc;
-        char**    ppz = (char**)(void*)&(option_usage_text);
-        int       ix  = option_usage_text.field_ct;
+        tOptDesc * pOD = pOpt->pOptDesc;
+        char **    ppz = (char**)(void*)&(option_usage_text);
+        int        ix  = option_usage_text.field_ct;
 
         do {
             ppz++;
             *ppz = AO_gettext(*ppz);
         } while (--ix > 0);
 
-        COERSION(pzCopyright);
-        COERSION(pzCopyNotice);
-        COERSION(pzFullVersion);
-        COERSION(pzUsageTitle);
-        COERSION(pzExplain);
-        COERSION(pzDetail);
-        COERSION(pzPackager);
+        coerce_it((void*)&(pOpt->pzCopyright));
+        coerce_it((void*)&(pOpt->pzCopyNotice));
+        coerce_it((void*)&(pOpt->pzFullVersion));
+        coerce_it((void*)&(pOpt->pzUsageTitle));
+        coerce_it((void*)&(pOpt->pzExplain));
+        coerce_it((void*)&(pOpt->pzDetail));
+        coerce_it((void*)&(pOpt->pzPackager));
         option_usage_text.field_ct = 0;
 
-        for (ix = ntp_keygenOptions.optCt; ix > 0; ix--, pOD++)
+        for (ix = pOpt->optCt; ix > 0; ix--, pOD++)
             coerce_it((void*)&(pOD->pzText));
     }
 
-    if ((ntp_keygenOptions.fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
-        tOptDesc* pOD = ntp_keygenOptions.pOptDesc;
-        int       ix;
+    if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
+        tOptDesc * pOD = pOpt->pOptDesc;
+        int        ix;
 
-        for (ix = ntp_keygenOptions.optCt; ix > 0; ix--, pOD++) {
+        for (ix = pOpt->optCt; ix > 0; ix--, pOD++) {
             coerce_it((void*)&(pOD->pz_Name));
             coerce_it((void*)&(pOD->pz_DisableName));
             coerce_it((void*)&(pOD->pz_DisablePfx));
diff --git a/util/ntp-keygen-opts.h b/util/ntp-keygen-opts.h
index 5a17d3c1a..f3944ad04 100644
--- a/util/ntp-keygen-opts.h
+++ b/util/ntp-keygen-opts.h
@@ -1,11 +1,11 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntp-keygen-opts.h)
  *  
- *  It has been AutoGen-ed  February 22, 2011 at 12:29:03 AM by AutoGen 5.11.6
+ *  It has been AutoGen-ed  May 16, 2011 at 04:24:37 AM by AutoGen 5.11.9
  *  From the definitions    ntp-keygen-opts.def
  *  and the template file   options
  *
- * Generated from AutoOpts 34:0:9 templates.
+ * Generated from AutoOpts 35:0:10 templates.
  *
  *  AutoOpts is a copyrighted work.  This header file is not encumbered
  *  by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -20,6 +20,7 @@
  * ntp-keygen copyright (c) 1970-2011 David L. Mills and/or others - all rights reserved
  *
  * see html/copyright.html
+ * 
  */
 /*
  *  This file contains the programmatic interface to the Automated
@@ -39,7 +40,7 @@
  *  tolerable version is at least as old as what was current when the header
  *  template was released.
  */
-#define AO_TEMPLATE_VERSION 139264
+#define AO_TEMPLATE_VERSION 143360
 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
  || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
 # error option template version mismatches autoopts/options.h header
@@ -76,8 +77,8 @@ typedef enum {
 } teOptIndex;
 
 #define OPTION_CT    23
-#define NTP_KEYGEN_VERSION       "4.2.6p3"
-#define NTP_KEYGEN_FULL_VERSION  "ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.6p3"
+#define NTP_KEYGEN_VERSION       "4.2.6p4-beta1"
+#define NTP_KEYGEN_FULL_VERSION  "ntp-keygen (ntp) 4.2.6p4-beta1"
 
 /*
  *  Interface defines for all options.  Replace "n" with the UPPER_CASED
@@ -108,7 +109,6 @@ typedef enum {
     NTP_KEYGEN_EXIT_SUCCESS = 0,
     NTP_KEYGEN_EXIT_FAILURE = 1
 } ntp_keygen_exit_code_t;
-
 /*
  *  Make sure there are no #define name conflicts with the option names
  */
@@ -259,17 +259,17 @@ typedef enum {
                 ntp_keygenOptions.pzCurOpt  = NULL)
 #define START_OPT       RESTART_OPT(1)
 #define USAGE(c)        (*ntp_keygenOptions.pUsageProc)(&ntp_keygenOptions, c)
-/* extracted from opthead.tlib near line 435 */
+/* extracted from opthead.tlib near line 451 */
 
-/* * * * * *
- *
- *  Declare the ntp-keygen option descriptor.
- */
 #ifdef  __cplusplus
 extern "C" {
 #endif
 
-extern tOptions   ntp_keygenOptions;
+/* * * * * *
+ *
+ *  Declare the ntp-keygen option descriptor.
+ */
+extern tOptions ntp_keygenOptions;
 
 #if defined(ENABLE_NLS)
 # ifndef _
diff --git a/util/ntp-keygen-opts.texi b/util/ntp-keygen-opts.texi
index 175c04985..72b730d82 100644
--- a/util/ntp-keygen-opts.texi
+++ b/util/ntp-keygen-opts.texi
@@ -6,7 +6,7 @@
 # 
 # EDIT THIS FILE WITH CAUTION  (ntp-keygen-opts.texi)
 # 
-# It has been AutoGen-ed  January  3, 2011 at 09:19:07 PM by AutoGen 5.11.6pre7
+# It has been AutoGen-ed  May 16, 2011 at 04:24:43 AM by AutoGen 5.11.9
 # From the definitions    ntp-keygen-opts.def
 # and the template file   aginfo.tpl
 @end ignore
@@ -50,7 +50,7 @@ This is the automatically generated usage text for ntp-keygen:
 
 @exampleindent 0
 @example
-ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.6p3
+ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.6p4-beta1
 USAGE:  ntp-keygen [ - [] | --[@{=| @}] ]...
   Flg Arg Option-Name    Description
    -c Str certificate    certificate scheme
@@ -65,7 +65,8 @@ USAGE:  ntp-keygen [ - [] | --[@{=| @}] ]...
    -i Str issuer-name    set issuer name
    -M no  md5key         generate MD5 keys
    -m Num modulus        modulus
-                                - it must be:  256 to 2048
+                                - It must be in the range:
+                                  256 to 2048
    -P no  pvt-cert       generate PC private certificate
    -p Str pvt-passwd     output private password
    -q Str get-pvt-passwd input private password
@@ -82,16 +83,16 @@ USAGE:  ntp-keygen [ - [] | --[@{=| @}] ]...
                                 - disabled as --no-load-opts
                                 - may appear multiple times
 
-Options are specified by doubled hyphens and their name
-or by a single hyphen and the flag character.
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
 
 The following option preset mechanisms are supported:
  - reading file $HOME/.ntprc
  - reading file ./.ntprc
  - examining environment variables named NTP_KEYGEN_*
 
-If there is no new host key, look for an existing one.
-If one is not found, create it.
+If there is no new host key, look for an existing one.  If one is not
+found, create it.
 
 please send bug reports to:  http://bugs.ntp.org, bugs@@ntp.org
 @end example
diff --git a/util/ntp-keygen.1 b/util/ntp-keygen.1
index ad82ec35a..1beaa24b6 100644
--- a/util/ntp-keygen.1
+++ b/util/ntp-keygen.1
@@ -1,7 +1,7 @@
-.TH NTP-KEYGEN 1 2011-01-03 "(ntp 4.2.6p3)" "Programmer's Manual"
+.TH NTP-KEYGEN 1 2011-05-16 "(ntp 4.2.6p4-beta1)" "Programmer's Manual"
 .\"  EDIT THIS FILE WITH CAUTION  (ntp-keygen.1)
 .\"  
-.\"  It has been AutoGen-ed  January  3, 2011 at 09:19:05 PM by AutoGen 5.11.6pre7
+.\"  It has been AutoGen-ed  May 16, 2011 at 04:24:43 AM by AutoGen 5.11.9
 .\"  From the definitions    ntp-keygen-opts.def
 .\"  and the template file   agman1.tpl
 .\"
@@ -182,6 +182,7 @@ Please send bug reports to:  http://bugs.ntp.org, bugs@ntp.org
 .nf
 .na
 see html/copyright.html
+
 .fi
 .ad
 .PP