/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.c)
*
- * It has been AutoGen-ed November 14, 2010 at 08:53:30 AM by AutoGen 5.10
+ * It has been AutoGen-ed November 19, 2010 at 11:36:11 PM by AutoGen 5.11.3
* From the definitions ntpd-opts.def
* and the template file options
*
- * Generated from AutoOpts 33:0:8 templates.
- */
-
-/*
- * This file was produced by an AutoOpts template. AutoOpts is a
- * copyrighted work. This source file is not encumbered by AutoOpts
- * licensing, but is provided under the licensing terms chosen by the
- * ntpd author or copyright holder. AutoOpts is licensed under
- * the terms of the LGPL. The redistributable library (``libopts'') is
- * licensed under the terms of either the LGPL or, at the users discretion,
- * the BSD license. See the AutoOpts and/or libopts sources for details.
+ * Generated from AutoOpts 33:3:8 templates.
+ *
+ * AutoOpts is a copyrighted work. This source file is not encumbered
+ * by AutoOpts licensing, but is provided under the licensing terms chosen
+ * by the ntpd author or copyright holder. AutoOpts is
+ * licensed under the terms of the LGPL. The redistributable library
+ * (``libopts'') is licensed under the terms of either the LGPL or, at the
+ * users discretion, the BSD license. See the AutoOpts and/or libopts sources
+ * for details.
*
* This source file is copyrighted and licensed under the following terms:
*
* Ipv4 option description with
* "Must also have options" and "Incompatible options":
*/
-tSCC zIpv4Text[] =
+static char const zIpv4Text[] =
"Force IPv4 DNS name resolution";
-tSCC zIpv4_NAME[] = "IPV4";
-tSCC zIpv4_Name[] = "ipv4";
+static char const zIpv4_NAME[] = "IPV4";
+static char const zIpv4_Name[] = "ipv4";
static const int
aIpv4CantList[] = {
INDEX_OPT_IPV6, NO_EQUIVALENT };
* Ipv6 option description with
* "Must also have options" and "Incompatible options":
*/
-tSCC zIpv6Text[] =
+static char const zIpv6Text[] =
"Force IPv6 DNS name resolution";
-tSCC zIpv6_NAME[] = "IPV6";
-tSCC zIpv6_Name[] = "ipv6";
+static char const zIpv6_NAME[] = "IPV6";
+static char const zIpv6_Name[] = "ipv6";
static const int
aIpv6CantList[] = {
INDEX_OPT_IPV4, NO_EQUIVALENT };
* Authreq option description with
* "Must also have options" and "Incompatible options":
*/
-tSCC zAuthreqText[] =
+static char const zAuthreqText[] =
"Require crypto authentication";
-tSCC zAuthreq_NAME[] = "AUTHREQ";
-tSCC zAuthreq_Name[] = "authreq";
+static char const zAuthreq_NAME[] = "AUTHREQ";
+static char const zAuthreq_Name[] = "authreq";
static const int
aAuthreqCantList[] = {
INDEX_OPT_AUTHNOREQ, NO_EQUIVALENT };
* Authnoreq option description with
* "Must also have options" and "Incompatible options":
*/
-tSCC zAuthnoreqText[] =
+static char const zAuthnoreqText[] =
"Do not require crypto authentication";
-tSCC zAuthnoreq_NAME[] = "AUTHNOREQ";
-tSCC zAuthnoreq_Name[] = "authnoreq";
+static char const zAuthnoreq_NAME[] = "AUTHNOREQ";
+static char const zAuthnoreq_Name[] = "authnoreq";
static const int
aAuthnoreqCantList[] = {
INDEX_OPT_AUTHREQ, NO_EQUIVALENT };
/*
* Bcastsync option description:
*/
-tSCC zBcastsyncText[] =
+static char const zBcastsyncText[] =
"Allow us to sync to broadcast servers";
-tSCC zBcastsync_NAME[] = "BCASTSYNC";
-tSCC zBcastsync_Name[] = "bcastsync";
+static char const zBcastsync_NAME[] = "BCASTSYNC";
+static char const zBcastsync_Name[] = "bcastsync";
#define BCASTSYNC_FLAGS (OPTST_DISABLED)
/*
* Configfile option description:
*/
-tSCC zConfigfileText[] =
+static char const zConfigfileText[] =
"configuration file name";
-tSCC zConfigfile_NAME[] = "CONFIGFILE";
-tSCC zConfigfile_Name[] = "configfile";
+static char const zConfigfile_NAME[] = "CONFIGFILE";
+static char const zConfigfile_Name[] = "configfile";
#define CONFIGFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
* Debug_Level option description:
*/
#ifdef DEBUG
-tSCC zDebug_LevelText[] =
+static char const zDebug_LevelText[] =
"Increase output debug message level";
-tSCC zDebug_Level_NAME[] = "DEBUG_LEVEL";
-tSCC zDebug_Level_Name[] = "debug-level";
+static char const zDebug_Level_NAME[] = "DEBUG_LEVEL";
+static char const zDebug_Level_Name[] = "debug-level";
#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED)
#else /* disable Debug_Level */
#define DEBUG_LEVEL_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
#define zDebug_Level_NAME NULL
-tSCC zDebug_Level_Name[] = "debug-level";
-tSCC zDebug_LevelText[] = "this package was built using 'configure --disable--debug'";
+static char const zDebug_Level_Name[] = "debug-level";
+static char const zDebug_LevelText[] = "this package was built using 'configure --disable--debug'";
#endif /* DEBUG */
/*
* Set_Debug_Level option description:
*/
#ifdef DEBUG
-tSCC zSet_Debug_LevelText[] =
+static char const zSet_Debug_LevelText[] =
"Set the output debug message level";
-tSCC zSet_Debug_Level_NAME[] = "SET_DEBUG_LEVEL";
-tSCC zSet_Debug_Level_Name[] = "set-debug-level";
+static char const zSet_Debug_Level_NAME[] = "SET_DEBUG_LEVEL";
+static char const zSet_Debug_Level_Name[] = "set-debug-level";
#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
#else /* disable Set_Debug_Level */
#define SET_DEBUG_LEVEL_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
#define zSet_Debug_Level_NAME NULL
-tSCC zSet_Debug_Level_Name[] = "set-debug-level";
-tSCC zSet_Debug_LevelText[] = "this package was built using 'configure --disable--debug'";
+static char const zSet_Debug_Level_Name[] = "set-debug-level";
+static char const zSet_Debug_LevelText[] = "this package was built using 'configure --disable--debug'";
#endif /* DEBUG */
/*
* Driftfile option description:
*/
-tSCC zDriftfileText[] =
+static char const zDriftfileText[] =
"frequency drift file name";
-tSCC zDriftfile_NAME[] = "DRIFTFILE";
-tSCC zDriftfile_Name[] = "driftfile";
+static char const zDriftfile_NAME[] = "DRIFTFILE";
+static char const zDriftfile_Name[] = "driftfile";
#define DRIFTFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
/*
* Panicgate option description:
*/
-tSCC zPanicgateText[] =
+static char const zPanicgateText[] =
"Allow the first adjustment to be Big";
-tSCC zPanicgate_NAME[] = "PANICGATE";
-tSCC zPanicgate_Name[] = "panicgate";
+static char const zPanicgate_NAME[] = "PANICGATE";
+static char const zPanicgate_Name[] = "panicgate";
#define PANICGATE_FLAGS (OPTST_DISABLED)
/*
* Jaildir option description:
*/
#ifdef HAVE_DROPROOT
-tSCC zJaildirText[] =
+static char const zJaildirText[] =
"Jail directory";
-tSCC zJaildir_NAME[] = "JAILDIR";
-tSCC zJaildir_Name[] = "jaildir";
+static char const zJaildir_NAME[] = "JAILDIR";
+static char const zJaildir_Name[] = "jaildir";
#define JAILDIR_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
#else /* disable Jaildir */
#define JAILDIR_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
#define zJaildir_NAME NULL
-tSCC zJaildir_Name[] = "jaildir";
-tSCC zJaildirText[] = "built without --enable-clockctl or --enable-linuxcaps";
+static char const zJaildir_Name[] = "jaildir";
+static char const zJaildirText[] = "built without --enable-clockctl or --enable-linuxcaps";
#endif /* HAVE_DROPROOT */
/*
* Interface option description:
*/
-tSCC zInterfaceText[] =
+static char const zInterfaceText[] =
"Listen on an interface name or address";
-tSCC zInterface_NAME[] = "INTERFACE";
-tSCC zInterface_Name[] = "interface";
+static char const zInterface_NAME[] = "INTERFACE";
+static char const zInterface_Name[] = "interface";
#define INTERFACE_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
/*
* Keyfile option description:
*/
-tSCC zKeyfileText[] =
+static char const zKeyfileText[] =
"path to symmetric keys";
-tSCC zKeyfile_NAME[] = "KEYFILE";
-tSCC zKeyfile_Name[] = "keyfile";
+static char const zKeyfile_NAME[] = "KEYFILE";
+static char const zKeyfile_Name[] = "keyfile";
#define KEYFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
/*
* Logfile option description:
*/
-tSCC zLogfileText[] =
+static char const zLogfileText[] =
"path to the log file";
-tSCC zLogfile_NAME[] = "LOGFILE";
-tSCC zLogfile_Name[] = "logfile";
+static char const zLogfile_NAME[] = "LOGFILE";
+static char const zLogfile_Name[] = "logfile";
#define LOGFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
/*
* Novirtualips option description:
*/
-tSCC zNovirtualipsText[] =
+static char const zNovirtualipsText[] =
"Do not listen to virtual interfaces";
-tSCC zNovirtualips_NAME[] = "NOVIRTUALIPS";
-tSCC zNovirtualips_Name[] = "novirtualips";
+static char const zNovirtualips_NAME[] = "NOVIRTUALIPS";
+static char const zNovirtualips_Name[] = "novirtualips";
#define NOVIRTUALIPS_FLAGS (OPTST_DISABLED)
/*
* Modifymmtimer option description:
*/
#ifdef SYS_WINNT
-tSCC zModifymmtimerText[] =
+static char const zModifymmtimerText[] =
"Modify Multimedia Timer (Windows only)";
-tSCC zModifymmtimer_NAME[] = "MODIFYMMTIMER";
-tSCC zModifymmtimer_Name[] = "modifymmtimer";
+static char const zModifymmtimer_NAME[] = "MODIFYMMTIMER";
+static char const zModifymmtimer_Name[] = "modifymmtimer";
#define MODIFYMMTIMER_FLAGS (OPTST_DISABLED)
#else /* disable Modifymmtimer */
/*
* Nofork option description:
*/
-tSCC zNoforkText[] =
+static char const zNoforkText[] =
"Do not fork";
-tSCC zNofork_NAME[] = "NOFORK";
-tSCC zNofork_Name[] = "nofork";
+static char const zNofork_NAME[] = "NOFORK";
+static char const zNofork_Name[] = "nofork";
#define NOFORK_FLAGS (OPTST_DISABLED)
/*
* Nice option description:
*/
-tSCC zNiceText[] =
+static char const zNiceText[] =
"Run at high priority";
-tSCC zNice_NAME[] = "NICE";
-tSCC zNice_Name[] = "nice";
+static char const zNice_NAME[] = "NICE";
+static char const zNice_Name[] = "nice";
#define NICE_FLAGS (OPTST_DISABLED)
/*
* Pidfile option description:
*/
-tSCC zPidfileText[] =
+static char const zPidfileText[] =
"path to the PID file";
-tSCC zPidfile_NAME[] = "PIDFILE";
-tSCC zPidfile_Name[] = "pidfile";
+static char const zPidfile_NAME[] = "PIDFILE";
+static char const zPidfile_Name[] = "pidfile";
#define PIDFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
/*
* Priority option description:
*/
-tSCC zPriorityText[] =
+static char const zPriorityText[] =
"Process priority";
-tSCC zPriority_NAME[] = "PRIORITY";
-tSCC zPriority_Name[] = "priority";
+static char const zPriority_NAME[] = "PRIORITY";
+static char const zPriority_Name[] = "priority";
#define PRIORITY_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
/*
* Quit option description:
*/
-tSCC zQuitText[] =
+static char const zQuitText[] =
"Set the time and quit";
-tSCC zQuit_NAME[] = "QUIT";
-tSCC zQuit_Name[] = "quit";
+static char const zQuit_NAME[] = "QUIT";
+static char const zQuit_Name[] = "quit";
#define QUIT_FLAGS (OPTST_DISABLED)
/*
* Propagationdelay option description:
*/
-tSCC zPropagationdelayText[] =
+static char const zPropagationdelayText[] =
"Broadcast/propagation delay";
-tSCC zPropagationdelay_NAME[] = "PROPAGATIONDELAY";
-tSCC zPropagationdelay_Name[] = "propagationdelay";
+static char const zPropagationdelay_NAME[] = "PROPAGATIONDELAY";
+static char const zPropagationdelay_Name[] = "propagationdelay";
#define PROPAGATIONDELAY_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
* Saveconfigquit option description:
*/
#ifdef SAVECONFIG
-tSCC zSaveconfigquitText[] =
+static char const zSaveconfigquitText[] =
"Save parsed configuration and quit";
-tSCC zSaveconfigquit_NAME[] = "SAVECONFIGQUIT";
-tSCC zSaveconfigquit_Name[] = "saveconfigquit";
+static char const zSaveconfigquit_NAME[] = "SAVECONFIGQUIT";
+static char const zSaveconfigquit_Name[] = "saveconfigquit";
#define SAVECONFIGQUIT_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
/*
* Statsdir option description:
*/
-tSCC zStatsdirText[] =
+static char const zStatsdirText[] =
"Statistics file location";
-tSCC zStatsdir_NAME[] = "STATSDIR";
-tSCC zStatsdir_Name[] = "statsdir";
+static char const zStatsdir_NAME[] = "STATSDIR";
+static char const zStatsdir_Name[] = "statsdir";
#define STATSDIR_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
/*
* Trustedkey option description:
*/
-tSCC zTrustedkeyText[] =
+static char const zTrustedkeyText[] =
"Trusted key number";
-tSCC zTrustedkey_NAME[] = "TRUSTEDKEY";
-tSCC zTrustedkey_Name[] = "trustedkey";
+static char const zTrustedkey_NAME[] = "TRUSTEDKEY";
+static char const zTrustedkey_Name[] = "trustedkey";
#define TRUSTEDKEY_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
* User option description:
*/
#ifdef HAVE_DROPROOT
-tSCC zUserText[] =
+static char const zUserText[] =
"Run as userid (or userid:groupid)";
-tSCC zUser_NAME[] = "USER";
-tSCC zUser_Name[] = "user";
+static char const zUser_NAME[] = "USER";
+static char const zUser_Name[] = "user";
#define USER_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
#else /* disable User */
#define USER_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
#define zUser_NAME NULL
-tSCC zUser_Name[] = "user";
-tSCC zUserText[] = "built without --enable-clockctl or --enable-linuxcaps";
+static char const zUser_Name[] = "user";
+static char const zUserText[] = "built without --enable-clockctl or --enable-linuxcaps";
#endif /* HAVE_DROPROOT */
/*
* Updateinterval option description:
*/
-tSCC zUpdateintervalText[] =
+static char const zUpdateintervalText[] =
"interval in seconds between scans for new or dropped interfaces";
-tSCC zUpdateinterval_NAME[] = "UPDATEINTERVAL";
-tSCC zUpdateinterval_Name[] = "updateinterval";
+static char const zUpdateinterval_NAME[] = "UPDATEINTERVAL";
+static char const zUpdateinterval_Name[] = "updateinterval";
#define UPDATEINTERVAL_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
/*
* Var option description:
*/
-tSCC zVarText[] =
+static char const zVarText[] =
"make ARG an ntp variable (RW)";
-tSCC zVar_NAME[] = "VAR";
-tSCC zVar_Name[] = "var";
+static char const zVar_NAME[] = "VAR";
+static char const zVar_Name[] = "var";
#define VAR_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
/*
* Dvar option description:
*/
-tSCC zDvarText[] =
+static char const zDvarText[] =
"make ARG an ntp variable (RW|DEF)";
-tSCC zDvar_NAME[] = "DVAR";
-tSCC zDvar_Name[] = "dvar";
+static char const zDvar_NAME[] = "DVAR";
+static char const zDvar_Name[] = "dvar";
#define DVAR_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
/*
* Slew option description:
*/
-tSCC zSlewText[] =
+static char const zSlewText[] =
"Slew up to 600 seconds";
-tSCC zSlew_NAME[] = "SLEW";
-tSCC zSlew_Name[] = "slew";
+static char const zSlew_NAME[] = "SLEW";
+static char const zSlew_Name[] = "slew";
#define SLEW_FLAGS (OPTST_DISABLED)
/*
* Usepcc option description:
*/
#ifdef SYS_WINNT
-tSCC zUsepccText[] =
+static char const zUsepccText[] =
"Use CPU cycle counter (Windows only)";
-tSCC zUsepcc_NAME[] = "USEPCC";
-tSCC zUsepcc_Name[] = "usepcc";
+static char const zUsepcc_NAME[] = "USEPCC";
+static char const zUsepcc_Name[] = "usepcc";
#define USEPCC_FLAGS (OPTST_DISABLED)
#else /* disable Usepcc */
* Pccfreq option description:
*/
#ifdef SYS_WINNT
-tSCC zPccfreqText[] =
+static char const zPccfreqText[] =
"Force CPU cycle counter use (Windows only)";
-tSCC zPccfreq_NAME[] = "PCCFREQ";
-tSCC zPccfreq_Name[] = "pccfreq";
+static char const zPccfreq_NAME[] = "PCCFREQ";
+static char const zPccfreq_Name[] = "pccfreq";
#define PCCFREQ_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
/*
* Help/More_Help/Version option descriptions:
*/
-tSCC zHelpText[] = "Display extended usage information and exit";
-tSCC zHelp_Name[] = "help";
+static char const zHelpText[] = "Display extended usage information and exit";
+static char const zHelp_Name[] = "help";
#ifdef HAVE_WORKING_FORK
#define OPTST_MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
-tSCC zMore_Help_Name[] = "more-help";
-tSCC zMore_HelpText[] = "Extended usage information passed thru pager";
+static char const zMore_Help_Name[] = "more-help";
+static char const zMore_HelpText[] = "Extended usage information passed thru pager";
#else
#define OPTST_MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
#define zMore_Help_Name NULL
OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT
#endif
-tSCC zVersionText[] = "Output version information and exit";
-tSCC zVersion_Name[] = "version";
+static char const zVersionText[] = "Output version information and exit";
+static char const zVersion_Name[] = "version";
/*
* Declare option callback procedures
*/
* Under test, omit argument processing, or call optionStackArg,
* if multiple copies are allowed.
*/
-extern tOptProc
- optionNumericVal, optionPagedUsage, optionStackArg,
- optionVersionStderr;
static tOptProc
doUsageOpt;
* When not under test, there are different procs to use
*/
extern tOptProc
- optionNumericVal, optionPagedUsage, optionPrintVersion, optionStackArg;
+ optionBooleanVal, optionNestedVal, optionNumericVal,
+ optionPagedUsage, optionPrintVersion, optionResetOpt,
+ optionStackArg, optionTimeVal, optionUnstackArg,
+ optionVersionStderr;
static tOptProc
doUsageOpt;
#define zExplain NULL
tSCC zDetail[] = "\n\n";
tSCC zFullVersion[] = NTPD_FULL_VERSION;
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 495 */
+/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 493 */
#if defined(ENABLE_NLS)
# define OPTPROC_BASE OPTPROC_TRANSLATE
+ OPTPROC_LONGOPT
+ OPTPROC_NO_REQ_OPT
+ OPTPROC_ENVIRON
- + OPTPROC_NO_ARGS ),
+ + OPTPROC_NO_ARGS
+ + OPTPROC_MISUSE ),
0, NULL, /* current option index, current option */
NULL, NULL, zPROGNAME,
zRcName, zCopyright, zCopyrightNotice,
tOptDesc* pOptDesc )
{
(void)pOptions;
- USAGE( EXIT_SUCCESS );
+ USAGE(EXIT_SUCCESS);
}
#if ! defined(TEST_NTPD_OPTS)
}
#endif /* defined DEBUG */
#endif /* defined(TEST_NTPD_OPTS) */
-/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 109 */
+/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 107 */
#if defined(TEST_NTPD_OPTS) /* TEST MAIN PROCEDURE: */
-extern void optionPutShell( tOptions* );
+extern void optionPutShell(tOptions*);
int
main(int argc, char** argv)
{
int res = EXIT_SUCCESS;
- (void)optionProcess( &ntpdOptions, argc, argv );
- optionPutShell( &ntpdOptions );
+ (void)optionProcess(&ntpdOptions, argc, argv);
+ optionPutShell(&ntpdOptions);
+ res = ferror(stdout);
+ if (res != 0)
+ fputs("output error writing to stdout\n", stderr);
return res;
}
#endif /* defined TEST_NTPD_OPTS */
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 627 */
+/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 626 */
#if ENABLE_NLS
#include <stdio.h>
#include <unistd.h>
#include <autoopts/usage-txt.h>
-static char* AO_gettext( char const* pz );
+static char* AO_gettext(char const* pz);
static void coerce_it(void** s);
static char*
-AO_gettext( char const* pz )
+AO_gettext(char const* pz)
{
char* pzRes;
if (pz == NULL)
pzRes = _(pz);
if (pzRes == pz)
return pzRes;
- pzRes = strdup( pzRes );
+ pzRes = strdup(pzRes);
if (pzRes == NULL) {
- fputs( _("No memory for duping translated strings\n"), stderr );
- exit( EXIT_FAILURE );
+ fputs(_("No memory for duping translated strings\n"), stderr);
+ exit(EXIT_FAILURE);
}
return pzRes;
}
* This invokes the translation code (e.g. gettext(3)).
*/
static void
-translate_option_strings( void )
+translate_option_strings(void)
{
/*
* Guard against re-translation. It won't work. The strings will have
/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.h)
*
- * It has been AutoGen-ed November 14, 2010 at 08:53:29 AM by AutoGen 5.10
+ * It has been AutoGen-ed November 19, 2010 at 11:36:11 PM by AutoGen 5.11.3
* From the definitions ntpd-opts.def
* and the template file options
*
- * Generated from AutoOpts 33:0:8 templates.
- */
-
-/*
- * This file was produced by an AutoOpts template. AutoOpts is a
- * copyrighted work. This header file is not encumbered by AutoOpts
- * licensing, but is provided under the licensing terms chosen by the
- * ntpd author or copyright holder. AutoOpts is licensed under
- * the terms of the LGPL. The redistributable library (``libopts'') is
- * licensed under the terms of either the LGPL or, at the users discretion,
- * the BSD license. See the AutoOpts and/or libopts sources for details.
+ * Generated from AutoOpts 33:3:8 templates.
+ *
+ * AutoOpts is a copyrighted work. This header file is not encumbered
+ * by AutoOpts licensing, but is provided under the licensing terms chosen
+ * by the ntpd author or copyright holder. AutoOpts is
+ * licensed under the terms of the LGPL. The redistributable library
+ * (``libopts'') is licensed under the terms of either the LGPL or, at the
+ * users discretion, the BSD license. See the AutoOpts and/or libopts sources
+ * for details.
*
* This source file is copyrighted and licensed under the following terms:
*
* tolerable version is at least as old as what was current when the header
* template was released.
*/
-#define AO_TEMPLATE_VERSION 135168
+#define AO_TEMPLATE_VERSION 135171
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header
/*
* Interface defines for all options. Replace "n" with the UPPER_CASED
* option name (as in the teOptIndex enumeration above).
- * e.g. HAVE_OPT( IPV4 )
+ * e.g. HAVE_OPT(IPV4)
*/
#define DESC(n) (ntpdOptions.pOptDesc[INDEX_OPT_## n])
#define HAVE_OPT(n) (! UNUSED_OPT(& DESC(n)))
#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
#define CLEAR_OPT(n) STMTS( \
DESC(n).fOptState &= OPTST_PERSISTENT_MASK; \
- if ( (DESC(n).fOptState & OPTST_INITENABLED) == 0) \
+ if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \
DESC(n).fOptState |= OPTST_DISABLED; \
DESC(n).optCookie = NULL )
/*
* Interface defines not associated with particular options
*/
-#define ERRSKIP_OPTERR STMTS( ntpdOptions.fOptSet &= ~OPTPROC_ERRSTOP )
-#define ERRSTOP_OPTERR STMTS( ntpdOptions.fOptSet |= OPTPROC_ERRSTOP )
+#define ERRSKIP_OPTERR STMTS(ntpdOptions.fOptSet &= ~OPTPROC_ERRSTOP)
+#define ERRSTOP_OPTERR STMTS(ntpdOptions.fOptSet |= OPTPROC_ERRSTOP)
#define RESTART_OPT(n) STMTS( \
ntpdOptions.curOptIdx = (n); \
- ntpdOptions.pzCurOpt = NULL )
+ ntpdOptions.pzCurOpt = NULL)
#define START_OPT RESTART_OPT(1)
-#define USAGE(c) (*ntpdOptions.pUsageProc)( &ntpdOptions, c )
-/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 409 */
+#define USAGE(c) (*ntpdOptions.pUsageProc)(&ntpdOptions, c)
+/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 408 */
/* * * * * *
*
#if defined(ENABLE_NLS)
# ifndef _
# include <stdio.h>
- static inline char* aoGetsText( char const* pz ) {
+ static inline char* aoGetsText(char const* pz) {
if (pz == NULL) return NULL;
- return (char*)gettext( pz );
+ return (char*)gettext(pz);
}
# define _(s) aoGetsText(s)
# endif /* _() */
@pindex ntpd
@cindex NTP daemon program
@ignore
-#
-# EDIT THIS FILE WITH CAUTION (ntpd-opts.texi)
-#
-# It has been AutoGen-ed November 14, 2010 at 08:54:06 AM by AutoGen 5.10
-# From the definitions ntpd-opts.def
-# and the template file aginfo.tpl
-@end ignore
-This program has no explanation.
-
-
-
-This section was generated by @strong{AutoGen},
-the aginfo template and the option descriptions for the @command{ntpd} program. It documents the ntpd usage text and option meanings.
-
-This software is released under a specialized copyright license.
-
-@menu
-* ntpd usage:: ntpd usage help (-?)
-* ntpd authnoreq:: authnoreq option (-A)
-* ntpd authreq:: authreq option (-a)
-* ntpd bcastsync:: bcastsync option (-b)
-* ntpd configfile:: configfile option (-c)
-* ntpd debug-level:: debug-level option (-d)
-* ntpd driftfile:: driftfile option (-f)
-* ntpd dvar:: dvar option
-* ntpd interface:: interface option (-I)
-* ntpd ipv4:: ipv4 option (-4)
-* ntpd ipv6:: ipv6 option (-6)
-* ntpd jaildir:: jaildir option (-i)
-* ntpd keyfile:: keyfile option (-k)
-* ntpd logfile:: logfile option (-l)
-* ntpd modifymmtimer:: modifymmtimer option (-M)
-* ntpd nice:: nice option (-N)
-* ntpd nofork:: nofork option (-n)
-* ntpd novirtualips:: novirtualips option (-L)
-* ntpd panicgate:: panicgate option (-g)
-* ntpd pccfreq:: pccfreq option
-* ntpd pidfile:: pidfile option (-p)
-* ntpd priority:: priority option (-P)
-* ntpd propagationdelay:: propagationdelay option (-r)
-* ntpd quit:: quit option (-q)
-* ntpd saveconfigquit:: saveconfigquit option
-* ntpd set-debug-level:: set-debug-level option (-D)
-* ntpd slew:: slew option (-x)
-* ntpd statsdir:: statsdir option (-s)
-* ntpd trustedkey:: trustedkey option (-t)
-* ntpd updateinterval:: updateinterval option (-U)
-* ntpd usepcc:: usepcc option
-* ntpd user:: user option (-u)
-* ntpd var:: var option
-@end menu
-
-@node ntpd usage
-@subsection ntpd usage help (-?)
-@cindex ntpd usage
-
-This is the automatically generated usage text for ntpd:
-
-@exampleindent 0
-@example
-ntpd - NTP daemon program - Ver. 4.2.6p3-RC10
-USAGE: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
- Flg Arg Option-Name Description
- -4 no ipv4 Force IPv4 DNS name resolution
- - prohibits these options:
- ipv6
- -6 no ipv6 Force IPv6 DNS name resolution
- - prohibits these options:
- ipv4
- -a no authreq Require crypto authentication
- - prohibits these options:
- authnoreq
- -A no authnoreq Do not require crypto authentication
- - prohibits these options:
- authreq
- -b no bcastsync Allow us to sync to broadcast servers
- -c Str configfile configuration file name
- -d no debug-level Increase output debug message level
- - may appear multiple times
- -D Str set-debug-level Set the output debug message level
- - may appear multiple times
- -f Str driftfile frequency drift file name
- -g no panicgate Allow the first adjustment to be Big
- - may appear multiple times
- -i --- jaildir built without --enable-clockctl or --enable-linuxcaps
- -I Str interface Listen on an interface name or address
- - may appear multiple times
- -k Str keyfile path to symmetric keys
- -l Str logfile path to the log file
- -L no novirtualips Do not listen to virtual interfaces
- -n no nofork Do not fork
- -N no nice Run at high priority
- -p Str pidfile path to the PID file
- -P Num priority Process priority
- -q no quit Set the time and quit
- -r Str propagationdelay Broadcast/propagation delay
- Str saveconfigquit Save parsed configuration and quit
- -s Str statsdir Statistics file location
- -t Str trustedkey Trusted key number
- - may appear multiple times
- -u --- user built without --enable-clockctl or --enable-linuxcaps
- -U Num updateinterval interval in seconds between scans for new or dropped interfaces
- Str var make ARG an ntp variable (RW)
- - may appear multiple times
- Str dvar make ARG an ntp variable (RW|DEF)
- - may appear multiple times
- -x no slew Slew up to 600 seconds
- opt version Output version information and exit
- -? 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.
-
-The following option preset mechanisms are supported:
- - examining environment variables named NTPD_*
-
-
-
-please send bug reports to: http://bugs.ntp.org, bugs@@ntp.org
-@end example
-@exampleindent 4
-
-@node ntpd ipv4
-@subsection ipv4 option (-4)
-@cindex ntpd-ipv4
-
-This is the ``force ipv4 dns name resolution'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-ipv6.
-@end itemize
-
-Force DNS resolution of following host names on the command line
-to the IPv4 namespace.
-
-@node ntpd ipv6
-@subsection ipv6 option (-6)
-@cindex ntpd-ipv6
-
-This is the ``force ipv6 dns name resolution'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-ipv4.
-@end itemize
-
-Force DNS resolution of following host names on the command line
-to the IPv6 namespace.
-
-@node ntpd authreq
-@subsection authreq option (-a)
-@cindex ntpd-authreq
-
-This is the ``require crypto authentication'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-authnoreq.
-@end itemize
-
-Require cryptographic authentication for broadcast client,
-multicast client and symmetric passive associations.
-This is the default.
-
-@node ntpd authnoreq
-@subsection authnoreq option (-A)
-@cindex ntpd-authnoreq
-
-This is the ``do not require crypto authentication'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-authreq.
-@end itemize
-
-Do not require cryptographic authentication for broadcast client,
-multicast client and symmetric passive associations.
-This is almost never a good idea.
-
-@node ntpd bcastsync
-@subsection bcastsync option (-b)
-@cindex ntpd-bcastsync
-
-This is the ``allow us to sync to broadcast servers'' option.
-
-
-@node ntpd configfile
-@subsection configfile option (-c)
-@cindex ntpd-configfile
-
-This is the ``configuration file name'' option.
-The name and path of the configuration file,
-/etc/ntp.conf
-by default.
-
-@node ntpd debug-level
-@subsection debug-level option (-d)
-@cindex ntpd-debug-level
-
-This is the ``increase output debug message level'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-may appear an unlimited number of times.
-@item
-must be compiled in by defining @code{DEBUG} during the compilation.
-@end itemize
-
-Increase the debugging message output level.
-
-@node ntpd set-debug-level
-@subsection set-debug-level option (-D)
-@cindex ntpd-set-debug-level
-
-This is the ``set the output debug message level'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-may appear an unlimited number of times.
-@item
-must be compiled in by defining @code{DEBUG} during the compilation.
-@end itemize
-
-Set the output debugging level. Can be supplied multiple times,
-but each overrides the previous value(s).
-
-@node ntpd driftfile
-@subsection driftfile option (-f)
-@cindex ntpd-driftfile
-
-This is the ``frequency drift file name'' option.
-The name and path of the frequency file,
-/etc/ntp.drift
-by default.
-This is the same operation as the
-driftfile driftfile
-configuration specification in the
-/etc/ntp.conf
-file.
-
-@node ntpd panicgate
-@subsection panicgate option (-g)
-@cindex ntpd-panicgate
-
-This is the ``allow the first adjustment to be big'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-may appear an unlimited number of times.
-@end itemize
-
-Normally,
-ntpd
-exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. This option allows the time to be set to any value without restriction; however, this can happen only once. If the threshold is exceeded after that,
-ntpd
-will exit with a message to the system log. This option can be used with the
--q
-and
--x
-options.
-See the
-tinker
-configuration file directive for other options.
-
-@node ntpd jaildir
-@subsection jaildir option (-i)
-@cindex ntpd-jaildir
-
-This is the ``jail directory'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{HAVE_DROPROOT} during the compilation.
-@end itemize
-
-Chroot the server to the directory
-jaildir
-.
-This option also implies that the server attempts to drop root privileges at startup.
-You may need to also specify a
--u
-option.
-This option is only available if the OS supports adjusting the clock
-without full root privileges.
-This option is supported under NetBSD (configure with
---enable-clockctl
-) and Linux (configure with
---enable-linuxcaps
-).
-
-@node ntpd interface
-@subsection interface option (-I)
-@cindex ntpd-interface
-
-This is the ``listen on an interface name or address'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-may appear an unlimited number of times.
-@end itemize
-
-Open the network address given, or all the addresses associated with the
-given interface name. This option may appear multiple times. This option
-also implies not opening other addresses, except wildcard and localhost.
-This option is deprecated. Please consider using the configuration file
-interface command, which is more versatile.
-
-@node ntpd keyfile
-@subsection keyfile option (-k)
-@cindex ntpd-keyfile
-
-This is the ``path to symmetric keys'' option.
-Specify the name and path of the symmetric key file.
-/etc/ntp.keys
-is the default.
-This is the same operation as the
-keys keyfile
-configuration file directive.
-
-@node ntpd logfile
-@subsection logfile option (-l)
-@cindex ntpd-logfile
-
-This is the ``path to the log file'' option.
-Specify the name and path of the log file.
-The default is the system log file.
-This is the same operation as the
-logfile logfile
-configuration file directive.
-
-@node ntpd novirtualips
-@subsection novirtualips option (-L)
-@cindex ntpd-novirtualips
-
-This is the ``do not listen to virtual interfaces'' option.
-Do not listen to virtual interfaces, defined as those with
-names containing a colon. This option is deprecated. Please
-consider using the configuration file interface command, which
-is more versatile.
-
-@node ntpd modifymmtimer
-@subsection modifymmtimer option (-M)
-@cindex ntpd-modifymmtimer
-
-This is the ``modify multimedia timer (windows only)'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{SYS_WINNT} during the compilation.
-@end itemize
-
-Set the Windows Multimedia Timer to highest resolution. This
-ensures the resolution does not change while ntpd is running,
-avoiding timekeeping glitches associated with changes.
-
-@node ntpd nofork
-@subsection nofork option (-n)
-@cindex ntpd-nofork
-
-This is the ``do not fork'' option.
-
-
-@node ntpd nice
-@subsection nice option (-N)
-@cindex ntpd-nice
-
-This is the ``run at high priority'' option.
-To the extent permitted by the operating system, run
-ntpd
-at the highest priority.
-
-@node ntpd pidfile
-@subsection pidfile option (-p)
-@cindex ntpd-pidfile
-
-This is the ``path to the pid file'' option.
-Specify the name and path of the file used to record
-ntpd's
-process ID.
-This is the same operation as the
-pidfile pidfile
-configuration file directive.
-
-@node ntpd priority
-@subsection priority option (-P)
-@cindex ntpd-priority
-
-This is the ``process priority'' option.
-To the extent permitted by the operating system, run
-ntpd
-at the specified
-sched_setscheduler(SCHED_FIFO)
-priority.
-
-@node ntpd quit
-@subsection quit option (-q)
-@cindex ntpd-quit
-
-This is the ``set the time and quit'' option.
-ntpd
-will exit just after the first time the clock is set. This behavior mimics that of the
-ntpdate
-program, which is to be retired.
-The
--g
-and
--x
-options can be used with this option.
-Note: The kernel time discipline is disabled with this option.
-
-@node ntpd propagationdelay
-@subsection propagationdelay option (-r)
-@cindex ntpd-propagationdelay
-
-This is the ``broadcast/propagation delay'' option.
-Specify the default propagation delay from the broadcast/multicast server to this client. This is necessary only if the delay cannot be computed automatically by the protocol.
-
-@node ntpd saveconfigquit
-@subsection saveconfigquit option
-@cindex ntpd-saveconfigquit
-
-This is the ``save parsed configuration and quit'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{SAVECONFIG} during the compilation.
-@end itemize
-
-Cause ntpd to parse its startup configuration file and save an
-equivalent to the given filename and exit. This option was
-designed for automated testing.
-
-@node ntpd statsdir
-@subsection statsdir option (-s)
-@cindex ntpd-statsdir
-
-This is the ``statistics file location'' option.
-Specify the directory path for files created by the statistics facility.
-This is the same operation as the
-statsdir statsdir
-configuration file directive.
-
-@node ntpd trustedkey
-@subsection trustedkey option (-t)
-@cindex ntpd-trustedkey
-
-This is the ``trusted key number'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-may appear an unlimited number of times.
-@end itemize
-
-Add a key number to the trusted key list.
-
-@node ntpd user
-@subsection user option (-u)
-@cindex ntpd-user
-
-This is the ``run as userid (or userid:groupid)'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{HAVE_DROPROOT} during the compilation.
-@end itemize
-
-Specify a user, and optionally a group, to switch to.
-This option is only available if the OS supports adjusting the clock
-without full root privileges.
-This option is supported under NetBSD (configure with
---enable-clockctl
-) and Linux (configure with
---enable-linuxcaps
-).
-
-@node ntpd updateinterval
-@subsection updateinterval option (-U)
-@cindex ntpd-updateinterval
-
-This is the ``interval in seconds between scans for new or dropped interfaces'' option.
-Give the time in seconds between two scans for new or dropped interfaces.
-For systems with routing socket support the scans will be performed shortly after the interface change
-has been detected by the system.
-Use 0 to disable scanning. 60 seconds is the minimum time between scans.
-
-@node ntpd var
-@subsection var option
-@cindex ntpd-var
-
-This is the ``make arg an ntp variable (rw)'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-may appear an unlimited number of times.
-@end itemize
-
-
-
-@node ntpd dvar
-@subsection dvar option
-@cindex ntpd-dvar
-
-This is the ``make arg an ntp variable (rw|def)'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-may appear an unlimited number of times.
-@end itemize
-
-
-
-@node ntpd slew
-@subsection slew option (-x)
-@cindex ntpd-slew
-
-This is the ``slew up to 600 seconds'' option.
-Normally, the time is slewed if the offset is less than the step threshold, which is 128 ms by default, and stepped if above the threshold.
-This option sets the threshold to 600 s, which is well within the accuracy window to set the clock manually.
-Note: Since the slew rate of typical Unix kernels is limited to 0.5 ms/s, each second of adjustment requires an amortization interval of 2000 s.
-Thus, an adjustment as much as 600 s will take almost 14 days to complete.
-This option can be used with the
--g
-and
--q
-options.
-See the
-tinker
-configuration file directive for other options.
-Note: The kernel time discipline is disabled with this option.
-
-@node ntpd usepcc
-@subsection usepcc option
-@cindex ntpd-usepcc
-
-This is the ``use cpu cycle counter (windows only)'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{SYS_WINNT} during the compilation.
-@end itemize
-
-Attempt to substitute the CPU counter for QueryPerformanceCounter.
-The CPU counter and QueryPerformanceCounter are compared, and if
-they have the same frequency, the CPU counter (RDTSC on x86) is
-used directly, saving the overhead of a system call.
-
-@node ntpd pccfreq
-@subsection pccfreq option
-@cindex ntpd-pccfreq
-
-This is the ``force cpu cycle counter use (windows only)'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{SYS_WINNT} during the compilation.
-@end itemize
-
-Force substitution the CPU counter for QueryPerformanceCounter.
-The CPU counter (RDTSC on x86) is used unconditionally with the
-given frequency (in Hz).
-.TH NTPD 1 2010-11-14 "( 4.2.6p3-RC10)" "Programmer's Manual"
+.TH NTPD 1 2010-11-19 "( 4.2.6p3-RC10)" "Programmer's Manual"
.\" EDIT THIS FILE WITH CAUTION (ntpd.1)
.\"
-.\" It has been AutoGen-ed November 14, 2010 at 08:54:05 AM by AutoGen 5.10
+.\" It has been AutoGen-ed November 19, 2010 at 11:46:44 PM by AutoGen 5.11.3
.\" From the definitions ntpd-opts.def
.\" and the template file agman1.tpl
.\"
/*
* EDIT THIS FILE WITH CAUTION (ntpdc-opts.c)
*
- * It has been AutoGen-ed November 14, 2010 at 08:54:11 AM by AutoGen 5.10
+ * It has been AutoGen-ed November 19, 2010 at 11:46:55 PM by AutoGen 5.11.3
* From the definitions ntpdc-opts.def
* and the template file options
*
- * Generated from AutoOpts 33:0:8 templates.
- */
-
-/*
- * This file was produced by an AutoOpts template. AutoOpts is a
- * copyrighted work. This source file is not encumbered by AutoOpts
- * licensing, but is provided under the licensing terms chosen by the
- * ntpdc author or copyright holder. AutoOpts is licensed under
- * the terms of the LGPL. The redistributable library (``libopts'') is
- * licensed under the terms of either the LGPL or, at the users discretion,
- * the BSD license. See the AutoOpts and/or libopts sources for details.
+ * Generated from AutoOpts 33:3:8 templates.
+ *
+ * AutoOpts is a copyrighted work. This source file is not encumbered
+ * by AutoOpts licensing, but is provided under the licensing terms chosen
+ * by the ntpdc author or copyright holder. AutoOpts is
+ * licensed under the terms of the LGPL. The redistributable library
+ * (``libopts'') is licensed under the terms of either the LGPL or, at the
+ * users discretion, the BSD license. See the AutoOpts and/or libopts sources
+ * for details.
*
* This source file is copyrighted and licensed under the following terms:
*
* Ipv4 option description with
* "Must also have options" and "Incompatible options":
*/
-tSCC zIpv4Text[] =
+static char const zIpv4Text[] =
"Force IPv4 DNS name resolution";
-tSCC zIpv4_NAME[] = "IPV4";
-tSCC zIpv4_Name[] = "ipv4";
+static char const zIpv4_NAME[] = "IPV4";
+static char const zIpv4_Name[] = "ipv4";
static const int
aIpv4CantList[] = {
INDEX_OPT_IPV6, NO_EQUIVALENT };
* Ipv6 option description with
* "Must also have options" and "Incompatible options":
*/
-tSCC zIpv6Text[] =
+static char const zIpv6Text[] =
"Force IPv6 DNS name resolution";
-tSCC zIpv6_NAME[] = "IPV6";
-tSCC zIpv6_Name[] = "ipv6";
+static char const zIpv6_NAME[] = "IPV6";
+static char const zIpv6_Name[] = "ipv6";
static const int
aIpv6CantList[] = {
INDEX_OPT_IPV4, NO_EQUIVALENT };
/*
* Command option description:
*/
-tSCC zCommandText[] =
+static char const zCommandText[] =
"run a command and exit";
-tSCC zCommand_NAME[] = "COMMAND";
-tSCC zCommand_Name[] = "command";
+static char const zCommand_NAME[] = "COMMAND";
+static char const zCommand_Name[] = "command";
#define COMMAND_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
* Listpeers option description with
* "Must also have options" and "Incompatible options":
*/
-tSCC zListpeersText[] =
+static char const zListpeersText[] =
"Print a list of the peers";
-tSCC zListpeers_NAME[] = "LISTPEERS";
-tSCC zListpeers_Name[] = "listpeers";
+static char const zListpeers_NAME[] = "LISTPEERS";
+static char const zListpeers_Name[] = "listpeers";
static const int
aListpeersCantList[] = {
INDEX_OPT_COMMAND, NO_EQUIVALENT };
* Peers option description with
* "Must also have options" and "Incompatible options":
*/
-tSCC zPeersText[] =
+static char const zPeersText[] =
"Print a list of the peers";
-tSCC zPeers_NAME[] = "PEERS";
-tSCC zPeers_Name[] = "peers";
+static char const zPeers_NAME[] = "PEERS";
+static char const zPeers_Name[] = "peers";
static const int
aPeersCantList[] = {
INDEX_OPT_COMMAND, NO_EQUIVALENT };
* Showpeers option description with
* "Must also have options" and "Incompatible options":
*/
-tSCC zShowpeersText[] =
+static char const zShowpeersText[] =
"Show a list of the peers";
-tSCC zShowpeers_NAME[] = "SHOWPEERS";
-tSCC zShowpeers_Name[] = "showpeers";
+static char const zShowpeers_NAME[] = "SHOWPEERS";
+static char const zShowpeers_Name[] = "showpeers";
static const int
aShowpeersCantList[] = {
INDEX_OPT_COMMAND, NO_EQUIVALENT };
* Interactive option description with
* "Must also have options" and "Incompatible options":
*/
-tSCC zInteractiveText[] =
+static char const zInteractiveText[] =
"Force ntpq to operate in interactive mode";
-tSCC zInteractive_NAME[] = "INTERACTIVE";
-tSCC zInteractive_Name[] = "interactive";
+static char const zInteractive_NAME[] = "INTERACTIVE";
+static char const zInteractive_Name[] = "interactive";
static const int
aInteractiveCantList[] = {
INDEX_OPT_COMMAND,
/*
* Debug_Level option description:
*/
-tSCC zDebug_LevelText[] =
+static char const zDebug_LevelText[] =
"Increase output debug message level";
-tSCC zDebug_Level_NAME[] = "DEBUG_LEVEL";
-tSCC zDebug_Level_Name[] = "debug-level";
+static char const zDebug_Level_NAME[] = "DEBUG_LEVEL";
+static char const zDebug_Level_Name[] = "debug-level";
#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED)
/*
* Set_Debug_Level option description:
*/
-tSCC zSet_Debug_LevelText[] =
+static char const zSet_Debug_LevelText[] =
"Set the output debug message level";
-tSCC zSet_Debug_Level_NAME[] = "SET_DEBUG_LEVEL";
-tSCC zSet_Debug_Level_Name[] = "set-debug-level";
+static char const zSet_Debug_Level_NAME[] = "SET_DEBUG_LEVEL";
+static char const zSet_Debug_Level_Name[] = "set-debug-level";
#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
/*
* Numeric option description:
*/
-tSCC zNumericText[] =
+static char const zNumericText[] =
"numeric host addresses";
-tSCC zNumeric_NAME[] = "NUMERIC";
-tSCC zNumeric_Name[] = "numeric";
+static char const zNumeric_NAME[] = "NUMERIC";
+static char const zNumeric_Name[] = "numeric";
#define NUMERIC_FLAGS (OPTST_DISABLED)
/*
* Help/More_Help/Version option descriptions:
*/
-tSCC zHelpText[] = "Display extended usage information and exit";
-tSCC zHelp_Name[] = "help";
+static char const zHelpText[] = "Display extended usage information and exit";
+static char const zHelp_Name[] = "help";
#ifdef HAVE_WORKING_FORK
#define OPTST_MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
-tSCC zMore_Help_Name[] = "more-help";
-tSCC zMore_HelpText[] = "Extended usage information passed thru pager";
+static char const zMore_Help_Name[] = "more-help";
+static char const zMore_HelpText[] = "Extended usage information passed thru pager";
#else
#define OPTST_MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
#define zMore_Help_Name NULL
OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT
#endif
-tSCC zVersionText[] = "Output version information and exit";
-tSCC zVersion_Name[] = "version";
-tSCC zSave_OptsText[] = "Save the option state to a config file";
-tSCC zSave_Opts_Name[] = "save-opts";
-tSCC zLoad_OptsText[] = "Load options from a config file";
-tSCC zLoad_Opts_NAME[] = "LOAD_OPTS";
-tSCC zNotLoad_Opts_Name[] = "no-load-opts";
-tSCC zNotLoad_Opts_Pfx[] = "no";
+static char const zVersionText[] = "Output version information and exit";
+static char const zVersion_Name[] = "version";
+static char const zSave_OptsText[] = "Save the option state to a config file";
+static char const zSave_Opts_Name[] = "save-opts";
+static char const zLoad_OptsText[] = "Load options from a config file";
+static char const zLoad_Opts_NAME[] = "LOAD_OPTS";
+static char const zNotLoad_Opts_Name[] = "no-load-opts";
+static char const zNotLoad_Opts_Pfx[] = "no";
#define zLoad_Opts_Name (zNotLoad_Opts_Name + 3)
/*
* Declare option callback procedures
* Under test, omit argument processing, or call optionStackArg,
* if multiple copies are allowed.
*/
-extern tOptProc
- optionPagedUsage, optionStackArg, optionVersionStderr;
static tOptProc
doUsageOpt;
* When not under test, there are different procs to use
*/
extern tOptProc
- optionPagedUsage, optionPrintVersion, optionStackArg;
+ optionBooleanVal, optionNestedVal, optionNumericVal,
+ optionPagedUsage, optionPrintVersion, optionResetOpt,
+ optionStackArg, optionTimeVal, optionUnstackArg,
+ optionVersionStderr;
static tOptProc
doOptSet_Debug_Level, doUsageOpt;
ntpd's configuration file may also be specified at run time using\n\
[= prog-name =] .\n";
tSCC zFullVersion[] = NTPDC_FULL_VERSION;
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 495 */
+/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 493 */
#if defined(ENABLE_NLS)
# define OPTPROC_BASE OPTPROC_TRANSLATE
+ OPTPROC_SHORTOPT
+ OPTPROC_LONGOPT
+ OPTPROC_NO_REQ_OPT
- + OPTPROC_ENVIRON ),
+ + OPTPROC_ENVIRON
+ + OPTPROC_MISUSE ),
0, NULL, /* current option index, current option */
NULL, NULL, zPROGNAME,
zRcName, zCopyright, zCopyrightNotice,
tOptDesc* pOptDesc )
{
(void)pOptions;
- USAGE( EXIT_SUCCESS );
+ USAGE(EXIT_SUCCESS);
}
#if ! defined(TEST_NTPDC_OPTS)
DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
}
#endif /* defined(TEST_NTPDC_OPTS) */
-/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 109 */
+/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 107 */
#if defined(TEST_NTPDC_OPTS) /* TEST MAIN PROCEDURE: */
-extern void optionPutShell( tOptions* );
+extern void optionPutShell(tOptions*);
int
main(int argc, char** argv)
{
int res = EXIT_SUCCESS;
- (void)optionProcess( &ntpdcOptions, argc, argv );
- optionPutShell( &ntpdcOptions );
+ (void)optionProcess(&ntpdcOptions, argc, argv);
+ optionPutShell(&ntpdcOptions);
+ res = ferror(stdout);
+ if (res != 0)
+ fputs("output error writing to stdout\n", stderr);
return res;
}
#endif /* defined TEST_NTPDC_OPTS */
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 627 */
+/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 626 */
#if ENABLE_NLS
#include <stdio.h>
#include <unistd.h>
#include <autoopts/usage-txt.h>
-static char* AO_gettext( char const* pz );
+static char* AO_gettext(char const* pz);
static void coerce_it(void** s);
static char*
-AO_gettext( char const* pz )
+AO_gettext(char const* pz)
{
char* pzRes;
if (pz == NULL)
pzRes = _(pz);
if (pzRes == pz)
return pzRes;
- pzRes = strdup( pzRes );
+ pzRes = strdup(pzRes);
if (pzRes == NULL) {
- fputs( _("No memory for duping translated strings\n"), stderr );
- exit( EXIT_FAILURE );
+ fputs(_("No memory for duping translated strings\n"), stderr);
+ exit(EXIT_FAILURE);
}
return pzRes;
}
* This invokes the translation code (e.g. gettext(3)).
*/
static void
-translate_option_strings( void )
+translate_option_strings(void)
{
/*
* Guard against re-translation. It won't work. The strings will have
/*
* EDIT THIS FILE WITH CAUTION (ntpdc-opts.h)
*
- * It has been AutoGen-ed November 14, 2010 at 08:54:11 AM by AutoGen 5.10
+ * It has been AutoGen-ed November 19, 2010 at 11:46:55 PM by AutoGen 5.11.3
* From the definitions ntpdc-opts.def
* and the template file options
*
- * Generated from AutoOpts 33:0:8 templates.
- */
-
-/*
- * This file was produced by an AutoOpts template. AutoOpts is a
- * copyrighted work. This header file is not encumbered by AutoOpts
- * licensing, but is provided under the licensing terms chosen by the
- * ntpdc author or copyright holder. AutoOpts is licensed under
- * the terms of the LGPL. The redistributable library (``libopts'') is
- * licensed under the terms of either the LGPL or, at the users discretion,
- * the BSD license. See the AutoOpts and/or libopts sources for details.
+ * Generated from AutoOpts 33:3:8 templates.
+ *
+ * AutoOpts is a copyrighted work. This header file is not encumbered
+ * by AutoOpts licensing, but is provided under the licensing terms chosen
+ * by the ntpdc author or copyright holder. AutoOpts is
+ * licensed under the terms of the LGPL. The redistributable library
+ * (``libopts'') is licensed under the terms of either the LGPL or, at the
+ * users discretion, the BSD license. See the AutoOpts and/or libopts sources
+ * for details.
*
* This source file is copyrighted and licensed under the following terms:
*
* tolerable version is at least as old as what was current when the header
* template was released.
*/
-#define AO_TEMPLATE_VERSION 135168
+#define AO_TEMPLATE_VERSION 135171
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header
/*
* Interface defines for all options. Replace "n" with the UPPER_CASED
* option name (as in the teOptIndex enumeration above).
- * e.g. HAVE_OPT( IPV4 )
+ * e.g. HAVE_OPT(IPV4)
*/
#define DESC(n) (ntpdcOptions.pOptDesc[INDEX_OPT_## n])
#define HAVE_OPT(n) (! UNUSED_OPT(& DESC(n)))
#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
#define CLEAR_OPT(n) STMTS( \
DESC(n).fOptState &= OPTST_PERSISTENT_MASK; \
- if ( (DESC(n).fOptState & OPTST_INITENABLED) == 0) \
+ if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \
DESC(n).fOptState |= OPTST_DISABLED; \
DESC(n).optCookie = NULL )
/*
* Interface defines not associated with particular options
*/
-#define ERRSKIP_OPTERR STMTS( ntpdcOptions.fOptSet &= ~OPTPROC_ERRSTOP )
-#define ERRSTOP_OPTERR STMTS( ntpdcOptions.fOptSet |= OPTPROC_ERRSTOP )
+#define ERRSKIP_OPTERR STMTS(ntpdcOptions.fOptSet &= ~OPTPROC_ERRSTOP)
+#define ERRSTOP_OPTERR STMTS(ntpdcOptions.fOptSet |= OPTPROC_ERRSTOP)
#define RESTART_OPT(n) STMTS( \
ntpdcOptions.curOptIdx = (n); \
- ntpdcOptions.pzCurOpt = NULL )
+ ntpdcOptions.pzCurOpt = NULL)
#define START_OPT RESTART_OPT(1)
-#define USAGE(c) (*ntpdcOptions.pUsageProc)( &ntpdcOptions, c )
-/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 409 */
+#define USAGE(c) (*ntpdcOptions.pUsageProc)(&ntpdcOptions, c)
+/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 408 */
/* * * * * *
*
#if defined(ENABLE_NLS)
# ifndef _
# include <stdio.h>
- static inline char* aoGetsText( char const* pz ) {
+ static inline char* aoGetsText(char const* pz) {
if (pz == NULL) return NULL;
- return (char*)gettext( pz );
+ return (char*)gettext(pz);
}
# define _(s) aoGetsText(s)
# endif /* _() */
@pindex ntpdc
@cindex vendor-specific NTP query program
@ignore
-#
-# EDIT THIS FILE WITH CAUTION (ntpdc-opts.texi)
-#
-# It has been AutoGen-ed November 14, 2010 at 08:54:21 AM by AutoGen 5.10
-# From the definitions ntpdc-opts.def
-# and the template file aginfo.tpl
-@end ignore
-This program has no explanation.
-
-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 =] .
-
-
-
-This section was generated by @strong{AutoGen},
-the aginfo template and the option descriptions for the @command{ntpdc} program. It documents the ntpdc usage text and option meanings.
-
-This software is released under a specialized copyright license.
-
-@menu
-* ntpdc usage:: ntpdc usage help (-?)
-* ntpdc command:: command option (-c)
-* ntpdc debug-level:: debug-level option (-d)
-* ntpdc interactive:: interactive option (-i)
-* ntpdc ipv4:: ipv4 option (-4)
-* ntpdc ipv6:: ipv6 option (-6)
-* ntpdc listpeers:: listpeers option (-l)
-* ntpdc numeric:: numeric option (-n)
-* ntpdc peers:: peers option (-p)
-* ntpdc set-debug-level:: set-debug-level option (-D)
-* ntpdc showpeers:: showpeers option (-s)
-@end menu
-
-@node ntpdc usage
-@subsection ntpdc usage help (-?)
-@cindex ntpdc usage
-
-This is the automatically generated usage text for ntpdc:
-
-@exampleindent 0
-@example
-ntpdc - vendor-specific NTP query program - Ver. 4.2.6p3-RC10
-USAGE: ntpdc [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
- Flg Arg Option-Name Description
- -4 no ipv4 Force IPv4 DNS name resolution
- - prohibits these options:
- ipv6
- -6 no ipv6 Force IPv6 DNS name resolution
- - prohibits these options:
- ipv4
- -c Str command run a command and exit
- - may appear multiple times
- -l no listpeers Print a list of the peers
- - prohibits these options:
- command
- -p no peers Print a list of the peers
- - prohibits these options:
- command
- -s no showpeers Show a list of the peers
- - prohibits these options:
- command
- -i no interactive Force ntpq to operate in interactive mode
- - prohibits these options:
- command
- listpeers
- peers
- showpeers
- -d no debug-level Increase output debug message level
- - may appear multiple times
- -D Str set-debug-level Set the output debug message level
- - may appear multiple times
- -n no numeric numeric host addresses
- opt version Output version information and exit
- -? no help Display extended usage information and exit
- -! no more-help Extended usage information passed thru pager
- -> opt save-opts Save the option state to a config file
- -< Str load-opts Load options from a config file
- - 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.
-
-The following option preset mechanisms are supported:
- - reading file /deacon/users/stenn/.ntprc
- - reading file /deacon/backroom/snaps/ntp-stable/ntpdc/.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
-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 =] .
-
-please send bug reports to: http://bugs.ntp.org, bugs@@ntp.org
-@end example
-@exampleindent 4
-
-@node ntpdc ipv4
-@subsection ipv4 option (-4)
-@cindex ntpdc-ipv4
-
-This is the ``force ipv4 dns name resolution'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-ipv6.
-@end itemize
-
-Force DNS resolution of following host names on the command line
-to the IPv4 namespace.
-
-@node ntpdc ipv6
-@subsection ipv6 option (-6)
-@cindex ntpdc-ipv6
-
-This is the ``force ipv6 dns name resolution'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-ipv4.
-@end itemize
-
-Force DNS resolution of following host names on the command line
-to the IPv6 namespace.
-
-@node ntpdc command
-@subsection command option (-c)
-@cindex ntpdc-command
-
-This is the ``run a command and exit'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-may appear an unlimited number of times.
-@end itemize
-
-The following argument is interpreted as an interactive format command
-and is added to the list of commands to be executed on the specified
-host(s).
-
-@node ntpdc listpeers
-@subsection listpeers option (-l)
-@cindex ntpdc-listpeers
-
-This is the ``print a list of the peers'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-command.
-@end itemize
-
-Print a list of the peers known to the server as well as a summary of
-their state. This is equivalent to the 'listpeers' interactive command.
-
-@node ntpdc peers
-@subsection peers option (-p)
-@cindex ntpdc-peers
-
-This is the ``print a list of the peers'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-command.
-@end itemize
-
-Print a list of the peers known to the server as well as a summary
-of their state. This is equivalent to the 'peers' interactive command.
-
-@node ntpdc showpeers
-@subsection showpeers option (-s)
-@cindex ntpdc-showpeers
-
-This is the ``show a list of the peers'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-command.
-@end itemize
-
-Print a list of the peers known to the server as well as a summary
-of their state. This is equivalent to the 'dmpeers' interactive command.
-
-@node ntpdc interactive
-@subsection interactive option (-i)
-@cindex ntpdc-interactive
-
-This is the ``force ntpq to operate in interactive mode'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-command, listpeers, peers, showpeers.
-@end itemize
-
-Force ntpq to operate in interactive mode. Prompts will be written
-to the standard output and commands read from the standard input.
-
-@node ntpdc debug-level
-@subsection debug-level option (-d)
-@cindex ntpdc-debug-level
-
-This is the ``increase output debug message level'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-may appear an unlimited number of times.
-@end itemize
-
-Increase the debugging message output level.
-
-@node ntpdc set-debug-level
-@subsection set-debug-level option (-D)
-@cindex ntpdc-set-debug-level
-
-This is the ``set the output debug message level'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-may appear an unlimited number of times.
-@end itemize
-
-Set the output debugging level. Can be supplied multiple times,
-but each overrides the previous value(s).
-
-@node ntpdc numeric
-@subsection numeric option (-n)
-@cindex ntpdc-numeric
-
-This is the ``numeric host addresses'' option.
-Output all host addresses in dotted-quad numeric format rather than
-converting to the canonical host names.
-.TH NTPDC 1 2010-11-14 "( 4.2.6p3-RC10)" "Programmer's Manual"
+.TH NTPDC 1 2010-11-19 "( 4.2.6p3-RC10)" "Programmer's Manual"
.\" EDIT THIS FILE WITH CAUTION (ntpdc.1)
.\"
-.\" It has been AutoGen-ed November 14, 2010 at 08:54:21 AM by AutoGen 5.10
+.\" It has been AutoGen-ed November 19, 2010 at 11:47:05 PM by AutoGen 5.11.3
.\" From the definitions ntpdc-opts.def
.\" and the template file agman1.tpl
.\"
/*
* EDIT THIS FILE WITH CAUTION (ntpq-opts.c)
*
- * It has been AutoGen-ed November 14, 2010 at 08:54:21 AM by AutoGen 5.10
+ * It has been AutoGen-ed November 19, 2010 at 11:47:06 PM by AutoGen 5.11.3
* From the definitions ntpq-opts.def
* and the template file options
*
- * Generated from AutoOpts 33:0:8 templates.
- */
-
-/*
- * This file was produced by an AutoOpts template. AutoOpts is a
- * copyrighted work. This source file is not encumbered by AutoOpts
- * licensing, but is provided under the licensing terms chosen by the
- * ntpq author or copyright holder. AutoOpts is licensed under
- * the terms of the LGPL. The redistributable library (``libopts'') is
- * licensed under the terms of either the LGPL or, at the users discretion,
- * the BSD license. See the AutoOpts and/or libopts sources for details.
+ * Generated from AutoOpts 33:3:8 templates.
+ *
+ * AutoOpts is a copyrighted work. This source file is not encumbered
+ * by AutoOpts licensing, but is provided under the licensing terms chosen
+ * by the ntpq author or copyright holder. AutoOpts is
+ * licensed under the terms of the LGPL. The redistributable library
+ * (``libopts'') is licensed under the terms of either the LGPL or, at the
+ * users discretion, the BSD license. See the AutoOpts and/or libopts sources
+ * for details.
*
* This source file is copyrighted and licensed under the following terms:
*
* Ipv4 option description with
* "Must also have options" and "Incompatible options":
*/
-tSCC zIpv4Text[] =
+static char const zIpv4Text[] =
"Force IPv4 DNS name resolution";
-tSCC zIpv4_NAME[] = "IPV4";
-tSCC zIpv4_Name[] = "ipv4";
+static char const zIpv4_NAME[] = "IPV4";
+static char const zIpv4_Name[] = "ipv4";
static const int
aIpv4CantList[] = {
INDEX_OPT_IPV6, NO_EQUIVALENT };
* Ipv6 option description with
* "Must also have options" and "Incompatible options":
*/
-tSCC zIpv6Text[] =
+static char const zIpv6Text[] =
"Force IPv6 DNS name resolution";
-tSCC zIpv6_NAME[] = "IPV6";
-tSCC zIpv6_Name[] = "ipv6";
+static char const zIpv6_NAME[] = "IPV6";
+static char const zIpv6_Name[] = "ipv6";
static const int
aIpv6CantList[] = {
INDEX_OPT_IPV4, NO_EQUIVALENT };
/*
* Command option description:
*/
-tSCC zCommandText[] =
+static char const zCommandText[] =
"run a command and exit";
-tSCC zCommand_NAME[] = "COMMAND";
-tSCC zCommand_Name[] = "command";
+static char const zCommand_NAME[] = "COMMAND";
+static char const zCommand_Name[] = "command";
#define COMMAND_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
/*
* Debug_Level option description:
*/
-tSCC zDebug_LevelText[] =
+static char const zDebug_LevelText[] =
"Increase output debug message level";
-tSCC zDebug_Level_NAME[] = "DEBUG_LEVEL";
-tSCC zDebug_Level_Name[] = "debug-level";
+static char const zDebug_Level_NAME[] = "DEBUG_LEVEL";
+static char const zDebug_Level_Name[] = "debug-level";
#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED)
/*
* Set_Debug_Level option description:
*/
-tSCC zSet_Debug_LevelText[] =
+static char const zSet_Debug_LevelText[] =
"Set the output debug message level";
-tSCC zSet_Debug_Level_NAME[] = "SET_DEBUG_LEVEL";
-tSCC zSet_Debug_Level_Name[] = "set-debug-level";
+static char const zSet_Debug_Level_NAME[] = "SET_DEBUG_LEVEL";
+static char const zSet_Debug_Level_Name[] = "set-debug-level";
#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
* Peers option description with
* "Must also have options" and "Incompatible options":
*/
-tSCC zPeersText[] =
+static char const zPeersText[] =
"Print a list of the peers";
-tSCC zPeers_NAME[] = "PEERS";
-tSCC zPeers_Name[] = "peers";
+static char const zPeers_NAME[] = "PEERS";
+static char const zPeers_Name[] = "peers";
static const int
aPeersCantList[] = {
INDEX_OPT_INTERACTIVE, NO_EQUIVALENT };
* Interactive option description with
* "Must also have options" and "Incompatible options":
*/
-tSCC zInteractiveText[] =
+static char const zInteractiveText[] =
"Force ntpq to operate in interactive mode";
-tSCC zInteractive_NAME[] = "INTERACTIVE";
-tSCC zInteractive_Name[] = "interactive";
+static char const zInteractive_NAME[] = "INTERACTIVE";
+static char const zInteractive_Name[] = "interactive";
static const int
aInteractiveCantList[] = {
INDEX_OPT_COMMAND,
/*
* Numeric option description:
*/
-tSCC zNumericText[] =
+static char const zNumericText[] =
"numeric host addresses";
-tSCC zNumeric_NAME[] = "NUMERIC";
-tSCC zNumeric_Name[] = "numeric";
+static char const zNumeric_NAME[] = "NUMERIC";
+static char const zNumeric_Name[] = "numeric";
#define NUMERIC_FLAGS (OPTST_DISABLED)
/*
* Old_Rv option description:
*/
-tSCC zOld_RvText[] =
+static char const zOld_RvText[] =
"Always output status line with readvar";
-tSCC zOld_Rv_NAME[] = "OLD_RV";
-tSCC zOld_Rv_Name[] = "old-rv";
+static char const zOld_Rv_NAME[] = "OLD_RV";
+static char const zOld_Rv_Name[] = "old-rv";
#define OLD_RV_FLAGS (OPTST_DISABLED)
/*
* Help/More_Help/Version option descriptions:
*/
-tSCC zHelpText[] = "Display extended usage information and exit";
-tSCC zHelp_Name[] = "help";
+static char const zHelpText[] = "Display extended usage information and exit";
+static char const zHelp_Name[] = "help";
#ifdef HAVE_WORKING_FORK
#define OPTST_MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
-tSCC zMore_Help_Name[] = "more-help";
-tSCC zMore_HelpText[] = "Extended usage information passed thru pager";
+static char const zMore_Help_Name[] = "more-help";
+static char const zMore_HelpText[] = "Extended usage information passed thru pager";
#else
#define OPTST_MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
#define zMore_Help_Name NULL
OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT
#endif
-tSCC zVersionText[] = "Output version information and exit";
-tSCC zVersion_Name[] = "version";
-tSCC zSave_OptsText[] = "Save the option state to a config file";
-tSCC zSave_Opts_Name[] = "save-opts";
-tSCC zLoad_OptsText[] = "Load options from a config file";
-tSCC zLoad_Opts_NAME[] = "LOAD_OPTS";
-tSCC zNotLoad_Opts_Name[] = "no-load-opts";
-tSCC zNotLoad_Opts_Pfx[] = "no";
+static char const zVersionText[] = "Output version information and exit";
+static char const zVersion_Name[] = "version";
+static char const zSave_OptsText[] = "Save the option state to a config file";
+static char const zSave_Opts_Name[] = "save-opts";
+static char const zLoad_OptsText[] = "Load options from a config file";
+static char const zLoad_Opts_NAME[] = "LOAD_OPTS";
+static char const zNotLoad_Opts_Name[] = "no-load-opts";
+static char const zNotLoad_Opts_Pfx[] = "no";
#define zLoad_Opts_Name (zNotLoad_Opts_Name + 3)
/*
* Declare option callback procedures
* if multiple copies are allowed.
*/
extern tOptProc
- optionPagedUsage, optionStackArg, optionVersionStderr;
+ optionStackArg;
static tOptProc
doUsageOpt;
* When not under test, there are different procs to use
*/
extern tOptProc
- ntpq_custom_opt_handler, optionPagedUsage, optionPrintVersion;
+ ntpq_custom_opt_handler, optionBooleanVal, optionNestedVal,
+ optionNumericVal, optionPagedUsage, optionPrintVersion,
+ optionResetOpt, optionStackArg, optionTimeVal,
+ optionUnstackArg, optionVersionStderr;
static tOptProc
doOptSet_Debug_Level, doUsageOpt;
The same formats are used in NTPv4, although some of the\n\
variables have changed and new ones added.\n";
tSCC zFullVersion[] = NTPQ_FULL_VERSION;
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 495 */
+/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 493 */
#if defined(ENABLE_NLS)
# define OPTPROC_BASE OPTPROC_TRANSLATE
+ OPTPROC_SHORTOPT
+ OPTPROC_LONGOPT
+ OPTPROC_NO_REQ_OPT
- + OPTPROC_ENVIRON ),
+ + OPTPROC_ENVIRON
+ + OPTPROC_MISUSE ),
0, NULL, /* current option index, current option */
NULL, NULL, zPROGNAME,
zRcName, zCopyright, zCopyrightNotice,
tOptDesc* pOptDesc )
{
(void)pOptions;
- USAGE( EXIT_SUCCESS );
+ USAGE(EXIT_SUCCESS);
}
#if ! defined(TEST_NTPQ_OPTS)
DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
}
#endif /* defined(TEST_NTPQ_OPTS) */
-/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 109 */
+/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 107 */
#if defined(TEST_NTPQ_OPTS) /* TEST MAIN PROCEDURE: */
-extern void optionPutShell( tOptions* );
+extern void optionPutShell(tOptions*);
int
main(int argc, char** argv)
{
int res = EXIT_SUCCESS;
- (void)optionProcess( &ntpqOptions, argc, argv );
- optionPutShell( &ntpqOptions );
+ (void)optionProcess(&ntpqOptions, argc, argv);
+ optionPutShell(&ntpqOptions);
+ res = ferror(stdout);
+ if (res != 0)
+ fputs("output error writing to stdout\n", stderr);
return res;
}
#endif /* defined TEST_NTPQ_OPTS */
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 627 */
+/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 626 */
#if ENABLE_NLS
#include <stdio.h>
#include <unistd.h>
#include <autoopts/usage-txt.h>
-static char* AO_gettext( char const* pz );
+static char* AO_gettext(char const* pz);
static void coerce_it(void** s);
static char*
-AO_gettext( char const* pz )
+AO_gettext(char const* pz)
{
char* pzRes;
if (pz == NULL)
pzRes = _(pz);
if (pzRes == pz)
return pzRes;
- pzRes = strdup( pzRes );
+ pzRes = strdup(pzRes);
if (pzRes == NULL) {
- fputs( _("No memory for duping translated strings\n"), stderr );
- exit( EXIT_FAILURE );
+ fputs(_("No memory for duping translated strings\n"), stderr);
+ exit(EXIT_FAILURE);
}
return pzRes;
}
* This invokes the translation code (e.g. gettext(3)).
*/
static void
-translate_option_strings( void )
+translate_option_strings(void)
{
/*
* Guard against re-translation. It won't work. The strings will have
/*
* EDIT THIS FILE WITH CAUTION (ntpq-opts.h)
*
- * It has been AutoGen-ed November 14, 2010 at 08:54:21 AM by AutoGen 5.10
+ * It has been AutoGen-ed November 19, 2010 at 11:47:06 PM by AutoGen 5.11.3
* From the definitions ntpq-opts.def
* and the template file options
*
- * Generated from AutoOpts 33:0:8 templates.
- */
-
-/*
- * This file was produced by an AutoOpts template. AutoOpts is a
- * copyrighted work. This header file is not encumbered by AutoOpts
- * licensing, but is provided under the licensing terms chosen by the
- * ntpq author or copyright holder. AutoOpts is licensed under
- * the terms of the LGPL. The redistributable library (``libopts'') is
- * licensed under the terms of either the LGPL or, at the users discretion,
- * the BSD license. See the AutoOpts and/or libopts sources for details.
+ * Generated from AutoOpts 33:3:8 templates.
+ *
+ * AutoOpts is a copyrighted work. This header file is not encumbered
+ * by AutoOpts licensing, but is provided under the licensing terms chosen
+ * by the ntpq author or copyright holder. AutoOpts is
+ * licensed under the terms of the LGPL. The redistributable library
+ * (``libopts'') is licensed under the terms of either the LGPL or, at the
+ * users discretion, the BSD license. See the AutoOpts and/or libopts sources
+ * for details.
*
* This source file is copyrighted and licensed under the following terms:
*
* tolerable version is at least as old as what was current when the header
* template was released.
*/
-#define AO_TEMPLATE_VERSION 135168
+#define AO_TEMPLATE_VERSION 135171
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header
/*
* Interface defines for all options. Replace "n" with the UPPER_CASED
* option name (as in the teOptIndex enumeration above).
- * e.g. HAVE_OPT( IPV4 )
+ * e.g. HAVE_OPT(IPV4)
*/
#define DESC(n) (ntpqOptions.pOptDesc[INDEX_OPT_## n])
#define HAVE_OPT(n) (! UNUSED_OPT(& DESC(n)))
#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
#define CLEAR_OPT(n) STMTS( \
DESC(n).fOptState &= OPTST_PERSISTENT_MASK; \
- if ( (DESC(n).fOptState & OPTST_INITENABLED) == 0) \
+ if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \
DESC(n).fOptState |= OPTST_DISABLED; \
DESC(n).optCookie = NULL )
/*
* Interface defines not associated with particular options
*/
-#define ERRSKIP_OPTERR STMTS( ntpqOptions.fOptSet &= ~OPTPROC_ERRSTOP )
-#define ERRSTOP_OPTERR STMTS( ntpqOptions.fOptSet |= OPTPROC_ERRSTOP )
+#define ERRSKIP_OPTERR STMTS(ntpqOptions.fOptSet &= ~OPTPROC_ERRSTOP)
+#define ERRSTOP_OPTERR STMTS(ntpqOptions.fOptSet |= OPTPROC_ERRSTOP)
#define RESTART_OPT(n) STMTS( \
ntpqOptions.curOptIdx = (n); \
- ntpqOptions.pzCurOpt = NULL )
+ ntpqOptions.pzCurOpt = NULL)
#define START_OPT RESTART_OPT(1)
-#define USAGE(c) (*ntpqOptions.pUsageProc)( &ntpqOptions, c )
-/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 409 */
+#define USAGE(c) (*ntpqOptions.pUsageProc)(&ntpqOptions, c)
+/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 408 */
/* * * * * *
*
#if defined(ENABLE_NLS)
# ifndef _
# include <stdio.h>
- static inline char* aoGetsText( char const* pz ) {
+ static inline char* aoGetsText(char const* pz) {
if (pz == NULL) return NULL;
- return (char*)gettext( pz );
+ return (char*)gettext(pz);
}
# define _(s) aoGetsText(s)
# endif /* _() */
@pindex ntpq
@cindex standard NTP query program
@ignore
-#
-# EDIT THIS FILE WITH CAUTION (ntpq-opts.texi)
-#
-# It has been AutoGen-ed November 14, 2010 at 08:54:30 AM by AutoGen 5.10
-# From the definitions ntpq-opts.def
-# and the template file aginfo.tpl
-@end ignore
-This program has no explanation.
-
-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.
-
-This section was generated by @strong{AutoGen},
-the aginfo template and the option descriptions for the @command{ntpq} program. It documents the ntpq usage text and option meanings.
-
-This software is released under a specialized copyright license.
-
-@menu
-* ntpq usage:: ntpq usage help (-?)
-* ntpq command:: command option (-c)
-* ntpq debug-level:: debug-level option (-d)
-* ntpq interactive:: interactive option (-i)
-* ntpq ipv4:: ipv4 option (-4)
-* ntpq ipv6:: ipv6 option (-6)
-* ntpq numeric:: numeric option (-n)
-* ntpq old-rv:: old-rv option
-* ntpq peers:: peers option (-p)
-* ntpq set-debug-level:: set-debug-level option (-D)
-@end menu
-
-@node ntpq usage
-@subsection ntpq usage help (-?)
-@cindex ntpq usage
-
-This is the automatically generated usage text for ntpq:
-
-@exampleindent 0
-@example
-ntpq - standard NTP query program - Ver. 4.2.6p3-RC10
-USAGE: ntpq [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
- Flg Arg Option-Name Description
- -4 no ipv4 Force IPv4 DNS name resolution
- - prohibits these options:
- ipv6
- -6 no ipv6 Force IPv6 DNS name resolution
- - prohibits these options:
- ipv4
- -c Str command run a command and exit
- - may appear multiple times
- -d no debug-level Increase output debug message level
- - may appear multiple times
- -D Str set-debug-level Set the output debug message level
- - may appear multiple times
- -p no peers Print a list of the peers
- - prohibits these options:
- interactive
- -i no interactive Force ntpq to operate in interactive mode
- - prohibits these options:
- command
- peers
- -n no numeric numeric host addresses
- no old-rv Always output status line with readvar
- opt version Output version information and exit
- -? no help Display extended usage information and exit
- -! no more-help Extended usage information passed thru pager
- -> opt save-opts Save the option state to a config file
- -< Str load-opts Load options from a config file
- - 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.
-
-The following option preset mechanisms are supported:
- - reading file /deacon/users/stenn/.ntprc
- - reading file /deacon/backroom/snaps/ntp-stable/ntpq/.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.
-
-please send bug reports to: http://bugs.ntp.org, bugs@@ntp.org
-@end example
-@exampleindent 4
-
-@node ntpq ipv4
-@subsection ipv4 option (-4)
-@cindex ntpq-ipv4
-
-This is the ``force ipv4 dns name resolution'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-ipv6.
-@end itemize
-
-Force DNS resolution of following host names on the command line
-to the IPv4 namespace.
-
-@node ntpq ipv6
-@subsection ipv6 option (-6)
-@cindex ntpq-ipv6
-
-This is the ``force ipv6 dns name resolution'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-ipv4.
-@end itemize
-
-Force DNS resolution of following host names on the command line
-to the IPv6 namespace.
-
-@node ntpq command
-@subsection command option (-c)
-@cindex ntpq-command
-
-This is the ``run a command and exit'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-may appear an unlimited number of times.
-@end itemize
-
-The following argument is interpreted as an interactive format command
-and is added to the list of commands to be executed on the specified
-host(s).
-
-@node ntpq debug-level
-@subsection debug-level option (-d)
-@cindex ntpq-debug-level
-
-This is the ``increase output debug message level'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-may appear an unlimited number of times.
-@end itemize
-
-Increase the debugging message output level.
-
-@node ntpq set-debug-level
-@subsection set-debug-level option (-D)
-@cindex ntpq-set-debug-level
-
-This is the ``set the output debug message level'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-may appear an unlimited number of times.
-@end itemize
-
-Set the output debugging level. Can be supplied multiple times,
-but each overrides the previous value(s).
-
-@node ntpq peers
-@subsection peers option (-p)
-@cindex ntpq-peers
-
-This is the ``print a list of the peers'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-interactive.
-@end itemize
-
-Print a list of the peers known to the server as well as a summary
-of their state. This is equivalent to the 'peers' interactive command.
-
-@node ntpq interactive
-@subsection interactive option (-i)
-@cindex ntpq-interactive
-
-This is the ``force ntpq to operate in interactive mode'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-command, peers.
-@end itemize
-
-Force ntpq to operate in interactive mode. Prompts will be written
-to the standard output and commands read from the standard input.
-
-@node ntpq numeric
-@subsection numeric option (-n)
-@cindex ntpq-numeric
-
-This is the ``numeric host addresses'' option.
-Output all host addresses in dotted-quad numeric format rather than
-converting to the canonical host names.
-
-@node ntpq old-rv
-@subsection old-rv option
-@cindex ntpq-old-rv
-
-This is the ``always output status line with readvar'' option.
-By default, ntpq now suppresses the associd=... line that
-precedes the output of "readvar" (alias "rv") when a single
-variable is requested, such as ntpq -c "rv 0 offset". This
-option causes ntpq to include both lines of output for a
-single-variable readvar. Using an environment variable to
-preset this option in a script will enable both older and
-newer ntpq to behave identically in this regard.
-.TH NTPQ 1 2010-11-14 "( 4.2.6p3-RC10)" "Programmer's Manual"
+.TH NTPQ 1 2010-11-19 "( 4.2.6p3-RC10)" "Programmer's Manual"
.\" EDIT THIS FILE WITH CAUTION (ntpq.1)
.\"
-.\" It has been AutoGen-ed November 14, 2010 at 08:54:30 AM by AutoGen 5.10
+.\" It has been AutoGen-ed November 19, 2010 at 11:47:22 PM by AutoGen 5.11.3
.\" From the definitions ntpq-opts.def
.\" and the template file agman1.tpl
.\"
/*
* EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.c)
*
- * It has been AutoGen-ed November 14, 2010 at 08:54:33 AM by AutoGen 5.10
+ * It has been AutoGen-ed November 19, 2010 at 11:47:23 PM by AutoGen 5.11.3
* From the definitions ntpsnmpd-opts.def
* and the template file options
*
- * Generated from AutoOpts 33:0:8 templates.
- */
-
-/*
- * This file was produced by an AutoOpts template. AutoOpts is a
- * copyrighted work. This source file is not encumbered by AutoOpts
- * licensing, but is provided under the licensing terms chosen by the
- * ntpsnmpd author or copyright holder. AutoOpts is licensed under
- * the terms of the LGPL. The redistributable library (``libopts'') is
- * licensed under the terms of either the LGPL or, at the users discretion,
- * the BSD license. See the AutoOpts and/or libopts sources for details.
+ * Generated from AutoOpts 33:3:8 templates.
+ *
+ * AutoOpts is a copyrighted work. This source file is not encumbered
+ * by AutoOpts licensing, but is provided under the licensing terms chosen
+ * by the ntpsnmpd author or copyright holder. AutoOpts is
+ * licensed under the terms of the LGPL. The redistributable library
+ * (``libopts'') is licensed under the terms of either the LGPL or, at the
+ * users discretion, the BSD license. See the AutoOpts and/or libopts sources
+ * for details.
*
* This source file is copyrighted and licensed under the following terms:
*
/*
* Nofork option description:
*/
-tSCC zNoforkText[] =
+static char const zNoforkText[] =
"Do not fork";
-tSCC zNofork_NAME[] = "NOFORK";
-tSCC zNofork_Name[] = "nofork";
+static char const zNofork_NAME[] = "NOFORK";
+static char const zNofork_Name[] = "nofork";
#define NOFORK_FLAGS (OPTST_DISABLED)
/*
* Syslog option description:
*/
-tSCC zSyslogText[] =
+static char const zSyslogText[] =
"Log to syslog()";
-tSCC zSyslog_NAME[] = "SYSLOG";
-tSCC zSyslog_Name[] = "syslog";
+static char const zSyslog_NAME[] = "SYSLOG";
+static char const zSyslog_Name[] = "syslog";
#define SYSLOG_FLAGS (OPTST_DISABLED)
/*
* Agentxsocket option description:
*/
-tSCC zAgentxsocketText[] =
+static char const zAgentxsocketText[] =
"The socket address ntpsnmpd uses to connect to net-snmpd";
-tSCC zAgentxsocket_NAME[] = "AGENTXSOCKET";
-tSCC zAgentxsocket_Name[] = "agentxsocket";
-tSCC zAgentxsocketDefaultArg[] = "unix:/var/agentx/master";
+static char const zAgentxsocket_NAME[] = "AGENTXSOCKET";
+static char const zAgentxsocket_Name[] = "agentxsocket";
+static char const zAgentxsocketDefaultArg[] = "unix:/var/agentx/master";
#define AGENTXSOCKET_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
/*
* Help/More_Help/Version option descriptions:
*/
-tSCC zHelpText[] = "Display extended usage information and exit";
-tSCC zHelp_Name[] = "help";
+static char const zHelpText[] = "Display extended usage information and exit";
+static char const zHelp_Name[] = "help";
#ifdef HAVE_WORKING_FORK
#define OPTST_MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
-tSCC zMore_Help_Name[] = "more-help";
-tSCC zMore_HelpText[] = "Extended usage information passed thru pager";
+static char const zMore_Help_Name[] = "more-help";
+static char const zMore_HelpText[] = "Extended usage information passed thru pager";
#else
#define OPTST_MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
#define zMore_Help_Name NULL
OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT
#endif
-tSCC zVersionText[] = "Output version information and exit";
-tSCC zVersion_Name[] = "version";
-tSCC zSave_OptsText[] = "Save the option state to a config file";
-tSCC zSave_Opts_Name[] = "save-opts";
-tSCC zLoad_OptsText[] = "Load options from a config file";
-tSCC zLoad_Opts_NAME[] = "LOAD_OPTS";
-tSCC zNotLoad_Opts_Name[] = "no-load-opts";
-tSCC zNotLoad_Opts_Pfx[] = "no";
+static char const zVersionText[] = "Output version information and exit";
+static char const zVersion_Name[] = "version";
+static char const zSave_OptsText[] = "Save the option state to a config file";
+static char const zSave_Opts_Name[] = "save-opts";
+static char const zLoad_OptsText[] = "Load options from a config file";
+static char const zLoad_Opts_NAME[] = "LOAD_OPTS";
+static char const zNotLoad_Opts_Name[] = "no-load-opts";
+static char const zNotLoad_Opts_Pfx[] = "no";
#define zLoad_Opts_Name (zNotLoad_Opts_Name + 3)
/*
* Declare option callback procedures
* Under test, omit argument processing, or call optionStackArg,
* if multiple copies are allowed.
*/
-extern tOptProc
- optionPagedUsage, optionVersionStderr;
static tOptProc
doUsageOpt;
* When not under test, there are different procs to use
*/
extern tOptProc
- optionPagedUsage, optionPrintVersion;
+ optionBooleanVal, optionNestedVal, optionNumericVal,
+ optionPagedUsage, optionPrintVersion, optionResetOpt,
+ optionStackArg, optionTimeVal, optionUnstackArg,
+ optionVersionStderr;
static tOptProc
doUsageOpt;
#endif /* defined(TEST_NTPSNMPD_OPTS) */
#define zExplain NULL
#define zDetail NULL
tSCC zFullVersion[] = NTPSNMPD_FULL_VERSION;
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 495 */
+/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 493 */
#if defined(ENABLE_NLS)
# define OPTPROC_BASE OPTPROC_TRANSLATE
+ OPTPROC_LONGOPT
+ OPTPROC_NO_REQ_OPT
+ OPTPROC_ENVIRON
- + OPTPROC_NO_ARGS ),
+ + OPTPROC_NO_ARGS
+ + OPTPROC_MISUSE ),
0, NULL, /* current option index, current option */
NULL, NULL, zPROGNAME,
zRcName, zCopyright, zCopyrightNotice,
tOptDesc* pOptDesc )
{
(void)pOptions;
- USAGE( EXIT_SUCCESS );
+ USAGE(EXIT_SUCCESS);
}
-/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 109 */
+/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 107 */
#if defined(TEST_NTPSNMPD_OPTS) /* TEST MAIN PROCEDURE: */
-extern void optionPutShell( tOptions* );
+extern void optionPutShell(tOptions*);
int
main(int argc, char** argv)
{
int res = EXIT_SUCCESS;
- (void)optionProcess( &ntpsnmpdOptions, argc, argv );
- optionPutShell( &ntpsnmpdOptions );
+ (void)optionProcess(&ntpsnmpdOptions, argc, argv);
+ optionPutShell(&ntpsnmpdOptions);
+ res = ferror(stdout);
+ if (res != 0)
+ fputs("output error writing to stdout\n", stderr);
return res;
}
#endif /* defined TEST_NTPSNMPD_OPTS */
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 627 */
+/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 626 */
#if ENABLE_NLS
#include <stdio.h>
#include <unistd.h>
#include <autoopts/usage-txt.h>
-static char* AO_gettext( char const* pz );
+static char* AO_gettext(char const* pz);
static void coerce_it(void** s);
static char*
-AO_gettext( char const* pz )
+AO_gettext(char const* pz)
{
char* pzRes;
if (pz == NULL)
pzRes = _(pz);
if (pzRes == pz)
return pzRes;
- pzRes = strdup( pzRes );
+ pzRes = strdup(pzRes);
if (pzRes == NULL) {
- fputs( _("No memory for duping translated strings\n"), stderr );
- exit( EXIT_FAILURE );
+ fputs(_("No memory for duping translated strings\n"), stderr);
+ exit(EXIT_FAILURE);
}
return pzRes;
}
* This invokes the translation code (e.g. gettext(3)).
*/
static void
-translate_option_strings( void )
+translate_option_strings(void)
{
/*
* Guard against re-translation. It won't work. The strings will have
/*
* EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.h)
*
- * It has been AutoGen-ed November 14, 2010 at 08:54:33 AM by AutoGen 5.10
+ * It has been AutoGen-ed November 19, 2010 at 11:47:23 PM by AutoGen 5.11.3
* From the definitions ntpsnmpd-opts.def
* and the template file options
*
- * Generated from AutoOpts 33:0:8 templates.
- */
-
-/*
- * This file was produced by an AutoOpts template. AutoOpts is a
- * copyrighted work. This header file is not encumbered by AutoOpts
- * licensing, but is provided under the licensing terms chosen by the
- * ntpsnmpd author or copyright holder. AutoOpts is licensed under
- * the terms of the LGPL. The redistributable library (``libopts'') is
- * licensed under the terms of either the LGPL or, at the users discretion,
- * the BSD license. See the AutoOpts and/or libopts sources for details.
+ * Generated from AutoOpts 33:3:8 templates.
+ *
+ * AutoOpts is a copyrighted work. This header file is not encumbered
+ * by AutoOpts licensing, but is provided under the licensing terms chosen
+ * by the ntpsnmpd author or copyright holder. AutoOpts is
+ * licensed under the terms of the LGPL. The redistributable library
+ * (``libopts'') is licensed under the terms of either the LGPL or, at the
+ * users discretion, the BSD license. See the AutoOpts and/or libopts sources
+ * for details.
*
* This source file is copyrighted and licensed under the following terms:
*
* tolerable version is at least as old as what was current when the header
* template was released.
*/
-#define AO_TEMPLATE_VERSION 135168
+#define AO_TEMPLATE_VERSION 135171
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header
/*
* Interface defines for all options. Replace "n" with the UPPER_CASED
* option name (as in the teOptIndex enumeration above).
- * e.g. HAVE_OPT( NOFORK )
+ * e.g. HAVE_OPT(NOFORK)
*/
#define DESC(n) (ntpsnmpdOptions.pOptDesc[INDEX_OPT_## n])
#define HAVE_OPT(n) (! UNUSED_OPT(& DESC(n)))
#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
#define CLEAR_OPT(n) STMTS( \
DESC(n).fOptState &= OPTST_PERSISTENT_MASK; \
- if ( (DESC(n).fOptState & OPTST_INITENABLED) == 0) \
+ if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \
DESC(n).fOptState |= OPTST_DISABLED; \
DESC(n).optCookie = NULL )
/*
* Interface defines not associated with particular options
*/
-#define ERRSKIP_OPTERR STMTS( ntpsnmpdOptions.fOptSet &= ~OPTPROC_ERRSTOP )
-#define ERRSTOP_OPTERR STMTS( ntpsnmpdOptions.fOptSet |= OPTPROC_ERRSTOP )
+#define ERRSKIP_OPTERR STMTS(ntpsnmpdOptions.fOptSet &= ~OPTPROC_ERRSTOP)
+#define ERRSTOP_OPTERR STMTS(ntpsnmpdOptions.fOptSet |= OPTPROC_ERRSTOP)
#define RESTART_OPT(n) STMTS( \
ntpsnmpdOptions.curOptIdx = (n); \
- ntpsnmpdOptions.pzCurOpt = NULL )
+ ntpsnmpdOptions.pzCurOpt = NULL)
#define START_OPT RESTART_OPT(1)
-#define USAGE(c) (*ntpsnmpdOptions.pUsageProc)( &ntpsnmpdOptions, c )
-/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 409 */
+#define USAGE(c) (*ntpsnmpdOptions.pUsageProc)(&ntpsnmpdOptions, c)
+/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 408 */
/* * * * * *
*
#if defined(ENABLE_NLS)
# ifndef _
# include <stdio.h>
- static inline char* aoGetsText( char const* pz ) {
+ static inline char* aoGetsText(char const* pz) {
if (pz == NULL) return NULL;
- return (char*)gettext( pz );
+ return (char*)gettext(pz);
}
# define _(s) aoGetsText(s)
# endif /* _() */
@pindex ntpsnmpd
@cindex NTP SNMP MIB agent
@ignore
-#
-# EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.texi)
-#
-# It has been AutoGen-ed November 14, 2010 at 08:54:39 AM by AutoGen 5.10
-# From the definitions ntpsnmpd-opts.def
-# and the template file aginfo.tpl
-@end ignore
-This program has no explanation.
-
-
-
-This section was generated by @strong{AutoGen},
-the aginfo template and the option descriptions for the @command{ntpsnmpd} program. It documents the ntpsnmpd usage text and option meanings.
-
-This software is released under a specialized copyright license.
-
-@menu
-* ntpsnmpd usage:: ntpsnmpd usage help (-?)
-* ntpsnmpd agentxsocket:: agentxsocket option
-* ntpsnmpd nofork:: nofork option (-n)
-* ntpsnmpd syslog:: syslog option (-p)
-@end menu
-
-@node ntpsnmpd usage
-@subsection ntpsnmpd usage help (-?)
-@cindex ntpsnmpd usage
-
-This is the automatically generated usage text for ntpsnmpd:
-
-@exampleindent 0
-@example
-ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.6p3-RC10
-USAGE: ntpsnmpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
- Flg Arg Option-Name Description
- -n no nofork Do not fork
- -p no syslog Log to syslog()
- Str agentxsocket The socket address ntpsnmpd uses to connect to net-snmpd
- opt version Output version information and exit
- -? no help Display extended usage information and exit
- -! no more-help Extended usage information passed thru pager
- -> opt save-opts Save the option state to a config file
- -< Str load-opts Load options from a config file
- - 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.
-
-The following option preset mechanisms are supported:
- - reading file /deacon/users/stenn/.ntprc
- - reading file /deacon/backroom/snaps/ntp-stable/ntpsnmpd/.ntprc
- - examining environment variables named NTPSNMPD_*
-
-please send bug reports to: http://bugs.ntp.org, bugs@@ntp.org
-@end example
-@exampleindent 4
-
-@node ntpsnmpd nofork
-@subsection nofork option (-n)
-@cindex ntpsnmpd-nofork
-
-This is the ``do not fork'' option.
-
-
-@node ntpsnmpd syslog
-@subsection syslog option (-p)
-@cindex ntpsnmpd-syslog
-
-This is the ``log to syslog()'' option.
-
-
-@node ntpsnmpd agentxsocket
-@subsection agentxsocket option
-@cindex ntpsnmpd-agentxsocket
-
-This is the ``the socket address ntpsnmpd uses to connect to net-snmpd'' option.
-[<transport-specifier>:]<transport-address>
-The default is the Unix Domain socket "unix:/var/agentx/master". Another common alternative is tcp:localhost:705.
-.TH NTPSNMPD 1 2010-11-14 "( 4.2.6p3-RC10)" "Programmer's Manual"
+.TH NTPSNMPD 1 2010-11-19 "( 4.2.6p3-RC10)" "Programmer's Manual"
.\" EDIT THIS FILE WITH CAUTION (ntpsnmpd.1)
.\"
-.\" It has been AutoGen-ed November 14, 2010 at 08:54:38 AM by AutoGen 5.10
+.\" It has been AutoGen-ed November 19, 2010 at 11:47:33 PM by AutoGen 5.11.3
.\" From the definitions ntpsnmpd-opts.def
.\" and the template file agman1.tpl
.\"
/*
* EDIT THIS FILE WITH CAUTION (sntp-opts.c)
*
- * It has been AutoGen-ed November 14, 2010 at 08:55:47 AM by AutoGen 5.10
+ * It has been AutoGen-ed November 19, 2010 at 11:48:43 PM by AutoGen 5.11.3
* From the definitions sntp-opts.def
* and the template file options
*
- * Generated from AutoOpts 33:0:8 templates.
- */
-
-/*
- * This file was produced by an AutoOpts template. AutoOpts is a
- * copyrighted work. This source file is not encumbered by AutoOpts
- * licensing, but is provided under the licensing terms chosen by the
- * sntp author or copyright holder. AutoOpts is licensed under
- * the terms of the LGPL. The redistributable library (``libopts'') is
- * licensed under the terms of either the LGPL or, at the users discretion,
- * the BSD license. See the AutoOpts and/or libopts sources for details.
+ * Generated from AutoOpts 33:3:8 templates.
+ *
+ * AutoOpts is a copyrighted work. This source file is not encumbered
+ * by AutoOpts licensing, but is provided under the licensing terms chosen
+ * by the sntp author or copyright holder. AutoOpts is
+ * licensed under the terms of the LGPL. The redistributable library
+ * (``libopts'') is licensed under the terms of either the LGPL or, at the
+ * users discretion, the BSD license. See the AutoOpts and/or libopts sources
+ * for details.
*
* This source file is copyrighted and licensed under the following terms:
*
* Ipv4 option description with
* "Must also have options" and "Incompatible options":
*/
-tSCC zIpv4Text[] =
+static char const zIpv4Text[] =
"Force IPv4 DNS name resolution";
-tSCC zIpv4_NAME[] = "IPV4";
-tSCC zIpv4_Name[] = "ipv4";
+static char const zIpv4_NAME[] = "IPV4";
+static char const zIpv4_Name[] = "ipv4";
static const int
aIpv4CantList[] = {
INDEX_OPT_IPV6, NO_EQUIVALENT };
* Ipv6 option description with
* "Must also have options" and "Incompatible options":
*/
-tSCC zIpv6Text[] =
+static char const zIpv6Text[] =
"Force IPv6 DNS name resolution";
-tSCC zIpv6_NAME[] = "IPV6";
-tSCC zIpv6_Name[] = "ipv6";
+static char const zIpv6_NAME[] = "IPV6";
+static char const zIpv6_Name[] = "ipv6";
static const int
aIpv6CantList[] = {
INDEX_OPT_IPV4, NO_EQUIVALENT };
/*
* Normalverbose option description:
*/
-tSCC zNormalverboseText[] =
+static char const zNormalverboseText[] =
"Normal verbose";
-tSCC zNormalverbose_NAME[] = "NORMALVERBOSE";
-tSCC zNormalverbose_Name[] = "normalverbose";
+static char const zNormalverbose_NAME[] = "NORMALVERBOSE";
+static char const zNormalverbose_Name[] = "normalverbose";
#define NORMALVERBOSE_FLAGS (OPTST_DISABLED)
/*
* Kod option description:
*/
-tSCC zKodText[] =
+static char const zKodText[] =
"KoD history filename";
-tSCC zKod_NAME[] = "KOD";
-tSCC zKod_Name[] = "kod";
+static char const zKod_NAME[] = "KOD";
+static char const zKod_Name[] = "kod";
#define KOD_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
* Syslog option description with
* "Must also have options" and "Incompatible options":
*/
-tSCC zSyslogText[] =
+static char const zSyslogText[] =
"Logging with syslog";
-tSCC zSyslog_NAME[] = "SYSLOG";
-tSCC zSyslog_Name[] = "syslog";
+static char const zSyslog_NAME[] = "SYSLOG";
+static char const zSyslog_Name[] = "syslog";
static const int
aSyslogCantList[] = {
INDEX_OPT_FILELOG, NO_EQUIVALENT };
* Filelog option description with
* "Must also have options" and "Incompatible options":
*/
-tSCC zFilelogText[] =
+static char const zFilelogText[] =
"Log to specified logfile";
-tSCC zFilelog_NAME[] = "FILELOG";
-tSCC zFilelog_Name[] = "filelog";
+static char const zFilelog_NAME[] = "FILELOG";
+static char const zFilelog_Name[] = "filelog";
static const int
aFilelogCantList[] = {
INDEX_OPT_SYSLOG, NO_EQUIVALENT };
* Settod option description with
* "Must also have options" and "Incompatible options":
*/
-tSCC zSettodText[] =
+static char const zSettodText[] =
"Set (step) the time with settimeofday()";
-tSCC zSettod_NAME[] = "SETTOD";
-tSCC zSettod_Name[] = "settod";
+static char const zSettod_NAME[] = "SETTOD";
+static char const zSettod_Name[] = "settod";
static const int
aSettodCantList[] = {
INDEX_OPT_ADJTIME, NO_EQUIVALENT };
* Adjtime option description with
* "Must also have options" and "Incompatible options":
*/
-tSCC zAdjtimeText[] =
+static char const zAdjtimeText[] =
"Set (slew) the time with adjtime()";
-tSCC zAdjtime_NAME[] = "ADJTIME";
-tSCC zAdjtime_Name[] = "adjtime";
+static char const zAdjtime_NAME[] = "ADJTIME";
+static char const zAdjtime_Name[] = "adjtime";
static const int
aAdjtimeCantList[] = {
INDEX_OPT_SETTOD, NO_EQUIVALENT };
/*
* Broadcast option description:
*/
-tSCC zBroadcastText[] =
+static char const zBroadcastText[] =
"Use broadcasts to the address specified for synchronisation";
-tSCC zBroadcast_NAME[] = "BROADCAST";
-tSCC zBroadcast_Name[] = "broadcast";
+static char const zBroadcast_NAME[] = "BROADCAST";
+static char const zBroadcast_Name[] = "broadcast";
#define BROADCAST_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
/*
* Timeout option description:
*/
-tSCC zTimeoutText[] =
+static char const zTimeoutText[] =
"Specify the number of seconds to wait for broadcasts";
-tSCC zTimeout_NAME[] = "TIMEOUT";
-tSCC zTimeout_Name[] = "timeout";
+static char const zTimeout_NAME[] = "TIMEOUT";
+static char const zTimeout_Name[] = "timeout";
#define zTimeoutDefaultArg ((char const*)68)
#define TIMEOUT_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
/*
* Authentication option description:
*/
-tSCC zAuthenticationText[] =
+static char const zAuthenticationText[] =
"Enable authentication with the key auth-keynumber";
-tSCC zAuthentication_NAME[] = "AUTHENTICATION";
-tSCC zAuthentication_Name[] = "authentication";
+static char const zAuthentication_NAME[] = "AUTHENTICATION";
+static char const zAuthentication_Name[] = "authentication";
#define AUTHENTICATION_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
/*
* Keyfile option description:
*/
-tSCC zKeyfileText[] =
+static char const zKeyfileText[] =
"Specify a keyfile. SNTP will look in this file for the key specified with -a";
-tSCC zKeyfile_NAME[] = "KEYFILE";
-tSCC zKeyfile_Name[] = "keyfile";
+static char const zKeyfile_NAME[] = "KEYFILE";
+static char const zKeyfile_Name[] = "keyfile";
#define KEYFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
/*
* Help/More_Help/Version option descriptions:
*/
-tSCC zHelpText[] = "Display extended usage information and exit";
-tSCC zHelp_Name[] = "help";
+static char const zHelpText[] = "Display extended usage information and exit";
+static char const zHelp_Name[] = "help";
#ifdef HAVE_WORKING_FORK
#define OPTST_MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
-tSCC zMore_Help_Name[] = "more-help";
-tSCC zMore_HelpText[] = "Extended usage information passed thru pager";
+static char const zMore_Help_Name[] = "more-help";
+static char const zMore_HelpText[] = "Extended usage information passed thru pager";
#else
#define OPTST_MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
#define zMore_Help_Name NULL
OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT
#endif
-tSCC zVersionText[] = "Output version information and exit";
-tSCC zVersion_Name[] = "version";
-tSCC zSave_OptsText[] = "Save the option state to a config file";
-tSCC zSave_Opts_Name[] = "save-opts";
-tSCC zLoad_OptsText[] = "Load options from a config file";
-tSCC zLoad_Opts_NAME[] = "LOAD_OPTS";
-tSCC zNotLoad_Opts_Name[] = "no-load-opts";
-tSCC zNotLoad_Opts_Pfx[] = "no";
+static char const zVersionText[] = "Output version information and exit";
+static char const zVersion_Name[] = "version";
+static char const zSave_OptsText[] = "Save the option state to a config file";
+static char const zSave_Opts_Name[] = "save-opts";
+static char const zLoad_OptsText[] = "Load options from a config file";
+static char const zLoad_Opts_NAME[] = "LOAD_OPTS";
+static char const zNotLoad_Opts_Name[] = "no-load-opts";
+static char const zNotLoad_Opts_Pfx[] = "no";
#define zLoad_Opts_Name (zNotLoad_Opts_Name + 3)
/*
* Declare option callback procedures
* Under test, omit argument processing, or call optionStackArg,
* if multiple copies are allowed.
*/
-extern tOptProc
- optionNumericVal, optionPagedUsage, optionVersionStderr;
static tOptProc
doUsageOpt;
* When not under test, there are different procs to use
*/
extern tOptProc
- optionNumericVal, optionPagedUsage, optionPrintVersion;
+ optionBooleanVal, optionNestedVal, optionNumericVal,
+ optionPagedUsage, optionPrintVersion, optionResetOpt,
+ optionStackArg, optionTimeVal, optionUnstackArg,
+ optionVersionStderr;
static tOptProc
doUsageOpt;
#endif /* defined(TEST_SNTP_OPTS) */
NTP and SNTP are defined by RFC 5905, which\n\
obsoletes RFC 4330 and RFC 1305.\n";
tSCC zFullVersion[] = SNTP_FULL_VERSION;
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 495 */
+/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 493 */
#if defined(ENABLE_NLS)
# define OPTPROC_BASE OPTPROC_TRANSLATE
+ OPTPROC_LONGOPT
+ OPTPROC_NO_REQ_OPT
+ OPTPROC_ENVIRON
- + OPTPROC_ARGS_REQ ),
+ + OPTPROC_ARGS_REQ
+ + OPTPROC_MISUSE ),
0, NULL, /* current option index, current option */
NULL, NULL, zPROGNAME,
zRcName, zCopyright, zCopyrightNotice,
tOptDesc* pOptDesc )
{
(void)pOptions;
- USAGE( EXIT_SUCCESS );
+ USAGE(EXIT_SUCCESS);
}
-/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 109 */
+/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 107 */
#if defined(TEST_SNTP_OPTS) /* TEST MAIN PROCEDURE: */
-extern void optionPutShell( tOptions* );
+extern void optionPutShell(tOptions*);
int
main(int argc, char** argv)
{
int res = EXIT_SUCCESS;
- (void)optionProcess( &sntpOptions, argc, argv );
- optionPutShell( &sntpOptions );
+ (void)optionProcess(&sntpOptions, argc, argv);
+ optionPutShell(&sntpOptions);
+ res = ferror(stdout);
+ if (res != 0)
+ fputs("output error writing to stdout\n", stderr);
return res;
}
#endif /* defined TEST_SNTP_OPTS */
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 627 */
+/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 626 */
#if ENABLE_NLS
#include <stdio.h>
#include <unistd.h>
#include <autoopts/usage-txt.h>
-static char* AO_gettext( char const* pz );
+static char* AO_gettext(char const* pz);
static void coerce_it(void** s);
static char*
-AO_gettext( char const* pz )
+AO_gettext(char const* pz)
{
char* pzRes;
if (pz == NULL)
pzRes = _(pz);
if (pzRes == pz)
return pzRes;
- pzRes = strdup( pzRes );
+ pzRes = strdup(pzRes);
if (pzRes == NULL) {
- fputs( _("No memory for duping translated strings\n"), stderr );
- exit( EXIT_FAILURE );
+ fputs(_("No memory for duping translated strings\n"), stderr);
+ exit(EXIT_FAILURE);
}
return pzRes;
}
* This invokes the translation code (e.g. gettext(3)).
*/
static void
-translate_option_strings( void )
+translate_option_strings(void)
{
/*
* Guard against re-translation. It won't work. The strings will have
/*
* EDIT THIS FILE WITH CAUTION (sntp-opts.h)
*
- * It has been AutoGen-ed November 14, 2010 at 08:55:47 AM by AutoGen 5.10
+ * It has been AutoGen-ed November 19, 2010 at 11:48:43 PM by AutoGen 5.11.3
* From the definitions sntp-opts.def
* and the template file options
*
- * Generated from AutoOpts 33:0:8 templates.
- */
-
-/*
- * This file was produced by an AutoOpts template. AutoOpts is a
- * copyrighted work. This header file is not encumbered by AutoOpts
- * licensing, but is provided under the licensing terms chosen by the
- * sntp author or copyright holder. AutoOpts is licensed under
- * the terms of the LGPL. The redistributable library (``libopts'') is
- * licensed under the terms of either the LGPL or, at the users discretion,
- * the BSD license. See the AutoOpts and/or libopts sources for details.
+ * Generated from AutoOpts 33:3:8 templates.
+ *
+ * AutoOpts is a copyrighted work. This header file is not encumbered
+ * by AutoOpts licensing, but is provided under the licensing terms chosen
+ * by the sntp author or copyright holder. AutoOpts is
+ * licensed under the terms of the LGPL. The redistributable library
+ * (``libopts'') is licensed under the terms of either the LGPL or, at the
+ * users discretion, the BSD license. See the AutoOpts and/or libopts sources
+ * for details.
*
* This source file is copyrighted and licensed under the following terms:
*
* tolerable version is at least as old as what was current when the header
* template was released.
*/
-#define AO_TEMPLATE_VERSION 135168
+#define AO_TEMPLATE_VERSION 135171
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header
/*
* Interface defines for all options. Replace "n" with the UPPER_CASED
* option name (as in the teOptIndex enumeration above).
- * e.g. HAVE_OPT( IPV4 )
+ * e.g. HAVE_OPT(IPV4)
*/
#define DESC(n) (sntpOptions.pOptDesc[INDEX_OPT_## n])
#define HAVE_OPT(n) (! UNUSED_OPT(& DESC(n)))
#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
#define CLEAR_OPT(n) STMTS( \
DESC(n).fOptState &= OPTST_PERSISTENT_MASK; \
- if ( (DESC(n).fOptState & OPTST_INITENABLED) == 0) \
+ if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \
DESC(n).fOptState |= OPTST_DISABLED; \
DESC(n).optCookie = NULL )
/*
* Interface defines not associated with particular options
*/
-#define ERRSKIP_OPTERR STMTS( sntpOptions.fOptSet &= ~OPTPROC_ERRSTOP )
-#define ERRSTOP_OPTERR STMTS( sntpOptions.fOptSet |= OPTPROC_ERRSTOP )
+#define ERRSKIP_OPTERR STMTS(sntpOptions.fOptSet &= ~OPTPROC_ERRSTOP)
+#define ERRSTOP_OPTERR STMTS(sntpOptions.fOptSet |= OPTPROC_ERRSTOP)
#define RESTART_OPT(n) STMTS( \
sntpOptions.curOptIdx = (n); \
- sntpOptions.pzCurOpt = NULL )
+ sntpOptions.pzCurOpt = NULL)
#define START_OPT RESTART_OPT(1)
-#define USAGE(c) (*sntpOptions.pUsageProc)( &sntpOptions, c )
-/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 409 */
+#define USAGE(c) (*sntpOptions.pUsageProc)(&sntpOptions, c)
+/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 408 */
/* * * * * *
*
#if defined(ENABLE_NLS)
# ifndef _
# include <stdio.h>
- static inline char* aoGetsText( char const* pz ) {
+ static inline char* aoGetsText(char const* pz) {
if (pz == NULL) return NULL;
- return (char*)gettext( pz );
+ return (char*)gettext(pz);
}
# define _(s) aoGetsText(s)
# endif /* _() */
@pindex sntp
@cindex standard SNTP program
@ignore
-#
-# EDIT THIS FILE WITH CAUTION (sntp-opts.texi)
-#
-# It has been AutoGen-ed November 14, 2010 at 08:55:57 AM by AutoGen 5.10
-# From the definitions sntp-opts.def
-# and the template file aginfo.tpl
-@end ignore
-This program has no explanation.
-
-.I 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
-.I cron
-job.
-
-NTP and SNTP are defined by RFC 5905, which
-obsoletes RFC 4330 and RFC 1305.
-
-This section was generated by @strong{AutoGen},
-the aginfo template and the option descriptions for the @command{sntp} program. It documents the sntp usage text and option meanings.
-
-This software is released under a specialized copyright license.
-
-@menu
-* sntp usage:: sntp usage help (-?)
-* sntp adjtime:: adjtime option (-j)
-* sntp authentication:: authentication option (-a)
-* sntp broadcast:: broadcast option (-b)
-* sntp filelog:: filelog option (-l)
-* sntp ipv4:: ipv4 option (-4)
-* sntp ipv6:: ipv6 option (-6)
-* sntp keyfile:: keyfile option (-k)
-* sntp kod:: kod option (-K)
-* sntp normalverbose:: normalverbose option (-d)
-* sntp settod:: settod option (-s)
-* sntp syslog:: syslog option (-p)
-* sntp timeout:: timeout option (-t)
-@end menu
-
-@node sntp usage
-@subsection sntp usage help (-?)
-@cindex sntp usage
-
-This is the automatically generated usage text for sntp:
-
-@exampleindent 0
-@example
-sntp is unavailable - no --help
-@end example
-@exampleindent 4
-
-@node sntp ipv4
-@subsection ipv4 option (-4)
-@cindex sntp-ipv4
-
-This is the ``force ipv4 dns name resolution'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-ipv6.
-@end itemize
-
-Force DNS resolution of following host names on the command line
-to the IPv4 namespace.
-
-@node sntp ipv6
-@subsection ipv6 option (-6)
-@cindex sntp-ipv6
-
-This is the ``force ipv6 dns name resolution'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-ipv4.
-@end itemize
-
-Force DNS resolution of following host names on the command line
-to the IPv6 namespace.
-
-@node sntp normalverbose
-@subsection normalverbose option (-d)
-@cindex sntp-normalverbose
-
-This is the ``normal verbose'' option.
-Diagnostic messages for non-fatal errors and a limited amount of
-tracing should be written to standard error. Fatal ones always
-produce a diagnostic. This option should be set when there is a
-suspected problem with the server, network or the source.
-
-@node sntp kod
-@subsection kod option (-K)
-@cindex sntp-kod
-
-This is the ``kod history filename'' option.
-Modifies the filename to be used to persist the history of KoD
-responses received from servers. The default is
-/var/db/ntp-kod.
-
-@node sntp syslog
-@subsection syslog option (-p)
-@cindex sntp-syslog
-
-This is the ``logging with syslog'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-filelog.
-@end itemize
-
-When this option is set all logging will be done using syslog.
-
-@node sntp filelog
-@subsection filelog option (-l)
-@cindex sntp-filelog
-
-This is the ``log to specified logfile'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-syslog.
-@end itemize
-
-This option causes the client to write log messages to the specified
-logfile.
-
-@node sntp settod
-@subsection settod option (-s)
-@cindex sntp-settod
-
-This is the ``set (step) the time with settimeofday()'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-adjtime.
-@end itemize
-
-
-
-@node sntp adjtime
-@subsection adjtime option (-j)
-@cindex sntp-adjtime
-
-This is the ``set (slew) the time with adjtime()'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-settod.
-@end itemize
-
-
-
-@node sntp broadcast
-@subsection broadcast option (-b)
-@cindex sntp-broadcast
-
-This is the ``use broadcasts to the address specified for synchronisation'' option.
-If specified SNTP will listen to the specified broadcast address
-for NTP broadcasts. The default maximum wait time,
-68 seconds, can be modified with -t.
-
-@node sntp timeout
-@subsection timeout option (-t)
-@cindex sntp-timeout
-
-This is the ``specify the number of seconds to wait for broadcasts'' option.
-When waiting for a broadcast packet SNTP will wait the number
-of seconds specified before giving up. Default 68 seconds.
-
-@node sntp authentication
-@subsection authentication option (-a)
-@cindex sntp-authentication
-
-This is the ``enable authentication with the key auth-keynumber'' option.
-This option enables authentication using the key specified in this option's argument.
-The argument of this option is the keyid, a number specified in the keyfile as this
-key's identifier. See the keyfile option (-k) for more details.
-
-@node sntp keyfile
-@subsection keyfile option (-k)
-@cindex sntp-keyfile
-
-This is the ``specify a keyfile. sntp will look in this file for the key specified with -a'' option.
-This option specifies the keyfile. SNTP will search for the key specified with -a keyno in this
-file. Key files follow the following format:
-
-keyid keytype key
-
-Where keyid is a number identifying this key
-keytype is one of the follow:
-S Key in 64 Bit hexadecimal number as specified in in the DES specification.
-N Key in 64 Bit hexadecimal number as specified in the NTP standard.
-A Key in a 1-to-8 character ASCII string.
-M Key in a 1-to-8 character ASCII string using the MD5 authentication scheme.
-
-For more information see ntp.keys(5).
-.TH SNTP 1 2010-11-14 "( 4.2.6p3-RC10)" "Programmer's Manual"
+.TH SNTP 1 2010-11-19 "( 4.2.6p3-RC10)" "Programmer's Manual"
.\" EDIT THIS FILE WITH CAUTION (sntp.1)
.\"
-.\" It has been AutoGen-ed November 14, 2010 at 08:55:57 AM by AutoGen 5.10
+.\" It has been AutoGen-ed November 19, 2010 at 11:48:53 PM by AutoGen 5.11.3
.\" From the definitions sntp-opts.def
.\" and the template file agman1.tpl
.\"
<ul class="menu">
<li><a accesskey="1" href="#sntp-Description">sntp Description</a>: Description
-* sntp Invocation:: Invoking sntp
-<li><a accesskey="2" href="#Usage">Usage</a>: Usage
+#
+# EDIT THIS FILE WITH CAUTION (sntp-opts.menu)
+#
+# It has been AutoGen-ed November 19, 2010 at 11:48:53 PM by AutoGen 5.11.3
+# From the definitions sntp-opts.def
+# and the template file aginfo.tpl
</ul>
+This program has no explanation.
+
+ <p>.I 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).
+
+ <p>It can be
+run interactively from the command line or as a
+.I cron
+job.
+
+ <p>NTP and SNTP are defined by RFC 5905, which
+obsoletes RFC 4330 and RFC 1305.
+
+ <p>This section was generated by <strong>AutoGen</strong>,
+the aginfo template and the option descriptions for the <span class="command">sntp</span> program. It documents the sntp usage text and option meanings.
+
+ <p>This software is released under a specialized copyright license.
+
+<ul class="menu">
+<li><a accesskey="1" href="#sntp-usage">sntp usage</a>: sntp usage help (-?)
+<li><a accesskey="2" href="#sntp-adjtime">sntp adjtime</a>: adjtime option (-j)
+<li><a accesskey="3" href="#sntp-authentication">sntp authentication</a>: authentication option (-a)
+<li><a accesskey="4" href="#sntp-broadcast">sntp broadcast</a>: broadcast option (-b)
+<li><a accesskey="5" href="#sntp-filelog">sntp filelog</a>: filelog option (-l)
+<li><a accesskey="6" href="#sntp-ipv4">sntp ipv4</a>: ipv4 option (-4)
+<li><a accesskey="7" href="#sntp-ipv6">sntp ipv6</a>: ipv6 option (-6)
+<li><a accesskey="8" href="#sntp-keyfile">sntp keyfile</a>: keyfile option (-k)
+<li><a accesskey="9" href="#sntp-kod">sntp kod</a>: kod option (-K)
+<li><a href="#sntp-normalverbose">sntp normalverbose</a>: normalverbose option (-d)
+<li><a href="#sntp-settod">sntp settod</a>: settod option (-s)
+<li><a href="#sntp-syslog">sntp syslog</a>: syslog option (-p)
+<li><a href="#sntp-timeout">sntp timeout</a>: timeout option (-t)
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="sntp-usage"></a>
+<br>
+</div>
+
+<h4 class="subsection">sntp usage help (-?)</h4>
+
+<p><a name="index-sntp-usage-1"></a>
+This is the automatically generated usage text for sntp:
+
+<pre class="example">sntp is unavailable - no --help
+</pre>
+ <p>* Usage:: Usage
<div class="node">
<p><hr>
<p>By default, <code>sntp</code> writes the local data and time (i.e., not UTC) to the
standard output in the format:
-<pre class="example"> 1996 Oct 15 20:17:25.123 +4.567 +/- 0.089 secs
+<pre class="example"> 1996 Oct 15 20:17:25.123 +4.567 +/- 0.089 secs
</pre>
<p>where the +4.567 +/- 0.089 secs indicates the time offset and
error bound of the system clock relative to the server clock.
check the current time, offset, and error in the local clock.
For example:
-<pre class="example"> sntp ntpserver.somewhere
+<pre class="example"> sntp ntpserver.somewhere
</pre>
<p>With suitable privilege, it can be run as a command or in a
<code>crom</code> job to reset the local clock from a reliable server, like
the <code>ntpdate</code> and <code>rdate</code> commands.
For example:
-<pre class="example"> sntp -a ntpserver.somewhere
+<pre class="example"> sntp -a ntpserver.somewhere
</pre>
</body></html>
/*
* EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.c)
*
- * It has been AutoGen-ed November 14, 2010 at 08:55:57 AM by AutoGen 5.10
+ * It has been AutoGen-ed November 19, 2010 at 11:51:05 PM by AutoGen 5.11.3
* From the definitions ntp-keygen-opts.def
* and the template file options
*
- * Generated from AutoOpts 33:0:8 templates.
- */
-
-/*
- * This file was produced by an AutoOpts template. AutoOpts is a
- * copyrighted work. This source file is not encumbered by AutoOpts
- * licensing, but is provided under the licensing terms chosen by the
- * ntp-keygen author or copyright holder. AutoOpts is licensed under
- * the terms of the LGPL. The redistributable library (``libopts'') is
- * licensed under the terms of either the LGPL or, at the users discretion,
- * the BSD license. See the AutoOpts and/or libopts sources for details.
+ * Generated from AutoOpts 33:3:8 templates.
+ *
+ * AutoOpts is a copyrighted work. This source file is not encumbered
+ * by AutoOpts licensing, but is provided under the licensing terms chosen
+ * by the ntp-keygen author or copyright holder. AutoOpts is
+ * licensed under the terms of the LGPL. The redistributable library
+ * (``libopts'') is licensed under the terms of either the LGPL or, at the
+ * users discretion, the BSD license. See the AutoOpts and/or libopts sources
+ * for details.
*
* This source file is copyrighted and licensed under the following terms:
*
* Certificate option description:
*/
#ifdef OPENSSL
-tSCC zCertificateText[] =
+static char const zCertificateText[] =
"certificate scheme";
-tSCC zCertificate_NAME[] = "CERTIFICATE";
-tSCC zCertificate_Name[] = "certificate";
+static char const zCertificate_NAME[] = "CERTIFICATE";
+static char const zCertificate_Name[] = "certificate";
#define CERTIFICATE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
/*
* Debug_Level option description:
*/
-tSCC zDebug_LevelText[] =
+static char const zDebug_LevelText[] =
"Increase output debug message level";
-tSCC zDebug_Level_NAME[] = "DEBUG_LEVEL";
-tSCC zDebug_Level_Name[] = "debug-level";
+static char const zDebug_Level_NAME[] = "DEBUG_LEVEL";
+static char const zDebug_Level_Name[] = "debug-level";
#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED)
/*
* Set_Debug_Level option description:
*/
-tSCC zSet_Debug_LevelText[] =
+static char const zSet_Debug_LevelText[] =
"Set the output debug message level";
-tSCC zSet_Debug_Level_NAME[] = "SET_DEBUG_LEVEL";
-tSCC zSet_Debug_Level_Name[] = "set-debug-level";
+static char const zSet_Debug_Level_NAME[] = "SET_DEBUG_LEVEL";
+static char const zSet_Debug_Level_Name[] = "set-debug-level";
#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
* Id_Key option description:
*/
#ifdef OPENSSL
-tSCC zId_KeyText[] =
+static char const zId_KeyText[] =
"Write IFF or GQ identity keys";
-tSCC zId_Key_NAME[] = "ID_KEY";
-tSCC zId_Key_Name[] = "id-key";
+static char const zId_Key_NAME[] = "ID_KEY";
+static char const zId_Key_Name[] = "id-key";
#define ID_KEY_FLAGS (OPTST_DISABLED)
#else /* disable Id_Key */
* Gq_Params option description:
*/
#ifdef OPENSSL
-tSCC zGq_ParamsText[] =
+static char const zGq_ParamsText[] =
"Generate GQ parameters and keys";
-tSCC zGq_Params_NAME[] = "GQ_PARAMS";
-tSCC zGq_Params_Name[] = "gq-params";
+static char const zGq_Params_NAME[] = "GQ_PARAMS";
+static char const zGq_Params_Name[] = "gq-params";
#define GQ_PARAMS_FLAGS (OPTST_DISABLED)
#else /* disable Gq_Params */
* Host_Key option description:
*/
#ifdef OPENSSL
-tSCC zHost_KeyText[] =
+static char const zHost_KeyText[] =
"generate RSA host key";
-tSCC zHost_Key_NAME[] = "HOST_KEY";
-tSCC zHost_Key_Name[] = "host-key";
+static char const zHost_Key_NAME[] = "HOST_KEY";
+static char const zHost_Key_Name[] = "host-key";
#define HOST_KEY_FLAGS (OPTST_DISABLED)
#else /* disable Host_Key */
* Iffkey option description:
*/
#ifdef OPENSSL
-tSCC zIffkeyText[] =
+static char const zIffkeyText[] =
"generate IFF parameters";
-tSCC zIffkey_NAME[] = "IFFKEY";
-tSCC zIffkey_Name[] = "iffkey";
+static char const zIffkey_NAME[] = "IFFKEY";
+static char const zIffkey_Name[] = "iffkey";
#define IFFKEY_FLAGS (OPTST_DISABLED)
#else /* disable Iffkey */
* Issuer_Name option description:
*/
#ifdef OPENSSL
-tSCC zIssuer_NameText[] =
+static char const zIssuer_NameText[] =
"set issuer name";
-tSCC zIssuer_Name_NAME[] = "ISSUER_NAME";
-tSCC zIssuer_Name_Name[] = "issuer-name";
+static char const zIssuer_Name_NAME[] = "ISSUER_NAME";
+static char const zIssuer_Name_Name[] = "issuer-name";
#define ISSUER_NAME_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
/*
* Md5key option description:
*/
-tSCC zMd5keyText[] =
+static char const zMd5keyText[] =
"generate MD5 keys";
-tSCC zMd5key_NAME[] = "MD5KEY";
-tSCC zMd5key_Name[] = "md5key";
+static char const zMd5key_NAME[] = "MD5KEY";
+static char const zMd5key_Name[] = "md5key";
#define MD5KEY_FLAGS (OPTST_DISABLED)
/*
* Modulus option description:
*/
#ifdef OPENSSL
-tSCC zModulusText[] =
+static char const zModulusText[] =
"modulus";
-tSCC zModulus_NAME[] = "MODULUS";
-tSCC zModulus_Name[] = "modulus";
+static char const zModulus_NAME[] = "MODULUS";
+static char const zModulus_Name[] = "modulus";
#define MODULUS_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
* Pvt_Cert option description:
*/
#ifdef OPENSSL
-tSCC zPvt_CertText[] =
+static char const zPvt_CertText[] =
"generate PC private certificate";
-tSCC zPvt_Cert_NAME[] = "PVT_CERT";
-tSCC zPvt_Cert_Name[] = "pvt-cert";
+static char const zPvt_Cert_NAME[] = "PVT_CERT";
+static char const zPvt_Cert_Name[] = "pvt-cert";
#define PVT_CERT_FLAGS (OPTST_DISABLED)
#else /* disable Pvt_Cert */
* Pvt_Passwd option description:
*/
#ifdef OPENSSL
-tSCC zPvt_PasswdText[] =
+static char const zPvt_PasswdText[] =
"output private password";
-tSCC zPvt_Passwd_NAME[] = "PVT_PASSWD";
-tSCC zPvt_Passwd_Name[] = "pvt-passwd";
+static char const zPvt_Passwd_NAME[] = "PVT_PASSWD";
+static char const zPvt_Passwd_Name[] = "pvt-passwd";
#define PVT_PASSWD_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
* Get_Pvt_Passwd option description:
*/
#ifdef OPENSSL
-tSCC zGet_Pvt_PasswdText[] =
+static char const zGet_Pvt_PasswdText[] =
"input private password";
-tSCC zGet_Pvt_Passwd_NAME[] = "GET_PVT_PASSWD";
-tSCC zGet_Pvt_Passwd_Name[] = "get-pvt-passwd";
+static char const zGet_Pvt_Passwd_NAME[] = "GET_PVT_PASSWD";
+static char const zGet_Pvt_Passwd_Name[] = "get-pvt-passwd";
#define GET_PVT_PASSWD_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
* Sign_Key option description:
*/
#ifdef OPENSSL
-tSCC zSign_KeyText[] =
+static char const zSign_KeyText[] =
"generate sign key (RSA or DSA)";
-tSCC zSign_Key_NAME[] = "SIGN_KEY";
-tSCC zSign_Key_Name[] = "sign-key";
+static char const zSign_Key_NAME[] = "SIGN_KEY";
+static char const zSign_Key_Name[] = "sign-key";
#define SIGN_KEY_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
* Subject_Name option description:
*/
#ifdef OPENSSL
-tSCC zSubject_NameText[] =
+static char const zSubject_NameText[] =
"set subject name";
-tSCC zSubject_Name_NAME[] = "SUBJECT_NAME";
-tSCC zSubject_Name_Name[] = "subject-name";
+static char const zSubject_Name_NAME[] = "SUBJECT_NAME";
+static char const zSubject_Name_Name[] = "subject-name";
#define SUBJECT_NAME_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
* Trusted_Cert option description:
*/
#ifdef OPENSSL
-tSCC zTrusted_CertText[] =
+static char const zTrusted_CertText[] =
"trusted certificate (TC scheme)";
-tSCC zTrusted_Cert_NAME[] = "TRUSTED_CERT";
-tSCC zTrusted_Cert_Name[] = "trusted-cert";
+static char const zTrusted_Cert_NAME[] = "TRUSTED_CERT";
+static char const zTrusted_Cert_Name[] = "trusted-cert";
#define TRUSTED_CERT_FLAGS (OPTST_DISABLED)
#else /* disable Trusted_Cert */
* Mv_Params option description:
*/
#ifdef OPENSSL
-tSCC zMv_ParamsText[] =
+static char const zMv_ParamsText[] =
"generate <num> MV parameters";
-tSCC zMv_Params_NAME[] = "MV_PARAMS";
-tSCC zMv_Params_Name[] = "mv-params";
+static char const zMv_Params_NAME[] = "MV_PARAMS";
+static char const zMv_Params_Name[] = "mv-params";
#define MV_PARAMS_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
* Mv_Keys option description:
*/
#ifdef OPENSSL
-tSCC zMv_KeysText[] =
+static char const zMv_KeysText[] =
"update <num> MV keys";
-tSCC zMv_Keys_NAME[] = "MV_KEYS";
-tSCC zMv_Keys_Name[] = "mv-keys";
+static char const zMv_Keys_NAME[] = "MV_KEYS";
+static char const zMv_Keys_Name[] = "mv-keys";
#define MV_KEYS_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
/*
* Help/More_Help/Version option descriptions:
*/
-tSCC zHelpText[] = "Display extended usage information and exit";
-tSCC zHelp_Name[] = "help";
+static char const zHelpText[] = "Display extended usage information and exit";
+static char const zHelp_Name[] = "help";
#ifdef HAVE_WORKING_FORK
#define OPTST_MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
-tSCC zMore_Help_Name[] = "more-help";
-tSCC zMore_HelpText[] = "Extended usage information passed thru pager";
+static char const zMore_Help_Name[] = "more-help";
+static char const zMore_HelpText[] = "Extended usage information passed thru pager";
#else
#define OPTST_MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
#define zMore_Help_Name NULL
OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT
#endif
-tSCC zVersionText[] = "Output version information and exit";
-tSCC zVersion_Name[] = "version";
-tSCC zSave_OptsText[] = "Save the option state to a config file";
-tSCC zSave_Opts_Name[] = "save-opts";
-tSCC zLoad_OptsText[] = "Load options from a config file";
-tSCC zLoad_Opts_NAME[] = "LOAD_OPTS";
-tSCC zNotLoad_Opts_Name[] = "no-load-opts";
-tSCC zNotLoad_Opts_Pfx[] = "no";
+static char const zVersionText[] = "Output version information and exit";
+static char const zVersion_Name[] = "version";
+static char const zSave_OptsText[] = "Save the option state to a config file";
+static char const zSave_Opts_Name[] = "save-opts";
+static char const zLoad_OptsText[] = "Load options from a config file";
+static char const zLoad_Opts_NAME[] = "LOAD_OPTS";
+static char const zNotLoad_Opts_Name[] = "no-load-opts";
+static char const zNotLoad_Opts_Pfx[] = "no";
#define zLoad_Opts_Name (zNotLoad_Opts_Name + 3)
/*
* Declare option callback procedures
#else /* not OPENSSL */
# define doOptModulus NULL
#endif /* def/not OPENSSL */
-#ifdef OPENSSL
- extern tOptProc optionNumericVal;
-#else /* not OPENSSL */
-# define optionNumericVal NULL
-#endif /* def/not OPENSSL */
-#ifdef OPENSSL
- extern tOptProc optionNumericVal;
-#else /* not OPENSSL */
-# define optionNumericVal NULL
-#endif /* def/not OPENSSL */
#if defined(TEST_NTP_KEYGEN_OPTS)
/*
* Under test, omit argument processing, or call optionStackArg,
* if multiple copies are allowed.
*/
-extern tOptProc
- optionNumericVal, optionPagedUsage, optionVersionStderr;
static tOptProc
doOptModulus, doUsageOpt;
* When not under test, there are different procs to use
*/
extern tOptProc
- optionPagedUsage, optionPrintVersion;
+ optionBooleanVal, optionNestedVal, optionNumericVal,
+ optionPagedUsage, optionPrintVersion, optionResetOpt,
+ optionStackArg, optionTimeVal, optionUnstackArg,
+ optionVersionStderr;
static tOptProc
doOptSet_Debug_Level, doUsageOpt;
If there is no new host key, look for an existing one.\n\
If one is not found, create it.\n";
tSCC zFullVersion[] = NTP_KEYGEN_FULL_VERSION;
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 495 */
+/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 493 */
#if defined(ENABLE_NLS)
# define OPTPROC_BASE OPTPROC_TRANSLATE
+ OPTPROC_LONGOPT
+ OPTPROC_NO_REQ_OPT
+ OPTPROC_ENVIRON
- + OPTPROC_NO_ARGS ),
+ + OPTPROC_NO_ARGS
+ + OPTPROC_MISUSE ),
0, NULL, /* current option index, current option */
NULL, NULL, zPROGNAME,
zRcName, zCopyright, zCopyrightNotice,
tOptDesc* pOptDesc )
{
(void)pOptions;
- USAGE( EXIT_SUCCESS );
+ USAGE(EXIT_SUCCESS);
}
#if ! defined(TEST_NTP_KEYGEN_OPTS)
pOptDesc->optArg.argInt = val;
}
#endif /* defined OPENSSL */
-/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 109 */
+/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 107 */
#if defined(TEST_NTP_KEYGEN_OPTS) /* TEST MAIN PROCEDURE: */
-extern void optionPutShell( tOptions* );
+extern void optionPutShell(tOptions*);
int
main(int argc, char** argv)
{
int res = EXIT_SUCCESS;
- (void)optionProcess( &ntp_keygenOptions, argc, argv );
- optionPutShell( &ntp_keygenOptions );
+ (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 /* defined TEST_NTP_KEYGEN_OPTS */
-/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 627 */
+/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 626 */
#if ENABLE_NLS
#include <stdio.h>
#include <unistd.h>
#include <autoopts/usage-txt.h>
-static char* AO_gettext( char const* pz );
+static char* AO_gettext(char const* pz);
static void coerce_it(void** s);
static char*
-AO_gettext( char const* pz )
+AO_gettext(char const* pz)
{
char* pzRes;
if (pz == NULL)
pzRes = _(pz);
if (pzRes == pz)
return pzRes;
- pzRes = strdup( pzRes );
+ pzRes = strdup(pzRes);
if (pzRes == NULL) {
- fputs( _("No memory for duping translated strings\n"), stderr );
- exit( EXIT_FAILURE );
+ fputs(_("No memory for duping translated strings\n"), stderr);
+ exit(EXIT_FAILURE);
}
return pzRes;
}
* This invokes the translation code (e.g. gettext(3)).
*/
static void
-translate_option_strings( void )
+translate_option_strings(void)
{
/*
* Guard against re-translation. It won't work. The strings will have
/*
* EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.h)
*
- * It has been AutoGen-ed November 14, 2010 at 08:55:57 AM by AutoGen 5.10
+ * It has been AutoGen-ed November 19, 2010 at 11:51:05 PM by AutoGen 5.11.3
* From the definitions ntp-keygen-opts.def
* and the template file options
*
- * Generated from AutoOpts 33:0:8 templates.
- */
-
-/*
- * This file was produced by an AutoOpts template. AutoOpts is a
- * copyrighted work. This header file is not encumbered by AutoOpts
- * licensing, but is provided under the licensing terms chosen by the
- * ntp-keygen author or copyright holder. AutoOpts is licensed under
- * the terms of the LGPL. The redistributable library (``libopts'') is
- * licensed under the terms of either the LGPL or, at the users discretion,
- * the BSD license. See the AutoOpts and/or libopts sources for details.
+ * Generated from AutoOpts 33:3:8 templates.
+ *
+ * AutoOpts is a copyrighted work. This header file is not encumbered
+ * by AutoOpts licensing, but is provided under the licensing terms chosen
+ * by the ntp-keygen author or copyright holder. AutoOpts is
+ * licensed under the terms of the LGPL. The redistributable library
+ * (``libopts'') is licensed under the terms of either the LGPL or, at the
+ * users discretion, the BSD license. See the AutoOpts and/or libopts sources
+ * for details.
*
* This source file is copyrighted and licensed under the following terms:
*
* tolerable version is at least as old as what was current when the header
* template was released.
*/
-#define AO_TEMPLATE_VERSION 135168
+#define AO_TEMPLATE_VERSION 135171
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header
/*
* Interface defines for all options. Replace "n" with the UPPER_CASED
* option name (as in the teOptIndex enumeration above).
- * e.g. HAVE_OPT( CERTIFICATE )
+ * e.g. HAVE_OPT(CERTIFICATE)
*/
#define DESC(n) (ntp_keygenOptions.pOptDesc[INDEX_OPT_## n])
#define HAVE_OPT(n) (! UNUSED_OPT(& DESC(n)))
#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
#define CLEAR_OPT(n) STMTS( \
DESC(n).fOptState &= OPTST_PERSISTENT_MASK; \
- if ( (DESC(n).fOptState & OPTST_INITENABLED) == 0) \
+ if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \
DESC(n).fOptState |= OPTST_DISABLED; \
DESC(n).optCookie = NULL )
/*
* Interface defines not associated with particular options
*/
-#define ERRSKIP_OPTERR STMTS( ntp_keygenOptions.fOptSet &= ~OPTPROC_ERRSTOP )
-#define ERRSTOP_OPTERR STMTS( ntp_keygenOptions.fOptSet |= OPTPROC_ERRSTOP )
+#define ERRSKIP_OPTERR STMTS(ntp_keygenOptions.fOptSet &= ~OPTPROC_ERRSTOP)
+#define ERRSTOP_OPTERR STMTS(ntp_keygenOptions.fOptSet |= OPTPROC_ERRSTOP)
#define RESTART_OPT(n) STMTS( \
ntp_keygenOptions.curOptIdx = (n); \
- ntp_keygenOptions.pzCurOpt = NULL )
+ ntp_keygenOptions.pzCurOpt = NULL)
#define START_OPT RESTART_OPT(1)
-#define USAGE(c) (*ntp_keygenOptions.pUsageProc)( &ntp_keygenOptions, c )
-/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 409 */
+#define USAGE(c) (*ntp_keygenOptions.pUsageProc)(&ntp_keygenOptions, c)
+/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 408 */
/* * * * * *
*
#if defined(ENABLE_NLS)
# ifndef _
# include <stdio.h>
- static inline char* aoGetsText( char const* pz ) {
+ static inline char* aoGetsText(char const* pz) {
if (pz == NULL) return NULL;
- return (char*)gettext( pz );
+ return (char*)gettext(pz);
}
# define _(s) aoGetsText(s)
# endif /* _() */
@pindex ntp-keygen
@cindex Create a NTP host key
@ignore
-#
-# EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.texi)
-#
-# It has been AutoGen-ed November 14, 2010 at 08:56:07 AM by AutoGen 5.10
-# From the definitions ntp-keygen-opts.def
-# and the template file aginfo.tpl
-@end ignore
-This program has no explanation.
-
-If there is no new host key, look for an existing one.
-If one is not found, create it.
-
-This section was generated by @strong{AutoGen},
-the aginfo template and the option descriptions for the @command{ntp-keygen} program. It documents the ntp-keygen usage text and option meanings.
-
-This software is released under a specialized copyright license.
-
-@menu
-* ntp-keygen usage:: ntp-keygen usage help (-?)
-* ntp-keygen certificate:: certificate option (-c)
-* ntp-keygen debug-level:: debug-level option (-d)
-* ntp-keygen get-pvt-passwd:: get-pvt-passwd option (-q)
-* ntp-keygen gq-params:: gq-params option (-G)
-* ntp-keygen host-key:: host-key option (-H)
-* ntp-keygen id-key:: id-key option (-e)
-* ntp-keygen iffkey:: iffkey option (-I)
-* ntp-keygen issuer-name:: issuer-name option (-i)
-* ntp-keygen md5key:: md5key option (-M)
-* ntp-keygen modulus:: modulus option (-m)
-* ntp-keygen mv-keys:: mv-keys option (-v)
-* ntp-keygen mv-params:: mv-params option (-V)
-* ntp-keygen pvt-cert:: pvt-cert option (-P)
-* ntp-keygen pvt-passwd:: pvt-passwd option (-p)
-* ntp-keygen set-debug-level:: set-debug-level option (-D)
-* ntp-keygen sign-key:: sign-key option (-S)
-* ntp-keygen subject-name:: subject-name option (-s)
-* ntp-keygen trusted-cert:: trusted-cert option (-T)
-@end menu
-
-@node ntp-keygen usage
-@subsection ntp-keygen usage help (-?)
-@cindex ntp-keygen usage
-
-This is the automatically generated usage text for ntp-keygen:
-
-@exampleindent 0
-@example
-Using OpenSSL version 90704f
-ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.6p3-RC10
-USAGE: ntp-keygen [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
- Flg Arg Option-Name Description
- -c Str certificate certificate scheme
- -d no debug-level Increase output debug message level
- - may appear multiple times
- -D Str set-debug-level Set the output debug message level
- - may appear multiple times
- -e no id-key Write IFF or GQ identity keys
- -G no gq-params Generate GQ parameters and keys
- -H no host-key generate RSA host key
- -I no iffkey generate IFF parameters
- -i Str issuer-name set issuer name
- -M no md5key generate MD5 keys
- -m Num modulus modulus
- - it must be: 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
- -S Str sign-key generate sign key (RSA or DSA)
- -s Str subject-name set subject name
- -T no trusted-cert trusted certificate (TC scheme)
- -V Num mv-params generate <num> MV parameters
- -v Num mv-keys update <num> MV keys
- opt version Output version information and exit
- -? no help Display extended usage information and exit
- -! no more-help Extended usage information passed thru pager
- -> opt save-opts Save the option state to a config file
- -< Str load-opts Load options from a config file
- - 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.
-
-The following option preset mechanisms are supported:
- - reading file /deacon/users/stenn/.ntprc
- - reading file /deacon/backroom/snaps/ntp-stable/util/.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.
-
-please send bug reports to: http://bugs.ntp.org, bugs@@ntp.org
-@end example
-@exampleindent 4
-
-@node ntp-keygen certificate
-@subsection certificate option (-c)
-@cindex ntp-keygen-certificate
-
-This is the ``certificate scheme'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{OPENSSL} during the compilation.
-@end itemize
-
-scheme is one of
-RSA-MD2, RSA-MD5, RSA-SHA, RSA-SHA1, RSA-MDC2, RSA-RIPEMD160,
-DSA-SHA, or DSA-SHA1.
-
-Select the certificate message digest/signature encryption scheme.
-Note that RSA schemes must be used with a RSA sign key and DSA
-schemes must be used with a DSA sign key. The default without
-this option is RSA-MD5.
-
-@node ntp-keygen debug-level
-@subsection debug-level option (-d)
-@cindex ntp-keygen-debug-level
-
-This is the ``increase output debug message level'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-may appear an unlimited number of times.
-@end itemize
-
-Increase the debugging message output level.
-
-@node ntp-keygen set-debug-level
-@subsection set-debug-level option (-D)
-@cindex ntp-keygen-set-debug-level
-
-This is the ``set the output debug message level'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-may appear an unlimited number of times.
-@end itemize
-
-Set the output debugging level. Can be supplied multiple times,
-but each overrides the previous value(s).
-
-@node ntp-keygen id-key
-@subsection id-key option (-e)
-@cindex ntp-keygen-id-key
-
-This is the ``write iff or gq identity keys'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{OPENSSL} during the compilation.
-@end itemize
-
-Write the IFF or GQ client keys to the standard output. This is
-intended for automatic key distribution by mail.
-
-@node ntp-keygen gq-params
-@subsection gq-params option (-G)
-@cindex ntp-keygen-gq-params
-
-This is the ``generate gq parameters and keys'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{OPENSSL} during the compilation.
-@end itemize
-
-Generate parameters and keys for the GQ identification scheme,
-obsoleting any that may exist.
-
-@node ntp-keygen host-key
-@subsection host-key option (-H)
-@cindex ntp-keygen-host-key
-
-This is the ``generate rsa host key'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{OPENSSL} during the compilation.
-@end itemize
-
-Generate new host keys, obsoleting any that may exist.
-
-@node ntp-keygen iffkey
-@subsection iffkey option (-I)
-@cindex ntp-keygen-iffkey
-
-This is the ``generate iff parameters'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{OPENSSL} during the compilation.
-@end itemize
-
-Generate parameters for the IFF identification scheme, obsoleting
-any that may exist.
-
-@node ntp-keygen issuer-name
-@subsection issuer-name option (-i)
-@cindex ntp-keygen-issuer-name
-
-This is the ``set issuer name'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{OPENSSL} during the compilation.
-@end itemize
-
-Set the suject name to name. This is used as the subject field
-in certificates and in the file name for host and sign keys.
-
-@node ntp-keygen md5key
-@subsection md5key option (-M)
-@cindex ntp-keygen-md5key
-
-This is the ``generate md5 keys'' option.
-Generate MD5 keys, obsoleting any that may exist.
-
-@node ntp-keygen modulus
-@subsection modulus option (-m)
-@cindex ntp-keygen-modulus
-
-This is the ``modulus'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{OPENSSL} during the compilation.
-@end itemize
-
-The number of bits in the prime modulus. The default is 512.
-
-@node ntp-keygen pvt-cert
-@subsection pvt-cert option (-P)
-@cindex ntp-keygen-pvt-cert
-
-This is the ``generate pc private certificate'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{OPENSSL} during the compilation.
-@end itemize
-
-Generate a private certificate. By default, the program generates
-public certificates.
-
-@node ntp-keygen pvt-passwd
-@subsection pvt-passwd option (-p)
-@cindex ntp-keygen-pvt-passwd
-
-This is the ``output private password'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{OPENSSL} during the compilation.
-@end itemize
-
-Encrypt generated files containing private data with the specified
-password and the DES-CBC algorithm.
-
-@node ntp-keygen get-pvt-passwd
-@subsection get-pvt-passwd option (-q)
-@cindex ntp-keygen-get-pvt-passwd
-
-This is the ``input private password'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{OPENSSL} during the compilation.
-@end itemize
-
-Set the password for reading files to the specified password.
-
-@node ntp-keygen sign-key
-@subsection sign-key option (-S)
-@cindex ntp-keygen-sign-key
-
-This is the ``generate sign key (rsa or dsa)'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{OPENSSL} during the compilation.
-@end itemize
-
-Generate a new sign key of the designated type, obsoleting any
-that may exist. By default, the program uses the host key as the
-sign key.
-
-@node ntp-keygen subject-name
-@subsection subject-name option (-s)
-@cindex ntp-keygen-subject-name
-
-This is the ``set subject name'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{OPENSSL} during the compilation.
-@end itemize
-
-Set the issuer name to name. This is used for the issuer field
-in certificates and in the file name for identity files.
-
-@node ntp-keygen trusted-cert
-@subsection trusted-cert option (-T)
-@cindex ntp-keygen-trusted-cert
-
-This is the ``trusted certificate (tc scheme)'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{OPENSSL} during the compilation.
-@end itemize
-
-Generate a trusted certificate. By default, the program generates
-a non-trusted certificate.
-
-@node ntp-keygen mv-params
-@subsection mv-params option (-V)
-@cindex ntp-keygen-mv-params
-
-This is the ``generate <num> mv parameters'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{OPENSSL} during the compilation.
-@end itemize
-
-Generate parameters and keys for the Mu-Varadharajan (MV)
-identification scheme.
-
-@node ntp-keygen mv-keys
-@subsection mv-keys option (-v)
-@cindex ntp-keygen-mv-keys
-
-This is the ``update <num> mv keys'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{OPENSSL} during the compilation.
-@end itemize
-
-This option has no @samp{doc} documentation.
-.TH NTP-KEYGEN 1 2010-11-14 "(ntp 4.2.6p3-RC10)" "Programmer's Manual"
+.TH NTP-KEYGEN 1 2010-11-19 "(ntp 4.2.6p3-RC10)" "Programmer's Manual"
.\" EDIT THIS FILE WITH CAUTION (ntp-keygen.1)
.\"
-.\" It has been AutoGen-ed November 14, 2010 at 08:56:07 AM by AutoGen 5.10
+.\" It has been AutoGen-ed November 19, 2010 at 11:51:15 PM by AutoGen 5.11.3
.\" From the definitions ntp-keygen-opts.def
.\" and the template file agman1.tpl
.\"