]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
NTP_4_2_7P84 NTP_4_2_7P84
authorHarlan Stenn <stenn@ntp.org>
Mon, 22 Nov 2010 05:27:59 +0000 (05:27 +0000)
committerHarlan Stenn <stenn@ntp.org>
Mon, 22 Nov 2010 05:27:59 +0000 (05:27 +0000)
bk: 4ce9ff5f5Ph0TJlcZo5_VXD674SB4g

33 files changed:
ChangeLog
ntpd/ntpd-opts.c
ntpd/ntpd-opts.h
ntpd/ntpd-opts.menu
ntpd/ntpd-opts.texi
ntpd/ntpd.1
ntpdc/ntpdc-opts.c
ntpdc/ntpdc-opts.h
ntpdc/ntpdc-opts.menu
ntpdc/ntpdc-opts.texi
ntpdc/ntpdc.1
ntpq/ntpq-opts.c
ntpq/ntpq-opts.h
ntpq/ntpq-opts.menu
ntpq/ntpq-opts.texi
ntpq/ntpq.1
ntpsnmpd/ntpsnmpd-opts.c
ntpsnmpd/ntpsnmpd-opts.h
ntpsnmpd/ntpsnmpd-opts.menu
ntpsnmpd/ntpsnmpd-opts.texi
ntpsnmpd/ntpsnmpd.1
packageinfo.sh
sntp/sntp-opts.c
sntp/sntp-opts.h
sntp/sntp-opts.menu
sntp/sntp-opts.texi
sntp/sntp.1
sntp/sntp.html
util/ntp-keygen-opts.c
util/ntp-keygen-opts.h
util/ntp-keygen-opts.menu
util/ntp-keygen-opts.texi
util/ntp-keygen.1

index 1fd6e3f705de3646a50da6a562f768c5c633824e..529c95fabe46666fed7aa2b9eb4c536c8fc0cd93 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+(4.2.7p84) 2010/11/22 Released by Harlan Stenn <stenn@ntp.org>
 * [Bug 1618] Unreachable code in jjy_start().
 * [Bug 1725] from 4.2.6p3-RC11: ntpd sends multicast from only one
   address.
index cb6633b1a6064808cc994e8d8f4d54be85e9a75f..407ff1b02446816f8662e124f3909a8b75127773 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpd-opts.c)
  *  
- *  It has been AutoGen-ed  November 20, 2010 at 10:16:13 PM by AutoGen 5.11.2
+ *  It has been AutoGen-ed  November 22, 2010 at 04:34:29 AM by AutoGen 5.11.3
  *  From the definitions    ntpd-opts.def
  *  and the template file   options
  *
@@ -1006,7 +1006,7 @@ static tOptDesc optDesc[ OPTION_CT ] = {
  */
 tSCC   zPROGNAME[]   = "NTPD";
 tSCC   zUsageTitle[] =
-"ntpd - NTP daemon program - Ver. 4.2.7p83\n\
+"ntpd - NTP daemon program - Ver. 4.2.7p84\n\
 USAGE:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
 \t\t[ <server1> ... <serverN> ]\n";
 #define zRcName     NULL
@@ -1016,7 +1016,7 @@ tSCC   zBugsAddr[]    = "http://bugs.ntp.org, bugs@ntp.org";
 #define zExplain NULL
 tSCC    zDetail[]     = "\n\n";
 tSCC    zFullVersion[] = NTPD_FULL_VERSION;
-/* extracted from /usr/local/share/autogen/optcode.tpl near line 493 */
+/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 493 */
 
 #if defined(ENABLE_NLS)
 # define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -1088,7 +1088,7 @@ DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
 }
 #endif /* defined DEBUG */
 #endif /* defined(TEST_NTPD_OPTS) */
-/* extracted from /usr/local/share/autogen/optmain.tpl near line 107 */
+/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 107 */
 
 #if defined(TEST_NTPD_OPTS) /* TEST MAIN PROCEDURE: */
 
@@ -1106,7 +1106,7 @@ main(int argc, char** argv)
     return res;
 }
 #endif  /* defined TEST_NTPD_OPTS */
-/* extracted from /usr/local/share/autogen/optcode.tpl near line 626 */
+/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 626 */
 
 #if ENABLE_NLS
 #include <stdio.h>
index 68cae1c7323eb1a546a332be1965c101d553c200..e872b5c23e3eca1f03675d32e3ca9c4643fbeaed 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpd-opts.h)
  *  
- *  It has been AutoGen-ed  November 20, 2010 at 10:16:12 PM by AutoGen 5.11.2
+ *  It has been AutoGen-ed  November 22, 2010 at 04:34:29 AM by AutoGen 5.11.3
  *  From the definitions    ntpd-opts.def
  *  and the template file   options
  *
@@ -89,8 +89,8 @@ typedef enum {
 } teOptIndex;
 
 #define OPTION_CT    36
-#define NTPD_VERSION       "4.2.7p83"
-#define NTPD_FULL_VERSION  "ntpd - NTP daemon program - Ver. 4.2.7p83"
+#define NTPD_VERSION       "4.2.7p84"
+#define NTPD_FULL_VERSION  "ntpd - NTP daemon program - Ver. 4.2.7p84"
 
 /*
  *  Interface defines for all options.  Replace "n" with the UPPER_CASED
@@ -343,7 +343,7 @@ typedef enum {
                 ntpdOptions.pzCurOpt  = NULL)
 #define START_OPT       RESTART_OPT(1)
 #define USAGE(c)        (*ntpdOptions.pUsageProc)(&ntpdOptions, c)
-/* extracted from /usr/local/share/autogen/opthead.tpl near line 408 */
+/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 408 */
 
 /* * * * * *
  *
index eba56a7ab090f1fcdd3b935256f370648eac9d3f..71ad34f434bf9f1e48b215ea1d29dd75e1917ab1 100644 (file)
@@ -1,7 +1,7 @@
 # 
 # EDIT THIS FILE WITH CAUTION  (ntpd-opts.menu)
 # 
-# It has been AutoGen-ed  November 19, 2010 at 11:46:45 PM by AutoGen 5.11.3
+# It has been AutoGen-ed  November 22, 2010 at 04:35:43 AM by AutoGen 5.11.3
 # From the definitions    ntpd-opts.def
 # and the template file   aginfo.tpl
 @end ignore
@@ -48,6 +48,7 @@ This software is released under a specialized copyright license.
 * ntpd usepcc::                usepcc option
 * ntpd user::                  user option (-u)
 * ntpd var::                   var option
+* ntpd wait-sync::             wait-sync option (-w)
 @end menu
 
 @node ntpd usage
@@ -58,65 +59,6 @@ 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
+ntpd is unavailable - no --help
 @end example
 @exampleindent 4
\ No newline at end of file
index 092bdc63e387d8557bbf55ed555485ca39ffb69c..02cf138eac9a932eb13c62a0663bba51a4e970ba 100644 (file)
@@ -3,645 +3,3 @@
 @pindex ntpd
 @cindex NTP daemon program
 @ignore
-# 
-# EDIT THIS FILE WITH CAUTION  (ntpd-opts.texi)
-# 
-# It has been AutoGen-ed  November 17, 2010 at 10:08:17 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
-* ntpd wait-sync::              wait-sync option (-w)
-@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.7p83
-USAGE:  ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
-                [ <server1> ... <serverN> ]
-  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
-                                - prohibits these options:
-                                wait-sync
-   -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
-                                - prohibits these options:
-                                saveconfigquit
-                                wait-sync
-   -r Str propagationdelay Broadcast/propagation delay
-      Str saveconfigquit Save parsed configuration and quit
-                                - prohibits these options:
-                                quit
-                                wait-sync
-   -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
-   -w Str wait-sync      Seconds to wait for first clock sync
-                                - prohibits these options:
-                                nofork
-                                quit
-                                saveconfigquit
-   -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.
-
-This option has some usage constraints.  It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-wait-sync.
-@end itemize
-
-
-
-@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.
-
-This option has some usage constraints.  It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-saveconfigquit, wait-sync.
-@end itemize
-
-ntpd
-will not daemonize and will exit after the clock is first
-synchronized.  This behavior mimics that of the
-ntpdate
-program, which will soon be replaced with a shell script.
-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.
-@item
-must not appear in combination with any of the following options:
-quit, wait-sync.
-@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 wait-sync
-@subsection wait-sync option (-w)
-@cindex ntpd-wait-sync
-
-This is the ``seconds to wait for first clock sync'' option.
-
-This option has some usage constraints.  It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{HAVE_WORKING_FORK} during the compilation.
-@item
-must not appear in combination with any of the following options:
-nofork, quit, saveconfigquit.
-@end itemize
-
-If greater than zero, alters ntpd behavior when forking to
-daemonize.  Instead of exiting with status 0 immediately after
-the fork, the parent waits up to the specified number of
-seconds for the child to first synchronize the clock.  The exit
-status is zero (success) if the clock was synchronized,
-otherwise it is ETIMEDOUT.
-This provides the option for a script starting ntpd to easily
-wait for the first set of the clock before proceeding.
-
-@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).
index f7bdeb3aa74a501df9a8eebf3b98ec47ee3264cc..63de21ea7ad3ee8bf039e6fa1572357a00a11c03 100644 (file)
@@ -1,7 +1,7 @@
-.TH NTPD 1 2010-11-17 "( 4.2.7p83)" "Programmer's Manual"
+.TH NTPD 1 2010-11-22 "( 4.2.7p84)" "Programmer's Manual"
 .\"  EDIT THIS FILE WITH CAUTION  (ntpd.1)
 .\"  
-.\"  It has been AutoGen-ed  November 17, 2010 at 10:08:17 AM by AutoGen 5.10
+.\"  It has been AutoGen-ed  November 22, 2010 at 04:35:42 AM by AutoGen 5.11.3
 .\"  From the definitions    ntpd-opts.def
 .\"  and the template file   agman1.tpl
 .\"
@@ -281,10 +281,11 @@ This option may appear an unlimited number of times.
 .sp
 
 .TP
-.BR \-w " \fIstring\fP, " \--wait-sync "=" \fIstring\fP
+.BR \-w " \fInumber\fP, " \--wait-sync "=" \fInumber\fP
 Seconds to wait for first clock sync.
 This option must not appear in combination with any of the following options:
 nofork, quit, saveconfigquit.
+This option takes an integer number as its argument.
 .sp
 If greater than zero, alters ntpd behavior when forking to
 daemonize.  Instead of exiting with status 0 immediately after
index 9a10318031c5fa55611c9174b1877385f9c52888..7029064104401605601e76d423d1185cad1b06d5 100644 (file)
@@ -1,21 +1,19 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpdc-opts.c)
  *  
- *  It has been AutoGen-ed  November 17, 2010 at 10:08:23 AM by AutoGen 5.10
+ *  It has been AutoGen-ed  November 22, 2010 at 04:35:50 AM 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:
  *
@@ -70,10 +68,10 @@ extern tUsageProc optionUsage;
  *  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 };
@@ -83,10 +81,10 @@ static const int
  *  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 };
@@ -95,10 +93,10 @@ static const int
 /*
  *  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))
 
@@ -106,10 +104,10 @@ tSCC    zCommand_Name[]            = "command";
  *  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 };
@@ -119,10 +117,10 @@ static const int
  *  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 };
@@ -132,10 +130,10 @@ static const int
  *  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 };
@@ -145,10 +143,10 @@ static const int
  *  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,
@@ -160,40 +158,40 @@ static const int
 /*
  *  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
@@ -206,14 +204,14 @@ tSCC zMore_HelpText[]     = "Extended usage information passed thru pager";
                                 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
@@ -223,8 +221,6 @@ tSCC zNotLoad_Opts_Pfx[]  = "no";
  *  Under test, omit argument processing, or call optionStackArg,
  *  if multiple copies are allowed.
  */
-extern tOptProc
-    optionPagedUsage, optionStackArg, optionVersionStderr;
 static tOptProc
     doUsageOpt;
 
@@ -239,7 +235,10 @@ static tOptProc
  *  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;
 
@@ -452,7 +451,7 @@ static tOptDesc optDesc[ OPTION_CT ] = {
  */
 tSCC   zPROGNAME[]   = "NTPDC";
 tSCC   zUsageTitle[] =
-"ntpdc - vendor-specific NTP query program - Ver. 4.2.7p83\n\
+"ntpdc - vendor-specific NTP query program - Ver. 4.2.7p84\n\
 USAGE:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n";
 tSCC   zRcName[]     = ".ntprc";
 tSCC*  apzHomeList[] = {
@@ -480,7 +479,7 @@ configuration options which can be specified at startup using\n\
 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
@@ -501,7 +500,8 @@ tOptions ntpdcOptions = {
     + 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,
@@ -533,7 +533,7 @@ doUsageOpt(
     tOptDesc*   pOptDesc )
 {
     (void)pOptions;
-    USAGE( EXIT_SUCCESS );
+    USAGE(EXIT_SUCCESS);
 }
 
 #if ! defined(TEST_NTPDC_OPTS)
@@ -549,22 +549,25 @@ doOptSet_Debug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
 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>
@@ -573,11 +576,11 @@ main(int argc, char** argv)
 #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)
@@ -585,10 +588,10 @@ AO_gettext( char const* pz )
     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;
 }
@@ -601,7 +604,7 @@ static void coerce_it(void** s) { *s = AO_gettext(*s); }
  *  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
index 516841c99c101dc5c254c9072b6ea455293f8a1a..1561542e7ebfcce4a0e3a9ee961f6fb87c3f2987 100644 (file)
@@ -1,21 +1,19 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpdc-opts.h)
  *  
- *  It has been AutoGen-ed  November 17, 2010 at 10:08:23 AM by AutoGen 5.10
+ *  It has been AutoGen-ed  November 22, 2010 at 04:35:50 AM 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:
  *
@@ -41,7 +39,7 @@
  *  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
@@ -70,13 +68,13 @@ typedef enum {
 } teOptIndex;
 
 #define OPTION_CT    15
-#define NTPDC_VERSION       "4.2.7p83"
-#define NTPDC_FULL_VERSION  "ntpdc - vendor-specific NTP query program - Ver. 4.2.7p83"
+#define NTPDC_VERSION       "4.2.7p84"
+#define NTPDC_FULL_VERSION  "ntpdc - vendor-specific NTP query program - Ver. 4.2.7p84"
 
 /*
  *  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)))
@@ -90,7 +88,7 @@ typedef enum {
 #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 )
 
@@ -177,14 +175,14 @@ typedef enum {
 /*
  *  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 */
 
 /* * * * * *
  *
@@ -199,9 +197,9 @@ extern tOptions   ntpdcOptions;
 #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 /* _() */
index abac397924bbd0e26e52e29eb553c709339d920b..e3f7db1c800a1026ff53c2fb4f2683bffb093a20 100644 (file)
@@ -1,7 +1,7 @@
 # 
 # EDIT THIS FILE WITH CAUTION  (ntpdc-opts.menu)
 # 
-# It has been AutoGen-ed  November 19, 2010 at 11:47:05 PM by AutoGen 5.11.3
+# It has been AutoGen-ed  November 22, 2010 at 04:36:02 AM by AutoGen 5.11.3
 # From the definitions    ntpdc-opts.def
 # and the template file   aginfo.tpl
 @end ignore
@@ -53,70 +53,6 @@ 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/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
+ntpdc is unavailable - no --help
 @end example
 @exampleindent 4
\ No newline at end of file
index 5c938689880bdfced35e2a7ddadbe35adb253849..6a5ecfffb6c8551ac09351b6805af978cff04e15 100644 (file)
@@ -3,274 +3,3 @@
 @pindex ntpdc
 @cindex vendor-specific NTP query program
 @ignore
-# 
-# EDIT THIS FILE WITH CAUTION  (ntpdc-opts.texi)
-# 
-# It has been AutoGen-ed  November 17, 2010 at 10:08:35 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.7p83
-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-dev/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. 
index a50259989c2b1bc39d76b1a509fa38f8edb2f2b9..cce4913a8e0706cef897bd0b5ac070e04ea18b49 100644 (file)
@@ -1,7 +1,7 @@
-.TH NTPDC 1 2010-11-17 "( 4.2.7p83)" "Programmer's Manual"
+.TH NTPDC 1 2010-11-22 "( 4.2.7p84)" "Programmer's Manual"
 .\"  EDIT THIS FILE WITH CAUTION  (ntpdc.1)
 .\"  
-.\"  It has been AutoGen-ed  November 17, 2010 at 10:08:34 AM by AutoGen 5.10
+.\"  It has been AutoGen-ed  November 22, 2010 at 04:36:01 AM by AutoGen 5.11.3
 .\"  From the definitions    ntpdc-opts.def
 .\"  and the template file   agman1.tpl
 .\"
index 1e2d0762e18ea7c24aa8f8b0afaddbc8826e3b4d..a33c4e9ac6a8f7463fd6a9f873f7069c7e5c99ea 100644 (file)
@@ -1,21 +1,19 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpq-opts.c)
  *  
- *  It has been AutoGen-ed  November 17, 2010 at 10:08:35 AM by AutoGen 5.10
+ *  It has been AutoGen-ed  November 22, 2010 at 04:36:02 AM 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:
  *
@@ -70,10 +68,10 @@ extern tUsageProc optionUsage;
  *  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 };
@@ -83,10 +81,10 @@ static const int
  *  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 };
@@ -95,29 +93,29 @@ static const int
 /*
  *  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))
 
@@ -125,10 +123,10 @@ tSCC    zSet_Debug_Level_Name[]    = "set-debug-level";
  *  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 };
@@ -138,10 +136,10 @@ static const int
  *  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,
@@ -151,30 +149,30 @@ static const int
 /*
  *  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
@@ -187,14 +185,14 @@ tSCC zMore_HelpText[]     = "Extended usage information passed thru pager";
                                 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
@@ -205,7 +203,7 @@ tSCC zNotLoad_Opts_Pfx[]  = "no";
  *  if multiple copies are allowed.
  */
 extern tOptProc
-    optionPagedUsage, optionStackArg, optionVersionStderr;
+    optionStackArg;
 static tOptProc
     doUsageOpt;
 
@@ -222,7 +220,10 @@ static tOptProc
  *  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;
 
@@ -427,7 +428,7 @@ static tOptDesc optDesc[ OPTION_CT ] = {
  */
 tSCC   zPROGNAME[]   = "NTPQ";
 tSCC   zUsageTitle[] =
-"ntpq - standard NTP query program - Ver. 4.2.7p83\n\
+"ntpq - standard NTP query program - Ver. 4.2.7p84\n\
 USAGE:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n";
 tSCC   zRcName[]     = ".ntprc";
 tSCC*  apzHomeList[] = {
@@ -447,7 +448,7 @@ information about current state and/or changes in that state.\n\
 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
@@ -468,7 +469,8 @@ tOptions ntpqOptions = {
     + 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,
@@ -500,7 +502,7 @@ doUsageOpt(
     tOptDesc*   pOptDesc )
 {
     (void)pOptions;
-    USAGE( EXIT_SUCCESS );
+    USAGE(EXIT_SUCCESS);
 }
 
 #if ! defined(TEST_NTPQ_OPTS)
@@ -516,22 +518,25 @@ doOptSet_Debug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
 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>
@@ -540,11 +545,11 @@ main(int argc, char** argv)
 #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)
@@ -552,10 +557,10 @@ AO_gettext( char const* pz )
     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;
 }
@@ -568,7 +573,7 @@ static void coerce_it(void** s) { *s = AO_gettext(*s); }
  *  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
index 8888be507b8849092f5b8a85ac6ba1f5573a5995..9ec69a32e743d6adee020b1722af54f05dd4c92e 100644 (file)
@@ -1,21 +1,19 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpq-opts.h)
  *  
- *  It has been AutoGen-ed  November 17, 2010 at 10:08:35 AM by AutoGen 5.10
+ *  It has been AutoGen-ed  November 22, 2010 at 04:36:02 AM 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:
  *
@@ -41,7 +39,7 @@
  *  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
@@ -69,13 +67,13 @@ typedef enum {
 } teOptIndex;
 
 #define OPTION_CT    14
-#define NTPQ_VERSION       "4.2.7p83"
-#define NTPQ_FULL_VERSION  "ntpq - standard NTP query program - Ver. 4.2.7p83"
+#define NTPQ_VERSION       "4.2.7p84"
+#define NTPQ_FULL_VERSION  "ntpq - standard NTP query program - Ver. 4.2.7p84"
 
 /*
  *  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)))
@@ -89,7 +87,7 @@ typedef enum {
 #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 )
 
@@ -170,14 +168,14 @@ typedef enum {
 /*
  *  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 */
 
 /* * * * * *
  *
@@ -192,9 +190,9 @@ extern tOptions   ntpqOptions;
 #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 /* _() */
index 3db44bc834e1f641cdb4d347e494d5dcdabe6198..7a33e1abc90af7f0368ca85b1a39a8ae9733986b 100644 (file)
@@ -1,7 +1,7 @@
 # 
 # EDIT THIS FILE WITH CAUTION  (ntpq-opts.menu)
 # 
-# It has been AutoGen-ed  November 19, 2010 at 11:47:22 PM by AutoGen 5.11.3
+# It has been AutoGen-ed  November 22, 2010 at 04:36:17 AM by AutoGen 5.11.3
 # From the definitions    ntpq-opts.def
 # and the template file   aginfo.tpl
 @end ignore
@@ -42,55 +42,6 @@ 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/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
+ntpq is unavailable - no --help
 @end example
 @exampleindent 4
\ No newline at end of file
index d6cd5bfa217147f151f94203688c1b2857621f45..fcd1e9e238084a5fadbc2924b86e560959077046 100644 (file)
@@ -3,229 +3,3 @@
 @pindex ntpq
 @cindex standard NTP query program
 @ignore
-# 
-# EDIT THIS FILE WITH CAUTION  (ntpq-opts.texi)
-# 
-# It has been AutoGen-ed  November 17, 2010 at 10:08:47 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.7p83
-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-dev/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.
index f13d6371c175d0bc6996fbf456b0e0c5cba99a29..a8161d5857f09ebf2582667960474c2bb0eb3cd5 100644 (file)
@@ -1,7 +1,7 @@
-.TH NTPQ 1 2010-11-17 "( 4.2.7p83)" "Programmer's Manual"
+.TH NTPQ 1 2010-11-22 "( 4.2.7p84)" "Programmer's Manual"
 .\"  EDIT THIS FILE WITH CAUTION  (ntpq.1)
 .\"  
-.\"  It has been AutoGen-ed  November 17, 2010 at 10:08:47 AM by AutoGen 5.10
+.\"  It has been AutoGen-ed  November 22, 2010 at 04:36:16 AM by AutoGen 5.11.3
 .\"  From the definitions    ntpq-opts.def
 .\"  and the template file   agman1.tpl
 .\"
index d2b13d19e09b80e4a776e2ec8e26d73a16644ef7..47eb05f72f5463bc86b546fa7eba7a29f86a179d 100644 (file)
@@ -1,21 +1,19 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpsnmpd-opts.c)
  *  
- *  It has been AutoGen-ed  November 17, 2010 at 10:08:47 AM by AutoGen 5.10
+ *  It has been AutoGen-ed  November 22, 2010 at 04:36:17 AM 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:
  *
@@ -60,41 +58,41 @@ extern tUsageProc optionUsage;
 /*
  *  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
@@ -107,14 +105,14 @@ tSCC zMore_HelpText[]     = "Extended usage information passed thru pager";
                                 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
@@ -124,8 +122,6 @@ tSCC zNotLoad_Opts_Pfx[]  = "no";
  *  Under test, omit argument processing, or call optionStackArg,
  *  if multiple copies are allowed.
  */
-extern tOptProc
-    optionPagedUsage, optionVersionStderr;
 static tOptProc
     doUsageOpt;
 
@@ -134,7 +130,10 @@ static tOptProc
  *  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) */
@@ -256,7 +255,7 @@ static tOptDesc optDesc[ OPTION_CT ] = {
  */
 tSCC   zPROGNAME[]   = "NTPSNMPD";
 tSCC   zUsageTitle[] =
-"ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.7p83\n\
+"ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.7p84\n\
 USAGE:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n";
 tSCC   zRcName[]     = ".ntprc";
 tSCC*  apzHomeList[] = {
@@ -268,7 +267,7 @@ tSCC   zBugsAddr[]    = "http://bugs.ntp.org, bugs@ntp.org";
 #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
@@ -290,7 +289,8 @@ tOptions ntpsnmpdOptions = {
     + 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,
@@ -322,24 +322,27 @@ doUsageOpt(
     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>
@@ -348,11 +351,11 @@ main(int argc, char** argv)
 #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)
@@ -360,10 +363,10 @@ AO_gettext( char const* pz )
     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;
 }
@@ -376,7 +379,7 @@ static void coerce_it(void** s) { *s = AO_gettext(*s); }
  *  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
index ad9693584cb01cc8b0de9e56e9d9b09385f16fe8..b9e614720233394478ab75297629dd1ee8291b47 100644 (file)
@@ -1,21 +1,19 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpsnmpd-opts.h)
  *  
- *  It has been AutoGen-ed  November 17, 2010 at 10:08:47 AM by AutoGen 5.10
+ *  It has been AutoGen-ed  November 22, 2010 at 04:36:17 AM 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:
  *
@@ -41,7 +39,7 @@
  *  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
@@ -63,13 +61,13 @@ typedef enum {
 } teOptIndex;
 
 #define OPTION_CT    8
-#define NTPSNMPD_VERSION       "4.2.7p83"
-#define NTPSNMPD_FULL_VERSION  "ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.7p83"
+#define NTPSNMPD_VERSION       "4.2.7p84"
+#define NTPSNMPD_FULL_VERSION  "ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.7p84"
 
 /*
  *  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)))
@@ -83,7 +81,7 @@ typedef enum {
 #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 )
 
@@ -128,14 +126,14 @@ typedef enum {
 /*
  *  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 */
 
 /* * * * * *
  *
@@ -150,9 +148,9 @@ extern tOptions   ntpsnmpdOptions;
 #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 /* _() */
index e4c8a96e2fe2e057b4b03d75c154fb60cd3d2c4b..f8bb10071f4666800d563ea1782c7134fbc7c0ae 100644 (file)
@@ -1,7 +1,7 @@
 # 
 # EDIT THIS FILE WITH CAUTION  (ntpsnmpd-opts.menu)
 # 
-# It has been AutoGen-ed  November 19, 2010 at 11:47:33 PM by AutoGen 5.11.3
+# It has been AutoGen-ed  November 22, 2010 at 04:36:23 AM by AutoGen 5.11.3
 # From the definitions    ntpsnmpd-opts.def
 # and the template file   aginfo.tpl
 @end ignore
@@ -29,28 +29,6 @@ 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/ntp-stable/ntpsnmpd/.ntprc
- - examining environment variables named NTPSNMPD_*
-
-please send bug reports to:  http://bugs.ntp.org, bugs@@ntp.org
+ntpsnmpd is unavailable - no --help
 @end example
 @exampleindent 4
\ No newline at end of file
index 5e23ebbfedb060ec5c0777eb3a250182a1ab9e84..eb52ccfa538d6fbb68f6defa54f59e9ea92a9100 100644 (file)
@@ -3,81 +3,3 @@
 @pindex ntpsnmpd
 @cindex NTP SNMP MIB agent
 @ignore
-# 
-# EDIT THIS FILE WITH CAUTION  (ntpsnmpd-opts.texi)
-# 
-# It has been AutoGen-ed  November 17, 2010 at 10:08:52 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.7p83
-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-dev/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.
index f06d8501b9e6e76bb833cd50dc5f496f582a4b6f..97c2e5ddf65229cd66d0813319a0d3821520852c 100644 (file)
@@ -1,7 +1,7 @@
-.TH NTPSNMPD 1 2010-11-17 "( 4.2.7p83)" "Programmer's Manual"
+.TH NTPSNMPD 1 2010-11-22 "( 4.2.7p84)" "Programmer's Manual"
 .\"  EDIT THIS FILE WITH CAUTION  (ntpsnmpd.1)
 .\"  
-.\"  It has been AutoGen-ed  November 17, 2010 at 10:08:52 AM by AutoGen 5.10
+.\"  It has been AutoGen-ed  November 22, 2010 at 04:36:22 AM by AutoGen 5.11.3
 .\"  From the definitions    ntpsnmpd-opts.def
 .\"  and the template file   agman1.tpl
 .\"
index 6f3857f49bd48a719dbf46cec069edc188b653ee..2decf9653888e30ae857911564c2852a2e106d86 100644 (file)
@@ -57,7 +57,7 @@ CLTAG=NTP_4_2_0
 # - Numeric values increment
 # - empty 'increments' to 1
 # - NEW 'increments' to empty
-point=83
+point=84
 
 ### betapoint is normally modified by script.
 # ntp-stable Beta number (betapoint)
index 0d404a26e09f5bb1e66b7fe7642ef3ef20d6637a..af7fe3ed01da8d62b36ecf3f88e8bb468c56d559 100644 (file)
@@ -1,21 +1,19 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (sntp-opts.c)
  *  
- *  It has been AutoGen-ed  November 17, 2010 at 10:10:11 AM by AutoGen 5.10
+ *  It has been AutoGen-ed  November 22, 2010 at 04:34:18 AM 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:
  *
@@ -61,10 +59,10 @@ extern tUsageProc optionUsage;
  *  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 };
@@ -74,10 +72,10 @@ static const int
  *  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 };
@@ -86,19 +84,19 @@ static const int
 /*
  *  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))
 
@@ -106,10 +104,10 @@ tSCC    zKod_Name[]                = "kod";
  *  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 };
@@ -119,10 +117,10 @@ static const int
  *  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 };
@@ -133,10 +131,10 @@ static const int
  *  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 };
@@ -146,10 +144,10 @@ static const int
  *  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 };
@@ -158,20 +156,20 @@ static const int
 /*
  *  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))
@@ -179,32 +177,32 @@ tSCC    zTimeout_Name[]            = "timeout";
 /*
  *  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
@@ -217,14 +215,14 @@ tSCC zMore_HelpText[]     = "Extended usage information passed thru pager";
                                 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
@@ -234,8 +232,6 @@ tSCC zNotLoad_Opts_Pfx[]  = "no";
  *  Under test, omit argument processing, or call optionStackArg,
  *  if multiple copies are allowed.
  */
-extern tOptProc
-    optionNumericVal, optionPagedUsage, optionVersionStderr;
 static tOptProc
     doUsageOpt;
 
@@ -244,7 +240,10 @@ static tOptProc
  *  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) */
@@ -474,7 +473,7 @@ static tOptDesc optDesc[ OPTION_CT ] = {
  */
 tSCC   zPROGNAME[]   = "SNTP";
 tSCC   zUsageTitle[] =
-"sntp - standard SNTP program - Ver. 4.2.7p83\n\
+"sntp - standard SNTP program - Ver. 4.2.7p84\n\
 USAGE:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... hostname-or-IP ...\n";
 tSCC   zRcName[]     = ".ntprc";
 tSCC*  apzHomeList[] = {
@@ -498,7 +497,7 @@ job.\n\n\
 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
@@ -520,7 +519,8 @@ tOptions sntpOptions = {
     + 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,
@@ -552,24 +552,27 @@ doUsageOpt(
     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>
@@ -578,11 +581,11 @@ main(int argc, char** argv)
 #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)
@@ -590,10 +593,10 @@ AO_gettext( char const* pz )
     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;
 }
@@ -606,7 +609,7 @@ static void coerce_it(void** s) { *s = AO_gettext(*s); }
  *  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
index 9c45c66c2615f07c6e89a1969c658082c2d963b9..413b79acc643f74f730b106aae4e33af79056f2e 100644 (file)
@@ -1,21 +1,19 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (sntp-opts.h)
  *  
- *  It has been AutoGen-ed  November 17, 2010 at 10:10:11 AM by AutoGen 5.10
+ *  It has been AutoGen-ed  November 22, 2010 at 04:34:18 AM 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:
  *
@@ -41,7 +39,7 @@
  *  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
@@ -72,13 +70,13 @@ typedef enum {
 } teOptIndex;
 
 #define OPTION_CT    17
-#define SNTP_VERSION       "4.2.7p83"
-#define SNTP_FULL_VERSION  "sntp - standard SNTP program - Ver. 4.2.7p83"
+#define SNTP_VERSION       "4.2.7p84"
+#define SNTP_FULL_VERSION  "sntp - standard SNTP program - Ver. 4.2.7p84"
 
 /*
  *  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)))
@@ -92,7 +90,7 @@ typedef enum {
 #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 )
 
@@ -195,14 +193,14 @@ typedef enum {
 /*
  *  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 */
 
 /* * * * * *
  *
@@ -217,9 +215,9 @@ extern tOptions   sntpOptions;
 #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 /* _() */
index 730e85c1ecf39dd7f80e8d4d46c3e68d17b9b48d..4cb2b1ade848d26aebaf2620f32deab744942dac 100644 (file)
@@ -1,7 +1,7 @@
 # 
 # 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
+# It has been AutoGen-ed  November 22, 2010 at 04:34:28 AM by AutoGen 5.11.3
 # From the definitions    sntp-opts.def
 # and the template file   aginfo.tpl
 @end ignore
index 800f0b7afbf80d2c6796fc69aae8cfb9d6da2498..c4a53578307064af803c4c486bf1e31720757e69 100644 (file)
@@ -3,216 +3,3 @@
 @pindex sntp
 @cindex standard SNTP program
 @ignore
-# 
-# EDIT THIS FILE WITH CAUTION  (sntp-opts.texi)
-# 
-# It has been AutoGen-ed  November 17, 2010 at 10:10:17 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).
index 7ce89ff67579ffdd2a5ca9428d8da1e90392237b..fa58cec2d578d564024663210a76052b174d5c48 100644 (file)
@@ -1,7 +1,7 @@
-.TH SNTP 1 2010-11-17 "( 4.2.7p83)" "Programmer's Manual"
+.TH SNTP 1 2010-11-22 "( 4.2.7p84)" "Programmer's Manual"
 .\"  EDIT THIS FILE WITH CAUTION  (sntp.1)
 .\"  
-.\"  It has been AutoGen-ed  November 17, 2010 at 10:10:16 AM by AutoGen 5.10
+.\"  It has been AutoGen-ed  November 22, 2010 at 04:34:27 AM by AutoGen 5.11.3
 .\"  From the definitions    sntp-opts.def
 .\"  and the template file   agman1.tpl
 .\"
index 863794b2479519b11fca9e61daa9b0c1eeeea4ef..3f1c6f67505eceac4266e940647b70b7f42e396b 100644 (file)
@@ -36,7 +36,7 @@ display the time offset of the system clock relative to the server
 clock.  Run as root, it can correct the system clock to this offset as
 well.  It can be run as an interactive command or from a cron job.
 
-  <p>This document applies to version 4.2.7p83 of <code>sntp</code>.
+  <p>This document applies to version 4.2.7p84 of <code>sntp</code>.
 
   <p>The program implements the SNTP protocol as defined by the draft NTPv4
 IETF specification.
@@ -50,9 +50,65 @@ IETF specification.
 
 <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 22, 2010 at 04:34:28 AM 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>
@@ -68,7 +124,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
 <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.
@@ -88,14 +144,14 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
 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>
 
index d233059742a4f3a99f3057df310fcdfa504d90dd..07406d46971be0af4db4da4285c7921de4d7fbf8 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntp-keygen-opts.c)
  *  
- *  It has been AutoGen-ed  November 20, 2010 at 07:08:53 AM by AutoGen 5.11.2
+ *  It has been AutoGen-ed  November 22, 2010 at 04:36:24 AM by AutoGen 5.11.3
  *  From the definitions    ntp-keygen-opts.def
  *  and the template file   options
  *
@@ -757,7 +757,7 @@ static tOptDesc optDesc[ OPTION_CT ] = {
  */
 tSCC   zPROGNAME[]   = "NTP_KEYGEN";
 tSCC   zUsageTitle[] =
-"ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.7p83\n\
+"ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.7p84\n\
 USAGE:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n";
 tSCC   zRcName[]     = ".ntprc";
 tSCC*  apzHomeList[] = {
@@ -771,7 +771,7 @@ tSCC    zDetail[]     = "\n\
 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/share/autogen/optcode.tpl near line 493 */
+/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 493 */
 
 #if defined(ENABLE_NLS)
 # define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -894,7 +894,7 @@ doOptModulus(tOptions* pOptions, tOptDesc* pOptDesc)
     pOptDesc->optArg.argInt = val;
 }
 #endif /* defined AUTOKEY */
-/* extracted from /usr/local/share/autogen/optmain.tpl near line 107 */
+/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 107 */
 
 #if defined(TEST_NTP_KEYGEN_OPTS) /* TEST MAIN PROCEDURE: */
 
@@ -912,7 +912,7 @@ main(int argc, char** argv)
     return res;
 }
 #endif  /* defined TEST_NTP_KEYGEN_OPTS */
-/* extracted from /usr/local/share/autogen/optcode.tpl near line 626 */
+/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 626 */
 
 #if ENABLE_NLS
 #include <stdio.h>
index e0e19b100d9c4ef0caed09dbaaa4a43a1dd3c1e5..8145081b86e21fcc291794889c9c57eb14ee54ee 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntp-keygen-opts.h)
  *  
- *  It has been AutoGen-ed  November 20, 2010 at 07:08:53 AM by AutoGen 5.11.2
+ *  It has been AutoGen-ed  November 22, 2010 at 04:36:24 AM by AutoGen 5.11.3
  *  From the definitions    ntp-keygen-opts.def
  *  and the template file   options
  *
@@ -77,8 +77,8 @@ typedef enum {
 } teOptIndex;
 
 #define OPTION_CT    24
-#define NTP_KEYGEN_VERSION       "4.2.7p83"
-#define NTP_KEYGEN_FULL_VERSION  "ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.7p83"
+#define NTP_KEYGEN_VERSION       "4.2.7p84"
+#define NTP_KEYGEN_FULL_VERSION  "ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.7p84"
 
 /*
  *  Interface defines for all options.  Replace "n" with the UPPER_CASED
@@ -261,7 +261,7 @@ typedef enum {
                 ntp_keygenOptions.pzCurOpt  = NULL)
 #define START_OPT       RESTART_OPT(1)
 #define USAGE(c)        (*ntp_keygenOptions.pUsageProc)(&ntp_keygenOptions, c)
-/* extracted from /usr/local/share/autogen/opthead.tpl near line 408 */
+/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 408 */
 
 /* * * * * *
  *
index bc5cfe9e19d8102d63d880a5cdf5501e93db8f3b..fc3a48a121b3f9640e5d279518dd0b3dc05f22c7 100644 (file)
@@ -1 +1,51 @@
-* ntp-keygen Invocation::          Invoking ntp-keygen
+# 
+# EDIT THIS FILE WITH CAUTION  (ntp-keygen-opts.menu)
+# 
+# It has been AutoGen-ed  November 22, 2010 at 04:36:33 AM by AutoGen 5.11.3
+# 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 lifetime::              lifetime option (-l)
+* 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
+ntp-keygen is unavailable - no --help
+@end example
+@exampleindent 4
\ No newline at end of file
index 28404f5e1db4ba745ec43c2b2be2a82ba80fb78a..38b75a2538af81506b627c90376ad4a434234cd4 100644 (file)
@@ -3,377 +3,3 @@
 @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 20, 2010 at 07:08:57 AM by AutoGen 5.11.2
-# 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 lifetime::              lifetime option (-l)
-* 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 90705f
-ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.7p83
-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
-   -l Num lifetime       set certificate lifetime
-   -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 /a/etc/amd.stage/thump2-g3/export/ntp/home/hart/.ntprc
- - reading file /a/etc/amd.stage/thump2-g3/export/ntp/home/hart/ntp-dev-1725/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{AUTOKEY} 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 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{AUTOKEY} during the compilation.
-@end itemize
-
-Set the password for reading files to the specified password.
-
-@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{AUTOKEY} 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{AUTOKEY} during the compilation.
-@end itemize
-
-Generate new host keys, obsoleting any that may exist.
-
-@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{AUTOKEY} 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 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{AUTOKEY} 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{AUTOKEY} during the compilation.
-@end itemize
-
-Set the subject 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 lifetime
-@subsection lifetime option (-l)
-@cindex ntp-keygen-lifetime
-
-This is the ``set certificate lifetime'' option.
-
-This option has some usage constraints.  It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{AUTOKEY} during the compilation.
-@end itemize
-
-Set the certificate expiration to lifetime days from now.
-
-@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{AUTOKEY} during the compilation.
-@end itemize
-
-The number of bits in the prime modulus.  The default is 512.
-
-@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{AUTOKEY} during the compilation.
-@end itemize
-
-This option has no @samp{doc} documentation.
-
-@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{AUTOKEY} during the compilation.
-@end itemize
-
-Generate parameters and keys for the Mu-Varadharajan (MV)
-identification scheme.
-
-@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{AUTOKEY} 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{AUTOKEY} during the compilation.
-@end itemize
-
-Encrypt generated files containing private data with the specified
-password and the DES-CBC algorithm.
-
-@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 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{AUTOKEY} 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{AUTOKEY} 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{AUTOKEY} during the compilation.
-@end itemize
-
-Generate a trusted certificate.  By default, the program generates
-a non-trusted certificate.
index a417a8439165a1dedb2f8edc1775a776ef083690..0d248c3df243c19939f08c49fd1a471ac8238046 100644 (file)
@@ -1,7 +1,7 @@
-.TH NTP-KEYGEN 1 2010-11-20 "(ntp 4.2.7p83)" "Programmer's Manual"
+.TH NTP-KEYGEN 1 2010-11-22 "(ntp 4.2.7p84)" "Programmer's Manual"
 .\"  EDIT THIS FILE WITH CAUTION  (ntp-keygen.1)
 .\"  
-.\"  It has been AutoGen-ed  November 20, 2010 at 07:08:56 AM by AutoGen 5.11.2
+.\"  It has been AutoGen-ed  November 22, 2010 at 04:36:33 AM by AutoGen 5.11.3
 .\"  From the definitions    ntp-keygen-opts.def
 .\"  and the template file   agman1.tpl
 .\"