summaryrefslogtreecommitdiffstats
path: root/usr.sbin/xntpd
diff options
context:
space:
mode:
authorrgrimes <rgrimes@FreeBSD.org>1995-05-30 03:57:47 +0000
committerrgrimes <rgrimes@FreeBSD.org>1995-05-30 03:57:47 +0000
commit4f960dd75f181e9fa2edc44324f15f0ab5c64b37 (patch)
tree15a9c7203efd47ba6dde2896fdb6327dddd4547f /usr.sbin/xntpd
parent30ef9631c5eac7f8254bd3d7ad274d34d9f518b8 (diff)
downloadFreeBSD-src-4f960dd75f181e9fa2edc44324f15f0ab5c64b37.zip
FreeBSD-src-4f960dd75f181e9fa2edc44324f15f0ab5c64b37.tar.gz
Remove trailing whitespace.
Diffstat (limited to 'usr.sbin/xntpd')
-rw-r--r--usr.sbin/xntpd/Makefile.inc2
-rw-r--r--usr.sbin/xntpd/authstuff/authcert.c2
-rw-r--r--usr.sbin/xntpd/authstuff/authspeed.c10
-rw-r--r--usr.sbin/xntpd/authstuff/keyparity.c4
-rw-r--r--usr.sbin/xntpd/authstuff/makeSP.c2
-rw-r--r--usr.sbin/xntpd/authstuff/unixcert.c2
-rw-r--r--usr.sbin/xntpd/clockstuff/chutest.c6
-rw-r--r--usr.sbin/xntpd/clockstuff/propdelay.c6
-rw-r--r--usr.sbin/xntpd/include/in.h2
-rw-r--r--usr.sbin/xntpd/include/l_stdlib.h4
-rw-r--r--usr.sbin/xntpd/include/ntp.h2
-rwxr-xr-xusr.sbin/xntpd/include/ntp_in.h2
-rw-r--r--usr.sbin/xntpd/include/ntp_io.h2
-rw-r--r--usr.sbin/xntpd/include/ntp_machine.h68
-rw-r--r--usr.sbin/xntpd/include/ntp_request.h6
-rw-r--r--usr.sbin/xntpd/include/ntp_select.h2
-rw-r--r--usr.sbin/xntpd/include/ntp_string.h2
-rw-r--r--usr.sbin/xntpd/include/ntp_types.h2
-rw-r--r--usr.sbin/xntpd/include/parse.h14
-rw-r--r--usr.sbin/xntpd/include/parse_conf.h2
-rw-r--r--usr.sbin/xntpd/include/sys/parsestreams.h2
-rw-r--r--usr.sbin/xntpd/kernel/chuinit.c10
-rw-r--r--usr.sbin/xntpd/kernel/clkinit.c10
-rw-r--r--usr.sbin/xntpd/lib/a_md512crypt.c4
-rw-r--r--usr.sbin/xntpd/lib/a_md5decrypt.c2
-rw-r--r--usr.sbin/xntpd/lib/a_md5encrypt.c2
-rw-r--r--usr.sbin/xntpd/lib/atoint.c2
-rw-r--r--usr.sbin/xntpd/lib/atolfp.c10
-rw-r--r--usr.sbin/xntpd/lib/auth12crypt.c2
-rw-r--r--usr.sbin/xntpd/lib/authdecrypt.c4
-rw-r--r--usr.sbin/xntpd/lib/authencrypt.c2
-rw-r--r--usr.sbin/xntpd/lib/authkeys.c10
-rw-r--r--usr.sbin/xntpd/lib/authreadkeys.c10
-rw-r--r--usr.sbin/xntpd/lib/authusekey.c6
-rw-r--r--usr.sbin/xntpd/lib/caljulian.c4
-rw-r--r--usr.sbin/xntpd/lib/calleapwhen.c2
-rw-r--r--usr.sbin/xntpd/lib/calyearstart.c2
-rw-r--r--usr.sbin/xntpd/lib/clocktypes.c2
-rw-r--r--usr.sbin/xntpd/lib/decodenetnum.c2
-rw-r--r--usr.sbin/xntpd/lib/dofptoa.c6
-rw-r--r--usr.sbin/xntpd/lib/dolfptoa.c2
-rwxr-xr-xusr.sbin/xntpd/lib/findconfig.c8
-rw-r--r--usr.sbin/xntpd/lib/getopt.c4
-rw-r--r--usr.sbin/xntpd/lib/hextolfp.c4
-rw-r--r--usr.sbin/xntpd/lib/humandate.c10
-rw-r--r--usr.sbin/xntpd/lib/md5.c2
-rw-r--r--usr.sbin/xntpd/lib/mstolfp.c4
-rw-r--r--usr.sbin/xntpd/lib/netof.c2
-rw-r--r--usr.sbin/xntpd/lib/numtohost.c4
-rw-r--r--usr.sbin/xntpd/lib/prettydate.c4
-rw-r--r--usr.sbin/xntpd/lib/refnumtoa.c4
-rw-r--r--usr.sbin/xntpd/lib/systime.c4
-rw-r--r--usr.sbin/xntpd/lib/utvtoa.c2
-rw-r--r--usr.sbin/xntpd/ntpdate/ntpdate.c30
-rw-r--r--usr.sbin/xntpd/ntpq/ntpq.c50
-rw-r--r--usr.sbin/xntpd/ntpq/ntpq_ops.c22
-rw-r--r--usr.sbin/xntpd/ntptrace/ntptrace.c26
-rw-r--r--usr.sbin/xntpd/parse/clk_dcf7000.c8
-rw-r--r--usr.sbin/xntpd/parse/clk_meinberg.c40
-rw-r--r--usr.sbin/xntpd/parse/clk_rawdcf.c18
-rw-r--r--usr.sbin/xntpd/parse/clk_schmid.c10
-rw-r--r--usr.sbin/xntpd/parse/clk_trimtsip.c17
-rw-r--r--usr.sbin/xntpd/parse/parse.c98
-rw-r--r--usr.sbin/xntpd/parse/parse_conf.c4
-rw-r--r--usr.sbin/xntpd/parse/parsesolaris.c122
-rw-r--r--usr.sbin/xntpd/parse/parsestreams.c134
-rw-r--r--usr.sbin/xntpd/parse/util/dcfd.c38
-rw-r--r--usr.sbin/xntpd/parse/util/parsetest.c31
-rw-r--r--usr.sbin/xntpd/parse/util/testdcf.c10
-rw-r--r--usr.sbin/xntpd/util/byteorder.c4
-rw-r--r--usr.sbin/xntpd/util/longsize.c2
-rw-r--r--usr.sbin/xntpd/util/ntptime.c2
-rw-r--r--usr.sbin/xntpd/util/precision.c2
-rw-r--r--usr.sbin/xntpd/util/testrs6000.c2
-rw-r--r--usr.sbin/xntpd/util/tickadj.c32
-rw-r--r--usr.sbin/xntpd/util/timetrim.c8
-rw-r--r--usr.sbin/xntpd/xntpd/ntp_config.c146
-rw-r--r--usr.sbin/xntpd/xntpd/ntp_control.c54
-rw-r--r--usr.sbin/xntpd/xntpd/ntp_filegen.c46
-rw-r--r--usr.sbin/xntpd/xntpd/ntp_intres.c22
-rw-r--r--usr.sbin/xntpd/xntpd/ntp_io.c30
-rw-r--r--usr.sbin/xntpd/xntpd/ntp_leap.c4
-rw-r--r--usr.sbin/xntpd/xntpd/ntp_loopfilter.c6
-rw-r--r--usr.sbin/xntpd/xntpd/ntp_monitor.c8
-rw-r--r--usr.sbin/xntpd/xntpd/ntp_peer.c12
-rw-r--r--usr.sbin/xntpd/xntpd/ntp_proto.c30
-rw-r--r--usr.sbin/xntpd/xntpd/ntp_refclock.c10
-rw-r--r--usr.sbin/xntpd/xntpd/ntp_request.c10
-rw-r--r--usr.sbin/xntpd/xntpd/ntp_restrict.c10
-rw-r--r--usr.sbin/xntpd/xntpd/ntp_unixclock.c8
-rw-r--r--usr.sbin/xntpd/xntpd/ntp_util.c12
-rw-r--r--usr.sbin/xntpd/xntpd/refclock_acts.c6
-rw-r--r--usr.sbin/xntpd/xntpd/refclock_as2201.c2
-rw-r--r--usr.sbin/xntpd/xntpd/refclock_atom.c4
-rw-r--r--usr.sbin/xntpd/xntpd/refclock_chu.c12
-rw-r--r--usr.sbin/xntpd/xntpd/refclock_datum.c4
-rw-r--r--usr.sbin/xntpd/xntpd/refclock_gpstm.c8
-rw-r--r--usr.sbin/xntpd/xntpd/refclock_heath.c2
-rw-r--r--usr.sbin/xntpd/xntpd/refclock_leitch.c16
-rw-r--r--usr.sbin/xntpd/xntpd/refclock_mx4200.c4
-rw-r--r--usr.sbin/xntpd/xntpd/refclock_nmea.c4
-rw-r--r--usr.sbin/xntpd/xntpd/refclock_omega.c6
-rw-r--r--usr.sbin/xntpd/xntpd/refclock_parse.c104
-rw-r--r--usr.sbin/xntpd/xntpd/refclock_pst.c2
-rw-r--r--usr.sbin/xntpd/xntpd/refclock_tpro.c2
-rw-r--r--usr.sbin/xntpd/xntpdc/ntpdc.c16
-rw-r--r--usr.sbin/xntpd/xntpdc/ntpdc_ops.c78
107 files changed, 842 insertions, 836 deletions
diff --git a/usr.sbin/xntpd/Makefile.inc b/usr.sbin/xntpd/Makefile.inc
index bb225ee..ce551ea 100644
--- a/usr.sbin/xntpd/Makefile.inc
+++ b/usr.sbin/xntpd/Makefile.inc
@@ -3,7 +3,7 @@ NTPDEFS= -DSYS_FREEBSD -DSYS_44BSD
AUTHDEFS= -DMD5
CLOCKDEFS= -DLOCAL_CLOCK -DPST -DWWVB -DAS2201 -DGOES -DGPSTM -DOMEGA \
-DLEITCH -DTRAK -DACTS -DATOM -DDATUM -DHEATH -DMSFEES \
- -DMX4200 -DNMEA -DWWVB
+ -DMX4200 -DNMEA -DWWVB
CFLAGS+= ${NTPDEFS} ${DEFS_LOCAL} ${AUTHDEFS} ${CLOCKDEFS} ${COPTS}
BINDIR?= /usr/sbin
diff --git a/usr.sbin/xntpd/authstuff/authcert.c b/usr.sbin/xntpd/authstuff/authcert.c
index 0f04d61..19ade8c 100644
--- a/usr.sbin/xntpd/authstuff/authcert.c
+++ b/usr.sbin/xntpd/authstuff/authcert.c
@@ -89,7 +89,7 @@ put8(lp)
{
int i;
-
+
for(i = 0; i < 2; i++)
printf("%08lx", (u_long)(*lp++));
}
diff --git a/usr.sbin/xntpd/authstuff/authspeed.c b/usr.sbin/xntpd/authstuff/authspeed.c
index a6362a8..93965d2 100644
--- a/usr.sbin/xntpd/authstuff/authspeed.c
+++ b/usr.sbin/xntpd/authstuff/authspeed.c
@@ -84,7 +84,7 @@ char *argv[];
case 'n':
loops = atoi(ntp_optarg);
if (loops <= 0) {
- (void) fprintf(stderr,
+ (void) fprintf(stderr,
"%s: %s is unlikely to be a useful number of loops\n",
progname, ntp_optarg);
errflg++;
@@ -182,22 +182,22 @@ dodelay(loops)
/*
* If we're attempting to compute the cost of an auth2crypt()
* for first compute the total cost, then compute the
- * cost of only doing the first step, auth1crypt(). What
+ * cost of only doing the first step, auth1crypt(). What
* remains is the cost of auth2crypt.
*/
loopcount = loops;
(void) gettimeofday(&tstart, (struct timezone *)0);
(void) getrusage(RUSAGE_SELF, &rstart);
-
+
while (loopcount-- > 0) {
auth1crypt((loops & 0xf) + domd5, pkt, 48);
L_ADDUF(&dummy1, dummy3);
auth2crypt((loops & 0xf) + domd5, pkt, 48);
}
-
+
(void) getrusage(RUSAGE_SELF, &rend);
(void) gettimeofday(&tend, (struct timezone *)0);
-
+
subtime(&tstart, &tend, &rtime1);
#ifdef FAKE_RUSAGE
vtime1 = (rend.tms_utime - rstart.tms_utime) * 1.0 / HZ;
diff --git a/usr.sbin/xntpd/authstuff/keyparity.c b/usr.sbin/xntpd/authstuff/keyparity.c
index aed05d9..8a12c13 100644
--- a/usr.sbin/xntpd/authstuff/keyparity.c
+++ b/usr.sbin/xntpd/authstuff/keyparity.c
@@ -237,7 +237,7 @@ decodekey(keytype, str, key)
| ((key[i] >> 7) & STD_PARITY_BITS);
}
break;
-
+
case KEY_TYPE_ASCII:
/*
* Make up key from ascii representation
@@ -250,7 +250,7 @@ decodekey(keytype, str, key)
key[1] = keybytes[4] << 24 | keybytes[5] << 16
| keybytes[6] << 8 | keybytes[7];
break;
-
+
default:
/* Oh, well */
return 0;
diff --git a/usr.sbin/xntpd/authstuff/makeSP.c b/usr.sbin/xntpd/authstuff/makeSP.c
index 4fcd78c..7daefa6 100644
--- a/usr.sbin/xntpd/authstuff/makeSP.c
+++ b/usr.sbin/xntpd/authstuff/makeSP.c
@@ -61,7 +61,7 @@ u_char S[8][64] = {
3, 13, 4, 7, 15, 2, 8, 14, 12, 0, 1, 10, 6, 9, 11, 5,
0, 14, 7, 11, 10, 4, 13, 1, 5, 8, 12, 6, 9, 3, 2, 15,
13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9,
-
+
10, 0, 9, 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8,
13, 7, 0, 9, 3, 4, 6, 10, 2, 8, 5, 14, 12, 11, 15, 1,
13, 6, 4, 9, 8, 15, 3, 0, 11, 1, 2, 12, 5, 10, 14, 7,
diff --git a/usr.sbin/xntpd/authstuff/unixcert.c b/usr.sbin/xntpd/authstuff/unixcert.c
index 47c76f6..9ec2c98 100644
--- a/usr.sbin/xntpd/authstuff/unixcert.c
+++ b/usr.sbin/xntpd/authstuff/unixcert.c
@@ -88,7 +88,7 @@ U_LONG *lp;
{
int i;
-
+
for(i=0;i<2;i++){
printf("%08x",*lp++);
}
diff --git a/usr.sbin/xntpd/clockstuff/chutest.c b/usr.sbin/xntpd/clockstuff/chutest.c
index 2bf058c..d8b804a 100644
--- a/usr.sbin/xntpd/clockstuff/chutest.c
+++ b/usr.sbin/xntpd/clockstuff/chutest.c
@@ -166,7 +166,7 @@ openterm(dev)
error("ioctl(TIOCEXCL)", "", "");
if (debug)
(void) fprintf(stderr, "done\n");
-
+
ttyb.sg_ispeed = ttyb.sg_ospeed = B300;
ttyb.sg_erase = ttyb.sg_kill = 0;
ttyb.sg_flags = EVENP|ODDP|RAW;
@@ -552,7 +552,7 @@ chufilter(chuc, rtime)
(void) printf("Bad format, halves don't match\n");
return;
}
-
+
/*
* Break out the code into the BCD nibbles. Only need to fiddle
* with the first half since both are identical. Note the first
@@ -705,7 +705,7 @@ codeokay:
isneg = 1;
else
isneg = 0;
-
+
/*
* Here is a multiply-by-0.1 optimization that should apply
* just about everywhere. If the magnitude of the sum
diff --git a/usr.sbin/xntpd/clockstuff/propdelay.c b/usr.sbin/xntpd/clockstuff/propdelay.c
index 0c1f1bb..507bc08 100644
--- a/usr.sbin/xntpd/clockstuff/propdelay.c
+++ b/usr.sbin/xntpd/clockstuff/propdelay.c
@@ -171,7 +171,7 @@ char *argv[];
errflg++;
break;
}
- if (errflg || (!(Cflag || Wflag || Gflag) && ntp_optind+4 != argc) ||
+ if (errflg || (!(Cflag || Wflag || Gflag) && ntp_optind+4 != argc) ||
((Cflag || Wflag || Gflag) && ntp_optind+2 != argc)) {
(void) fprintf(stderr,
"usage: %s [-d] [-h height] lat1 long1 lat2 long2\n",
@@ -183,7 +183,7 @@ char *argv[];
exit(2);
}
-
+
if (!(Cflag || Wflag || Gflag)) {
lat1 = latlong(argv[ntp_optind], 1);
long1 = latlong(argv[ntp_optind + 1], 0);
@@ -456,7 +456,7 @@ finddelay(lat1, long1, lat2, long2, h, delay)
dg = greatcircle(lat1, long1, lat2, long2);
if (debug)
printf("great circle distance %g km %g miles\n", dg, dg/MILE);
-
+
n = 1;
while ((delta = waveangle(dg, h, n)) < 0.0) {
if (debug)
diff --git a/usr.sbin/xntpd/include/in.h b/usr.sbin/xntpd/include/in.h
index abd404c..c18d569 100644
--- a/usr.sbin/xntpd/include/in.h
+++ b/usr.sbin/xntpd/include/in.h
@@ -183,7 +183,7 @@ struct sockaddr_in {
#define IP_MULTICAST_LOOP 4 /* set/get IP multicast loopback */
#define IP_ADD_MEMBERSHIP 5 /* add an IP group membership */
#define IP_DROP_MEMBERSHIP 6 /* drop an IP group membership */
-
+
#define IP_DEFAULT_MULTICAST_TTL 1 /* normally limit m'casts to 1 hop */
#define IP_DEFAULT_MULTICAST_LOOP 1 /* normally hear sends if a member */
#define IP_MAX_MEMBERSHIPS 20 /* per socket; must fit in one mbuf */
diff --git a/usr.sbin/xntpd/include/l_stdlib.h b/usr.sbin/xntpd/include/l_stdlib.h
index 426dc48..221682e 100644
--- a/usr.sbin/xntpd/include/l_stdlib.h
+++ b/usr.sbin/xntpd/include/l_stdlib.h
@@ -55,7 +55,7 @@ extern void bzero P((char *, int));
extern int bcmp P((char *, char *, int));
extern void bcopy P((char *, char *, int));
#endif
-extern char *mktemp P((char *));
+extern char *mktemp P((char *));
extern int tolower P((int));
@@ -196,7 +196,7 @@ extern int close P((int));
extern char * getpass P((char *));
extern int getpid P((void));
extern int ioctl P((int, int, char *));
-extern char *mktemp P((char *));
+extern char *mktemp P((char *));
extern int unlink P((const char *));
extern int link P((const char *, const char *));
diff --git a/usr.sbin/xntpd/include/ntp.h b/usr.sbin/xntpd/include/ntp.h
index 733f2e7..5eca0e8 100644
--- a/usr.sbin/xntpd/include/ntp.h
+++ b/usr.sbin/xntpd/include/ntp.h
@@ -467,7 +467,7 @@ struct pkt {
* the maximum length NTP packet is a full length NTP control message with
* the maximum length message authenticator. I hate to hard-code 468 and 12,
* but only a few modules include ntp_control.h...
- */
+ */
#define RX_BUFF_SIZE (468+12+MAX_MAC_LEN)
struct recvbuf {
diff --git a/usr.sbin/xntpd/include/ntp_in.h b/usr.sbin/xntpd/include/ntp_in.h
index 80aa451..494051f 100755
--- a/usr.sbin/xntpd/include/ntp_in.h
+++ b/usr.sbin/xntpd/include/ntp_in.h
@@ -186,7 +186,7 @@ struct sockaddr_in {
#define IP_MULTICAST_LOOP 4 /* set/get IP multicast loopback */
#define IP_ADD_MEMBERSHIP 5 /* add an IP group membership */
#define IP_DROP_MEMBERSHIP 6 /* drop an IP group membership */
-
+
#define IP_DEFAULT_MULTICAST_TTL 1 /* normally limit m'casts to 1 hop */
#define IP_DEFAULT_MULTICAST_LOOP 1 /* normally hear sends if a member */
#define IP_MAX_MEMBERSHIPS 20 /* per socket; must fit in one mbuf */
diff --git a/usr.sbin/xntpd/include/ntp_io.h b/usr.sbin/xntpd/include/ntp_io.h
index d60f083..ebe20b4 100644
--- a/usr.sbin/xntpd/include/ntp_io.h
+++ b/usr.sbin/xntpd/include/ntp_io.h
@@ -1,5 +1,5 @@
/*
- * POSIX says use <fnct.h> to get O_* symbols and
+ * POSIX says use <fnct.h> to get O_* symbols and
* SEEK_SET symbol form <untisd.h>.
*/
#if defined(NTP_POSIX_SOURCE)
diff --git a/usr.sbin/xntpd/include/ntp_machine.h b/usr.sbin/xntpd/include/ntp_machine.h
index 9d2bab8..0b62ed1 100644
--- a/usr.sbin/xntpd/include/ntp_machine.h
+++ b/usr.sbin/xntpd/include/ntp_machine.h
@@ -9,7 +9,7 @@
Various options.
They can defined with the DEFS directive in the Config file if they
are not defined here.
-
+
WHICH NICE
HAVE_ATT_NICE - Use att nice(priority_change)
@@ -17,11 +17,11 @@ WHICH NICE
HAVE_NO_NICE - Don't have (or use) either
KERNEL MUCKING - If you porting to a new system see xntpd/ntp_unixclock.c and
- util/tickadj.c to see what these do. This is very system
+ util/tickadj.c to see what these do. This is very system
dependent stuff!!!
-
+
HAVE_LIBKVM - Use libkvm to read kernal memory
- HAVE_READKMEM - Use read to read kernal memory
+ HAVE_READKMEM - Use read to read kernal memory
NOKMEM - Don't read kmem
HAVE_N_UN - Have u_nn nlist struct.
@@ -31,7 +31,7 @@ WHICH SETPGRP TO USE - Not needed if NTP_POSIX_SOURCE is defined since you
HAVE_ATT_SETPGRP - setpgrp(void) instead of setpgrp(int, int)
-Signaled IO - Signled IO defines.
+Signaled IO - Signled IO defines.
HAVE_SIGNALED_IO - Enable signaled io. Assumes you are going to use SIGIO
for tty and udp io.
@@ -39,10 +39,10 @@ Signaled IO - Signled IO defines.
sockets routines are defined on top of streams.
USE_TTY_SIGPOLL - Use SIGPOLL on tty io. This assumes streams.
UDP_BACKWARDS_SETOWN - SunOS 3.5 or Ultirx 2.0 system.
-
-WHICH TERMINAL MODEL TO USE - I would assume HAVE_TERMIOS if
- NTP_POSIX_SOURCE was set but can't. The
+
+WHICH TERMINAL MODEL TO USE - I would assume HAVE_TERMIOS if
+ NTP_POSIX_SOURCE was set but can't. The
posix tty driver is too restrictive on most systems.
It is defined if you define STREAMS.
@@ -65,8 +65,8 @@ THIS MAKES PORTS TO NEW SYSTEMS EASY - You only have to wory about
STEP SLEW OR TWO STEP - The Default is to step.
- SLEWALWAYS - setttimeofday can not be used to set the time of day at
- all.
+ SLEWALWAYS - setttimeofday can not be used to set the time of day at
+ all.
STEP_SLEW - setttimeofday can not set the seconds part of time
time use setttimeofday to set the seconds part of the
time and the slew the seconds.
@@ -101,8 +101,8 @@ WHAT DOES IOCTL(SIOCGIFCONF) RETURN IN THE BUFFER
When requesting the IP interface configuration with an ioctl(2) calll,
an array of ifreq structures are placed in the provided buffer. Some
implementations also place the length of the buffer information in
- the first integer position of the buffer.
-
+ the first integer position of the buffer.
+
SIZE_RETURNED_IN_BUFFER - size integer is in the buffer
WILL IOCTL(SIOCGIFCONF) WORK ON A SOCKET
@@ -113,7 +113,7 @@ WILL IOCTL(SIOCGIFCONF) WORK ON A SOCKET
USE_STREAMS_DEVICE_FOR_IF_CONFIG - use the /dev/ip device for configuration
-MISC
+MISC
USE_PROTOTYPES - Prototype functions
DOSYNCTODR - Resync TODR clock every hour.
@@ -136,13 +136,13 @@ have, some that can do proto typing and others that cannot on the same system.
I get a chance to twiddle some of the configuration parameters at compile
time based on compiler/machine combinations by using this include file.
See convex, aix and sun configurations see how complex it get.
-
+
Note that it _is_ considered reasonable to add some system-specific defines
to the machine/<os> file if it would be too inconvenient to puzzle them out
in this file.
-
+
*/
-
+
/*
* RS6000 running AIX.
@@ -175,7 +175,7 @@ in this file.
#if defined(SYS_SUNOS4)
#define NTP_NEED_BOPS
#define NO_SIGNED_CHAR_DECL
-#define HAVE_LIBKVM
+#define HAVE_LIBKVM
#define HAVE_MALLOC_H
#define HAVE_BSD_NICE
#define RETSIGTYPE void
@@ -195,7 +195,7 @@ in this file.
#undef USE_TTY_SIGPOLL
#undef USE_UDP_SIGPOLL
#define STREAMS_TLI
-#define NO_SIGNED_CHAR_DECL
+#define NO_SIGNED_CHAR_DECL
#define STEP_SLEW /* TWO step */
#define RETSIGTYPE void
#define NTP_POSIX_SOURCE
@@ -213,7 +213,7 @@ in this file.
#define HAVE_SIGNALED_IO
#define USE_TTY_SIGPOLL
#define USE_UDP_SIGPOLL
-#define NO_SIGNED_CHAR_DECL
+#define NO_SIGNED_CHAR_DECL
#define STEP_SLEW /* TWO step */
#define RETSIGTYPE void
#define NTP_POSIX_SOURCE
@@ -232,9 +232,9 @@ in this file.
#if defined(SYS_CONVEXOS10) || defined(SYS_CONVEXOS9)
#define HAVE_SIGNALED_IO
#define HAVE_N_UN
-#define HAVE_READKMEM
+#define HAVE_READKMEM
#define HAVE_BSD_NICE
-#if defined(convex)
+#if defined(convex)
#define RETSIGTYPE int
#define NO_SIGNED_CHAR_DECL
#else
@@ -275,7 +275,7 @@ in this file.
*/
#if defined(SYS_ULTRIX)
#define S_CHAR_DEFINED
-#define HAVE_READKMEM
+#define HAVE_READKMEM
#define HAVE_BSD_NICE
#define RETSIGTYPE void
#define NTP_SYSCALLS_STD
@@ -399,7 +399,7 @@ in this file.
#define NTP_POSIX_SOURCE
#define ADJTIME_IS_ACCURATE
#define HAVE_SYS_TIMEX_H
-/* hope there will be a standard interface
+/* hope there will be a standard interface
* along with a standard name one day ! */
#define ntp_adjtime __adjtimex
#define HAVE_BSD_NICE
@@ -478,8 +478,8 @@ in this file.
* XXX - what OS?
*/
#if defined(SYS_I386)
-#define HAVE_READKMEM
-#define S_CHAR_DEFINED
+#define HAVE_READKMEM
+#define S_CHAR_DEFINED
#define HAVE_BSD_NICE
#ifndef STR_SYSTEM
#define STR_SYSTEM "UNIX/I386"
@@ -490,7 +490,7 @@ in this file.
* Mips
*/
#if defined(SYS_MIPS)
-#define NOKMEM
+#define NOKMEM
#define HAVE_BSD_NICE
#ifndef STR_SYSTEM
#define STR_SYSTEM "UNIX/Mips"
@@ -513,7 +513,7 @@ in this file.
#if defined(SYS_PTX)
#define NO_SIGNED_CHAR_DECL
#define STREAMS_TLI
-#define HAVE_ATT_SETPGRP
+#define HAVE_ATT_SETPGRP
#define HAVE_SIGNALED_IO
#define USE_UDP_SIGPOLL
#define USE_TTY_SIGPOLL
@@ -547,7 +547,7 @@ typedef unsigned long u_long;
* Sony NEWS
*/
#if defined(SYS_SONY)
-#define NO_SIGNED_CHAR_DECL
+#define NO_SIGNED_CHAR_DECL
#define HAVE_READKMEM
#define HAVE_BSD_NICE
#ifndef STR_SYSTEM
@@ -560,15 +560,15 @@ typedef unsigned long u_long;
* XXX - VMS?
*/
#if defined(SYS_VAX)
-#define NO_SIGNED_CHAR_DECL
-#define HAVE_READKMEM
+#define NO_SIGNED_CHAR_DECL
+#define HAVE_READKMEM
#define HAVE_BSD_NICE
#ifndef STR_SYSTEM
#define STR_SYSTEM "UNIX/VAX"
#endif
#endif
-/*
+/*
* UNIX V.4 on and NCR 3000
*/
#if defined(SYS_SVR4)
@@ -576,7 +576,7 @@ typedef unsigned long u_long;
#define USE_PROTOTYPES
#define NTP_POSIX_SOURCE
#define HAVE_ATT_NICE
-#define HAVE_READKMEM
+#define HAVE_READKMEM
#define USE_TTY_SIGPOLL
#define USE_UDP_SIGPOLL
#define STREAM
@@ -598,7 +598,7 @@ typedef unsigned long u_long;
#define USE_PROTOTYPES
#define NTP_POSIX_SOURCE
#define HAVE_ATT_NICE
-#define HAVE_READKMEM
+#define HAVE_READKMEM
#define USE_TTY_SIGPOLL
#define USE_UDP_SIGPOLL
#define UDP_WILDCARD_DELIVERY
@@ -611,7 +611,7 @@ typedef unsigned long u_long;
/* #define USE_STREAMS_DEVICE_FOR_IF_CONFIG */
#undef STEP_SLEW /* TWO step */
#define LOCK_PROCESS
-#define NO_SIGNED_CHAR_DECL
+#define NO_SIGNED_CHAR_DECL
#undef SYSV_TIMEOFDAY
#define SIZE_RETURNED_IN_BUFFER
#define RETSIGTYPE void
diff --git a/usr.sbin/xntpd/include/ntp_request.h b/usr.sbin/xntpd/include/ntp_request.h
index 698e20a..ea2d769 100644
--- a/usr.sbin/xntpd/include/ntp_request.h
+++ b/usr.sbin/xntpd/include/ntp_request.h
@@ -582,7 +582,7 @@ struct conf_restrict {
/*
* Structure used for returning monitor data
*/
-struct info_monitor_1 {
+struct info_monitor_1 {
U_LONG lasttime; /* last packet from this host */
U_LONG firsttime; /* first time we received a packet */
U_LONG lastdrop; /* last time we rejected a packet due to client limitation policy */
@@ -599,7 +599,7 @@ struct info_monitor_1 {
/*
* Structure used for returning monitor data
*/
-struct info_monitor {
+struct info_monitor {
U_LONG lasttime; /* last packet from this host */
U_LONG firsttime; /* first time we received a packet */
U_LONG lastdrop; /* last time we rejected a packet due to client limitation policy */
@@ -613,7 +613,7 @@ struct info_monitor {
/*
* Structure used for returning monitor data (old format
*/
-struct old_info_monitor {
+struct old_info_monitor {
U_LONG lasttime; /* last packet from this host */
U_LONG firsttime; /* first time we received a packet */
U_LONG count; /* count of packets received */
diff --git a/usr.sbin/xntpd/include/ntp_select.h b/usr.sbin/xntpd/include/ntp_select.h
index e3ce0e7..14e498d 100644
--- a/usr.sbin/xntpd/include/ntp_select.h
+++ b/usr.sbin/xntpd/include/ntp_select.h
@@ -1,6 +1,6 @@
/*
* Not all machines define FD_SET in sys/types.h
- */
+ */
#ifndef _ntp_select_h
#define _ntp_select_h
diff --git a/usr.sbin/xntpd/include/ntp_string.h b/usr.sbin/xntpd/include/ntp_string.h
index cc2eec8..90a29da 100644
--- a/usr.sbin/xntpd/include/ntp_string.h
+++ b/usr.sbin/xntpd/include/ntp_string.h
@@ -1,5 +1,5 @@
/*
- * Define string ops: strchr strrchr memcmp memmove memset
+ * Define string ops: strchr strrchr memcmp memmove memset
*/
#ifndef _ntp_string_h
diff --git a/usr.sbin/xntpd/include/ntp_types.h b/usr.sbin/xntpd/include/ntp_types.h
index ac3d76c..bbcea1b 100644
--- a/usr.sbin/xntpd/include/ntp_types.h
+++ b/usr.sbin/xntpd/include/ntp_types.h
@@ -55,6 +55,6 @@
#define U_LONG u_long
#endif /* U_LONG */
#endif /* __ alplha */
-
+
#endif /* _NTP_TYPES_ */
diff --git a/usr.sbin/xntpd/include/parse.h b/usr.sbin/xntpd/include/parse.h
index 49ed4e5..774cf5e 100644
--- a/usr.sbin/xntpd/include/parse.h
+++ b/usr.sbin/xntpd/include/parse.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 1989,1990,1991,1992,1993,1994
* Frank Kardel Friedrich-Alexander Universitaet Erlangen-Nuernberg
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -204,8 +204,8 @@ typedef struct parsetime parsetime_t;
#define PARSE_IO_CSIZE 0x00000003
#define PARSE_IO_CS5 0x00000000
#define PARSE_IO_CS6 0x00000001
-#define PARSE_IO_CS7 0x00000002
-#define PARSE_IO_CS8 0x00000003
+#define PARSE_IO_CS7 0x00000002
+#define PARSE_IO_CS8 0x00000003
/*
* sizes
@@ -215,7 +215,7 @@ typedef struct parsetime parsetime_t;
/*
* ioctl structure
*/
-union parsectl
+union parsectl
{
struct parsestatus
{
@@ -243,7 +243,7 @@ union parsectl
u_long parse_cs; /* character size (needed for stripping) */
} parsesetcs;
};
-
+
typedef union parsectl parsectl_t;
/*------ for conversion routines --------*/
@@ -253,7 +253,7 @@ typedef union parsectl parsectl_t;
struct parse /* parse module local data */
{
int parse_flags; /* operation and current status flags */
-
+
int parse_ioflags; /* io handling flags (5-8 Bit control currently) */
int parse_syncflags; /* possible sync events (START/END/character) */
/*
@@ -292,7 +292,7 @@ struct parse /* parse module local data */
char *parse_ldata; /* last data buffer */
unsigned short parse_ldsize; /* last data buffer length */
u_long parse_badformat; /* number of unparsable pakets */
-
+
/*
* time stamp filtering
*/
diff --git a/usr.sbin/xntpd/include/parse_conf.h b/usr.sbin/xntpd/include/parse_conf.h
index 47f8c0c..3c512aa 100644
--- a/usr.sbin/xntpd/include/parse_conf.h
+++ b/usr.sbin/xntpd/include/parse_conf.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 1993,1994
* Frank Kardel Friedrich-Alexander Universitaet Erlangen-Nuernberg
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/usr.sbin/xntpd/include/sys/parsestreams.h b/usr.sbin/xntpd/include/sys/parsestreams.h
index 7c054af..ac66f42 100644
--- a/usr.sbin/xntpd/include/sys/parsestreams.h
+++ b/usr.sbin/xntpd/include/sys/parsestreams.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 1989,1990,1991,1992,1993,1994
* Frank Kardel Friedrich-Alexander Universitaet Erlangen-Nuernberg
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/usr.sbin/xntpd/kernel/chuinit.c b/usr.sbin/xntpd/kernel/chuinit.c
index 5fd96fd..80b36a9 100644
--- a/usr.sbin/xntpd/kernel/chuinit.c
+++ b/usr.sbin/xntpd/kernel/chuinit.c
@@ -1,9 +1,9 @@
/*
** dynamically loadable chu driver
**
-** $Header: /usr/src/etc/xntp3.3ww/kernel/RCS/chuinit.c,v 1.1 1994/06/15 22:14:38 rob Exp $
+** $Header: /home/ncvs/src/usr.sbin/xntpd/kernel/chuinit.c,v 1.1.1.1 1994/09/29 23:02:42 wollman Exp $
**
-** william robertson <rob@agate.berkeley.edu>
+** william robertson <rob@agate.berkeley.edu>
*/
#include <sys/types.h>
@@ -42,10 +42,10 @@ struct vdstat *vds;
log(LOG_ERR, "chu stream module already loaded\n");
return (EADDRINUSE);
}
-
+
i = findmod("\0");
- if (i == -1 || fmodsw[i].f_name[0] != '\0')
+ if (i == -1 || fmodsw[i].f_name[0] != '\0')
return(-1);
for (j = 0; vd.Drv_name[j] != '\0'; j++) /* XXX check bounds */
@@ -66,7 +66,7 @@ struct vdstat *vds;
fmodsw[i].f_str = 0;
return(0);
-
+
case VDSTAT:
return(0);
diff --git a/usr.sbin/xntpd/kernel/clkinit.c b/usr.sbin/xntpd/kernel/clkinit.c
index e15b114..b8fe456 100644
--- a/usr.sbin/xntpd/kernel/clkinit.c
+++ b/usr.sbin/xntpd/kernel/clkinit.c
@@ -1,9 +1,9 @@
/*
** dynamically loadable clk driver
**
-** $Header: /usr/src/etc/xntp3.3ww/kernel/RCS/clkinit.c,v 1.1 1994/06/15 22:14:38 rob Exp $
+** $Header: /home/ncvs/src/usr.sbin/xntpd/kernel/clkinit.c,v 1.1.1.1 1994/09/29 23:02:47 wollman Exp $
**
-** william robertson <rob@agate.berkeley.edu>
+** william robertson <rob@agate.berkeley.edu>
*/
#include <sys/types.h>
@@ -42,10 +42,10 @@ struct vdstat *vds;
log(LOG_ERR, "clk stream module already loaded\n");
return (EADDRINUSE);
}
-
+
i = findmod("\0");
- if (i == -1 || fmodsw[i].f_name[0] != '\0')
+ if (i == -1 || fmodsw[i].f_name[0] != '\0')
return(-1);
for (j = 0; vd.Drv_name[j] != '\0'; j++) /* XXX check bounds */
@@ -66,7 +66,7 @@ struct vdstat *vds;
fmodsw[i].f_str = 0;
return(0);
-
+
case VDSTAT:
return(0);
diff --git a/usr.sbin/xntpd/lib/a_md512crypt.c b/usr.sbin/xntpd/lib/a_md512crypt.c
index e3705c0..515d83b 100644
--- a/usr.sbin/xntpd/lib/a_md512crypt.c
+++ b/usr.sbin/xntpd/lib/a_md512crypt.c
@@ -25,7 +25,7 @@ extern U_LONG authnokey;
* a variable amount of encrypted data, multiple of 8 bytes, followed by:
* NOCRYPT_OCTETS worth of unencrypted data, followed by:
* BLOCK_OCTETS worth of ciphered checksum.
- */
+ */
#define NOCRYPT_OCTETS 4
#define BLOCK_OCTETS 16
@@ -80,7 +80,7 @@ MD5auth2crypt(keyno, pkt, length)
MD5Final(&ctx);
memmove((char *) &pkt[NOCRYPT_LONGS + length/sizeof(U_LONG)],
- (char *) ctx.digest,
+ (char *) ctx.digest,
BLOCK_OCTETS);
return (4 + BLOCK_OCTETS);
}
diff --git a/usr.sbin/xntpd/lib/a_md5decrypt.c b/usr.sbin/xntpd/lib/a_md5decrypt.c
index bde17c0..958c21f 100644
--- a/usr.sbin/xntpd/lib/a_md5decrypt.c
+++ b/usr.sbin/xntpd/lib/a_md5decrypt.c
@@ -25,7 +25,7 @@ extern U_LONG authnokey;
* a variable amount of encrypted data, multiple of 8 bytes, followed by:
* NOCRYPT_OCTETS worth of unencrypted data, followed by:
* BLOCK_OCTETS worth of ciphered checksum.
- */
+ */
#define NOCRYPT_OCTETS 4
#define BLOCK_OCTETS 16
diff --git a/usr.sbin/xntpd/lib/a_md5encrypt.c b/usr.sbin/xntpd/lib/a_md5encrypt.c
index 0d816dc..6fae6fb 100644
--- a/usr.sbin/xntpd/lib/a_md5encrypt.c
+++ b/usr.sbin/xntpd/lib/a_md5encrypt.c
@@ -25,7 +25,7 @@ extern U_LONG authnokey;
* a variable amount of encrypted data, multiple of 8 bytes, followed by:
* NOCRYPT_OCTETS worth of unencrypted data, followed by:
* BLOCK_OCTETS worth of ciphered checksum.
- */
+ */
#define NOCRYPT_OCTETS 4
#define BLOCK_OCTETS 16
diff --git a/usr.sbin/xntpd/lib/atoint.c b/usr.sbin/xntpd/lib/atoint.c
index 33b5c5d..57abd44 100644
--- a/usr.sbin/xntpd/lib/atoint.c
+++ b/usr.sbin/xntpd/lib/atoint.c
@@ -42,7 +42,7 @@ atoint(str, ival)
if (isneg)
*ival = -u;
- else
+ else
*ival = u;
return 1;
}
diff --git a/usr.sbin/xntpd/lib/atolfp.c b/usr.sbin/xntpd/lib/atolfp.c
index 649303e..644a38c 100644
--- a/usr.sbin/xntpd/lib/atolfp.c
+++ b/usr.sbin/xntpd/lib/atolfp.c
@@ -49,12 +49,12 @@ atolfp(str, lfp)
*/
while (isspace(*cp))
cp++;
-
+
if (*cp == '-') {
cp++;
isneg = 1;
}
-
+
if (*cp == '+')
cp++;
@@ -70,7 +70,7 @@ atolfp(str, lfp)
if (*cp != '\0' && !isspace(*cp)) {
if (*cp++ != '.')
return 0;
-
+
while (ndec < 9 && *cp != '\0'
&& (ind = strchr(digits, *cp)) != NULL) {
ndec++;
@@ -81,7 +81,7 @@ atolfp(str, lfp)
while (isdigit(*cp))
cp++;
-
+
if (*cp != '\0' && !isspace(*cp))
return 0;
}
@@ -110,7 +110,7 @@ atolfp(str, lfp)
if (isneg)
M_NEG(dec_i, dec_f);
-
+
lfp->l_ui = dec_i;
lfp->l_uf = dec_f;
return 1;
diff --git a/usr.sbin/xntpd/lib/auth12crypt.c b/usr.sbin/xntpd/lib/auth12crypt.c
index 0e69dbe..7d69122 100644
--- a/usr.sbin/xntpd/lib/auth12crypt.c
+++ b/usr.sbin/xntpd/lib/auth12crypt.c
@@ -11,7 +11,7 @@
* an 8 byte chunk of data which is encrypted in pass 2
* NOCRYPT_OCTETS worth of unencrypted data, followed by:
* BLOCK_OCTETS worth of ciphered checksum.
- */
+ */
#define NOCRYPT_OCTETS 4
#define BLOCK_OCTETS 8
diff --git a/usr.sbin/xntpd/lib/authdecrypt.c b/usr.sbin/xntpd/lib/authdecrypt.c
index 7462941..6ad3aeb 100644
--- a/usr.sbin/xntpd/lib/authdecrypt.c
+++ b/usr.sbin/xntpd/lib/authdecrypt.c
@@ -9,7 +9,7 @@
* a variable amount of unencrypted data, multiple of 8 bytes, followed by:
* NOCRYPT_OCTETS worth of unencrypted data, followed by:
* BLOCK_OCTETS worth of ciphered checksum.
- */
+ */
#define NOCRYPT_OCTETS 4
#define BLOCK_OCTETS 8
@@ -42,7 +42,7 @@ DESauthdecrypt(keyno, pkt, length)
U_LONG work[2];
authdecryptions++;
-
+
if (keyno == 0)
keys = DESzerodkeys;
else {
diff --git a/usr.sbin/xntpd/lib/authencrypt.c b/usr.sbin/xntpd/lib/authencrypt.c
index eb203e4..f84d10f 100644
--- a/usr.sbin/xntpd/lib/authencrypt.c
+++ b/usr.sbin/xntpd/lib/authencrypt.c
@@ -9,7 +9,7 @@
* a variable amount of encrypted data, multiple of 8 bytes, followed by:
* NOCRYPT_OCTETS worth of unencrypted data, followed by:
* BLOCK_OCTETS worth of ciphered checksum.
- */
+ */
#define NOCRYPT_OCTETS 4
#define BLOCK_OCTETS 8
diff --git a/usr.sbin/xntpd/lib/authkeys.c b/usr.sbin/xntpd/lib/authkeys.c
index 8e590ce..9fce020 100644
--- a/usr.sbin/xntpd/lib/authkeys.c
+++ b/usr.sbin/xntpd/lib/authkeys.c
@@ -200,7 +200,7 @@ authhavekey(keyno)
authkeynotfound++;
return 0;
}
-
+
cache_keyid = sk->keyid;
cache_flags = sk->flags;
#ifdef MD5
@@ -233,7 +233,7 @@ auth_moremem()
sk = (struct savekey *)malloc(MEMINC * sizeof(struct savekey));
if (sk == 0)
return 0;
-
+
for (i = MEMINC; i > 0; i--) {
sk->next = authfreekeys;
authfreekeys = sk++;
@@ -262,7 +262,7 @@ authtrust(keyno, trust)
if (sk == 0 && !trust)
return;
-
+
if (sk != 0) {
if (cache_keyid == keyno)
cache_flags = cache_keyid = 0;
@@ -405,7 +405,7 @@ MD5auth_setkey(keyno, key)
while (sk != 0) {
if (keyno == sk->keyid) {
strncpy(sk->k.MD5_key, (char *)key, sizeof(sk->k.MD5_key));
- if ((sk->keylen = strlen((char *)key)) >
+ if ((sk->keylen = strlen((char *)key)) >
sizeof(sk->k.MD5_key))
sk->keylen = sizeof(sk->k.MD5_key);
@@ -441,7 +441,7 @@ MD5auth_setkey(keyno, key)
return;
}
#endif
-
+
/*
* auth_delkeys - delete all known keys, in preparation for rereading
* the keys file (presumably)
diff --git a/usr.sbin/xntpd/lib/authreadkeys.c b/usr.sbin/xntpd/lib/authreadkeys.c
index 8d2697f..ee13441 100644
--- a/usr.sbin/xntpd/lib/authreadkeys.c
+++ b/usr.sbin/xntpd/lib/authreadkeys.c
@@ -44,7 +44,7 @@ nexttok(str)
*/
while (*cp == ' ' || *cp == '\t')
cp++;
-
+
/*
* Save this and space to end of token
*/
@@ -52,19 +52,19 @@ nexttok(str)
while (*cp != '\0' && *cp != '\n' && *cp != ' '
&& *cp != '\t' && *cp != '#')
cp++;
-
+
/*
* If token length is zero return an error, else set end of
* token to zero and return start.
*/
if (starttok == cp)
return 0;
-
+
if (*cp == ' ' || *cp == '\t')
*cp++ = '\0';
else
*cp = '\0';
-
+
*str = cp;
return starttok;
}
@@ -107,7 +107,7 @@ extern int fclose P((FILE *stream));
token = nexttok(&line);
if (token == 0)
continue;
-
+
/*
* First is key number. See if it is okay.
*/
diff --git a/usr.sbin/xntpd/lib/authusekey.c b/usr.sbin/xntpd/lib/authusekey.c
index 20d7f3c..05fc0d7 100644
--- a/usr.sbin/xntpd/lib/authusekey.c
+++ b/usr.sbin/xntpd/lib/authusekey.c
@@ -84,14 +84,14 @@ authusekey(keyno, keytype, str)
if (!DESauth_parity(key)) {
return 0;
}
-
+
/*
* We can't find a good reason not to use this key.
* So use it.
*/
DESauth_setkey(keyno, key);
break;
-
+
case KEY_TYPE_ASCII:
/*
* Make up key from ascii representation
@@ -103,7 +103,7 @@ authusekey(keyno, keytype, str)
| (U_LONG)keybytes[2] << 8 | (U_LONG)keybytes[3];
key[1] = (U_LONG)keybytes[4] << 24 | (U_LONG)keybytes[5] << 16
| (U_LONG)keybytes[6] << 8 | (U_LONG)keybytes[7];
-
+
/*
* Set parity on key
*/
diff --git a/usr.sbin/xntpd/lib/caljulian.c b/usr.sbin/xntpd/lib/caljulian.c
index 070fa0d..64efd1e 100644
--- a/usr.sbin/xntpd/lib/caljulian.c
+++ b/usr.sbin/xntpd/lib/caljulian.c
@@ -60,7 +60,7 @@ caljulian(ntptime, jt)
nt -= SECSPERCYCLE;
cyear++;
}
-
+
/*
* Seconds, minutes and hours are too hard to do without
* divides, so we don't.
@@ -96,7 +96,7 @@ caljulian(ntptime, jt)
for (i = 0; i < 11; i++)
if (snt < calmonthtab[i+1])
break;
-
+
if (i > 9)
jt->month = i - 9; /* January or February */
else
diff --git a/usr.sbin/xntpd/lib/calleapwhen.c b/usr.sbin/xntpd/lib/calleapwhen.c
index 83613ef..d68bbe9 100644
--- a/usr.sbin/xntpd/lib/calleapwhen.c
+++ b/usr.sbin/xntpd/lib/calleapwhen.c
@@ -52,7 +52,7 @@ calleapwhen(ntpdate, leaplast, leapnext)
for (i = 1; i < 9; i++)
if (dateincycle < (u_long)calleaptab[i])
break;
-
+
/*
* i points at the next leap. Compute the last and the next.
*/
diff --git a/usr.sbin/xntpd/lib/calyearstart.c b/usr.sbin/xntpd/lib/calyearstart.c
index 015ed93..e78c058 100644
--- a/usr.sbin/xntpd/lib/calyearstart.c
+++ b/usr.sbin/xntpd/lib/calyearstart.c
@@ -35,7 +35,7 @@ calyearstart(dateinyear)
cyclestart = MAR1900;
while ((cyclestart + SECSPERCYCLE) <= dateinyear)
cyclestart += SECSPERCYCLE;
-
+
/*
* If we're in the first year of the cycle, January 1 is
* two months back from the cyclestart and the year is
diff --git a/usr.sbin/xntpd/lib/clocktypes.c b/usr.sbin/xntpd/lib/clocktypes.c
index 38b8cd2..4c5f437 100644
--- a/usr.sbin/xntpd/lib/clocktypes.c
+++ b/usr.sbin/xntpd/lib/clocktypes.c
@@ -63,7 +63,7 @@ clockname(num)
int num;
{
register struct clktype *clk;
-
+
for (clk = clktypes; clk->code != -1; clk++) {
if (num == clk->code)
return (clk->abbrev);
diff --git a/usr.sbin/xntpd/lib/decodenetnum.c b/usr.sbin/xntpd/lib/decodenetnum.c
index 65e7761..f19b137 100644
--- a/usr.sbin/xntpd/lib/decodenetnum.c
+++ b/usr.sbin/xntpd/lib/decodenetnum.c
@@ -50,7 +50,7 @@ decodenetnum(num, netnum)
*netnum <<= 8;
*netnum += temp;
}
-
+
if (i < 4)
return 0;
*netnum = htonl(*netnum);
diff --git a/usr.sbin/xntpd/lib/dofptoa.c b/usr.sbin/xntpd/lib/dofptoa.c
index 31673fb..bfa9c71 100644
--- a/usr.sbin/xntpd/lib/dofptoa.c
+++ b/usr.sbin/xntpd/lib/dofptoa.c
@@ -72,7 +72,7 @@ dofptoa(fpv, neg, ndec, msec)
if (dec > 6)
dec = 6;
-
+
if (dec > 0) {
do {
val &= 0xffff;
@@ -99,14 +99,14 @@ dofptoa(fpv, neg, ndec, msec)
*/
while (cp < (cpdec -1) && *cp == 0)
cp++;
-
+
/*
* Copy it into the buffer, asciizing as we go.
*/
bp = buf;
if (neg)
*bp++ = '-';
-
+
while (cp < cpend) {
if (cp == cpdec)
*bp++ = '.';
diff --git a/usr.sbin/xntpd/lib/dolfptoa.c b/usr.sbin/xntpd/lib/dolfptoa.c
index a79d8c6..24fc213 100644
--- a/usr.sbin/xntpd/lib/dolfptoa.c
+++ b/usr.sbin/xntpd/lib/dolfptoa.c
@@ -81,7 +81,7 @@ dolfptoa(fpi, fpv, neg, ndec, msec)
}
if (dec > 12)
dec = 12;
-
+
/*
* If there's a fraction to deal with, do so.
*/
diff --git a/usr.sbin/xntpd/lib/findconfig.c b/usr.sbin/xntpd/lib/findconfig.c
index 8312668..a65f32c 100755
--- a/usr.sbin/xntpd/lib/findconfig.c
+++ b/usr.sbin/xntpd/lib/findconfig.c
@@ -11,8 +11,8 @@ FindConfig(base)
{
static char result[BUFSIZ];
char hostname[BUFSIZ], *cp;
- struct stat sbuf;
- struct utsname unamebuf;
+ struct stat sbuf;
+ struct utsname unamebuf;
/* All keyed by initial target being a directory */
(void) strcpy(result, base);
@@ -46,8 +46,8 @@ FindConfig(base)
}
}
}
- }
- }
+ }
+ }
}
outahere:
return(result);
diff --git a/usr.sbin/xntpd/lib/getopt.c b/usr.sbin/xntpd/lib/getopt.c
index 8505d80..b5164c60 100644
--- a/usr.sbin/xntpd/lib/getopt.c
+++ b/usr.sbin/xntpd/lib/getopt.c
@@ -63,7 +63,7 @@ ntp_getopt(argc, argv, optstring)
scan = NULL;
ntp_optind++;
}
-
+
if (scan == NULL || *scan == '\0') {
if (ntp_optind >= argc
|| argv[ntp_optind][0] != '-'
@@ -75,7 +75,7 @@ ntp_getopt(argc, argv, optstring)
ntp_optind++;
return (EOF);
}
-
+
scan = argv[ntp_optind++]+1;
}
diff --git a/usr.sbin/xntpd/lib/hextolfp.c b/usr.sbin/xntpd/lib/hextolfp.c
index d9291cc..104446c 100644
--- a/usr.sbin/xntpd/lib/hextolfp.c
+++ b/usr.sbin/xntpd/lib/hextolfp.c
@@ -30,7 +30,7 @@ hextolfp(str, lfp)
*/
while (isspace(*cp))
cp++;
-
+
cpstart = cp;
while (*cp != '\0' && (cp - cpstart) < 8 &&
(ind = strchr(digits, *cp)) != NULL) {
@@ -56,7 +56,7 @@ hextolfp(str, lfp)
if ((cp - cpstart) < 8 || ind == NULL)
return 0;
-
+
if (*cp != '\0' && !isspace(*cp))
return 0;
diff --git a/usr.sbin/xntpd/lib/humandate.c b/usr.sbin/xntpd/lib/humandate.c
index 8ea936f..b7b89bc 100644
--- a/usr.sbin/xntpd/lib/humandate.c
+++ b/usr.sbin/xntpd/lib/humandate.c
@@ -29,14 +29,14 @@ humandate(ntptime)
time_t sec;
LIB_GETBUF(bp);
-
+
sec = ntptime - JAN_1970;
tm = localtime(&sec);
(void) sprintf(bp, "%s, %s %2d %4d %2d:%02d:%02d",
days[tm->tm_wday], months[tm->tm_mon], tm->tm_mday,
1900+tm->tm_year, tm->tm_hour, tm->tm_min, tm->tm_sec);
-
+
return bp;
}
@@ -50,12 +50,12 @@ humanlogtime()
char *bp;
time_t cursec = time((time_t *) 0);
struct tm *tm = localtime(&cursec);
-
+
LIB_GETBUF(bp);
-
+
(void) sprintf(bp, "%2d %s %02d:%02d:%02d",
tm->tm_mday, months[tm->tm_mon],
tm->tm_hour, tm->tm_min, tm->tm_sec);
-
+
return bp;
}
diff --git a/usr.sbin/xntpd/lib/md5.c b/usr.sbin/xntpd/lib/md5.c
index 2c373cf..a5aca7a 100644
--- a/usr.sbin/xntpd/lib/md5.c
+++ b/usr.sbin/xntpd/lib/md5.c
@@ -82,7 +82,7 @@ unsigned char PADDING[64] = {
* inline assembly code, we can speed this up a bit.
*/
inline UINT4 ROTATE_LEFT(UINT4 x, int n)
-{
+{
asm("roll %2,%0" : "=d" (x) : "0" (x), "Ir" (n));
return x;
}
diff --git a/usr.sbin/xntpd/lib/mstolfp.c b/usr.sbin/xntpd/lib/mstolfp.c
index f9c21b7..e4c4d46 100644
--- a/usr.sbin/xntpd/lib/mstolfp.c
+++ b/usr.sbin/xntpd/lib/mstolfp.c
@@ -32,7 +32,7 @@ mstolfp(str, lfp)
cp = str;
while (isspace(*cp))
cp++;
-
+
if (*cp == '-') {
*bp++ = '-';
cp++;
@@ -81,7 +81,7 @@ mstolfp(str, lfp)
*/
while (cp < cpdec)
*bp++ = (char)*cp++;
-
+
if (*cp == '.') {
cp++;
while (isdigit(*cp))
diff --git a/usr.sbin/xntpd/lib/netof.c b/usr.sbin/xntpd/lib/netof.c
index def3013..1823fb2 100644
--- a/usr.sbin/xntpd/lib/netof.c
+++ b/usr.sbin/xntpd/lib/netof.c
@@ -1,4 +1,4 @@
-/*
+/*
* netof - return the net address part of an ip address
* (zero out host part)
*/
diff --git a/usr.sbin/xntpd/lib/numtohost.c b/usr.sbin/xntpd/lib/numtohost.c
index 844bbce..9d83584 100644
--- a/usr.sbin/xntpd/lib/numtohost.c
+++ b/usr.sbin/xntpd/lib/numtohost.c
@@ -29,9 +29,9 @@ numtohost(netnum)
|| ((hp = gethostbyaddr((char *)&netnum, sizeof netnum, AF_INET))
== 0))
return numtoa(netnum);
-
+
LIB_GETBUF(bp);
-
+
bp[LIB_BUFLENGTH-1] = '\0';
(void) strncpy(bp, hp->h_name, LIB_BUFLENGTH-1);
return bp;
diff --git a/usr.sbin/xntpd/lib/prettydate.c b/usr.sbin/xntpd/lib/prettydate.c
index 747e310..fd4a8b1 100644
--- a/usr.sbin/xntpd/lib/prettydate.c
+++ b/usr.sbin/xntpd/lib/prettydate.c
@@ -29,7 +29,7 @@ prettydate(ts)
};
LIB_GETBUF(bp);
-
+
sec = ts->l_ui - JAN_1970;
msec = ts->l_uf / 4294967; /* fract / (2 ** 32 / 1000) */
@@ -39,6 +39,6 @@ prettydate(ts)
(u_long)ts->l_ui, (u_long)ts->l_uf, days[tm->tm_wday],
months[tm->tm_mon], tm->tm_mday, 1900 + tm->tm_year,
tm->tm_hour,tm->tm_min, tm->tm_sec, msec);
-
+
return bp;
}
diff --git a/usr.sbin/xntpd/lib/refnumtoa.c b/usr.sbin/xntpd/lib/refnumtoa.c
index b46fdd8..8bb7d38 100644
--- a/usr.sbin/xntpd/lib/refnumtoa.c
+++ b/usr.sbin/xntpd/lib/refnumtoa.c
@@ -14,9 +14,9 @@ refnumtoa(num)
register u_long netnum;
register char *buf;
register const char *rclock;
-
+
netnum = ntohl(num);
-
+
LIB_GETBUF(buf);
rclock = clockname((int)((netnum >> 8) & 0xff));
diff --git a/usr.sbin/xntpd/lib/systime.c b/usr.sbin/xntpd/lib/systime.c
index 4464e8d..53f0e67 100644
--- a/usr.sbin/xntpd/lib/systime.c
+++ b/usr.sbin/xntpd/lib/systime.c
@@ -100,7 +100,7 @@ int
step_systime(ts)
l_fp *ts;
{
-#ifdef SLEWALWAYS
+#ifdef SLEWALWAYS
#ifdef STEP_SLEW
register u_long tmp_ui;
register u_long tmp_uf;
@@ -121,7 +121,7 @@ step_systime(ts)
if (tmp_ui >= 3) { /* Step it and slew we might win */
n = step_systime_real(ts);
if (!n) return n;
- if (isneg)
+ if (isneg)
ts->l_ui = ~0;
else
ts->l_ui = ~0;
diff --git a/usr.sbin/xntpd/lib/utvtoa.c b/usr.sbin/xntpd/lib/utvtoa.c
index 48310a8..5a192e1 100644
--- a/usr.sbin/xntpd/lib/utvtoa.c
+++ b/usr.sbin/xntpd/lib/utvtoa.c
@@ -14,7 +14,7 @@ utvtoa(tv)
register char *buf;
LIB_GETBUF(buf);
-
+
(void) sprintf(buf, "%lu.%06lu", (u_long)tv->tv_sec,
(u_long)tv->tv_usec);
return buf;
diff --git a/usr.sbin/xntpd/ntpdate/ntpdate.c b/usr.sbin/xntpd/ntpdate/ntpdate.c
index 20fa604..bb5ede5 100644
--- a/usr.sbin/xntpd/ntpdate/ntpdate.c
+++ b/usr.sbin/xntpd/ntpdate/ntpdate.c
@@ -247,7 +247,7 @@ main(argc, argv)
default:
break;
}
-
+
sys_maxservers = argc - ntp_optind;
if (errflg || sys_maxservers == 0) {
(void) fprintf(stderr,
@@ -532,7 +532,7 @@ receive(rbufp)
PKT_MODE(rpkt->li_vn_mode), rpkt->stratum);
return;
}
-
+
/*
* So far, so good. See if this is from a server we know.
*/
@@ -553,7 +553,7 @@ receive(rbufp)
printf("receive: pkt.org and peer.xmt differ\n");
return;
}
-
+
/*
* Check out the authenticity if we're doing that.
*/
@@ -564,7 +564,7 @@ receive(rbufp)
if (debug > 3)
printf("receive: rpkt keyid=%ld sys_authkey=%ld decrypt=%ld\n",
- (long int)ntohl(rpkt->keyid), (long int)sys_authkey,
+ (long int)ntohl(rpkt->keyid), (long int)sys_authkey,
(long int)authdecrypt(sys_authkey, (U_LONG *)rpkt,
LEN_PKT_NOMAC));
@@ -578,7 +578,7 @@ receive(rbufp)
server->trust <<= 1;
if (!is_authentic)
server->trust |= 1;
-
+
/*
* Looks good. Record info from the packet.
*/
@@ -685,7 +685,7 @@ clock_filter(server)
*/
for (i = 0; i < sys_samples; i++)
ord[i] = i;
-
+
for (i = 0; i < (sys_samples-1); i++) {
for (j = i+1; j < sys_samples; j++) {
if (server->filter_delay[ord[j]] == 0)
@@ -866,7 +866,7 @@ clock_select()
server_list[i] = server_list[j];
server_list[j] = server;
}
-
+
/*
* Calculate the fixed part of the dispersion limit
*/
@@ -910,7 +910,7 @@ clock_select()
if (n > server_list[j]->precision)
n = server_list[j]->precision;
}
-
+
/*
* i is the index of the server with the worst
* dispersion. If his dispersion is less than
@@ -965,7 +965,7 @@ clock_adjust()
"no server suitable for synchronization found");
return(1);
}
-
+
dostep = 1;
if (!always_step) {
absoffset = server->soffset;
@@ -1237,7 +1237,7 @@ getrecvbufs()
if (full_recvbufs == 0) {
return (struct recvbuf *)0; /* nothing has arrived */
}
-
+
/*
* Get the fulllist chain and mark it empty
*/
@@ -1418,7 +1418,7 @@ static int
l_step_systime(ts)
l_fp *ts;
{
-#ifdef SLEWALWAYS
+#ifdef SLEWALWAYS
#ifdef STEP_SLEW
l_fp ftmp;
int isneg;
@@ -1439,7 +1439,7 @@ l_step_systime(ts)
n = step_systime_real(ts);
if (!n)
return n;
- if (isneg)
+ if (isneg)
ts->l_ui = ~0;
else
ts->l_ui = ~0;
@@ -1512,7 +1512,7 @@ printserver(pp, fp)
pp->leap & 0x2 ? '1' : '0',
pp->leap & 0x1 ? '1' : '0',
pp->trust);
-
+
if (pp->stratum == 1) {
junk[4] = 0;
memmove(junk, (char *)&pp->refid, 4);
@@ -1524,7 +1524,7 @@ printserver(pp, fp)
"refid [%s], delay %s, dispersion %s\n",
str, fptoa(pp->delay, 5),
ufptoa(pp->dispersion, 5));
-
+
(void) fprintf(fp, "transmitted %d, in filter %d\n",
pp->xmtcnt, pp->filter_nextpt);
@@ -1534,7 +1534,7 @@ printserver(pp, fp)
prettydate(&pp->org));
(void) fprintf(fp, "transmit timestamp: %s\n",
prettydate(&pp->xmt));
-
+
(void) fprintf(fp, "filter delay: ");
for (i = 0; i < NTP_SHIFT; i++) {
(void) fprintf(fp, " %-8.8s", fptoa(pp->filter_delay[i], 5));
diff --git a/usr.sbin/xntpd/ntpq/ntpq.c b/usr.sbin/xntpd/ntpq/ntpq.c
index 441b283..2c5eacf 100644
--- a/usr.sbin/xntpd/ntpq/ntpq.c
+++ b/usr.sbin/xntpd/ntpq/ntpq.c
@@ -146,7 +146,7 @@ struct ctl_var peer_var[] = {
{ CP_RECEIVED, UI, "received" }, /* 31 */
{ CP_SENT, UI, "sent" }, /* 32 */
{ CP_FILTERROR, AR, "filterror" }, /* 33 */
- { CP_FLASH, TST, "flash"}, /* 34 */
+ { CP_FLASH, TST, "flash"}, /* 34 */
{ CP_DISP, AR, "disp" }, /* 35 */
/*
* These are duplicate entries so that we can
@@ -608,7 +608,7 @@ openhost(hname)
if (!getnetnum(hname, &netnum, temphost))
return 0;
-
+
if (debug > 2)
printf("Opening host %s\n", temphost);
@@ -627,7 +627,7 @@ openhost(hname)
sockfd = socket(AF_INET, SOCK_DGRAM, 0);
if (sockfd == -1)
error("socket", "", "");
-
+
#if defined(SYS_HPUX) && (SYS_HPUX < 8)
#ifdef SO_RCVBUF
{ int rbufsize = DATASIZE + 2048; /* 2K for slop */
@@ -641,7 +641,7 @@ openhost(hname)
if (connect(sockfd, (struct sockaddr *)&hostaddr,
sizeof(hostaddr)) == -1)
error("connect", "", "");
-
+
havehost = 1;
return 1;
}
@@ -726,7 +726,7 @@ again:
tvo = tvout;
else
tvo = tvsout;
-
+
FD_SET(sockfd, &fds);
n = select(sockfd+1, &fds, (fd_set *)0, (fd_set *)0, &tvo);
@@ -954,22 +954,22 @@ again:
printf("Number of fragments exceeds maximum\n");
return ERR_TOOMUCH;
}
-
+
for (n = 0; n < numfrags; n++) {
if (offset == offsets[n])
goto again; /* duplicate */
if (offset < offsets[n])
break;
}
-
+
if ((u_short)(n > 0 && offsets[n-1] + counts[n-1]) > offset)
goto overlap;
if (n < numfrags && (u_short)(offset + count) > offsets[n])
goto overlap;
-
+
{
register int i;
-
+
for (i = numfrags; i > n; i--) {
offsets[i] = offsets[i-1];
counts[i] = counts[i-1];
@@ -1162,7 +1162,7 @@ again:
res = sendrequest(opcode, associd, auth, qsize, qdata);
if (res != 0)
return res;
-
+
/*
* Get the response. If we got a standard error, print a message
*/
@@ -1286,7 +1286,7 @@ docmd(cmdline)
tokenize(cmdline, tokens, &ntok);
if (ntok == 0)
return;
-
+
/*
* Find the appropriate command description.
*/
@@ -1300,7 +1300,7 @@ docmd(cmdline)
tokens[0]);
return;
}
-
+
/*
* Save the keyword, then walk through the arguments, interpreting
* as we go.
@@ -1623,7 +1623,7 @@ rtdatetolfp(str, lfp)
if (*cp++ != '-')
return 0;
-
+
for (i = 0; i < 3; i++)
buf[i] = *cp++;
buf[3] = '\0';
@@ -1637,7 +1637,7 @@ rtdatetolfp(str, lfp)
if (*cp++ != '-')
return 0;
-
+
if (!isdigit(*cp))
return 0;
cal.year = *cp++ - '0';
@@ -2488,7 +2488,7 @@ statustoa(type, st)
(void)strcat(cb, ", ");
(void)strcat(cb, getcode(CTL_SYS_EVENT(st), sys_codes));
break;
-
+
case TYPE_PEER:
/*
* Handcraft the bits
@@ -2535,7 +2535,7 @@ statustoa(type, st)
peer_codes));
}
break;
-
+
case TYPE_CLOCK:
(void)strcpy(cb, getcode(((st)>>8) & 0xff, clock_codes));
(void)strcat(cb, ", last_");
@@ -2573,7 +2573,7 @@ nextvar(datalen, datap, vname, vvalue)
cp++;
if (cp == cpend)
return 0;
-
+
/*
* Copy name until we hit a ',', an '=', a '\r' or a '\n'. Backspace
* over any white space and terminate it.
@@ -2800,7 +2800,7 @@ outputarr(fp, name, narr, lfp)
*/
if ((int)strlen(name) < 10)
*bp++ = ' ';
-
+
for (i = narr; i > 0; i--) {
if (i != narr)
*bp++ = ' ';
@@ -2937,14 +2937,14 @@ cookedprint(datatype, length, data, status, fp)
}
}
break;
-
+
case UI:
if (!decodeuint(value, &uval))
output_raw = '?';
else
output(fp, name, uinttoa(uval));
break;
-
+
case IN:
if (!decodeint(value, &ival))
output_raw = '?';
@@ -2961,11 +2961,11 @@ cookedprint(datatype, length, data, status, fp)
else
output(fp, name, numtoa(hval));
break;
-
+
case ST:
output_raw = '*';
break;
-
+
case RF:
if (decodenetnum(value, &hval))
output(fp, name, nntohost(hval));
@@ -3000,14 +3000,14 @@ cookedprint(datatype, length, data, status, fp)
output(fp, name, b);
}
break;
-
+
case MD:
if (!decodeuint(value, &uval))
output_raw = '?';
else
output(fp, name, uinttoa(uval));
break;
-
+
case AR:
if (!decodearr(value, &narr, lfparr))
output_raw = '?';
@@ -3021,7 +3021,7 @@ cookedprint(datatype, length, data, status, fp)
else
output(fp, name, tstflags(uval));
break;
-
+
default:
(void) fprintf(stderr,
"Internal error in cookedprint, %s=%s, fmt %d\n",
diff --git a/usr.sbin/xntpd/ntpq/ntpq_ops.c b/usr.sbin/xntpd/ntpq/ntpq_ops.c
index 8bab73d..8e59a71 100644
--- a/usr.sbin/xntpd/ntpq/ntpq_ops.c
+++ b/usr.sbin/xntpd/ntpq/ntpq_ops.c
@@ -370,7 +370,7 @@ makequerydata(vlist, datalen, data)
totallen = namelen + valuelen + (valuelen != 0) + (cp != data);
if (cp + totallen > cpend)
break;
-
+
if (cp != data)
*cp++ = ',';
memmove(cp, vl->name, namelen);
@@ -833,15 +833,15 @@ dogetassoc(fp)
res = doquery(CTL_OP_READSTAT, 0, 0, 0, (char *)0, &rstatus,
&dsize, (char **)&datap);
-
+
if (res != 0)
return 0;
-
+
if (dsize == 0) {
(void) fprintf(fp, "No association ID's returned\n");
return 0;
}
-
+
if (dsize & 0x3) {
(void) fprintf(stderr,
"***Server returned %d octets, should be multiple of 4\n",
@@ -964,7 +964,7 @@ printassoc(showall, fp)
condition = "sys.peer";
break;
}
-
+
} else {
reach = "no";
auth = condition = "";
@@ -1164,7 +1164,7 @@ when(ts, rec, reftime)
lasttime = reftime;
else
return "-";
-
+
diff = (long)(ts->l_ui - lasttime->l_ui);
if (diff <= 0) {
/*
@@ -1237,7 +1237,7 @@ struct varlist peervarlist[] = {
#define HAVE_REFID 1
#define HAVE_STRATUM 2
#define HAVE_HPOLL 3
-#define HAVE_PPOLL 4
+#define HAVE_PPOLL 4
#define HAVE_REACH 5
#define HAVE_DELAY 6
#define HAVE_OFFSET 7
@@ -1286,7 +1286,7 @@ doprintpeers(pvl, associd, rstatus, datalen, data, fp)
memset((char *)havevar, 0, sizeof(havevar));
gettstamp(&ts);
-
+
while (nextvar(&datalen, &data, &name, &value)) {
u_long dummy;
i = findvar(name, peer_var);
@@ -1405,7 +1405,7 @@ doprintpeers(pvl, associd, rstatus, datalen, data, fp)
pvl[i].name, associd);
return 0;
}
-
+
/*
* Got everything, format the line
@@ -1439,7 +1439,7 @@ doprintpeers(pvl, associd, rstatus, datalen, data, fp)
#undef HAVE_REC
#undef HAVE_SRCPORT
#undef HAVE_REFTIME
-#undef MAXHAVE
+#undef MAXHAVE
/*
@@ -1478,7 +1478,7 @@ dogetpeers(pvl, associd, fp)
return 0;
}
-
+
return doprintpeers(pvl, associd, (int)rstatus, dsize, datap, fp);
}
diff --git a/usr.sbin/xntpd/ntptrace/ntptrace.c b/usr.sbin/xntpd/ntptrace/ntptrace.c
index b4c5c57..206c738 100644
--- a/usr.sbin/xntpd/ntptrace/ntptrace.c
+++ b/usr.sbin/xntpd/ntptrace/ntptrace.c
@@ -159,7 +159,7 @@ main(argc, argv)
default:
break;
}
-
+
if (errflg || (argc - ntp_optind) > 1) {
(void) fprintf(stderr,
"usage: %s [-vnd] [-r retries] [-t timeout] [server]\n",
@@ -186,7 +186,7 @@ main(argc, argv)
firstserver = addservbyname(argv[ntp_optind]);
else
firstserver = addservbyname("localhost");
-
+
if (firstserver == NULL) {
/* a message has already been printed */
exit(2);
@@ -196,7 +196,7 @@ main(argc, argv)
* Initialize the time of day routines and the I/O subsystem
*/
setup_io();
-
+
DoTrace(firstserver);
exit(0);
@@ -291,7 +291,7 @@ register struct server *server;
timeout.tv_sec = sys_timeout;
timeout.tv_usec = 0;
n = select(fd+1, &fds, (fd_set *)0, (fd_set *)0, &timeout);
-
+
if (n == 0) { /* timed out */
if (debug)
printf("timeout\n");
@@ -302,7 +302,7 @@ register struct server *server;
return(0);
}
get_systime(&ts);
-
+
if (free_recvbufs == 0) {
syslog(LOG_ERR, "no buffers");
exit(1);
@@ -335,7 +335,7 @@ register struct server *server;
status = ReceiveBuf(server, rb);
freerecvbuf(rb);
-
+
return(status);
}
}
@@ -357,7 +357,7 @@ ReceiveBuf(server, rbufp)
l_fp ci;
struct server *nextserver;
struct in_addr nextia;
-
+
if (debug) {
printf("ReceiveBuf(%s, ", ntoa(&server->srcadr));
@@ -401,7 +401,7 @@ ReceiveBuf(server, rbufp)
PKT_MODE(rpkt->li_vn_mode), rpkt->stratum);
return(0);
}
-
+
/*
* Decode the org timestamp and make sure we're getting a response
* to our last request.
@@ -412,7 +412,7 @@ ReceiveBuf(server, rbufp)
printf("receive: pkt.org and peer.xmt differ\n");
return(0);
}
-
+
/*
* Looks good. Record info from the packet.
*/
@@ -504,7 +504,7 @@ struct in_addr *iap;
server->srcadr.sin_port = htons(NTP_PORT);
sys_servers[sys_numservers++] = server;
-
+
return(server);
}
/*
@@ -653,7 +653,7 @@ decodeipaddr(num, ipaddr)
*ipaddr <<= 8;
*ipaddr += temp;
}
-
+
if (i < 4)
return 0;
*ipaddr = htonl(*ipaddr);
@@ -694,7 +694,7 @@ printserver(pp, fp)
pp->stratum, pp->precision,
pp->leap & 0x2 ? '1' : '0',
pp->leap & 0x1 ? '1' : '0');
-
+
(void) fprintf(fp, "refid ");
printrefid(fp, pp);
@@ -708,7 +708,7 @@ printserver(pp, fp)
fptoa(pp->rootdelay, 5), ufptoa(pp->rootdispersion, 5));
(void) fprintf(fp, ", synch dist %s\n",
ufptoa(synchdist, 5));
-
+
(void) fprintf(fp, "reference time: %s\n",
prettydate(&pp->reftime));
(void) fprintf(fp, "originate timestamp: %s\n",
diff --git a/usr.sbin/xntpd/parse/clk_dcf7000.c b/usr.sbin/xntpd/parse/clk_dcf7000.c
index 208e529..82e7915 100644
--- a/usr.sbin/xntpd/parse/clk_dcf7000.c
+++ b/usr.sbin/xntpd/parse/clk_dcf7000.c
@@ -1,14 +1,14 @@
#if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_DCF7000)
/*
* /src/NTP/REPOSITORY/v3/parse/clk_dcf7000.c,v 3.12 1994/05/30 10:19:57 kardel Exp
- *
+ *
* clk_dcf7000.c,v 3.12 1994/05/30 10:19:57 kardel Exp
*
* ELV DCF7000 module
*
* Copyright (c) 1992,1993,1994
* Frank Kardel Friedrich-Alexander Universitaet Erlangen-Nuernberg
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -33,7 +33,7 @@ static struct format dcf7000_fmt =
},
" - - - - - - - \r",
0
-};
+};
static u_long cvt_dcf7000();
@@ -92,7 +92,7 @@ cvt_dcf7000(buffer, size, format, clock)
{
char *f = &buffer[format->field_offsets[O_FLAGS].offset];
long flags;
-
+
clock->flags = 0;
clock->usecond = 0;
diff --git a/usr.sbin/xntpd/parse/clk_meinberg.c b/usr.sbin/xntpd/parse/clk_meinberg.c
index 6e3b224..10389cf 100644
--- a/usr.sbin/xntpd/parse/clk_meinberg.c
+++ b/usr.sbin/xntpd/parse/clk_meinberg.c
@@ -1,14 +1,14 @@
#if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_MEINBERG)
/*
* /src/NTP/REPOSITORY/v3/parse/clk_meinberg.c,v 3.15 1994/05/30 10:19:59 kardel Exp
- *
+ *
* clk_meinberg.c,v 3.15 1994/05/30 10:19:59 kardel Exp
*
* Meinberg clock support
*
* Copyright (c) 1992,1993,1994
* Frank Kardel Friedrich-Alexander Universitaet Erlangen-Nuernberg
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -27,7 +27,7 @@
/*
* The Meinberg receiver every second sends a datagram of the following form
* (Standard Format)
- *
+ *
* <STX>D:<dd>.<mm>.<yy>;T:<w>;U:<hh>:<mm>:<ss>;<S><F><D><A><ETX>
* pos: 0 00 00 0 00 0 11 111 1 111 12 2 22 2 22 2 2 2 3 3 3
* 1 23 45 6 78 9 01 234 5 678 90 1 23 4 56 7 8 9 0 1 2
@@ -85,7 +85,7 @@
* 123456789012345678901234567890123456789012345678901234567890123456
* \x0209.07.93; 5; 08:48:26; +00:00; ; 49.5736N 11.0280E 373m\x03
*
- *
+ *
* <STX> = '\002' ASCII start of text
* <ETX> = '\003' ASCII end of text
* <dd>,<mm>,<yy> = day, month, year(2 digits!!)
@@ -227,7 +227,7 @@ cvt_meinberg(buffer, size, format, clock)
else
{
char *f = &buffer[format->field_offsets[O_FLAGS].offset];
-
+
clock->flags = 0;
clock->usecond = 0;
@@ -260,22 +260,22 @@ cvt_meinberg(buffer, size, format, clock)
case ' ':
clock->utcoffset = -1*60*60; /* MET */
break;
-
+
case 'S':
clock->utcoffset = -2*60*60; /* MED */
break;
-
+
default:
return CVT_FAIL|CVT_BADFMT;
}
}
-
+
/*
* gather status flags
*/
if (buffer[format->field_offsets[O_ZONE].offset] == 'S')
clock->flags |= PARSEB_DST;
-
+
if (f[0] == '#')
clock->flags |= PARSEB_POWERUP;
@@ -284,12 +284,12 @@ cvt_meinberg(buffer, size, format, clock)
if (f[3] == '!')
clock->flags |= PARSEB_ANNOUNCE;
-
+
if (format->flags & MBG_EXTENDED)
{
clock->flags |= PARSEB_S_LEAP;
clock->flags |= PARSEB_S_ANTENNA;
-
+
/*
* DCF77 does not encode the direction -
* so we take the current default -
@@ -343,9 +343,9 @@ cvt_mgps(buffer, size, format, clock)
{
long h;
char *f = &buffer[format->field_offsets[O_FLAGS].offset];
-
+
clock->flags = PARSEB_S_LEAP|PARSEB_S_POSITION;
-
+
clock->usecond = 0;
/*
@@ -371,23 +371,23 @@ cvt_mgps(buffer, size, format, clock)
clock->utcoffset = -clock->utcoffset;
}
}
-
+
/*
* gather status flags
*/
if (buffer[format->field_offsets[O_ZONE].offset] == 'S')
clock->flags |= PARSEB_DST;
-
+
if ((f[0] == 'U') ||
(clock->utcoffset == 0))
clock->flags |= PARSEB_UTC;
-
+
/*
* no sv's seen - no time & position
*/
if (f[1] == '#')
clock->flags |= PARSEB_POWERUP;
-
+
/*
* at least one sv seen - time (for last position)
*/
@@ -396,13 +396,13 @@ cvt_mgps(buffer, size, format, clock)
else
if (!(clock->flags & PARSEB_POWERUP))
clock->flags |= PARSEB_POSITION;
-
+
/*
* oncoming zone switch
*/
if (f[4] == '!')
clock->flags |= PARSEB_ANNOUNCE;
-
+
/*
* oncoming leap second
* data format does not (yet) specify whether
@@ -411,7 +411,7 @@ cvt_mgps(buffer, size, format, clock)
*/
if (f[5] == 'A')
clock->flags |= PARSEB_LEAPADD;
-
+
/*
* this is the leap second
*/
diff --git a/usr.sbin/xntpd/parse/clk_rawdcf.c b/usr.sbin/xntpd/parse/clk_rawdcf.c
index 296af9e..042e5d3 100644
--- a/usr.sbin/xntpd/parse/clk_rawdcf.c
+++ b/usr.sbin/xntpd/parse/clk_rawdcf.c
@@ -1,14 +1,14 @@
#if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_RAWDCF)
/*
* /src/NTP/REPOSITORY/v3/parse/clk_rawdcf.c,v 3.16 1994/05/31 20:02:40 kardel Exp
- *
+ *
* clk_rawdcf.c,v 3.16 1994/05/31 20:02:40 kardel Exp
*
* Raw DCF77 pulse clock support
*
* Copyright (c) 1992,1993,1994
* Frank Kardel Friedrich-Alexander Universitaet Erlangen-Nuernberg
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -106,13 +106,13 @@ static struct dcfparam
{
unsigned char onebits[60];
unsigned char zerobits[60];
-} dcfparam =
+} dcfparam =
{
"###############RADMLS1248124P124812P1248121241248112481248P", /* 'ONE' representation */
"--------------------s-------p------p----------------------p" /* 'ZERO' representation */
};
-static struct rawdcfcode
+static struct rawdcfcode
{
char offset; /* start bit */
} rawdcfcode[] =
@@ -166,7 +166,7 @@ static u_long ext_bf(buf, idx, zero)
register int i, first;
first = rawdcfcode[idx].offset;
-
+
for (i = rawdcfcode[idx+1].offset - 1; i >= first; i--)
{
sum <<= 1;
@@ -213,7 +213,7 @@ static u_long convert_rawdcf(buffer, size, dcfparam, clock)
#endif
return CVT_NONE;
}
-
+
for (i = 0; i < 58; i++)
{
if ((*s != *b) && (*s != *c))
@@ -232,7 +232,7 @@ static u_long convert_rawdcf(buffer, size, dcfparam, clock)
c++;
s++;
}
-
+
/*
* check Start and Parity bits
*/
@@ -489,7 +489,7 @@ static u_long snt_rawdcf(parseio, ptime)
clocktime_t clock;
u_long cvtrtc;
time_t t;
-
+
/*
* start at last sample and add second index - gross, may have to be much more careful
*/
@@ -531,7 +531,7 @@ static u_long snt_rawdcf(parseio, ptime)
/*
* History:
*
- * clk_rawdcf.c,v $
+ * clk_rawdcf.c,v $
* Revision 3.16 1994/05/31 20:02:40 kardel
* sync on ONE transition
*
diff --git a/usr.sbin/xntpd/parse/clk_schmid.c b/usr.sbin/xntpd/parse/clk_schmid.c
index d15ba90..457a659 100644
--- a/usr.sbin/xntpd/parse/clk_schmid.c
+++ b/usr.sbin/xntpd/parse/clk_schmid.c
@@ -1,14 +1,14 @@
#if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_SCHMID)
/*
* /src/NTP/REPOSITORY/v3/parse/clk_schmid.c,v 3.16 1994/05/30 10:20:03 kardel Exp
- *
+ *
* clk_schmid.c,v 3.16 1994/05/30 10:20:03 kardel Exp
*
* Schmid clock support
*
* Copyright (c) 1992,1993,1994
* Frank Kardel Friedrich-Alexander Universitaet Erlangen-Nuernberg
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -30,7 +30,7 @@
* The command to Schmid's DCF77 clock is a single byte; each bit
* allows the user to select some part of the time string, as follows (the
* output for the lsb is sent first).
- *
+ *
* Bit 0: time in MEZ, 4 bytes *binary, not BCD*; hh.mm.ss.tenths
* Bit 1: date 3 bytes *binary, not BCD: dd.mm.yy
* Bit 2: week day, 1 byte (unused here)
@@ -128,7 +128,7 @@ cvt_schmid(buffer, size, format, clock)
default:
return CVT_FAIL|CVT_BADFMT;
}
-
+
if (!(buffer[7] & WS_TIME))
{
clock->flags |= PARSEB_POWERUP;
@@ -158,7 +158,7 @@ cvt_schmid(buffer, size, format, clock)
}
clock->flags |= PARSEB_S_LEAP|PARSEB_S_ANTENNA;
-
+
return CVT_OK;
}
}
diff --git a/usr.sbin/xntpd/parse/clk_trimtsip.c b/usr.sbin/xntpd/parse/clk_trimtsip.c
index f622bea..422fac1 100644
--- a/usr.sbin/xntpd/parse/clk_trimtsip.c
+++ b/usr.sbin/xntpd/parse/clk_trimtsip.c
@@ -1,6 +1,6 @@
#if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_TRIMTSIP)
/*
- * $Header: /src/NTP/REPOSITORY/v3/parse/clk_trimble.c,v 3.9 1994/02/02 17:45:27 kardel Exp $
+ * $Header: /home/ncvs/src/usr.sbin/xntpd/parse/clk_trimtsip.c,v 1.1.1.1 1994/09/29 23:01:31 wollman Exp $
*
* Trimble TSIP support - CURRENTLY VERY MUCH UNDER CONSTRUCTION
*/
@@ -159,7 +159,7 @@ static unsigned LONG inp_tsip(parseio, ch, ctime)
return (parseio->parse_index == parseio->parse_dsize-1); /* buffer full - attempt to parse (likely to fail) */
}
-
+
#define GPSORIGIN 2524953600 /* NTP origin - GPS origin in seconds */
#define SECSPERWEEK 604800 /* seconds per week - GPS tells us about weeks */
#define L_UF_SCALE 4294967296.0 /* scale a float fraction to l_uf units */
@@ -227,7 +227,7 @@ cvt_trimtsip(buffer, size, format, clock, t)
else
{
cmd = buffer[1];
-
+
#ifdef DEBUG
if (debug > 1)
switch(cmd)
@@ -323,7 +323,7 @@ cvt_trimtsip(buffer, size, format, clock, t)
{
#ifdef DEBUG
if (debug)
- printf("sv6+ seconds <= 0 (%e), setting POWERUP\n");
+ printf("sv6+ seconds <= 0 (%e), setting POWERUP\n");
#endif
clock->flags = PARSEB_POWERUP;
return CVT_OK;
@@ -341,10 +341,10 @@ cvt_trimtsip(buffer, size, format, clock, t)
if (t->t_leap == ADDSECOND)
clock->flags |= PARSEB_LEAPADD;
-
+
if (t->t_leap == DELSECOND)
clock->flags |= PARSEB_LEAPDEL;
-
+
if (t->t_operable)
clock->flags &= ~(PARSEB_NOSYNC|PARSEB_POWERUP);
else
@@ -467,5 +467,8 @@ getint(bp)
/*
* History:
*
- * $Log: clk_trimble.c,v $
+ * $Log: clk_trimtsip.c,v $
+ * Revision 1.1.1.1 1994/09/29 23:01:31 wollman
+ * xntp 3.4e from Dave Mills @ UDel
+ *
*/
diff --git a/usr.sbin/xntpd/parse/parse.c b/usr.sbin/xntpd/parse/parse.c
index 16c7813..713d3e6 100644
--- a/usr.sbin/xntpd/parse/parse.c
+++ b/usr.sbin/xntpd/parse/parse.c
@@ -1,7 +1,7 @@
#if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
/*
* /src/NTP/REPOSITORY/v3/parse/parse.c,v 3.27 1994/06/01 08:18:33 kardel Exp
- *
+ *
* parse.c,v 3.27 1994/06/01 08:18:33 kardel Exp
*
* Parser module for reference clock
@@ -14,7 +14,7 @@
*
* Copyright (c) 1992,1993,1994
* Frank Kardel Friedrich-Alexander Universitaet Erlangen-Nuernberg
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -100,7 +100,7 @@ Strcmp(s, t)
while (!(c = *s++ - *t++) && *s && *t)
/* empty loop */;
-
+
return c;
}
@@ -165,7 +165,7 @@ setup_bitmaps(parseio, low, high)
parseprintf(DD_PARSE, ("setup_bitmaps: failed: bounds error (low=%d, high=%d, nformats=%d)\n", low, high, nformats));
return 0;
}
-
+
bzero(parseio->parse_startsym, sizeof (parseio->parse_startsym));
bzero(parseio->parse_endsym, sizeof (parseio->parse_endsym));
bzero(parseio->parse_syncsym, sizeof (parseio->parse_syncsym));
@@ -175,7 +175,7 @@ setup_bitmaps(parseio, low, high)
parseio->parse_syncflags = 0;
parseio->parse_timeout.tv_sec = 0;
parseio->parse_timeout.tv_usec = 0;
-
+
/*
* gather bitmaps of possible start and end values
*/
@@ -189,7 +189,7 @@ setup_bitmaps(parseio, low, high)
parseio->parse_dsize = fmt->length;
continue;
}
-
+
if (fmt->flags & F_START)
{
index = fmt->startsym >> 3;
@@ -244,7 +244,7 @@ setup_bitmaps(parseio, low, high)
{
parseio->parse_timeout = fmt->timeout;
}
-
+
if (parseio->parse_dsize < fmt->length)
parseio->parse_dsize = fmt->length;
}
@@ -299,10 +299,10 @@ parse_ioinit(parseio)
register parse_t *parseio;
{
parseprintf(DD_PARSE, ("parse_iostart\n"));
-
+
parseio->parse_plen = 0;
parseio->parse_pdata = (void *)0;
-
+
if (!setup_bitmaps(parseio, 0, nformats))
return 0;
@@ -323,7 +323,7 @@ parse_ioinit(parseio)
parseio->parse_flags = 0; /* true samples */
parseio->parse_index = 0;
parseio->parse_ldsize = 0;
-
+
return 1;
}
@@ -369,7 +369,7 @@ parse_ioread(parseio, ch, ctime)
case PARSE_IO_CS7:
ch &= 0x7F;
break;
-
+
case PARSE_IO_CS8:
break;
}
@@ -388,7 +388,7 @@ parse_ioread(parseio, ch, ctime)
{
if (clockformats[parseio->parse_lformat]->input(parseio, ch, ctime))
updated = timepacket(parseio); /* got a datagram - process */
-
+
low = high = 0; /* all done - just post processing */
}
else
@@ -430,7 +430,7 @@ parse_ioread(parseio, ch, ctime)
}
}
}
-
+
if ((((parseio->parse_syncflags & SYNC_START) &&
(parseio->parse_startsym[index] & mask)) ||
(parseio->parse_index == 0)) ||
@@ -525,7 +525,7 @@ parse_ioread(parseio, ch, ctime)
{
updated = clockformats[parseio->parse_lformat]->synth(parseio, ctime);
}
-
+
/*
* remember last character time
*/
@@ -613,13 +613,13 @@ parse_to_unixtime(clock, cvtrtc)
register u_long *cvtrtc;
{
#define SETRTC(_X_) { if (cvtrtc) *cvtrtc = (_X_); }
- static int days_of_month[] =
+ static int days_of_month[] =
{
0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
};
register int i;
time_t t;
-
+
if (clock->utctime)
return clock->utctime; /* if the conversion routine gets it right away - why not */
@@ -634,7 +634,7 @@ parse_to_unixtime(clock, cvtrtc)
SETRTC(CVT_FAIL|CVT_BADDATE);
return -1;
}
-
+
/*
* sorry, slow section here - but it's not time critical anyway
*/
@@ -683,7 +683,7 @@ parse_to_unixtime(clock, cvtrtc)
t = TIMES60(t) + clock->minute;
/* sec */
-
+
if (clock->second < 0 || clock->second > 60) /* allow for LEAPs */
{
SETRTC(CVT_FAIL|CVT_BADTIME);
@@ -717,7 +717,7 @@ Stoi(s, zp, cnt)
while(*s == ' ')
s++;
-
+
if (*s == '-')
{
s++;
@@ -726,7 +726,7 @@ Stoi(s, zp, cnt)
else
if (*s == '+')
s++;
-
+
for(;;)
{
c = *s++;
@@ -794,14 +794,14 @@ updatetimeinfo(parseio, t, usec, flags)
usecoff += (t - parseio->parse_dtime.parse_stime.fp.l_ui + JAN_1970) * 1000000
+ usec;
#endif
-
+
/*
* filtering (median) if requested
*/
if (parseio->parse_flags & PARSE_STAT_FILTER)
{
register int n, i, s, k;
-
+
parseio->parse_delta[parseio->parse_dindex] = usecoff;
parseio->parse_dindex = (parseio->parse_dindex + 1) % PARSE_DELTA;
@@ -810,14 +810,14 @@ updatetimeinfo(parseio, t, usec, flags)
* sort always - thus every sample gets its data
*/
bcopy((caddr_t)parseio->parse_delta, (caddr_t)delta, sizeof(delta));
-
+
for (s = 0; s < PARSE_DELTA; s++)
for (k = s+1; k < PARSE_DELTA; k++)
{ /* Yes - it's slow sort */
- if (delta[s] > delta[k])
+ if (delta[s] > delta[k])
{
register long tmp;
-
+
tmp = delta[k];
delta[k] = delta[s];
delta[s] = tmp;
@@ -835,7 +835,7 @@ updatetimeinfo(parseio, t, usec, flags)
register long top = delta[n-1];
register long mid = delta[(n+i)>>1];
register long low = delta[i];
-
+
if ((top - mid) > (mid - low))
{
/*
@@ -851,7 +851,7 @@ updatetimeinfo(parseio, t, usec, flags)
i++;
}
}
-
+
parseio->parse_dtime.parse_usecdisp = delta[n-1] - delta[i];
if (parseio->parse_flags & PARSE_STAT_AVG)
@@ -873,7 +873,7 @@ updatetimeinfo(parseio, t, usec, flags)
{
mean = delta[(n+i)>>1];
}
-
+
parseio->parse_dtime.parse_usecerror = mean;
}
else
@@ -881,26 +881,26 @@ updatetimeinfo(parseio, t, usec, flags)
parseio->parse_dtime.parse_usecerror = usecoff;
parseio->parse_dtime.parse_usecdisp = 0;
}
-
+
parseprintf(DD_PARSE,("parse: updatetimeinfo: T=%x+%d usec, useccoff=%d, usecerror=%d, usecdisp=%d\n",
(int)t, (int)usec, (int)usecoff, (int)parseio->parse_dtime.parse_usecerror,
(int)parseio->parse_dtime.parse_usecdisp));
-
+
#ifdef PARSEKERNEL
{
int s = splhigh();
#endif
-
+
parseio->parse_lstate = parseio->parse_dtime.parse_state | flags | PARSEB_TIMECODE;
-
+
parseio->parse_dtime.parse_state = parseio->parse_lstate;
#ifdef PARSEKERNEL
(void)splx(s);
}
#endif
-
+
return CVT_OK; /* everything fine and dandy... */
}
@@ -935,7 +935,7 @@ pps_simple(parseio, status, ptime)
{
parseio->parse_dtime.parse_ptime = *ptime;
parseio->parse_dtime.parse_state |= PARSEB_PPS|PARSEB_S_PPS;
-
+
return CVT_NONE;
}
@@ -954,7 +954,7 @@ timepacket(parseio)
register u_long cvtsum = 0;/* accumulated CVT_FAIL errors */
u_long cvtrtc; /* current conversion result */
clocktime_t clock;
-
+
bzero(&clock, sizeof clock);
format = parseio->parse_lformat;
@@ -967,7 +967,7 @@ timepacket(parseio)
case CVT_FAIL:
parseio->parse_badformat++;
cvtsum = cvtrtc & ~CVT_MASK;
-
+
/*
* may be too often ... but is nice to know when it happens
*/
@@ -977,7 +977,7 @@ timepacket(parseio)
syslog(LOG_WARNING, "parse: \"%s\" failed to convert\n", clockformats[format]->name);
#endif
break;
-
+
case CVT_NONE:
/*
* too bad - pretend bad format
@@ -985,7 +985,7 @@ timepacket(parseio)
parseio->parse_badformat++;
cvtsum = CVT_BADFMT;
break;
-
+
case CVT_OK:
k = 1;
break;
@@ -1000,7 +1000,7 @@ timepacket(parseio)
printf("parse: INTERNAL error: bad return code of convert routine \"%s\"\n", clockformats[format]->name);
#else
syslog(LOG_WARNING, "parse: INTERNAL error: bad return code of convert routine \"%s\"\n", clockformats[format]->name);
-#endif
+#endif
return CVT_FAIL|cvtrtc;
}
}
@@ -1011,7 +1011,7 @@ timepacket(parseio)
* and convert time packet
* RR search starting at last successful conversion routine
*/
-
+
if (nformats) /* very careful ... */
{
do
@@ -1023,20 +1023,20 @@ timepacket(parseio)
case CVT_FAIL:
parseio->parse_badformat++;
cvtsum |= cvtrtc & ~CVT_MASK;
-
+
/*
* may be too often ... but is nice to know when it happens
*/
#ifdef PARSEKERNEL
printf("parse: \"%s\" failed to convert\n", clockformats[format]->name);
-#else
+#else
syslog(LOG_WARNING, "parse: \"%s\" failed to convert\n", clockformats[format]->name);
#endif
/*FALLTHROUGH*/
case CVT_NONE:
format++;
break;
-
+
case CVT_OK:
k = 1;
break;
@@ -1066,7 +1066,7 @@ timepacket(parseio)
#endif
return CVT_FAIL|cvtsum;
}
-
+
if (k == 2) return CVT_OK;
if ((t = parse_to_unixtime(&clock, &cvtrtc)) == -1)
@@ -1078,7 +1078,7 @@ timepacket(parseio)
#endif
return CVT_FAIL|cvtrtc;
}
-
+
parseio->parse_lformat = format;
/*
@@ -1111,7 +1111,7 @@ parse_getstat(dct, parse)
return 1;
}
-
+
/*ARGSUSED*/
int
parse_setstat(dct, parse)
@@ -1122,7 +1122,7 @@ parse_setstat(dct, parse)
return 1;
}
-
+
/*ARGSUSED*/
int
parse_timecode(dct, parse)
@@ -1139,7 +1139,7 @@ parse_timecode(dct, parse)
*/
dct->parsegettc.parse_badformat = parse->parse_badformat;
parse->parse_badformat = 0;
-
+
if (parse->parse_ldsize <= PARSE_TCMAX)
{
dct->parsegettc.parse_count = parse->parse_ldsize;
@@ -1152,7 +1152,7 @@ parse_timecode(dct, parse)
}
}
-
+
/*ARGSUSED*/
int
parse_setfmt(dct, parse)
diff --git a/usr.sbin/xntpd/parse/parse_conf.c b/usr.sbin/xntpd/parse/parse_conf.c
index ed306d4..cc931e3 100644
--- a/usr.sbin/xntpd/parse/parse_conf.c
+++ b/usr.sbin/xntpd/parse/parse_conf.c
@@ -1,7 +1,7 @@
#if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
/*
* /src/NTP/REPOSITORY/v3/parse/parse_conf.c,v 3.15 1994/02/02 17:45:32 kardel Exp
- *
+ *
* parse_conf.c,v 3.15 1994/02/02 17:45:32 kardel Exp
*
* Parser configuration module for reference clocks
@@ -14,7 +14,7 @@
*
* Copyright (c) 1992,1993,1994
* Frank Kardel Friedrich-Alexander Universitaet Erlangen-Nuernberg
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/usr.sbin/xntpd/parse/parsesolaris.c b/usr.sbin/xntpd/parse/parsesolaris.c
index 513cd00..a67f0bf 100644
--- a/usr.sbin/xntpd/parse/parsesolaris.c
+++ b/usr.sbin/xntpd/parse/parsesolaris.c
@@ -1,6 +1,6 @@
/*
* /src/NTP/REPOSITORY/v3/parse/parsesolaris.c,v 3.16 1994/05/30 09:57:40 kardel Exp
- *
+ *
* parsesolaris.c,v 3.16 1994/05/30 09:57:40 kardel Exp
*
* STREAMS module for reference clocks
@@ -11,7 +11,7 @@
* derived work from parsestreams.c ((c) 1991-1993, Frank Kardel) and
* dcf77sync.c((c) Frank Kardel)
* Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -71,7 +71,7 @@ static struct fmodsw fmod_templ =
extern struct mod_ops mod_strmodops;
-static struct modlstrmod modlstrmod =
+static struct modlstrmod modlstrmod =
{
&mod_strmodops, /* a STREAMS module */
"PARSE - NTP reference", /* name this baby - keep room for revision number */
@@ -129,7 +129,7 @@ int Strcmp(s, t)
while (!(c = *s++ - *t++) && *s && *t)
/* empty loop */;
-
+
return c;
}
@@ -141,7 +141,7 @@ int _init(void)
{
static char revision[] = "3.16";
char *s, *S, *t;
-
+
/*
* copy RCS revision into Drv_name
*
@@ -160,20 +160,20 @@ int _init(void)
}
if (*s == ' ') s++;
}
-
- t = modlstrmod.strmod_linkinfo;
+
+ t = modlstrmod.strmod_linkinfo;
while (*t && (*t != ' '))
{
t++;
}
if (*t == ' ') t++;
-
+
S = s;
while (*S && (((*S >= '0') && (*S <= '9')) || (*S == '.')))
{
S++;
}
-
+
if (*s && *t && (S > s))
{
if (Strlen(t) >= (S - s))
@@ -304,7 +304,7 @@ struct delays
unsigned char type; /* what to match */
unsigned long xsdelay; /* external status direct delay in us */
unsigned long stdelay; /* STREAMS message delay (M_[UN]HANGUP) */
-} isr_delays[] =
+} isr_delays[] =
{
/*
* WARNING: must still be measured - currently taken from Craig Leres ppsdev
@@ -372,7 +372,7 @@ setup_stream(queue_t *q, int mode)
}
else
{
- parseprintf(DD_OPEN,("parse: setup_stream - FAILED - no MEMORY for allocb\n"));
+ parseprintf(DD_OPEN,("parse: setup_stream - FAILED - no MEMORY for allocb\n"));
return 0;
}
}
@@ -383,33 +383,33 @@ static int parseopen(queue_t *q, dev_t *dev, int flag, int sflag, cred_t *credp)
register mblk_t *mp;
register parsestream_t *parse;
static int notice = 0;
-
- parseprintf(DD_OPEN,("parse: OPEN - q=%x\n", q));
-
+
+ parseprintf(DD_OPEN,("parse: OPEN - q=%x\n", q));
+
if (sflag != MODOPEN)
{ /* open only for modules */
- parseprintf(DD_OPEN,("parse: OPEN - FAILED - not MODOPEN\n"));
+ parseprintf(DD_OPEN,("parse: OPEN - FAILED - not MODOPEN\n"));
return EIO;
}
if (q->q_ptr != (caddr_t)NULL)
{
- parseprintf(DD_OPEN,("parse: OPEN - FAILED - EXCLUSIVE ONLY\n"));
+ parseprintf(DD_OPEN,("parse: OPEN - FAILED - EXCLUSIVE ONLY\n"));
return EBUSY;
}
parsebusy++;
-
+
q->q_ptr = (caddr_t)kmem_alloc(sizeof(parsestream_t), KM_SLEEP);
if (q->q_ptr == (caddr_t)0)
{
return ENOMEM;
}
- parseprintf(DD_OPEN,("parse: OPEN - parse area q=%x, q->q_ptr=%x\n", q, q->q_ptr));
+ parseprintf(DD_OPEN,("parse: OPEN - parse area q=%x, q->q_ptr=%x\n", q, q->q_ptr));
SAFE_WR(q)->q_ptr = q->q_ptr;
- parseprintf(DD_OPEN,("parse: OPEN - WQ parse area q=%x, q->q_ptr=%x\n", SAFE_WR(q), SAFE_WR(q)->q_ptr));
-
+ parseprintf(DD_OPEN,("parse: OPEN - WQ parse area q=%x, q->q_ptr=%x\n", SAFE_WR(q), SAFE_WR(q)->q_ptr));
+
parse = (parsestream_t *) q->q_ptr;
bzero((caddr_t)parse, sizeof(*parse));
parse->parse_queue = q;
@@ -420,7 +420,7 @@ static int parseopen(queue_t *q, dev_t *dev, int flag, int sflag, cred_t *credp)
qprocson(q);
- parseprintf(DD_OPEN,("parse: OPEN - initializing io subsystem q=%x\n", q));
+ parseprintf(DD_OPEN,("parse: OPEN - initializing io subsystem q=%x\n", q));
if (!parse_ioinit(&parse->parse_io))
{
@@ -436,13 +436,13 @@ static int parseopen(queue_t *q, dev_t *dev, int flag, int sflag, cred_t *credp)
return EIO;
}
- parseprintf(DD_OPEN,("parse: OPEN - initializing stream q=%x\n", q));
+ parseprintf(DD_OPEN,("parse: OPEN - initializing stream q=%x\n", q));
if (setup_stream(q, M_PARSE))
{
(void) init_linemon(q); /* hook up PPS ISR routines if possible */
setup_delays();
- parseprintf(DD_OPEN,("parse: OPEN - SUCCEEDED\n"));
+ parseprintf(DD_OPEN,("parse: OPEN - SUCCEEDED\n"));
/*
* I know that you know the delete key, but you didn't write this
@@ -473,19 +473,19 @@ static int parseclose(queue_t *q, int flags)
{
register parsestream_t *parse = (parsestream_t *)q->q_ptr;
register unsigned long s;
-
+
parseprintf(DD_CLOSE,("parse: CLOSE\n"));
-
+
qprocsoff(q);
s = splhigh();
-
+
if (parse->parse_dqueue)
close_linemon(parse->parse_dqueue, q);
parse->parse_dqueue = (queue_t *)0;
(void) splx(s);
-
+
parse_ioend(&parse->parse_io);
kmem_free((caddr_t)parse, sizeof(parsestream_t));
@@ -502,7 +502,7 @@ static int parseclose(queue_t *q, int flags)
static parsersvc(queue_t *q)
{
mblk_t *mp;
-
+
while (mp = getq(q))
{
if (canput(q->q_next) || (mp->b_datap->db_type > QPCTL))
@@ -530,15 +530,15 @@ static int parsewput(queue_t *q, mblk_t *mp)
register mblk_t *datap;
register struct iocblk *iocp;
parsestream_t *parse = (parsestream_t *)q->q_ptr;
-
+
parseprintf(DD_WPUT,("parse: parsewput\n"));
-
+
switch (mp->b_datap->db_type)
{
default:
putnext(q, mp);
break;
-
+
case M_IOCTL:
iocp = (struct iocblk *)mp->b_rptr;
switch (iocp->ioc_cmd)
@@ -571,7 +571,7 @@ static int parsewput(queue_t *q, mblk_t *mp)
iocp->ioc_count = sizeof(struct ppsclockev);
qreply(q, mp);
break;
-
+
case PARSEIOC_ENABLE:
case PARSEIOC_DISABLE:
{
@@ -589,7 +589,7 @@ static int parsewput(queue_t *q, mblk_t *mp)
}
qreply(q, mp);
break;
- }
+ }
case PARSEIOC_SETSTAT:
case PARSEIOC_GETSTAT:
@@ -607,17 +607,17 @@ static int parsewput(queue_t *q, mblk_t *mp)
parseprintf(DD_WPUT,("parse: parsewput - PARSEIOC_GETSTAT\n"));
ok = parse_getstat(dct, &parse->parse_io);
break;
-
+
case PARSEIOC_SETSTAT:
parseprintf(DD_WPUT,("parse: parsewput - PARSEIOC_SETSTAT\n"));
ok = parse_setstat(dct, &parse->parse_io);
break;
-
+
case PARSEIOC_TIMECODE:
parseprintf(DD_WPUT,("parse: parsewput - PARSEIOC_TIMECODE\n"));
ok = parse_timecode(dct, &parse->parse_io);
break;
-
+
case PARSEIOC_SETFMT:
parseprintf(DD_WPUT,("parse: parsewput - PARSEIOC_SETFMT\n"));
ok = parse_setfmt(dct, &parse->parse_io);
@@ -660,7 +660,7 @@ static unsigned long rdchar(mblk_t **mp)
else
{
register mblk_t *mmp = *mp;
-
+
*mp = (*mp)->b_cont;
freeb(mmp);
}
@@ -675,7 +675,7 @@ static int parserput(queue_t *q, mblk_t *imp)
{
register unsigned char type;
mblk_t *mp = imp;
-
+
switch (type = mp->b_datap->db_type)
{
default:
@@ -692,7 +692,7 @@ static int parserput(queue_t *q, mblk_t *imp)
else
putq(q, mp);
break;
-
+
case M_BREAK:
case M_DATA:
{
@@ -746,7 +746,7 @@ static int parserput(queue_t *q, mblk_t *imp)
if (nmp) freemsg(nmp);
parse_iodone(&parse->parse_io);
}
- }
+ }
}
else
{
@@ -785,11 +785,11 @@ static int parserput(queue_t *q, mblk_t *imp)
register int status = cd_invert ^ (type == M_HANGUP);
SET_LED(status);
-
+
uniqtime(&ctime.tv);
-
+
TIMEVAL_USADD(&ctime.tv, stdelay);
-
+
parseprintf(DD_RPUT,("parse: parserput - M_%sHANGUP\n", (type == M_HANGUP) ? "" : "UN"));
if ((parse->parse_status & PARSE_ENABLE) &&
@@ -814,7 +814,7 @@ static int parserput(queue_t *q, mblk_t *imp)
}
else
putq(q, mp);
-
+
if (status)
{
parse->parse_ppsclockev.tv = ctime.tv;
@@ -833,7 +833,7 @@ static void zs_xsisr(); /* zs external status interupt handler */
static int init_linemon(queue_t *q)
{
register queue_t *dq;
-
+
dq = SAFE_WR(q);
/*
* we ARE doing very bad things down here (basically stealing ISR
@@ -935,7 +935,7 @@ static int init_zs_linemon(queue_t *q, queue_t *my_q)
else
{
unsigned long s;
-
+
/*
* we do a direct replacement, in case others fiddle also
* if somebody else grabs our hook and we disconnect
@@ -961,14 +961,14 @@ static int init_zs_linemon(queue_t *q, queue_t *my_q)
szs->zsops.zsop_xsint = (void (*)())zs_xsisr; /* place our bastard */
szs->oldzsops = zs->zs_ops;
emergencyzs = zs->zs_ops;
-
+
zs->zs_ops = &szs->zsops; /* hook it up */
/*
- * XXX: this is usually done via zsopinit()
+ * XXX: this is usually done via zsopinit()
* - have yet to find a way to call that routine
*/
zs->zs_xsint = (void (*)())zs_xsisr;
-
+
mutex_exit(zs->zs_excl);
parseprintf(DD_INSTALL, ("init_zs_linemon: CD monitor installed\n"));
@@ -1010,7 +1010,7 @@ static void close_zs_linemon(queue_t *q, queue_t *my_q)
mutex_exit(zs->zs_excl);
kmem_free((caddr_t)szs, sizeof (struct savedzsops));
-
+
parseprintf(DD_INSTALL, ("close_zs_linemon: CD monitor deleted\n"));
return;
}
@@ -1041,7 +1041,7 @@ static void zs_xsisr(struct zscom *zs)
{
timestamp_t cdevent;
register int status;
-
+
/*
* CONDITIONAL external measurement support
*/
@@ -1051,14 +1051,14 @@ static void zs_xsisr(struct zscom *zs)
* are just interested in edge delays in the
* lower us range
*/
-
+
/*
* time stamp
*/
uniqtime(&cdevent.tv);
TIMEVAL_USADD(&cdevent.tv, xsdelay);
-
+
q = za->za_ttycommon.t_readq;
/*
@@ -1070,7 +1070,7 @@ static void zs_xsisr(struct zscom *zs)
* ok - now the hard part - find ourself
*/
loopcheck = MAXDEPTH;
-
+
while (q)
{
if (q->q_qinfo && q->q_qinfo->qi_minfo)
@@ -1098,7 +1098,7 @@ static void zs_xsisr(struct zscom *zs)
*/
parse_iodone(&((parsestream_t *)q->q_ptr)->parse_io);
}
-
+
if (status)
{
((parsestream_t *)q->q_ptr)->parse_ppsclockev.tv = cdevent.tv;
@@ -1132,9 +1132,9 @@ static void zs_xsisr(struct zscom *zs)
SCC_WRITE0(ZSWR0_RESET_STATUS); /* might kill other conditions here */
return;
}
- }
+ }
- parseprintf(DD_ISR, ("zs_xsisr: non CD event 0x%x for \"%s\"\n",
+ parseprintf(DD_ISR, ("zs_xsisr: non CD event 0x%x for \"%s\"\n",
(za->za_rr0 ^ zsstatus) & ~ZSRR0_CD,dname));
/*
* we are now gathered here to process some unusual external status
@@ -1149,7 +1149,7 @@ static void zs_xsisr(struct zscom *zs)
q = za->za_ttycommon.t_readq;
loopcheck = MAXDEPTH;
-
+
/*
* the real thing for everything else ...
*/
@@ -1161,7 +1161,7 @@ static void zs_xsisr(struct zscom *zs)
if (!Strcmp(dname, parseinfo.st_rdinit->qi_minfo->mi_idname))
{
register void (*zsisr)();
-
+
/*
* back home - phew (hopping along stream queues might
* prove dangerous to your health)
@@ -1170,7 +1170,7 @@ static void zs_xsisr(struct zscom *zs)
zsisr(zs);
else
panic("zs_xsisr: unable to locate original ISR");
-
+
parseprintf(DD_ISR, ("zs_xsisr: non CD event was processed for \"%s\"\n", dname));
/*
* now back to our program ...
@@ -1192,7 +1192,7 @@ static void zs_xsisr(struct zscom *zs)
* corrupted TTY structures
*/
printf("zs_zsisr: looking for \"%s\" - found \"%s\" - taking EMERGENCY path\n", parseinfo.st_rdinit->qi_minfo->mi_idname, dname ? dname : "-NIL-");
-
+
if (emergencyzs && emergencyzs->zsop_xsint)
emergencyzs->zsop_xsint(zs);
else
diff --git a/usr.sbin/xntpd/parse/parsestreams.c b/usr.sbin/xntpd/parse/parsestreams.c
index 19e5c10..990f2b3 100644
--- a/usr.sbin/xntpd/parse/parsestreams.c
+++ b/usr.sbin/xntpd/parse/parsestreams.c
@@ -1,6 +1,6 @@
/*
* /src/NTP/REPOSITORY/v3/parse/parsestreams.c,v 3.22 1994/06/01 10:41:16 kardel Exp
- *
+ *
* parsestreams.c,v 3.22 1994/06/01 10:41:16 kardel Exp
*
* STREAMS module for reference clocks
@@ -8,7 +8,7 @@
*
* Copyright (c) 1989,1990,1991,1992,1993,1994
* Frank Kardel Friedrich-Alexander Universitaet Erlangen-Nuernberg
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -68,7 +68,7 @@ static unsigned int parsebusy = 0;
extern struct streamtab parseinfo;
-struct vdldrv parsesync_vd =
+struct vdldrv parsesync_vd =
{
VDMAGIC_PSEUDO, /* nothing like a real driver - a STREAMS module */
"PARSE ", /* name this baby - keep room for revision number */
@@ -118,7 +118,7 @@ static int strcmp(s, t)
while (!(c = *s++ - *t++) && *s && *t)
/* empty loop */;
-
+
return c;
}
@@ -136,10 +136,10 @@ static int strncmp(s, t, n)
while (n-- && !(c = *s++ - *t++) && *s && *t)
/* empty loop */;
-
+
return c;
}
-
+
/*
* driver init routine
* since no mechanism gets us into and out of the fmodsw, we have to
@@ -154,12 +154,12 @@ int xxxinit(fc, vdp, vdi, vds)
{
extern struct fmodsw fmodsw[];
extern int fmodcnt;
-
+
struct fmodsw *fm = fmodsw;
struct fmodsw *fmend = &fmodsw[fmodcnt];
struct fmodsw *ifm = (struct fmodsw *)0;
char *mname = parseinfo.st_rdinit->qi_minfo->mi_idname;
-
+
switch (fc)
{
case VDLOAD:
@@ -176,7 +176,7 @@ int xxxinit(fc, vdp, vdi, vds)
return(EBUSY);
}
else
- if ((ifm == (struct fmodsw *)0) &&
+ if ((ifm == (struct fmodsw *)0) &&
(fm->f_name[0] == '\0') && (fm->f_str == (struct streamtab *)0))
{
/*
@@ -197,7 +197,7 @@ int xxxinit(fc, vdp, vdi, vds)
{
static char revision[] = "3.22";
char *s, *S, *t;
-
+
strncpy(ifm->f_name, mname, FMNAMESZ);
ifm->f_name[FMNAMESZ] = '\0';
ifm->f_str = &parseinfo;
@@ -219,20 +219,20 @@ int xxxinit(fc, vdp, vdi, vds)
}
if (*s == ' ') s++;
}
-
- t = parsesync_vd.Drv_name;
+
+ t = parsesync_vd.Drv_name;
while (*t && (*t != ' '))
{
t++;
}
if (*t == ' ') t++;
-
+
S = s;
while (*S && (((*S >= '0') && (*S <= '9')) || (*S == '.')))
{
S++;
}
-
+
if (*s && *t && (S > s))
{
if (strlen(t) >= (S - s))
@@ -241,9 +241,9 @@ int xxxinit(fc, vdp, vdi, vds)
}
}
return (0);
- }
+ }
break;
-
+
case VDUNLOAD:
if (parsebusy > 0)
{
@@ -262,7 +262,7 @@ int xxxinit(fc, vdp, vdi, vds)
fm->f_name[0] = '\0';
fm->f_str = (struct streamtab *)0;
fm++;
-
+
break;
}
fm++;
@@ -275,14 +275,14 @@ int xxxinit(fc, vdp, vdi, vds)
else
return (0);
}
-
+
case VDSTAT:
return (0);
default:
return (EIO);
-
+
}
return EIO;
}
@@ -392,7 +392,7 @@ struct delays
unsigned char type; /* what to match */
unsigned long xsdelay; /* external status direct delay in us */
unsigned long stdelay; /* STREAMS message delay (M_[UN]HANGUP) */
-} isr_delays[] =
+} isr_delays[] =
{
/*
* WARNING: must still be measured - currently taken from Craig Leres ppsdev
@@ -457,7 +457,7 @@ setup_stream(q, mode)
}
else
{
- parseprintf(DD_OPEN,("parse: setup_stream - FAILED - no MEMORY for allocb\n"));
+ parseprintf(DD_OPEN,("parse: setup_stream - FAILED - no MEMORY for allocb\n"));
return 0;
}
}
@@ -472,34 +472,34 @@ static int parseopen(q, dev, flag, sflag)
register mblk_t *mp;
register parsestream_t *parse;
static int notice = 0;
-
- parseprintf(DD_OPEN,("parse: OPEN\n"));
-
+
+ parseprintf(DD_OPEN,("parse: OPEN\n"));
+
if (sflag != MODOPEN)
{ /* open only for modules */
- parseprintf(DD_OPEN,("parse: OPEN - FAILED - not MODOPEN\n"));
+ parseprintf(DD_OPEN,("parse: OPEN - FAILED - not MODOPEN\n"));
return OPENFAIL;
}
if (q->q_ptr != (caddr_t)NULL)
{
u.u_error = EBUSY;
- parseprintf(DD_OPEN,("parse: OPEN - FAILED - EXCLUSIVE ONLY\n"));
+ parseprintf(DD_OPEN,("parse: OPEN - FAILED - EXCLUSIVE ONLY\n"));
return OPENFAIL;
}
#ifdef VDDRV
parsebusy++;
#endif
-
+
q->q_ptr = (caddr_t)kmem_alloc(sizeof(parsestream_t));
if (q->q_ptr == (caddr_t)0)
{
- parseprintf(DD_OPEN,("parse: OPEN - FAILED - no memory\n"));
+ parseprintf(DD_OPEN,("parse: OPEN - FAILED - no memory\n"));
return OPENFAIL;
}
WR(q)->q_ptr = q->q_ptr;
-
+
parse = (parsestream_t *) q->q_ptr;
bzero((caddr_t)parse, sizeof(*parse));
parse->parse_queue = q;
@@ -524,7 +524,7 @@ static int parseopen(q, dev, flag, sflag)
{
(void) init_linemon(q); /* hook up PPS ISR routines if possible */
setup_delays();
- parseprintf(DD_OPEN,("parse: OPEN - SUCCEEDED\n"));
+ parseprintf(DD_OPEN,("parse: OPEN - SUCCEEDED\n"));
/*
* I know that you know the delete key, but you didn't write this
@@ -556,17 +556,17 @@ static int parseclose(q, flags)
{
register parsestream_t *parse = (parsestream_t *)q->q_ptr;
register unsigned long s;
-
+
parseprintf(DD_CLOSE,("parse: CLOSE\n"));
-
+
s = splhigh();
-
+
if (parse->parse_dqueue)
close_linemon(parse->parse_dqueue, q);
parse->parse_dqueue = (queue_t *)0;
(void) splx(s);
-
+
parse_ioend(&parse->parse_io);
kmem_free((caddr_t)parse, sizeof(parsestream_t));
@@ -586,7 +586,7 @@ static parsersvc(q)
queue_t *q;
{
mblk_t *mp;
-
+
while (mp = getq(q))
{
if (canput(q->q_next) || (mp->b_datap->db_type > QPCTL))
@@ -616,15 +616,15 @@ static int parsewput(q, mp)
register mblk_t *datap;
register struct iocblk *iocp;
parsestream_t *parse = (parsestream_t *)q->q_ptr;
-
+
parseprintf(DD_WPUT,("parse: parsewput\n"));
-
+
switch (mp->b_datap->db_type)
{
default:
putnext(q, mp);
break;
-
+
case M_IOCTL:
iocp = (struct iocblk *)mp->b_rptr;
switch (iocp->ioc_cmd)
@@ -657,7 +657,7 @@ static int parsewput(q, mp)
iocp->ioc_count = sizeof(struct ppsclockev);
qreply(q, mp);
break;
-
+
case PARSEIOC_ENABLE:
case PARSEIOC_DISABLE:
{
@@ -675,7 +675,7 @@ static int parsewput(q, mp)
}
qreply(q, mp);
break;
- }
+ }
case PARSEIOC_SETSTAT:
case PARSEIOC_GETSTAT:
@@ -693,17 +693,17 @@ static int parsewput(q, mp)
parseprintf(DD_WPUT,("parse: parsewput - PARSEIOC_GETSTAT\n"));
ok = parse_getstat(dct, &parse->parse_io);
break;
-
+
case PARSEIOC_SETSTAT:
parseprintf(DD_WPUT,("parse: parsewput - PARSEIOC_SETSTAT\n"));
ok = parse_setstat(dct, &parse->parse_io);
break;
-
+
case PARSEIOC_TIMECODE:
parseprintf(DD_WPUT,("parse: parsewput - PARSEIOC_TIMECODE\n"));
ok = parse_timecode(dct, &parse->parse_io);
break;
-
+
case PARSEIOC_SETFMT:
parseprintf(DD_WPUT,("parse: parsewput - PARSEIOC_SETFMT\n"));
ok = parse_setfmt(dct, &parse->parse_io);
@@ -747,7 +747,7 @@ static unsigned long rdchar(mp)
else
{
register mblk_t *mmp = *mp;
-
+
*mp = (*mp)->b_cont;
freeb(mmp);
}
@@ -763,7 +763,7 @@ static int parserput(q, mp)
mblk_t *mp;
{
unsigned char type;
-
+
switch (type = mp->b_datap->db_type)
{
default:
@@ -779,7 +779,7 @@ static int parserput(q, mp)
else
putq(q, mp);
break;
-
+
case M_BREAK:
case M_DATA:
{
@@ -832,7 +832,7 @@ static int parserput(q, mp)
if (nmp) freemsg(nmp);
parse_iodone(&parse->parse_io);
}
- }
+ }
}
else
{
@@ -871,11 +871,11 @@ static int parserput(q, mp)
register int status = cd_invert ^ (type == M_HANGUP);
SET_LED(status);
-
+
uniqtime(&ctime.tv);
-
+
TIMEVAL_USADD(&ctime.tv, stdelay);
-
+
parseprintf(DD_RPUT,("parse: parserput - M_%sHANGUP\n", (type == M_HANGUP) ? "" : "UN"));
if ((parse->parse_status & PARSE_ENABLE) &&
@@ -900,7 +900,7 @@ static int parserput(q, mp)
}
else
putq(q, mp);
-
+
if (status)
{
parse->parse_ppsclockev.tv = ctime.tv;
@@ -920,7 +920,7 @@ static int init_linemon(q)
register queue_t *q;
{
register queue_t *dq;
-
+
dq = WR(q);
/*
* we ARE doing very bad things down here (basically stealing ISR
@@ -1019,7 +1019,7 @@ static int init_zs_linemon(q, my_q)
else
{
unsigned long s;
-
+
/*
* we do a direct replacement, in case others fiddle also
* if somebody else grabs our hook and we disconnect
@@ -1045,9 +1045,9 @@ static int init_zs_linemon(q, my_q)
szs->zsops.zsop_xsint = (int (*)())zs_xsisr; /* place our bastard */
szs->oldzsops = zs->zs_ops;
emergencyzs = zs->zs_ops;
-
+
zsopinit(zs, &szs->zsops); /* hook it up */
-
+
(void) splx(s);
parseprintf(DD_INSTALL, ("init_zs_linemon: CD monitor installed\n"));
@@ -1078,11 +1078,11 @@ static void close_zs_linemon(q, my_q)
else
{
register struct savedzsops *szs = (struct savedzsops *)parsestream->parse_data;
-
+
zsopinit(zs, szs->oldzsops); /* reset to previous handler functions */
kmem_free((caddr_t)szs, sizeof (struct savedzsops));
-
+
parseprintf(DD_INSTALL, ("close_zs_linemon: CD monitor deleted\n"));
return;
}
@@ -1121,7 +1121,7 @@ static void zs_xsisr(zs)
{
timestamp_t cdevent;
register int status;
-
+
/*
* CONDITIONAL external measurement support
*/
@@ -1139,7 +1139,7 @@ static void zs_xsisr(zs)
* time stamp
*/
uniqtime(&cdevent.tv);
-
+
#ifdef PPS_SYNC
splx(s);
#endif
@@ -1161,14 +1161,14 @@ static void zs_xsisr(zs)
#endif
TIMEVAL_USADD(&cdevent.tv, xsdelay);
-
+
q = za->za_ttycommon.t_readq;
/*
* ok - now the hard part - find ourself
*/
loopcheck = MAXDEPTH;
-
+
while (q)
{
if (q->q_qinfo && q->q_qinfo->qi_minfo)
@@ -1196,7 +1196,7 @@ static void zs_xsisr(zs)
*/
parse_iodone(&((parsestream_t *)q->q_ptr)->parse_io);
}
-
+
if (status)
{
((parsestream_t *)q->q_ptr)->parse_ppsclockev.tv = cdevent.tv;
@@ -1230,7 +1230,7 @@ static void zs_xsisr(zs)
zsaddr->zscc_control = ZSWR0_RESET_STATUS; /* might kill other conditions here */
return;
}
- }
+ }
/*
* we are now gathered here to process some unusual external status
@@ -1245,7 +1245,7 @@ static void zs_xsisr(zs)
q = za->za_ttycommon.t_readq;
loopcheck = MAXDEPTH;
-
+
/*
* the real thing for everything else ...
*/
@@ -1257,7 +1257,7 @@ static void zs_xsisr(zs)
if (!strcmp(dname, parseinfo.st_rdinit->qi_minfo->mi_idname))
{
register int (*zsisr)();
-
+
/*
* back home - phew (hopping along stream queues might
* prove dangerous to your health)
@@ -1266,7 +1266,7 @@ static void zs_xsisr(zs)
(void)zsisr(zs);
else
panic("zs_xsisr: unable to locate original ISR");
-
+
parseprintf(DD_ISR, ("zs_xsisr: non CD event was processed for \"%s\"\n", dname));
/*
* now back to our program ...
@@ -1288,7 +1288,7 @@ static void zs_xsisr(zs)
* corrupted TTY structures
*/
printf("zs_zsisr: looking for \"%s\" - found \"%s\" - taking EMERGENCY path\n", parseinfo.st_rdinit->qi_minfo->mi_idname, dname ? dname : "-NIL-");
-
+
if (emergencyzs && emergencyzs->zsop_xsint)
emergencyzs->zsop_xsint(zs);
else
diff --git a/usr.sbin/xntpd/parse/util/dcfd.c b/usr.sbin/xntpd/parse/util/dcfd.c
index cc338cb..e8103d4 100644
--- a/usr.sbin/xntpd/parse/util/dcfd.c
+++ b/usr.sbin/xntpd/parse/util/dcfd.c
@@ -1,8 +1,8 @@
/*
* /src/NTP/REPOSITORY/v3/parse/util/dcfd.c,v 3.18 1994/05/12 12:49:23 kardel Exp
- *
+ *
* dcfd.c,v 3.18 1994/05/12 12:49:23 kardel Exp
- *
+ *
* Ported to FreeBSD 2.0 1995/03/20 by Vincenzo Capuano
*
* DCF77 100/200ms pulse synchronisation daemon program (via 50Baud serial line)
@@ -17,7 +17,7 @@
*
* Copyright (c) 1993,1994
* Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -269,7 +269,7 @@ typedef struct clocktime clocktime_t;
* while the length is given as the difference between the start index and
* the start index of the following field.
*/
-static struct rawdcfcode
+static struct rawdcfcode
{
char offset; /* start bit */
} rawdcfcode[] =
@@ -336,7 +336,7 @@ static struct dcfparam
{
unsigned char onebits[60];
unsigned char zerobits[60];
-} dcfparam =
+} dcfparam =
{
"###############RADMLS1248124P124812P1248121241248112481248P", /* 'ONE' representation */
"--------------------s-------p------p----------------------p" /* 'ZERO' representation */
@@ -357,7 +357,7 @@ static unsigned long ext_bf(buf, idx)
register int i, first;
first = rawdcfcode[idx].offset;
-
+
for (i = rawdcfcode[idx+1].offset - 1; i >= first; i--)
{
sum <<= 1;
@@ -407,7 +407,7 @@ static unsigned long convert_rawdcf(buffer, size, clock)
PRINTF("%-30s", "*** INCOMPLETE");
return CVT_NONE;
}
-
+
/*
* check Start and Parity bits
*/
@@ -705,7 +705,7 @@ static unsigned long cvt_rawdcf(buffer, size, clock)
* if everything went well so far return the result of the symbolic
* conversion routine else just the accumulated errors
*/
- if (rtc != CVT_NONE)
+ if (rtc != CVT_NONE)
{
PRINTF("%-30s", "*** BAD DATA");
}
@@ -723,13 +723,13 @@ dcf_to_unixtime(clock, cvtrtc)
register unsigned long *cvtrtc;
{
#define SETRTC(_X_) { if (cvtrtc) *cvtrtc = (_X_); }
- static int days_of_month[] =
+ static int days_of_month[] =
{
0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
};
register int i;
time_t t;
-
+
/*
* map 2 digit years to 19xx (DCF77 is a 20th century item)
*/
@@ -751,7 +751,7 @@ dcf_to_unixtime(clock, cvtrtc)
SETRTC(CVT_FAIL|CVT_BADDATE);
return -1;
}
-
+
/*
* sorry, slow section here - but it's not time critical anyway
*/
@@ -817,7 +817,7 @@ dcf_to_unixtime(clock, cvtrtc)
*/
t = TIMES60(t) + clock->minute;
/* sec */
-
+
/*
* calculate UTC in minutes
*/
@@ -1219,7 +1219,7 @@ main(argc, argv)
errs=1;
}
break;
-
+
case 'd':
if (ac > 1)
{
@@ -1232,7 +1232,7 @@ main(argc, argv)
errs=1;
}
break;
-
+
default:
fprintf(stderr, "%s: unknown option -%c\n", argv[0], c);
errs=1;
@@ -1340,7 +1340,7 @@ main(argc, argv)
*/
if (!interactive)
detach();
-
+
/*
* get syslog() initialized
*/
@@ -1379,7 +1379,7 @@ main(argc, argv)
it.it_interval.tv_usec = 0;
it.it_value.tv_sec = 1<<ADJINTERVAL;
it.it_value.tv_usec = 0;
-
+
if (setitimer(ITIMER_REAL, &it, (struct itimerval *)0) == -1)
{
syslog(LOG_ERR, "setitimer: %m");
@@ -1392,7 +1392,7 @@ main(argc, argv)
#if defined(SYS_FREEBSD) && defined(BOEDER)
if (fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) & ~O_NONBLOCK) == -1)
perror("F_SETFL");
-
+
if (ioctl(fd, TIOCCDTR, 0) == -1)
perror("TIOCCDTR");
#endif
@@ -1603,7 +1603,7 @@ main(argc, argv)
fflush(stdout);
}
} while ((rrc == -1) && (errno == EINTR));
-
+
/*
* lost IO - sorry guys
*/
@@ -1613,6 +1613,6 @@ main(argc, argv)
}
closelog();
-
+
return 0;
}
diff --git a/usr.sbin/xntpd/parse/util/parsetest.c b/usr.sbin/xntpd/parse/util/parsetest.c
index 7fa62a9..33f3d9c 100644
--- a/usr.sbin/xntpd/parse/util/parsetest.c
+++ b/usr.sbin/xntpd/parse/util/parsetest.c
@@ -5,12 +5,15 @@
*
* Copyright (c) 1989,1990,1991,1992,1993,1994
* Frank Kardel Friedrich-Alexander Universitaet Erlangen-Nuernberg
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Log: parsetest.c,v $
+ * Revision 1.1.1.4 1994/09/29 23:01:34 wollman
+ * xntp 3.4e from Dave Mills @ UDel
+ *
* Revision 3.14 1994/05/12 12:49:27 kardel
* printf fmt/arg cleanup
*
@@ -90,7 +93,7 @@ static char *strstatus(buffer, state)
int i;
*buffer = '\0';
-
+
i = 0;
while (flagstrings[i].bit)
{
@@ -102,18 +105,18 @@ static char *strstatus(buffer, state)
}
i++;
}
-
+
if (state & (PARSEB_S_LEAP|PARSEB_S_ANTENNA|PARSEB_S_PPS|PARSEB_S_POSITION))
{
register char *s, *t;
-
+
if (buffer[0])
strcat(buffer, "; ");
strcat(buffer, "(");
t = s = buffer + strlen(buffer);
-
+
i = 0;
while (sflagstrings[i].bit)
{
@@ -124,7 +127,7 @@ static char *strstatus(buffer, state)
strcpy(t, "; ");
t += 2;
}
-
+
strcpy(t, sflagstrings[i].name);
t += strlen(t);
}
@@ -159,7 +162,7 @@ static char *parsestatus(state, buffer)
int i;
*buffer = '\0';
-
+
i = 0;
while (flagstrings[i].bit)
{
@@ -171,7 +174,7 @@ static char *parsestatus(state, buffer)
}
i++;
}
-
+
return buffer;
}
@@ -188,7 +191,7 @@ main(argc, argv)
else
{
int fd;
-
+
fd = open(argv[1], O_RDWR);
if (fd == -1)
{
@@ -200,9 +203,9 @@ main(argc, argv)
parsectl_t dct;
parsetime_t parsetime;
struct strioctl strioc;
-
+
printf("parsetest.c,v 3.11 1994/01/23 19:00:01 kardel Exp\n");
-
+
while (ioctl(fd, I_POP, 0) == 0)
;
@@ -226,14 +229,14 @@ main(argc, argv)
dct.parsestatus.flags |= PARSE_STAT_FILTER;
strioc.ic_cmd = PARSEIOC_SETSTAT;
-
+
if (ioctl(fd, I_STR, &strioc) == -1)
{
perror("ioctl(fd, I_STR(PARSEIOC_SETSTAT))");
exit(1);
}
printf("PARSE clock FILTERMODE\n");
-
+
if (ioctl(fd, I_STR, &strioc) == -1)
{
perror("ioctl(fd, I_STR(PARSEIOC_GETSTAT))");
@@ -264,7 +267,7 @@ main(argc, argv)
(unsigned long)parsetime.parse_status,
parsestatus(parsetime.parse_status, tmp1));
}
-
+
close(fd);
}
}
diff --git a/usr.sbin/xntpd/parse/util/testdcf.c b/usr.sbin/xntpd/parse/util/testdcf.c
index 73c8d89..219b7c3 100644
--- a/usr.sbin/xntpd/parse/util/testdcf.c
+++ b/usr.sbin/xntpd/parse/util/testdcf.c
@@ -1,13 +1,13 @@
/*
* /src/NTP/REPOSITORY/v3/parse/util/testdcf.c,v 3.13 1994/05/12 12:49:31 kardel Exp
- *
+ *
* testdcf.c,v 3.13 1994/05/12 12:49:31 kardel Exp
*
* simple DCF77 100/200ms pulse test program (via 50Baud serial line)
*
* Copyright (c) 1993,1994
* Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -112,7 +112,7 @@ typedef struct clocktime clocktime_t;
* 59 - usually missing (minute indication), except for leap insertion
*/
-static struct rawdcfcode
+static struct rawdcfcode
{
char offset; /* start bit */
} rawdcfcode[] =
@@ -165,7 +165,7 @@ static unsigned long ext_bf(buf, idx)
register int i, first;
first = rawdcfcode[idx].offset;
-
+
for (i = rawdcfcode[idx+1].offset - 1; i >= first; i--)
{
sum <<= 1;
@@ -199,7 +199,7 @@ static unsigned long convert_rawdcf(buffer, size, clock)
printf("%-30s", "*** INCOMPLETE");
return CVT_NONE;
}
-
+
/*
* check Start and Parity bits
*/
diff --git a/usr.sbin/xntpd/util/byteorder.c b/usr.sbin/xntpd/util/byteorder.c
index 665c146..ff7d239 100644
--- a/usr.sbin/xntpd/util/byteorder.c
+++ b/usr.sbin/xntpd/util/byteorder.c
@@ -32,8 +32,8 @@ main()
else big = 0;
}
for (i=0; i< sizeof(long); i++) {
- if (big == 1 && (u.c[i] == (sizeof(long) - i))) {
- continue;
+ if (big == 1 && (u.c[i] == (sizeof(long) - i))) {
+ continue;
} else if (big == 0 && (u.c[i] == (i+1))) {
continue;
} else {
diff --git a/usr.sbin/xntpd/util/longsize.c b/usr.sbin/xntpd/util/longsize.c
index 6bdbdfe..bb884ba 100644
--- a/usr.sbin/xntpd/util/longsize.c
+++ b/usr.sbin/xntpd/util/longsize.c
@@ -2,7 +2,7 @@
main()
{
- if (sizeof(long) == 8) {
+ if (sizeof(long) == 8) {
printf("-DLONG8\n");
} else if (sizeof(long) == 4) {
printf("-DLONG4\n");
diff --git a/usr.sbin/xntpd/util/ntptime.c b/usr.sbin/xntpd/util/ntptime.c
index 1515905..38d9a4a 100644
--- a/usr.sbin/xntpd/util/ntptime.c
+++ b/usr.sbin/xntpd/util/ntptime.c
@@ -189,7 +189,7 @@ main(argc, argv)
}
status = ntp_adjtime(&ntx);
if (status < 0)
- perror((errno == EPERM) ?
+ perror((errno == EPERM) ?
"Must be root to set kernel values\nntp_adjtime() call fails" :
"ntp_adjtime() call fails");
else {
diff --git a/usr.sbin/xntpd/util/precision.c b/usr.sbin/xntpd/util/precision.c
index 6961475..64fe336 100644
--- a/usr.sbin/xntpd/util/precision.c
+++ b/usr.sbin/xntpd/util/precision.c
@@ -108,7 +108,7 @@ int default_get_resolution()
* In order to guard against spurious values, which could occur if we
* happen to hit a fat interrupt, we do this for MINLOOPS times and
* keep the minimum value obtained.
- */
+ */
int default_get_precision()
{
struct timeval tp;
diff --git a/usr.sbin/xntpd/util/testrs6000.c b/usr.sbin/xntpd/util/testrs6000.c
index 9a5e0cd..0d4bf4f 100644
--- a/usr.sbin/xntpd/util/testrs6000.c
+++ b/usr.sbin/xntpd/util/testrs6000.c
@@ -35,7 +35,7 @@ int sig,code;
struct sigcontext *scp;
{
signal (SIGALRM, timeout);
- if (adjtime(&adjustment, &result))
+ if (adjtime(&adjustment, &result))
printf("adjtime call failed\n");
if (result.tv_sec != 0 || result.tv_usec != 0) {
printf("result.u = %d.%06.6d ", (int) result.tv_sec,
diff --git a/usr.sbin/xntpd/util/tickadj.c b/usr.sbin/xntpd/util/tickadj.c
index 75d2ab7..74757dd 100644
--- a/usr.sbin/xntpd/util/tickadj.c
+++ b/usr.sbin/xntpd/util/tickadj.c
@@ -39,7 +39,7 @@ main(int argc, char ** argv)
}
else
txc.mode = 0;
-
+
if (__adjtimex(&txc) < 0)
perror("adjtimex");
else
@@ -194,29 +194,29 @@ char *argv[];
}
if (setnoprintf && (noprintf_offset == 0)) {
- (void) fprintf(stderr,
+ (void) fprintf(stderr,
"No noprintf kernal variable\n");
errflg++;
}
if (unsetdosync && (dosync_offset == 0)) {
- (void) fprintf(stderr,
+ (void) fprintf(stderr,
"No dosynctodr kernal variable\n");
errflg++;
}
-
+
if (writeopttickadj && (tickadj_offset == 0)) {
- (void) fprintf(stderr,
+ (void) fprintf(stderr,
"No tickadj kernal variable\n");
errflg++;
}
if (writetick && (tick_offset == 0)) {
- (void) fprintf(stderr,
+ (void) fprintf(stderr,
"No tick kernal variable\n");
errflg++;
}
-
+
if (tickadj_offset != 0)
readvar(fd, tickadj_offset, &tickadj);
@@ -273,7 +273,7 @@ char *argv[];
if ((!quiet) && (tickadj_offset != 0))
(void) printf("recommended value of tickadj = %d us\n",
recommend_tickadj);
-
+
if (writetickadj == 0 && !writeopttickadj &&
!unsetdosync && writetick == 0 && !setnoprintf)
exit(errflg ? 1 : 0);
@@ -344,7 +344,7 @@ getoffsets(filex, tick_off, tickadj_off, dosync_off, noprintf_off)
#if defined(SYS_AUX3) || defined(SYS_AUX2)
#define X_TICKADJ 0
#define X_TICK 1
-#define X_DEF
+#define X_DEF
static struct nlist nl[] =
{ {"tickadj"},
{"tick"},
@@ -357,7 +357,7 @@ getoffsets(filex, tick_off, tickadj_off, dosync_off, noprintf_off)
#define X_TICK 1
#define X_DOSYNC 2
#define X_NOPRINTF 3
-#define X_DEF
+#define X_DEF
static struct nlist nl[] =
{ {{"_tickadj"}},
{{"_tick"}},
@@ -372,7 +372,7 @@ getoffsets(filex, tick_off, tickadj_off, dosync_off, noprintf_off)
#define X_TICK 1
#define X_DOSYNC 2
#define X_NOPRINTF 3
-#define X_DEF
+#define X_DEF
static struct nlist nl[] =
{ {{"tickadj"}},
{{"tick"}},
@@ -388,7 +388,7 @@ getoffsets(filex, tick_off, tickadj_off, dosync_off, noprintf_off)
#endif
#define X_DOSYNC 1
#define X_NOPRINTF 2
-#define X_DEF
+#define X_DEF
static struct nlist nl[] =
{ {"tickadj"},
{"dosynctodr"},
@@ -405,7 +405,7 @@ getoffsets(filex, tick_off, tickadj_off, dosync_off, noprintf_off)
#define X_TICKADJ 0
#define X_TICK 1
#define X_DEF
- static struct nlist nl[] =
+ static struct nlist nl[] =
#ifdef hp9000s300
{ {"_tickadj"},
{"_old_tick"},
@@ -452,7 +452,7 @@ getoffsets(filex, tick_off, tickadj_off, dosync_off, noprintf_off)
for (kname = kernels; *kname != NULL; kname++) {
if (stat(*kname, &stbuf) == -1)
continue;
- if (nlist(*kname, nl) >= 0)
+ if (nlist(*kname, nl) >= 0)
break;
}
#endif
@@ -537,7 +537,7 @@ writevar(fd, off, var)
unsigned long off;
int var;
{
-
+
if (lseek(fd, off, L_SET) == -1) {
(void) fprintf(stderr, "%s: lseek fails: ", progname);
perror("");
@@ -561,7 +561,7 @@ readvar(fd, off, var)
int *var;
{
int i;
-
+
if (lseek(fd, off, L_SET) == -1) {
(void) fprintf(stderr, "%s: lseek fails: ", progname);
perror("");
diff --git a/usr.sbin/xntpd/util/timetrim.c b/usr.sbin/xntpd/util/timetrim.c
index a1635c1..7b9413f 100644
--- a/usr.sbin/xntpd/util/timetrim.c
+++ b/usr.sbin/xntpd/util/timetrim.c
@@ -1,6 +1,6 @@
/*
* timetrim.c
- *
+ *
* "timetrim" allows setting and adjustment of the system clock frequency
* trim parameter on Silicon Graphics machines. The trim value native
* units are nanoseconds per second (10**-9), so a trim value of 1 makes
@@ -8,7 +8,7 @@
* of zero. Xntpd currently uses units of 2**-20 secs for its frequency
* offset (drift) values; to convert to a timetrim value, multiply by
* 1E9 / 2**20 (about 954).
- *
+ *
* "timetrim" with no arguments just prints out the current kernel value.
* With a numeric argument, the kernel value is set to the supplied value.
* The "-i" flag causes the supplied value to be added to the kernel value.
@@ -17,7 +17,7 @@
*
* Note that there is a limit of +-3000000 (0.3%) on the timetrim value
* which is (silently?) enforced by the kernel.
- *
+ *
*/
#include <stdio.h>
@@ -37,7 +37,7 @@ char **argv;
int c, incremental = 0, ntpunits = 0;
LONG timetrim;
double value, strtod();
-
+
while (--argc && **++argv == '-' && isalpha(argv[0][1])) {
switch (argv[0][1]) {
case 'i':
diff --git a/usr.sbin/xntpd/xntpd/ntp_config.c b/usr.sbin/xntpd/xntpd/ntp_config.c
index 202a029..bc88b5a 100644
--- a/usr.sbin/xntpd/xntpd/ntp_config.c
+++ b/usr.sbin/xntpd/xntpd/ntp_config.c
@@ -55,7 +55,7 @@
* clientlimit [ n ]
* clientperiod [ 3600 ]
* trustedkey [ key ]
- * requestkey [ key]
+ * requestkey [ key]
* controlkey [ key ]
* trap [ addr ]
* fudge [ addr ] [ stratum ] [ refid ] ...
@@ -105,7 +105,7 @@
#define CONF_MOD_KEY 2
#define CONF_MOD_MINPOLL 3
#define CONF_MOD_MAXPOLL 4
-#define CONF_MOD_PREFER 5
+#define CONF_MOD_PREFER 5
#define CONF_MOD_TTL 6
#define CONF_MOD_MODE 7
@@ -171,7 +171,7 @@ static struct keyword keywords[] = {
{ "trap", CONFIG_TRAP },
{ "fudge", CONFIG_FUDGE },
{ "statsdir", CONFIG_STATSDIR },
- { "filegen", CONFIG_FILEGEN },
+ { "filegen", CONFIG_FILEGEN },
{ "statistics", CONFIG_STATISTICS },
{ "pidfile", CONFIG_PIDFILE },
{ "setvar", CONFIG_SETVAR },
@@ -376,7 +376,7 @@ getstartup(argc, argv)
default:
break;
}
-
+
if (errflg || ntp_optind != argc) {
(void) fprintf(stderr, "usage: %s [ -abd ] [ -c config_file ] [ -e encryption delay ]\n", progname);
(void) fprintf(stderr, "\t\t[ -f frequency file ] [ -k key file ] [ -l log file ]\n");
@@ -487,7 +487,7 @@ getconfig(argc, argv)
case 'e':
do {
l_fp tmp;
-
+
if (!atolfp(ntp_optarg, &tmp)) {
syslog(LOG_ERR,
"command line encryption delay value %s undecodable",
@@ -503,7 +503,7 @@ getconfig(argc, argv)
}
} while (0);
break;
-
+
case 'f':
stats_config(STATS_FREQ_FILE, ntp_optarg);
break;
@@ -531,7 +531,7 @@ getconfig(argc, argv)
case 'r':
do {
l_fp tmp;
-
+
if (!atolfp(ntp_optarg, &tmp)) {
syslog(LOG_ERR,
"command line broadcast delay value %s undecodable",
@@ -545,15 +545,15 @@ getconfig(argc, argv)
}
} while (0);
break;
-
+
case 's':
stats_config(STATS_STATSDIR, ntp_optarg);
break;
-
+
case 't':
do {
u_long tkey;
-
+
tkey = atol(ntp_optarg);
if (tkey <= 0 || tkey > NTP_MAXKEY) {
syslog(LOG_ERR,
@@ -564,19 +564,19 @@ getconfig(argc, argv)
}
} while (0);
break;
-
+
case 'v':
case 'V':
set_sys_var(ntp_optarg, strlen(ntp_optarg)+1,
RW | ((c == 'V') ? DEF : 0));
break;
-
+
default:
errflg++;
break;
}
}
-
+
if (errflg || ntp_optind != argc) {
(void) fprintf(stderr,
"usage: %s [ -bd ] [ -c config_file ]\n", progname);
@@ -603,19 +603,19 @@ getconfig(argc, argv)
hmode = MODE_CLIENT;
else
hmode = MODE_BROADCAST;
-
+
if (ntokens < 2) {
syslog(LOG_ERR,
"No address for %s, line ignored",
tokens[0]);
break;
}
-
+
if (!getnetnum(tokens[1], &peeraddr, 0)) {
errflg = -1;
} else {
errflg = 0;
-
+
if (
#ifdef REFCLOCK
!ISREFCLOCKADR(&peeraddr) &&
@@ -627,7 +627,7 @@ getconfig(argc, argv)
break;
}
}
-
+
peerversion = NTP_VERSION;
minpoll = NTP_MINDPOLL;
maxpoll = NTP_MAXDPOLL;
@@ -652,7 +652,7 @@ getconfig(argc, argv)
errflg = 1;
}
break;
-
+
case CONF_MOD_KEY:
if (i >= ntokens-1) {
syslog(LOG_ERR,
@@ -723,7 +723,7 @@ getconfig(argc, argv)
}
if (errflg == 0) {
if (peer_config(&peeraddr,
- (struct interface *)0, hmode, peerversion,
+ (struct interface *)0, hmode, peerversion,
minpoll, maxpoll, peerflags, ttl, peerkey)
== 0) {
syslog(LOG_ERR,
@@ -735,7 +735,7 @@ getconfig(argc, argv)
minpoll, maxpoll, peerflags, ttl, peerkey);
}
break;
-
+
case CONFIG_PRECISION:
if (ntokens >= 2) {
i = atoi(tokens[1]);
@@ -747,25 +747,25 @@ getconfig(argc, argv)
proto_config(PROTO_PRECISION, i);
}
break;
-
+
case CONFIG_DRIFTFILE:
if (ntokens >= 2)
stats_config(STATS_FREQ_FILE, tokens[1]);
else
stats_config(STATS_FREQ_FILE, (char *)0);
break;
-
+
case CONFIG_PIDFILE:
if (ntokens >= 2)
stats_config(STATS_PID_FILE, tokens[1]);
else
stats_config(STATS_PID_FILE, (char *)0);
break;
-
+
case CONFIG_BROADCASTCLIENT:
proto_config(PROTO_BROADCLIENT, 1);
break;
-
+
case CONFIG_MULTICASTCLIENT:
if (ntokens > 1) {
for (i = 1; i < ntokens; i++) {
@@ -789,12 +789,12 @@ getconfig(argc, argv)
} else {
errflg++;
}
-
+
if (errflg)
syslog(LOG_ERR,
"should be `authenticate yes|no'");
break;
-
+
case CONFIG_KEYS:
if (ntokens >= 2) {
getauthkeys(tokens[1]);
@@ -808,7 +808,7 @@ getconfig(argc, argv)
}
}
break;
-
+
case CONFIG_MONITOR:
errflg = 0;
if (ntokens >= 2) {
@@ -821,16 +821,16 @@ getconfig(argc, argv)
} else {
errflg++;
}
-
+
if (errflg)
syslog(LOG_ERR,
"should be `monitor yes|no'");
break;
-
+
case CONFIG_AUTHDELAY:
if (ntokens >= 2) {
l_fp tmp;
-
+
if (!atolfp(tokens[1], &tmp)) {
syslog(LOG_ERR,
"authdelay value %s undecodable",
@@ -854,7 +854,7 @@ getconfig(argc, argv)
peeraddr.sin_addr.s_addr = htonl(INADDR_ANY);
else if (!getnetnum(tokens[1], &peeraddr, 1))
break;
-
+
/*
* Use peerversion as flags, peerkey as mflags. Ick.
*/
@@ -875,47 +875,47 @@ getconfig(argc, argv)
if (!getnetnum(tokens[i], &maskaddr, 1))
errflg++;
break;
-
+
case CONF_RES_IGNORE:
peerversion |= RES_IGNORE;
break;
-
+
case CONF_RES_NOSERVE:
peerversion |= RES_DONTSERVE;
break;
-
+
case CONF_RES_NOTRUST:
peerversion |= RES_DONTTRUST;
break;
-
+
case CONF_RES_NOQUERY:
peerversion |= RES_NOQUERY;
break;
-
+
case CONF_RES_NOMODIFY:
peerversion |= RES_NOMODIFY;
break;
-
+
case CONF_RES_NOPEER:
peerversion |= RES_NOPEER;
break;
-
+
case CONF_RES_NOTRAP:
peerversion |= RES_NOTRAP;
break;
-
+
case CONF_RES_LPTRAP:
peerversion |= RES_LPTRAP;
break;
-
+
case CONF_RES_NTPPORT:
peerkey |= RESM_NTPONLY;
break;
-
+
case CONF_RES_LIMITED:
peerversion |= RES_LIMITED;
break;
-
+
case CONFIG_UNKNOWN:
errflg++;
break;
@@ -927,11 +927,11 @@ getconfig(argc, argv)
restrict(RESTRICT_FLAGS, &peeraddr, &maskaddr,
(int)peerkey, peerversion);
break;
-
+
case CONFIG_BDELAY:
if (ntokens >= 2) {
l_fp tmp;
-
+
if (!atolfp(tokens[1], &tmp)) {
syslog(LOG_ERR,
"broadcastdelay value %s undecodable",
@@ -945,11 +945,11 @@ getconfig(argc, argv)
}
}
break;
-
+
case CONFIG_TRUSTEDKEY:
for (i = 1; i < ntokens; i++) {
u_long tkey;
-
+
tkey = atol(tokens[i]);
if (tkey == 0) {
syslog(LOG_ERR,
@@ -960,11 +960,11 @@ getconfig(argc, argv)
}
}
break;
-
+
case CONFIG_REQUESTKEY:
if (ntokens >= 2) {
u_long rkey;
-
+
if (!atouint(tokens[1], &rkey)) {
syslog(LOG_ERR,
"%s is undecodeable as request key",
@@ -983,12 +983,12 @@ getconfig(argc, argv)
}
}
break;
-
+
case CONFIG_CONTROLKEY:
if (ntokens >= 2) {
u_long ckey;
extern u_long ctl_auth_keyid;
-
+
ckey = atol(tokens[1]);
if (ckey == 0) {
syslog(LOG_ERR,
@@ -999,7 +999,7 @@ getconfig(argc, argv)
}
}
break;
-
+
case CONFIG_TRAP:
if (ntokens < 2) {
syslog(LOG_ERR,
@@ -1008,7 +1008,7 @@ getconfig(argc, argv)
}
if (!getnetnum(tokens[1], &peeraddr, 1))
break;
-
+
/*
* Use peerversion for port number. Barf.
*/
@@ -1033,7 +1033,7 @@ getconfig(argc, argv)
errflg = 1;
}
break;
-
+
case CONF_TRAP_INTERFACE:
if (i >= ntokens-1) {
syslog(LOG_ERR,
@@ -1041,13 +1041,13 @@ getconfig(argc, argv)
errflg = 1;
break;
}
-
+
if (!getnetnum(tokens[++i],
&maskaddr, 1)) {
errflg = 1;
break;
}
-
+
localaddr = findinterface(&maskaddr);
if (localaddr == NULL) {
syslog(LOG_ERR,
@@ -1056,15 +1056,15 @@ getconfig(argc, argv)
errflg = 1;
}
break;
-
+
case CONFIG_UNKNOWN:
errflg++;
break;
}
-
+
if (!errflg) {
extern struct interface *any_interface;
-
+
if (peerversion != 0)
peeraddr.sin_port = htons(peerversion);
else
@@ -1078,7 +1078,7 @@ getconfig(argc, argv)
ntoa(&peeraddr));
}
break;
-
+
case CONFIG_FUDGE:
if (ntokens < 2) {
syslog(LOG_ERR,
@@ -1087,14 +1087,14 @@ getconfig(argc, argv)
}
if (!getnetnum(tokens[1], &peeraddr, 1))
break;
-
+
if (!ISREFCLOCKADR(&peeraddr)) {
syslog(LOG_ERR,
"%s is inappropriate address for the fudge command, line ignored",
ntoa(&peeraddr));
break;
}
-
+
memset((char *)&clock, 0, sizeof clock);
errflg = 0;
for (i = 2; i < ntokens-1; i++) {
@@ -1111,7 +1111,7 @@ getconfig(argc, argv)
}
clock.haveflags |= CLK_HAVETIME1;
break;
-
+
case CONF_FDG_TIME2:
if (!atolfp(tokens[++i],
&clock.fudgetime2)) {
@@ -1123,7 +1123,7 @@ getconfig(argc, argv)
}
clock.haveflags |= CLK_HAVETIME2;
break;
-
+
case CONF_FDG_STRATUM:
if (!atoint(tokens[++i],
(long *)&clock.fudgeval1)) {
@@ -1135,7 +1135,7 @@ getconfig(argc, argv)
}
clock.haveflags |= CLK_HAVEVAL1;
break;
-
+
case CONF_FDG_REFID:
strncpy((char *)&clock.fudgeval2,
tokens[++i], 4);
@@ -1177,13 +1177,13 @@ getconfig(argc, argv)
else
clock.flags |= c;
break;
-
+
case CONFIG_UNKNOWN:
errflg = -1;
break;
}
}
-
+
#ifdef REFCLOCK
/*
* If reference clock support isn't defined the
@@ -1202,7 +1202,7 @@ getconfig(argc, argv)
stats_config(STATS_STATSDIR,tokens[1]);
}
break;
-
+
case CONFIG_STATISTICS:
for (i = 1; i < ntokens; i++) {
filegen = filegen_get(tokens[i]);
@@ -1221,14 +1221,14 @@ getconfig(argc, argv)
filegen->flag |= FGEN_FLAG_ENABLED;
}
break;
-
+
case CONFIG_FILEGEN:
if (ntokens < 2) {
syslog(LOG_ERR,
"no id for filegen command, line ignored");
break;
}
-
+
filegen = filegen_get(tokens[1]);
if (filegen == NULL) {
syslog(LOG_ERR,
@@ -1245,12 +1245,12 @@ getconfig(argc, argv)
peerkey = filegen->type;
peerflags = filegen->flag;
errflg = 0;
-
+
for (i = 2; i < ntokens; i++) {
switch (matchkey(tokens[i], filegen_keywords)) {
case CONF_FGEN_FILE:
if (i >= ntokens - 1) {
- syslog(LOG_ERR,
+ syslog(LOG_ERR,
"filegen %s file requires argument",
tokens[1]);
errflg = i;
@@ -1309,7 +1309,7 @@ getconfig(argc, argv)
"default"))) ? DEF : 0));
}
break;
-
+
case CONFIG_CLIENTLIMIT:
if (ntokens < 2) {
syslog(LOG_ERR,
@@ -1377,7 +1377,7 @@ getconfig(argc, argv)
flag = matchkey(tokens[i], flags_keywords);
if (flag == CONFIG_UNKNOWN) {
syslog(LOG_ERR,
- "disable unknown flag %s",
+ "disable unknown flag %s",
tokens[i]);
errflg = 1;
break;
diff --git a/usr.sbin/xntpd/xntpd/ntp_control.c b/usr.sbin/xntpd/xntpd/ntp_control.c
index 0f1dc2b..af4365c 100644
--- a/usr.sbin/xntpd/xntpd/ntp_control.c
+++ b/usr.sbin/xntpd/xntpd/ntp_control.c
@@ -484,7 +484,7 @@ ctl_error(errcode)
*(u_long *)((u_char *)&rpkt + CTL_HEADER_LEN)
= htonl(res_keyid);
- maclen =
+ maclen =
authencrypt(res_keyid, (U_LONG *)&rpkt, CTL_HEADER_LEN);
sendpkt(rmt_addr, lcl_inter, -2, (struct pkt *)&rpkt,
CTL_HEADER_LEN + maclen);
@@ -643,7 +643,7 @@ process_control(rbufp, restrict)
*/
for (cc = control_codes; cc->control_code != NO_REQUEST; cc++) {
if (cc->control_code == res_opcode) {
-#ifdef DEBUG
+#ifdef DEBUG
if (debug >= 2)
printf("opcode %d, found command handler\n",
res_opcode);
@@ -742,7 +742,7 @@ ctlsysstatus()
clock |= CTL_SST_TS_PPS;
}
}
- return (u_short)CTL_SYS_STATUS(sys_leap, clock,
+ return (u_short)CTL_SYS_STATUS(sys_leap, clock,
ctl_sys_num_events, ctl_sys_last_event);
}
@@ -815,7 +815,7 @@ ctl_flushpkt(more)
totlen++;
}
*(u_long *)datapt = htonl(res_keyid);
- maclen =
+ maclen =
authencrypt(res_keyid, (U_LONG *)&rpkt, totlen);
sendpkt(rmt_addr, lcl_inter, -5, (struct pkt *)&rpkt,
@@ -900,7 +900,7 @@ ctl_putstr(tag, data, len)
cq = tag;
while (*cq != '\0')
*cp++ = *cq++;
-
+
if (len > 0) {
*cp++ = '=';
*cp++ = '"';
@@ -936,7 +936,7 @@ ctl_putlfp(tag, ts)
cq = lfptoms(ts, 3);
while (*cq != '\0')
*cp++ = *cq++;
-
+
ctl_putdata(buffer, cp - buffer, 0);
}
@@ -961,7 +961,7 @@ ctl_putfp(tag, fp)
cq = fptoms(fp, 2);
while (*cq != '\0')
*cp++ = *cq++;
-
+
ctl_putdata(buffer, cp - buffer, 0);
}
@@ -986,7 +986,7 @@ ctl_putufp(tag, ufp)
cq = ufptoms(ufp, 2);
while (*cq != '\0')
*cp++ = *cq++;
-
+
ctl_putdata(buffer, cp - buffer, 0);
}
@@ -1011,7 +1011,7 @@ ctl_putuint(tag, uval)
(void) sprintf(cp, "%lu", uval);
while (*cp != '\0')
cp++;
-
+
ctl_putdata(buffer, cp - buffer, 0);
}
@@ -1061,7 +1061,7 @@ ctl_putint(tag, ival)
(void) sprintf(cp, "%ld", ival);
while (*cp != '\0')
cp++;
-
+
ctl_putdata(buffer, cp - buffer, 0);
}
@@ -1087,7 +1087,7 @@ ctl_putts(tag, ts)
ts->l_uf & 0xffffffffL);
while (*cp != '\0')
cp++;
-
+
ctl_putdata(buffer, cp - buffer, 0);
}
@@ -1112,7 +1112,7 @@ ctl_putadr(tag, addr)
cq = numtoa(addr);
while (*cq != '\0')
*cp++ = *cq++;
-
+
ctl_putdata(buffer, cp - buffer, 0);
}
@@ -1137,7 +1137,7 @@ ctl_putid(tag, id)
cq = id;
while (*cq != '\0' && (cq - id) < 4)
*cp++ = *cq++;
-
+
ctl_putdata(buffer, cp - buffer, 0);
}
@@ -1292,7 +1292,7 @@ ctl_putsys(varid)
be = buf + sizeof(buf) - strlen(sys_var[CS_VARLIST].text) - 4;
if (s > be)
break; /* really long var name 8-( - Killer */
-
+
strcpy(s, sys_var[CS_VARLIST].text);
strcat(s, "=\"");
s += strlen(s);
@@ -1335,7 +1335,7 @@ ctl_putsys(varid)
if (s+2 >= be)
break;
-
+
*s++ = '"';
*s = '\0';
@@ -1496,7 +1496,7 @@ ctl_putpeer(varid, peer)
be = buf + sizeof(buf) - strlen(peer_var[CP_VARLIST].text) - 4;
if (s > be)
break; /* really long var name 8-( - Killer */
-
+
strcpy(s, peer_var[CP_VARLIST].text);
strcat(s, "=\"");
s += strlen(s);
@@ -1518,7 +1518,7 @@ ctl_putpeer(varid, peer)
if (s+2 >= be)
break;
-
+
*s++ = '"';
*s = '\0';
@@ -1611,7 +1611,7 @@ ctl_putclock(varid, clock, mustput)
be = buf + sizeof(buf) - strlen(clock_var[CC_VARLIST].text) - 4;
if (s > be)
break; /* really long var name 8-( - Killer */
-
+
strcpy(s, clock_var[CC_VARLIST].text);
strcat(s, "=\"");
s += strlen(s);
@@ -1639,7 +1639,7 @@ ctl_putclock(varid, clock, mustput)
ss = k->text;
if (!ss)
continue;
-
+
while (*ss && *ss != '=')
ss++;
@@ -1655,7 +1655,7 @@ ctl_putclock(varid, clock, mustput)
if (s+2 >= be)
break;
-
+
*s++ = '"';
*s = '\0';
@@ -1693,7 +1693,7 @@ ctl_getitem(var_list, data)
if (var_list == (struct ctl_var *)0)
return &eol;
-
+
/*
* Look for a first character match on the tag. If we find
* one, see if it is a full match.
@@ -2017,7 +2017,7 @@ write_variables(rbufp, restrict)
t = v->text;
while (*t && *t != '=')
*tt++ = *t++;
-
+
*tt++ = '=';
strcat(tt, valuep);
@@ -2112,7 +2112,7 @@ read_clock_status(rbufp, restrict)
* If we got here we have a peer which is a clock. Get his status.
*/
clock.kv_list = (struct ctl_var *)0;
-
+
refclock_control(&peer->srcadr, (struct refclockstat *)0, &clock);
/*
@@ -2346,7 +2346,7 @@ ctlsettrap(raddr, linter, traptype, version)
*/
if (tptouse == NULL)
return 0;
-
+
/*
* Set up this structure for him.
*/
@@ -2380,11 +2380,11 @@ ctlclrtrap(raddr, linter, traptype)
if ((tp = ctlfindtrap(raddr, linter)) == NULL)
return 0;
-
+
if (tp->tr_flags & TRAP_CONFIGURED
&& traptype != TRAP_TYPE_CONFIG)
return 0;
-
+
tp->tr_flags = 0;
num_ctl_traps--;
return 1;
@@ -2527,7 +2527,7 @@ report_event(err, peer)
struct ctl_var *kv;
clock.kv_list = (struct ctl_var *)0;
-
+
refclock_control(&peer->srcadr,
(struct refclockstat *)0,
&clock);
diff --git a/usr.sbin/xntpd/xntpd/ntp_filegen.c b/usr.sbin/xntpd/xntpd/ntp_filegen.c
index 4c23bed..cc4882b 100644
--- a/usr.sbin/xntpd/xntpd/ntp_filegen.c
+++ b/usr.sbin/xntpd/xntpd/ntp_filegen.c
@@ -28,7 +28,7 @@
* NTP is intended to run long periods of time without restart.
* Thus log and statistic files generated by NTP will grow large.
*
- * this set of routines provides a central interface
+ * this set of routines provides a central interface
* to generating files using file generations
*
* the generation of a file is changed according to file generation type
@@ -85,13 +85,13 @@ filegen_open(gen, newid)
len = strlen(gen->prefix) + strlen(gen->basename) + 1;
basename = emalloc(len);
sprintf(basename, "%s%s", gen->prefix, gen->basename);
-
+
switch(gen->type) {
default:
syslog(LOG_ERR, "unsupported file generations type %d for \"%s\" - reverting to FILEGEN_NONE",
gen->type, basename);
gen->type = FILEGEN_NONE;
-
+
/*FALLTHROUGH*/
case FILEGEN_NONE:
filename = emalloc(len);
@@ -102,7 +102,7 @@ filegen_open(gen, newid)
filename = emalloc(len + 1 + 1 + 10);
sprintf(filename,"%s%c#%ld", basename, SUFFIX_SEP, newid);
break;
-
+
case FILEGEN_DAY:
/* You can argue here in favor of using MJD, but
* I would assume it to be easier for humans to interpret dates
@@ -113,7 +113,7 @@ filegen_open(gen, newid)
sprintf(filename, "%s%c%04d%02d%02d",
basename, SUFFIX_SEP, cal.year, cal.month, cal.monthday);
break;
-
+
case FILEGEN_WEEK:
/*
* This is still a hack
@@ -145,7 +145,7 @@ filegen_open(gen, newid)
sprintf(filename, "%s%ca%08ld", basename, SUFFIX_SEP, newid);
break;
}
-
+
if (gen->type != FILEGEN_NONE) {
/*
* check for existence of a file with name 'basename'
@@ -204,7 +204,7 @@ filegen_open(gen, newid)
* now, try to open new file generation...
*/
fp = fopen(filename, "a");
-
+
#ifdef DEBUG
if (debug > 3)
printf("opening filegen (type=%d/id=%lu) \"%s\"\n",
@@ -249,7 +249,7 @@ filegen_open(gen, newid)
} /*flags & FGEN_FLAG_LINK*/
} /*else fp == NULL*/
-
+
free(basename);
free(filename);
return;
@@ -276,12 +276,12 @@ filegen_setup(gen,now)
fclose(gen->fp);
return;
}
-
+
switch (gen->type) {
case FILEGEN_NONE:
if (gen->fp != NULL) return; /* file already open */
break;
-
+
case FILEGEN_PID:
new_gen = getpid();
break;
@@ -291,7 +291,7 @@ filegen_setup(gen,now)
cal.hour = cal.minute = cal.second = 0;
new_gen = caltontp(&cal);
break;
-
+
case FILEGEN_WEEK:
/* Would be nice to have a calweekstart() routine */
/* so just use a hack ... */
@@ -308,7 +308,7 @@ filegen_setup(gen,now)
cal.hour = cal.minute = cal.second = 0;
new_gen = caltontp(&cal);
break;
-
+
case FILEGEN_MONTH:
caljulian(now, &cal);
cal.yearday -= cal.monthday - 1;
@@ -316,7 +316,7 @@ filegen_setup(gen,now)
cal.hour = cal.minute = cal.second = 0;
new_gen = caltontp(&cal);
break;
-
+
case FILEGEN_YEAR:
new_gen = calyearstart(now);
break;
@@ -352,13 +352,13 @@ filegen_config(gen,basename,type,flag)
type == gen->type &&
flag == gen->flag)
return;
-
+
/*
* validate parameters
*/
if (!valid_fileref(gen->prefix,basename))
return;
-
+
if (gen->fp != NULL)
fclose(gen->fp);
@@ -412,7 +412,7 @@ valid_fileref(prefix,basename)
* (however, it would be possible to perform some checks here...)
*/
register char *p = basename;
-
+
/*
* Just to catch, dumb errors opening up the world...
*/
@@ -421,12 +421,12 @@ valid_fileref(prefix,basename)
if (basename == NULL)
return 0;
-
+
for (p = basename; p; p = strchr(p, '/')) {
if (*p == '.' && *(p+1) == '.' && (*(p+2) == '\0' || *(p+2) == '/'))
return 0;
}
-
+
return 1;
}
@@ -503,7 +503,7 @@ filegen_register(name, filegen)
}
#endif
}
-
+
return;
}
@@ -513,7 +513,7 @@ filegen_unregister(name)
char *name;
{
struct filegen_entry **f = &filegen_registry;
-
+
#ifdef DEBUG
if (debug > 3)
printf("filegen_unregister(\"%s\")\n", name);
@@ -523,7 +523,7 @@ filegen_unregister(name)
if (strcmp((*f)->name,name) == 0) {
struct filegen_entry *ff = *f;
FILEGEN *fg;
-
+
*f = (*f)->next;
fg = ff->filegen;
free(ff->name);
@@ -533,6 +533,6 @@ filegen_unregister(name)
f = &((*f)->next);
}
return NULL;
-}
+}
#endif /* UNUSED */
-
+
diff --git a/usr.sbin/xntpd/xntpd/ntp_intres.c b/usr.sbin/xntpd/xntpd/ntp_intres.c
index c05354b..62d3792 100644
--- a/usr.sbin/xntpd/xntpd/ntp_intres.c
+++ b/usr.sbin/xntpd/xntpd/ntp_intres.c
@@ -186,7 +186,7 @@ ntp_intres()
doconfigure(1);
if (confentries == NULL)
exit(0); /* done that quick */
-
+
/*
* Here we've got some problem children. Set up the timer
* and wait for it.
@@ -379,7 +379,7 @@ openntp()
if (sockfd >= 0)
return;
-
+
sockfd = socket(AF_INET, SOCK_DGRAM, 0);
if (sockfd == -1) {
syslog(LOG_ERR, "socket() failed: %m");
@@ -435,7 +435,7 @@ request(conf)
if (sockfd < 0)
openntp();
-
+
/*
* Try to clear out any previously received traffic so it
* doesn't fool us. Note the socket is nonblocking.
@@ -589,17 +589,17 @@ request(conf)
case INFO_OKAY:
/* success */
return 1;
-
+
case INFO_ERR_IMPL:
syslog(LOG_ERR,
"server reports implementation mismatch!!");
return 0;
-
+
case INFO_ERR_REQ:
syslog(LOG_ERR,
"server claims configuration request is unknown");
return 0;
-
+
case INFO_ERR_FMT:
syslog(LOG_ERR,
"server indicates a format error occured(!!)");
@@ -609,7 +609,7 @@ request(conf)
syslog(LOG_ERR,
"server indicates no data available (shouldn't happen)");
return 0;
-
+
case INFO_ERR_AUTH:
syslog(LOG_ERR,
"server returns a permission denied error");
@@ -641,7 +641,7 @@ nexttoken(lptr)
*/
while (*cp == ' ' || *cp == '\t')
cp++;
-
+
/*
* If this is the end of the line, return nothing.
*/
@@ -649,7 +649,7 @@ nexttoken(lptr)
*lptr = cp;
return NULL;
}
-
+
/*
* Must be the start of a token. Record the pointer and look
* for the end.
@@ -657,7 +657,7 @@ nexttoken(lptr)
tstart = cp++;
while (*cp != ' ' && *cp != '\t' && *cp != '\n' && *cp != '\0')
cp++;
-
+
/*
* Terminate the token with a \0. If this isn't the end of the
* line, space to the next character.
@@ -750,7 +750,7 @@ readconf(fp, name)
flags |= CONF_FLAG_AUTHENABLE;
if (intval[TOK_FLAGS] & FLAG_PREFER)
flags |= CONF_FLAG_PREFER;
-
+
/*
* This is as good as we can check it. Add it in.
*/
diff --git a/usr.sbin/xntpd/xntpd/ntp_io.c b/usr.sbin/xntpd/xntpd/ntp_io.c
index dcb68ef..bcf50f9 100644
--- a/usr.sbin/xntpd/xntpd/ntp_io.c
+++ b/usr.sbin/xntpd/xntpd/ntp_io.c
@@ -402,7 +402,7 @@ create_sockets(port)
maxactivefd = 0;
FD_ZERO(&activefds);
-
+
for (i = 0; i < ninterfaces; i++) {
inter_list[i].fd = open_socket(&inter_list[i].sin,
inter_list[i].flags & INT_BROADCAST);
@@ -546,7 +546,7 @@ io_multicast_add(addr)
mreq.imr_multiaddr, mreq.imr_interface.s_addr,
inet_ntoa(iaddr));
inter_list[i].flags |= INT_MULTICAST;
- if (i >= ninterfaces) ninterfaces = i+1;
+ if (i >= ninterfaces) ninterfaces = i+1;
#else /* MCAST */
struct in_addr iaddr;
iaddr.s_addr = addr;
@@ -813,7 +813,7 @@ getrecvbufs()
#endif
return (struct recvbuf *)0; /* nothing has arrived */
}
-
+
/*
* Get the fulllist chain and mark it empty
*/
@@ -932,7 +932,7 @@ sendpkt(dest, inter, ttl, pkt, len)
if (badaddrs[slot].port == dest->sin_port &&
badaddrs[slot].addr.s_addr == dest->sin_addr.s_addr)
break;
-
+
cc = sendto(inter->fd, (char *)pkt, len, 0, (struct sockaddr *)dest,
sizeof(struct sockaddr_in));
if (cc == -1) {
@@ -1030,7 +1030,7 @@ again:
i = (rp->datalen == 0
|| rp->datalen > sizeof(rb->recv_space))
? sizeof(rb->recv_space) : rp->datalen;
-
+
rb->recv_length =
read(fd, (char *)&rb->recv_space, i);
@@ -1041,7 +1041,7 @@ again:
free_recvbufs++;
continue;
}
-
+
/*
* Got one. Mark how and when it got here,
* put it on the full list and do bookkeeping.
@@ -1121,11 +1121,11 @@ again:
continue;
}
}
-
+
rb = freelist;
freelist = rb->next;
free_recvbufs--;
-
+
fromlen = sizeof(struct sockaddr_in);
rb->recv_length = recvfrom(fd,
(char *)&rb->recv_space,
@@ -1159,7 +1159,7 @@ again:
rb->fd = fd;
rb->recv_time = ts;
rb->receiver = receive;
-
+
if (fulllist == 0) {
beginlist = rb;
@@ -1170,7 +1170,7 @@ again:
}
fulllist = rb;
full_recvbufs++;
-
+
inter_list[i].received++;
packets_received++;
}
@@ -1300,7 +1300,7 @@ io_closeclock(rio)
rp->next = rio->next;
break;
}
-
+
if (rp == 0) {
/*
* Internal error. Report it.
@@ -1367,7 +1367,7 @@ init_clock_sig(rio)
struct refclockio *rio;
{
int pgrp, on = 1;
-
+
pgrp = getpid();
if (ioctl(rio->fd, FIOSSAIOOWN, (char *)&pgrp) == -1) {
syslog(LOG_ERR, "ioctl(FIOSSAIOOWN) fails for clock I/O: %m");
@@ -1389,7 +1389,7 @@ init_clock_sig(rio)
exit(1);
/*NOTREACHED*/
}
- return 0;
+ return 0;
}
#endif /* SYS_HPUX */
#if defined(SYS_AIX)&&!defined(_BSD)
@@ -1435,7 +1435,7 @@ init_clock_sig(rio)
"fcntl(FNDELAY|FASYNC) fails for clock I/O: %m");
return 1;
}
- return 0;
+ return 0;
}
#endif /* CLOCK_DONE */
#else /* !USE_TTY_SIGPOLL */
@@ -1798,7 +1798,7 @@ void
wait_for_signal()
{
int mask, omask;
-
+
mask = sigmask(SIGIO)|sigmask(SIGALRM);
omask = sigblock(0);
omask &= ~mask;
diff --git a/usr.sbin/xntpd/xntpd/ntp_leap.c b/usr.sbin/xntpd/xntpd/ntp_leap.c
index 6473362..5e7eca7 100644
--- a/usr.sbin/xntpd/xntpd/ntp_leap.c
+++ b/usr.sbin/xntpd/xntpd/ntp_leap.c
@@ -140,7 +140,7 @@ leap_process()
bits = leap_indicator;
else if (leapbits != 0)
bits = leapbits;
-
+
if (bits != 0 && !pll_control) {
l_fp tmp;
@@ -259,7 +259,7 @@ leap_setleap(indicator, warning)
if (indicator != ~0)
if (leapnext > DAYBEFORE)
i = 1;
-
+
if (i) {
syslog(LOG_ERR,
"attempt to set leap bits at unlikely time of month");
diff --git a/usr.sbin/xntpd/xntpd/ntp_loopfilter.c b/usr.sbin/xntpd/xntpd/ntp_loopfilter.c
index 6fcf0a0..69939ec 100644
--- a/usr.sbin/xntpd/xntpd/ntp_loopfilter.c
+++ b/usr.sbin/xntpd/xntpd/ntp_loopfilter.c
@@ -76,7 +76,7 @@
* run time using xntpdc. If true, the kernel modifications are active
* as described above; if false, the kernel is bypassed entirely (except
* for the PPS frequency update, if enabled) and the daemon PLL used
- * instead.
+ * instead.
*/
#define RSH_DRIFT_TO_FRAC (CLOCK_DSCALE - 16)
#define RSH_DRIFT_TO_ADJ (RSH_DRIFT_TO_FRAC - CLOCK_ADJ)
@@ -389,7 +389,7 @@ local_clock(fp_offset, peer)
* by the time constant, which is adjusted in response to the
* phase error and dispersion. Note the frequency is not changed
* if the local clock driver is in control.
- */
+ */
} else if (interval < allan) {
int time_constant = min(peer->ppoll, sys_poll) -
NTP_MINPOLL;
@@ -507,7 +507,7 @@ local_clock(fp_offset, peer)
#endif /* DEBUG */
(void) record_loop_stats(fp_offset, drift_comp, sys_poll);
-
+
/*
* Whew. I've had enough.
*/
diff --git a/usr.sbin/xntpd/xntpd/ntp_monitor.c b/usr.sbin/xntpd/xntpd/ntp_monitor.c
index 55bd5d5..e6a1c4f 100644
--- a/usr.sbin/xntpd/xntpd/ntp_monitor.c
+++ b/usr.sbin/xntpd/xntpd/ntp_monitor.c
@@ -127,7 +127,7 @@ mon_start(mode)
}
if (mode == MON_OFF)
return; /* Ooops.. */
-
+
if (!mon_have_memory) {
mon_total_mem = 0;
mon_mem_increments = 0;
@@ -164,7 +164,7 @@ mon_stop(mode)
mon_enabled &= ~mode;
if (mon_enabled != MON_OFF)
return;
-
+
/*
* Put everything back on the free list
*/
@@ -210,7 +210,7 @@ monitor(rbufp)
md = mon_hash[hash];
while (md != NULL) {
- if (md->rmtadr == netnum &&
+ if (md->rmtadr == netnum &&
/* ?? md->interface == rbufp->dstadr && ?? */
md->mode == (u_char)mode) {
md->lasttime = current_time;
@@ -254,7 +254,7 @@ monitor(rbufp)
*/
md->fifo_prev->fifo_next = md->fifo_next;
md->fifo_next->fifo_prev = md->fifo_prev;
-
+
} else {
if (mon_free == NULL) /* if free list empty */
mon_getmoremem(); /* then get more */
diff --git a/usr.sbin/xntpd/xntpd/ntp_peer.c b/usr.sbin/xntpd/xntpd/ntp_peer.c
index 389cc2c..f777734 100644
--- a/usr.sbin/xntpd/xntpd/ntp_peer.c
+++ b/usr.sbin/xntpd/xntpd/ntp_peer.c
@@ -176,7 +176,7 @@ findexistingpeer(addr, start_peer)
peer = peer_hash[HASH_ADDR(addr)];
else
peer = start_peer->next;
-
+
while (peer != 0) {
if (NSRCADR(addr) == NSRCADR(&peer->srcadr)
&& NSRCPORT(addr) == NSRCPORT(&peer->srcadr))
@@ -233,8 +233,8 @@ findpeer(srcadr, dstadr, fd)
ntoa(srcadr));
}
- /*
- * Multicast hacks to determine peer when a
+ /*
+ * Multicast hacks to determine peer when a
* packet arrives and there exists an assoc.
* with src in client/server mode
*/
@@ -316,7 +316,7 @@ unpeer(peer_to_remove)
peer = peer_hash[hash];
while (peer != 0 && peer->next != peer_to_remove)
peer = peer->next;
-
+
if (peer == 0) {
peer_hash_count[hash]++;
syslog(LOG_ERR, "peer struct for %s not in table!",
@@ -339,7 +339,7 @@ unpeer(peer_to_remove)
peer = assoc_hash[hash];
while (peer != 0 && peer->ass_next != peer_to_remove)
peer = peer->ass_next;
-
+
if (peer == 0) {
assoc_hash_count[hash]++;
syslog(LOG_ERR,
@@ -453,7 +453,7 @@ newpeer(srcadr, dstadr, hmode, version, minpoll, maxpoll, ttl, key)
*/
extern s_fp sys_bdelay;
extern long sys_clock;
-
+
if (peer_free_count == 0)
getmorepeermem();
diff --git a/usr.sbin/xntpd/xntpd/ntp_proto.c b/usr.sbin/xntpd/xntpd/ntp_proto.c
index 7889d93..fb81206 100644
--- a/usr.sbin/xntpd/xntpd/ntp_proto.c
+++ b/usr.sbin/xntpd/xntpd/ntp_proto.c
@@ -626,7 +626,7 @@ receive(rbufp)
if (!(peer->reach && peer->keyid != hiskeyid)) {
peer->keyid = hiskeyid;
peer->flags |= FLAG_AUTHENABLE;
- }
+ }
} else {
peer->keyid = 0;
peer->flags &= ~FLAG_AUTHENABLE;
@@ -659,7 +659,7 @@ receive(rbufp)
trustable = 0;
else
trustable = 1;
-
+
if (sys_authenticate && trustable) {
if (!(peer->flags & FLAG_CONFIG) ||
(peer->flags & FLAG_AUTHENABLE)) {
@@ -733,7 +733,7 @@ receive(rbufp)
}
break;
-
+
case MODE_BCLIENT:
/*
* Broadcast client pseudo-mode. We accept both server
@@ -771,10 +771,10 @@ receive(rbufp)
*/
unpeer(peer);
break;
-
+
case MODE_PASSIVE:
break;
-
+
case MODE_SERVER:
case MODE_BROADCAST:
process_packet(peer, pkt, &rbufp->recv_time,
@@ -871,7 +871,7 @@ process_packet(peer, pkt, recv_ts, has_mac, trustable)
}
peer->org = p_xmt; /* reuse byte-swapped pkt->xmt */
peer->ppoll = pkt->ppoll;
-
+
/*
* Call poll_update(). This will either start us, if the
* association is new, or drop the polling interval if the
@@ -1131,7 +1131,7 @@ clock_update(peer)
sys_leap = leap_consensus & leap_mask;
L_CLR(&sys_refskew);
break;
-
+
case 1:
/*
@@ -1363,11 +1363,11 @@ clock_filter(peer, sample_offset, sample_delay, sample_error)
}
}
skewmax += (1 << peer->hpoll);
- }
+ }
peer->filter_nextpt++;
if (peer->filter_nextpt >= NTP_SHIFT)
peer->filter_nextpt = 0;
-
+
/*
* We compute the dispersion as per the spec. Note that, to make
* things simple, both the l_fp and s_fp offsets are retained
@@ -1738,7 +1738,7 @@ clock_select()
}
nlist--;
}
-
+
#ifdef DEBUG
if (debug > 1) {
for (i = 0; i < nlist; i++)
@@ -1847,7 +1847,7 @@ clock_select()
*
* Note: this routine uses only those peers at the lowest stratum.
* Strictly speaking, this is at variance with the spec.
- */
+ */
void
clock_combine(peers, npeers)
struct peer **peers;
@@ -2060,7 +2060,7 @@ fast_xmit(rbufp, rmode, authentic)
* In order to guard against spurious values, which could occur if we
* happen to hit a fat interrupt, we do this for MINLOOPS times and
* keep the minimum value obtained.
- */
+ */
int default_get_precision()
{
struct timeval tp;
@@ -2206,14 +2206,14 @@ proto_config(item, value)
sys_bclient = 1;
io_multicast_del(value);
break;
-
+
case PROTO_PRECISION:
/*
* Set system precision
*/
sys_precision = (s_char)value;
break;
-
+
case PROTO_BROADDELAY:
/*
* Set default broadcast delay (s_fp)
@@ -2223,7 +2223,7 @@ proto_config(item, value)
else
sys_bdelay = value >> 16;
break;
-
+
case PROTO_AUTHENTICATE:
/*
* Specify the use of authenticated data
diff --git a/usr.sbin/xntpd/xntpd/ntp_refclock.c b/usr.sbin/xntpd/xntpd/ntp_refclock.c
index b0248fb..41aec27 100644
--- a/usr.sbin/xntpd/xntpd/ntp_refclock.c
+++ b/usr.sbin/xntpd/xntpd/ntp_refclock.c
@@ -907,9 +907,9 @@ refclock_ioctl(fd, flags)
#ifdef CLK
/*
- * The CLK option provides timestamping at the driver level.
+ * The CLK option provides timestamping at the driver level.
* It requires the tty_clk streams module and System V STREAMS
- * support.
+ * support.
*/
if (flags & (LDISC_CLK | LDISC_CLKPPS | LDISC_ACTS)) {
if (ioctl(fd, I_PUSH, "clk") < 0)
@@ -1174,15 +1174,15 @@ refclock_control(srcadr, in, out)
}
if (in->haveflags & CLK_HAVEFLAG2) {
pp->sloppyclockflag &= ~CLK_FLAG2;
- pp->sloppyclockflag |= in->flags & CLK_FLAG2;
+ pp->sloppyclockflag |= in->flags & CLK_FLAG2;
}
if (in->haveflags & CLK_HAVEFLAG3) {
pp->sloppyclockflag &= ~CLK_FLAG3;
- pp->sloppyclockflag |= in->flags & CLK_FLAG3;
+ pp->sloppyclockflag |= in->flags & CLK_FLAG3;
}
if (in->haveflags & CLK_HAVEFLAG4) {
pp->sloppyclockflag &= ~CLK_FLAG4;
- pp->sloppyclockflag |= in->flags & CLK_FLAG4;
+ pp->sloppyclockflag |= in->flags & CLK_FLAG4;
}
if (in->flags & CLK_FLAG3)
(void)refclock_ioctl(pp->io.fd, LDISC_PPS);
diff --git a/usr.sbin/xntpd/xntpd/ntp_request.c b/usr.sbin/xntpd/xntpd/ntp_request.c
index d06fd13..9f58d22 100644
--- a/usr.sbin/xntpd/xntpd/ntp_request.c
+++ b/usr.sbin/xntpd/xntpd/ntp_request.c
@@ -505,7 +505,7 @@ process_private(rbufp, mod_okay)
*/
if (proc->needs_auth) {
l_fp ftmp;
-
+
/*
* If this guy is restricted from doing this, don't let him
* If wrong key was used, or packet doesn't have mac, return.
@@ -548,7 +548,7 @@ process_private(rbufp, mod_okay)
L_SUB(&ftmp, &rbufp->recv_time);
if (L_ISNEG(&ftmp))
L_NEG(&ftmp);
-
+
if (ftmp.l_ui >= INFO_TS_MAXSKEW_UI) {
/*
* He's a loser. Tell him.
@@ -922,7 +922,7 @@ sys_info(srcadr, inter, inpkt)
HTONL_FP(&sys_reftime, &is->reftime);
is->poll = sys_poll;
-
+
is->flags = 0;
if (sys_bclient)
is->flags |= INFO_FLAG_BCLIENT;
@@ -1853,7 +1853,7 @@ get_auth_info(srcadr, inter, inpkt)
ia->decryptions = htonl(authdecryptions);
ia->keyuncached = htonl(authkeyuncached);
ia->timereset = htonl(current_time - auth_timereset);
-
+
(void) more_pkt();
flush_pkt();
}
@@ -2233,7 +2233,7 @@ get_kernel_info(srcadr, inter, inpkt)
ik->calcnt = htonl(ntx.calcnt);
ik->errcnt = htonl(ntx.errcnt);
ik->stbcnt = htonl(ntx.stbcnt);
-
+
(void) more_pkt();
flush_pkt();
}
diff --git a/usr.sbin/xntpd/xntpd/ntp_restrict.c b/usr.sbin/xntpd/xntpd/ntp_restrict.c
index 0cc4b7d..174d07e 100644
--- a/usr.sbin/xntpd/xntpd/ntp_restrict.c
+++ b/usr.sbin/xntpd/xntpd/ntp_restrict.c
@@ -182,7 +182,7 @@ restrictions(srcadr)
res_not_found++;
else
res_found++;
-
+
/*
* The following implements limiting the number of clients
* accepted from a given network. The notion of "same network"
@@ -194,7 +194,7 @@ restrictions(srcadr)
* - take the list of clients recorded
* from the given "network" seen within the last
* client_limit_period seconds
- * - if there are at most client_limit entries:
+ * - if there are at most client_limit entries:
* --> access allowed
* - otherwise sort by time first seen
* - current client among the first client_limit seen
@@ -226,7 +226,7 @@ restrictions(srcadr)
* How nice, MRU list provides our current client as the
* first entry in the list.
* Monitoring was verified to be active above, thus we
- * know an entry for our client must exist, or some
+ * know an entry for our client must exist, or some
* brain dead set the memory limit for mon entries to ZERO!!!
*/
this_client = mon_mru_list.mru_next;
@@ -410,7 +410,7 @@ restrict(op, resaddr, resmask, mflags, flags)
}
rl->flags |= (u_short)flags;
break;
-
+
case RESTRICT_UNFLAG:
/*
* Remove some bits from the flags. If we didn't
@@ -425,7 +425,7 @@ restrict(op, resaddr, resmask, mflags, flags)
rl->flags &= (u_short)~flags;
}
break;
-
+
case RESTRICT_REMOVE:
/*
* Remove an entry from the table entirely if we found one.
diff --git a/usr.sbin/xntpd/xntpd/ntp_unixclock.c b/usr.sbin/xntpd/xntpd/ntp_unixclock.c
index 8123c4f..bc771b6 100644
--- a/usr.sbin/xntpd/xntpd/ntp_unixclock.c
+++ b/usr.sbin/xntpd/xntpd/ntp_unixclock.c
@@ -341,7 +341,7 @@ clock_parms(tickadj, tick)
#define K_TICKADJ 0
#define K_TICK 1
- /*
+ /*
* Check to see what to use for the object file for names and get
* the locations of the necessary kernel variables.
*/
@@ -413,7 +413,7 @@ clock_parms(tickadj, tick)
/*
* clock_parms for Solaris 2.2 and later, with high-res timer kernel code.
* The clock code changed in Solaris 2.2, and tickadj went away.
- * The good news is that ADJTIME_IS_ACCURATE and tick is available through
+ * The good news is that ADJTIME_IS_ACCURATE and tick is available through
* sysconf().
*/
static void
@@ -425,10 +425,10 @@ clock_parms(tickadj, tick)
hz = (int) sysconf (_SC_CLK_TCK);
*tick = 1000000L/hz;
- *tickadj = (*tick/16); /* There is no tickadj, and it is only set here
+ *tickadj = (*tick/16); /* There is no tickadj, and it is only set here
for tvu_maxslew calculation above. Really,
clock_parms should return adj_precision
- and tvu_maxslew, instead of the very
+ and tvu_maxslew, instead of the very
BSD-centric tickadj */
#ifdef DEBUG
diff --git a/usr.sbin/xntpd/xntpd/ntp_util.c b/usr.sbin/xntpd/xntpd/ntp_util.c
index 540be62..e449276 100644
--- a/usr.sbin/xntpd/xntpd/ntp_util.c
+++ b/usr.sbin/xntpd/xntpd/ntp_util.c
@@ -61,7 +61,7 @@ extern int errno;
/*
* This controls whether stats are written to the fileset. Provided
- * so that xntpdc can turn off stats when the file system fills up.
+ * so that xntpdc can turn off stats when the file system fills up.
*/
int stats_control;
@@ -90,7 +90,7 @@ init_util()
peerstats.type = FILEGEN_DAY;
peerstats.flag = FGEN_FLAG_LINK; /* not yet enabled !!*/
filegen_register("peerstats", &peerstats);
-
+
loopstats.fp = NULL;
loopstats.prefix = &statsdir[0];
loopstats.basename = emalloc(strlen(LOOPNAME)+1);
@@ -173,7 +173,7 @@ hourly_stats()
syslog(LOG_INFO, "offset %s freq %s poll %d",
lfptoa(&last_offset, 6), fptoa(drift_comp, 3),
sys_poll);
-
+
if (stats_drift_file != 0) {
if ((fp = fopen(stats_temp_file, "w")) == NULL) {
syslog(LOG_ERR, "can't open %s: %m",
@@ -249,7 +249,7 @@ stats_config(item, value)
}
loop_config(LOOP_DRIFTCOMP, &old_drift, temp);
break;
-
+
case STATS_STATSDIR:
if (strlen(value) >= sizeof(statsdir)) {
syslog(LOG_ERR,
@@ -413,7 +413,7 @@ getauthkeys(keyfile)
len = strlen(keyfile);
if (len == 0)
return;
-
+
if (key_file_name != 0) {
if (len > (int)strlen(key_file_name)) {
(void) free(key_file_name);
@@ -423,7 +423,7 @@ getauthkeys(keyfile)
if (key_file_name == 0)
key_file_name = emalloc((u_int)(len + 1));
-
+
memmove(key_file_name, keyfile, len+1);
authreadkeys(key_file_name);
diff --git a/usr.sbin/xntpd/xntpd/refclock_acts.c b/usr.sbin/xntpd/xntpd/refclock_acts.c
index af3cabf..39ff433 100644
--- a/usr.sbin/xntpd/xntpd/refclock_acts.c
+++ b/usr.sbin/xntpd/xntpd/refclock_acts.c
@@ -189,7 +189,7 @@
* are consistent before switching from "*" to "#". If the user has a
* 1200 Baud modem with the same internal delay as that used by NIST,
* then the "#" OTM should arrive at the user within +-2 ms of the
- * correct time.
+ * correct time.
*
* However, NIST has studied different brands of 1200 Baud modems and
* found internal delays from 24 ms to 40 ms and offsets of the "#" OTM
@@ -198,7 +198,7 @@
* with granularity of 20 to 50 ms. In any case, the repeatability of
* the offset for the "#" OTM should be within +-2 ms, if the dial-up
* path is reciprocal and the user doesn't change the brand or model of
- * modem used.
+ * modem used.
*
* This should be true even if the dial-up path on one day is a land-
* line of less than 40 ms (one way) and on the next day is a satellite
@@ -767,7 +767,7 @@ acts_timeout(peer)
default:
syslog(LOG_NOTICE,
"clock %s ACTS invalid mode", ntoa(&peer->srcadr));
-
+
}
/*
diff --git a/usr.sbin/xntpd/xntpd/refclock_as2201.c b/usr.sbin/xntpd/xntpd/refclock_as2201.c
index 6c60fd0..afacb6f 100644
--- a/usr.sbin/xntpd/xntpd/refclock_as2201.c
+++ b/usr.sbin/xntpd/xntpd/refclock_as2201.c
@@ -56,7 +56,7 @@
* available using a gadget box and 1-pps signal from the receiver. This
* improves the accuracy to the order of a few tens of microseconds. In
* addition, the serial output and 1-pps signal can be bussed to
- * additional receivers.
+ * additional receivers.
*/
/*
diff --git a/usr.sbin/xntpd/xntpd/refclock_atom.c b/usr.sbin/xntpd/xntpd/refclock_atom.c
index 71fe05d..8df49d2 100644
--- a/usr.sbin/xntpd/xntpd/refclock_atom.c
+++ b/usr.sbin/xntpd/xntpd/refclock_atom.c
@@ -53,7 +53,7 @@
* pulse generator in the gadget box is adjusted to produce a start bit
* of length 26 usec at 38400 bps. Used with the LDISC_CLKPPS line
* discipline, this produces an ASCII DEL character ('\377') followed by
- * a timestamp at each seconds epoch.
+ * a timestamp at each seconds epoch.
*
* The third way involves an auxiliary radio clock driver which calls
* the PPS driver with a timestamp captured by that driver. This use is
@@ -297,7 +297,7 @@ atom_pps(peer)
* extend the fraction and stash in the buffer. No harm is done
* if previous data are overwritten. If the discipline comes bum
* or the data grow stale, just forget it.
- */
+ */
i = up->ev.serial;
if (ioctl(fdpps, CIOGETEV, (caddr_t)&up->ev) < 0)
return;
diff --git a/usr.sbin/xntpd/xntpd/refclock_chu.c b/usr.sbin/xntpd/xntpd/refclock_chu.c
index 2488da6..7b710fc 100644
--- a/usr.sbin/xntpd/xntpd/refclock_chu.c
+++ b/usr.sbin/xntpd/xntpd/refclock_chu.c
@@ -525,13 +525,13 @@ chu_receive(rbufp)
* interrupt latency). We then take the mean of the
* remaining 4 offsets as our estimate.
*/
-
+
/*
* Set up the order array.
*/
for (i = 0; i < NCHUCHARS; i++)
ord[i] = (u_short)i;
-
+
/*
* Sort them into order. Reuse variables with abandon.
*/
@@ -554,7 +554,7 @@ chu_receive(rbufp)
tmp = off[ord[4]].l_uf;
for (i = 5; i <= 7; i++)
M_ADD(date_ui, tmp, off[ord[i]].l_ui, off[ord[i]].l_uf);
-
+
/*
* Round properly, then right shift two bits for the
* divide by four.
@@ -595,7 +595,7 @@ chu_receive(rbufp)
if (date_ui < 9 || date_ui > 0xfffffff7) {
register u_long prod_ui;
register u_long prod_uf;
-
+
prod_ui = prod_uf = 0;
/*
* This code knows the low order bit in 0.1 is zero
@@ -647,7 +647,7 @@ chu_receive(rbufp)
tmp = prod_ui;
}
}
-
+
/*
* At this point we have the mean offset, with the integral
* part in date_ui and the fractional part in tmp. Store
@@ -768,7 +768,7 @@ chu_process(up)
refclock_receive(peer, &up->offsets[imax], 0,
dispersion, &up->rectimes[imax], &up->rectimes[imax],
pp->leap);
-
+
/*
* Zero out unit for next code series
*/
diff --git a/usr.sbin/xntpd/xntpd/refclock_datum.c b/usr.sbin/xntpd/xntpd/refclock_datum.c
index 825dee7..00449c0 100644
--- a/usr.sbin/xntpd/xntpd/refclock_datum.c
+++ b/usr.sbin/xntpd/xntpd/refclock_datum.c
@@ -162,7 +162,7 @@ struct datum_pts_unit {
int usec; /* miliseconds */
u_char leap; /* funny leap character code */
char retbuf[8]; /* returned time from the datum pts */
- char nbytes; /* number of bytes received from datum pts */
+ char nbytes; /* number of bytes received from datum pts */
double sigma2; /* average squared error (roughly) */
int tzoff; /* time zone offest from GMT */
};
@@ -652,7 +652,7 @@ static void datum_pts_receive(rbufp)
datum_pts->second = 10*((datum_pts->retbuf[4] & 0x70)>>4) +
(datum_pts->retbuf[4] & 0x0f);
- datum_pts->msec = 100*((datum_pts->retbuf[5] & 0xf0) >> 4) +
+ datum_pts->msec = 100*((datum_pts->retbuf[5] & 0xf0) >> 4) +
10*(datum_pts->retbuf[5] & 0x0f) +
((datum_pts->retbuf[6] & 0xf0)>>4);
diff --git a/usr.sbin/xntpd/xntpd/refclock_gpstm.c b/usr.sbin/xntpd/xntpd/refclock_gpstm.c
index 71eb015..9dfc87c 100644
--- a/usr.sbin/xntpd/xntpd/refclock_gpstm.c
+++ b/usr.sbin/xntpd/xntpd/refclock_gpstm.c
@@ -279,7 +279,7 @@ gpstm_start(unit, peer)
/*
* POSIX serial line parameters (termios interface)
*
- * The GPSTMCLK option provides timestamping at the driver level.
+ * The GPSTMCLK option provides timestamping at the driver level.
* It requires the tty_clk streams module.
*
* The GPSTMPPS option provides timestamping at the driver level.
@@ -333,7 +333,7 @@ gpstm_start(unit, peer)
/*
* 4.3bsd serial line parameters (sgttyb interface)
*
- * The GPSTMCLK option provides timestamping at the driver level.
+ * The GPSTMCLK option provides timestamping at the driver level.
* It requires the tty_clk line discipline and 4.3bsd or later.
*/
{ struct sgttyb ttyb;
@@ -513,7 +513,7 @@ gpstm_receive(rbufp)
dpend = dpt + rbufp->recv_length;
cp = gpstm->lastcode;
while (dpt < dpend) {
- if ((*cp = 0x7f & *dpt++) >= ' ') cp++;
+ if ((*cp = 0x7f & *dpt++) >= ' ') cp++;
#ifdef GPSTMCLK
else if (*cp == '\r') {
if (dpend - dpt < 8) {
@@ -618,7 +618,7 @@ gpstm_receive(rbufp)
}
/*
- * Convert format 0 and check values
+ * Convert format 0 and check values
*/
gpstm->year = 0; /* fake */
gpstm->day = cp[0] - '0';
diff --git a/usr.sbin/xntpd/xntpd/refclock_heath.c b/usr.sbin/xntpd/xntpd/refclock_heath.c
index 1fbb9b7..a1b602c 100644
--- a/usr.sbin/xntpd/xntpd/refclock_heath.c
+++ b/usr.sbin/xntpd/xntpd/refclock_heath.c
@@ -24,7 +24,7 @@
* sunset without warning. Since the indicated precision is 100 ms,
* expect a host synchronized only to this thing to wander to and fro,
* occasionally being rudely stepped when the offset exceeds the default
- * CLOCK_MAX of 128 ms.
+ * CLOCK_MAX of 128 ms.
*
* The internal DIPswitches should be set to operate at 1200 baud in
* MANUAL mode and the current year. The external DIPswitches should be
diff --git a/usr.sbin/xntpd/xntpd/refclock_leitch.c b/usr.sbin/xntpd/xntpd/refclock_leitch.c
index 753ad76..b6b002f 100644
--- a/usr.sbin/xntpd/xntpd/refclock_leitch.c
+++ b/usr.sbin/xntpd/xntpd/refclock_leitch.c
@@ -57,7 +57,7 @@
#define LEITCHREFID "ATOM" /* reference id */
#define LEITCH_DESCRIPTION "Leitch: CSD 5300 Master Clock System Driver"
#define LEITCH232 "/dev/leitch%d" /* name of radio device */
-#define SPEED232 B300 /* uart speed (300 baud) */
+#define SPEED232 B300 /* uart speed (300 baud) */
#define leitch_send(A,M) \
if (debug) fprintf(stderr,"write leitch %s\n",M); \
if ((write(A->leitchio.fd,M,sizeof(M)) < 0)) {\
@@ -65,7 +65,7 @@
fprintf(stderr, "leitch_send: unit %d send failed\n", A->unit); \
else \
syslog(LOG_ERR, "leitch_send: unit %d send failed %m",A->unit);}
-
+
#define STATE_IDLE 0
#define STATE_DATE 1
#define STATE_TIME1 2
@@ -305,7 +305,7 @@ leitch_start(unit, peer)
/*
* POSIX serial line parameters (termios interface)
*
- * The LEITCHCLK option provides timestamping at the driver level.
+ * The LEITCHCLK option provides timestamping at the driver level.
* It requires the tty_clk streams module.
*
* The LEITCHPPS option provides timestamping at the driver level.
@@ -359,7 +359,7 @@ leitch_start(unit, peer)
/*
* 4.3bsd serial line parameters (sgttyb interface)
*
- * The LEITCHCLK option provides timestamping at the driver level.
+ * The LEITCHCLK option provides timestamping at the driver level.
* It requires the tty_clk line discipline and 4.3bsd or later.
*/
{ struct sgttyb ttyb;
@@ -444,7 +444,7 @@ leitch_receive(rbufp)
#ifdef DEBUG
if (debug)
- fprintf(stderr, "leitch_recieve(%*.*s)\n",
+ fprintf(stderr, "leitch_recieve(%*.*s)\n",
rbufp->recv_length, rbufp->recv_length,
rbufp->recv_buffer);
#endif
@@ -620,7 +620,7 @@ leitch_timeout(fp)
default:
break;
}
-
+
leitch->leitchtimer.event_time += 30;
TIMER_ENQUEUE(timerqueue, &leitch->leitchtimer);
}
@@ -639,7 +639,7 @@ int year;
} else {
if (year % 100) { /* is a leap year */
return (366);
- } else {
+ } else {
if (year % 400) {
return (365);
} else {
@@ -679,7 +679,7 @@ leitch_get_date(rbufp,leitch)
while ( i < (leitch->month-1) )
leitch->yearday += days_in_month[i++];
- if ((dysize((leitch->year>90?1900:2000)+leitch->year)==365) &&
+ if ((dysize((leitch->year>90?1900:2000)+leitch->year)==365) &&
leitch->month > 2)
leitch->yearday--;
diff --git a/usr.sbin/xntpd/xntpd/refclock_mx4200.c b/usr.sbin/xntpd/xntpd/refclock_mx4200.c
index 2cfee52..577193d 100644
--- a/usr.sbin/xntpd/xntpd/refclock_mx4200.c
+++ b/usr.sbin/xntpd/xntpd/refclock_mx4200.c
@@ -375,7 +375,7 @@ mx4200_start(unit, peer)
/*
* POSIX serial line parameters (termios interface)
*
- * The MX4200CLK option provides timestamping at the driver level.
+ * The MX4200CLK option provides timestamping at the driver level.
* It requires the tty_clk streams module.
*
* The MX4200PPS option provides timestamping at the driver level.
@@ -429,7 +429,7 @@ mx4200_start(unit, peer)
/*
* 4.3bsd serial line parameters (sgttyb interface)
*
- * The MX4200CLK option provides timestamping at the driver level.
+ * The MX4200CLK option provides timestamping at the driver level.
* It requires the tty_clk line discipline and 4.3bsd or later.
*/
{ struct sgttyb ttyb;
diff --git a/usr.sbin/xntpd/xntpd/refclock_nmea.c b/usr.sbin/xntpd/xntpd/refclock_nmea.c
index 3058956..f8ae4bc 100644
--- a/usr.sbin/xntpd/xntpd/refclock_nmea.c
+++ b/usr.sbin/xntpd/xntpd/refclock_nmea.c
@@ -237,7 +237,7 @@ nmea_receive(rbufp)
!isdigit(dp[2]) ||
!isdigit(dp[3]) ||
!isdigit(dp[4]) ||
- !isdigit(dp[5])
+ !isdigit(dp[5])
) {
refclock_report(peer, CEVNT_BADREPLY);
return;
@@ -290,7 +290,7 @@ nmea_receive(rbufp)
pp->hour = ((dp[0] - '0') * 10) + dp[1] - '0';
pp->minute = ((dp[2] - '0') * 10) + dp[3] - '0';
pp->second = ((dp[4] - '0') * 10) + dp[5] - '0';
- pp->msec = 0;
+ pp->msec = 0;
if (pp->hour > 23 || pp->minute > 59 || pp->second > 59) {
refclock_report(peer, CEVNT_BADTIME);
diff --git a/usr.sbin/xntpd/xntpd/refclock_omega.c b/usr.sbin/xntpd/xntpd/refclock_omega.c
index 3d4e4b9..1dc31ff 100644
--- a/usr.sbin/xntpd/xntpd/refclock_omega.c
+++ b/usr.sbin/xntpd/xntpd/refclock_omega.c
@@ -9,7 +9,7 @@
* Tarted up the sample filtering mechanism to give improved
* one-off measurements. Improved measurement dispersion code
* to account for accumulated drift when the clock loses lock.
- *
+ *
*/
#if defined(REFCLOCK) && (defined(OMEGA) || defined(OMEGACLK) || defined(OMEGAPPS))
@@ -305,7 +305,7 @@ omega_start(unit, peer)
/*
* POSIX serial line parameters (termios interface)
*
- * The OMEGACLK option provides timestamping at the driver level.
+ * The OMEGACLK option provides timestamping at the driver level.
* It requires the tty_clk streams module.
*
* The OMEGAPPS option provides timestamping at the driver level.
@@ -359,7 +359,7 @@ omega_start(unit, peer)
/*
* 4.3bsd serial line parameters (sgttyb interface)
*
- * The OMEGACLK option provides timestamping at the driver level.
+ * The OMEGACLK option provides timestamping at the driver level.
* It requires the tty_clk line discipline and 4.3bsd or later.
*/
{ struct sgttyb ttyb;
diff --git a/usr.sbin/xntpd/xntpd/refclock_parse.c b/usr.sbin/xntpd/xntpd/refclock_parse.c
index 089e2c3..b8ef21e 100644
--- a/usr.sbin/xntpd/xntpd/refclock_parse.c
+++ b/usr.sbin/xntpd/xntpd/refclock_parse.c
@@ -803,7 +803,7 @@ static int stream_timecode P((struct parseunit *, parsectl_t *));
static void stream_receive P((struct recvbuf *));
static void stream_poll P((struct parseunit *));
#endif
-
+
static int local_init P((struct parseunit *));
static void local_end P((struct parseunit *));
static int local_nop P((struct parseunit *));
@@ -945,7 +945,7 @@ stream_setcs(parse, tcl)
parsectl_t *tcl;
{
struct strioctl strioc;
-
+
strioc.ic_cmd = PARSEIOC_SETCS;
strioc.ic_timout = 0;
strioc.ic_dp = (char *)tcl;
@@ -976,7 +976,7 @@ stream_enable(parse)
struct parseunit *parse;
{
struct strioctl strioc;
-
+
strioc.ic_cmd = PARSEIOC_ENABLE;
strioc.ic_timout = 0;
strioc.ic_dp = (char *)0;
@@ -998,7 +998,7 @@ stream_disable(parse)
struct parseunit *parse;
{
struct strioctl strioc;
-
+
strioc.ic_cmd = PARSEIOC_DISABLE;
strioc.ic_timout = 0;
strioc.ic_dp = (char *)0;
@@ -1021,7 +1021,7 @@ stream_getfmt(parse, tcl)
parsectl_t *tcl;
{
struct strioctl strioc;
-
+
strioc.ic_cmd = PARSEIOC_GETFMT;
strioc.ic_timout = 0;
strioc.ic_dp = (char *)tcl;
@@ -1043,7 +1043,7 @@ stream_setfmt(parse, tcl)
parsectl_t *tcl;
{
struct strioctl strioc;
-
+
strioc.ic_cmd = PARSEIOC_SETFMT;
strioc.ic_timout = 0;
strioc.ic_dp = (char *)tcl;
@@ -1066,12 +1066,12 @@ stream_getstat(parse, tcl)
parsectl_t *tcl;
{
struct strioctl strioc;
-
+
strioc.ic_cmd = PARSEIOC_GETSTAT;
strioc.ic_timout = 0;
strioc.ic_dp = (char *)tcl;
strioc.ic_len = sizeof (*tcl);
-
+
if (ioctl(parse->fd, I_STR, (caddr_t)&strioc) == -1)
{
syslog(LOG_ERR, "PARSE receiver #%d: stream_getstat: ioctl(fd, I_STR, PARSEIOC_GETSTAT): %m", CL_UNIT(parse->unit));
@@ -1089,12 +1089,12 @@ stream_setstat(parse, tcl)
parsectl_t *tcl;
{
struct strioctl strioc;
-
+
strioc.ic_cmd = PARSEIOC_SETSTAT;
strioc.ic_timout = 0;
strioc.ic_dp = (char *)tcl;
strioc.ic_len = sizeof (*tcl);
-
+
if (ioctl(parse->fd, I_STR, (caddr_t)&strioc) == -1)
{
syslog(LOG_ERR, "PARSE receiver #%d: stream_setstat: ioctl(fd, I_STR, PARSEIOC_SETSTAT): %m", CL_UNIT(parse->unit));
@@ -1112,12 +1112,12 @@ stream_timecode(parse, tcl)
parsectl_t *tcl;
{
struct strioctl strioc;
-
+
strioc.ic_cmd = PARSEIOC_TIMECODE;
strioc.ic_timout = 0;
strioc.ic_dp = (char *)tcl;
strioc.ic_len = sizeof (*tcl);
-
+
if (ioctl(parse->fd, I_STR, (caddr_t)&strioc) == -1)
{
syslog(LOG_ERR, "PARSE receiver #%d: parse_process: ioctl(fd, I_STR, PARSEIOC_TIMECODE): %m", CL_UNIT(parse->unit), parse->fd);
@@ -1206,7 +1206,7 @@ stream_poll(parse)
* - read the second packet from the parse module (fresh)
* - compute values for xntp
*/
-
+
FD_ZERO(&fdmask);
fd = parse->fd;
FD_SET(fd, &fdmask);
@@ -1249,7 +1249,7 @@ stream_poll(parse)
{
selecttime.tv_usec = curtime.tv_usec - starttime.tv_usec;
}
-
+
if (timercmp(&selecttime, &timeout, >))
{
@@ -1273,7 +1273,7 @@ stream_poll(parse)
{
selecttime.tv_usec = timeout.tv_usec - selecttime.tv_usec;
}
-
+
FD_SET(fd, &fdmask);
continue;
}
@@ -1358,7 +1358,7 @@ stream_poll(parse)
{
selecttime.tv_usec = curtime.tv_usec - starttime.tv_usec;
}
-
+
if (timercmp(&selecttime, &timeout, >))
{
@@ -1382,7 +1382,7 @@ stream_poll(parse)
{
selecttime.tv_usec = timeout.tv_usec - selecttime.tv_usec;
}
-
+
FD_SET(fd, &fdmask);
continue;
}
@@ -1395,7 +1395,7 @@ stream_poll(parse)
{
syslog(LOG_WARNING, "PARSE receiver #%d: no data[new] from device", CL_UNIT(parse->unit));
}
-
+
/*
* we will return here iff we got a good old sample as this would
* be misinterpreted. bad samples are passed on to be logged into the
@@ -1663,7 +1663,7 @@ local_poll(parse)
{
selecttime.tv_usec = curtime.tv_usec - starttime.tv_usec;
}
-
+
if (!timercmp(&selecttime, &timeout, >))
{
@@ -1681,7 +1681,7 @@ local_poll(parse)
{
selecttime.tv_usec = timeout.tv_usec - selecttime.tv_usec;
}
-
+
FD_SET(fd, &fdmask);
continue;
}
@@ -1842,7 +1842,7 @@ parsestate(state, buffer)
strcpy(t, "; ");
t += 2;
}
-
+
strcpy(t, sflagstrings[i].name);
t += strlen(t);
}
@@ -2114,7 +2114,7 @@ parse_shutdown(unit)
register struct parseunit *parse;
unit = CL_UNIT(unit);
-
+
if (unit >= MAXUNITS) {
syslog(LOG_ERR,
"PARSE receiver #%d: parse_shutdown: INTERNAL ERROR, unit invalid (max %d)",
@@ -2123,7 +2123,7 @@ parse_shutdown(unit)
}
parse = parseunits[unit];
-
+
if (parse && !parse->peer) {
syslog(LOG_ERR,
"PARSE receiver #%d: parse_shutdown: INTERNAL ERROR, unit not in use", unit);
@@ -2136,7 +2136,7 @@ parse_shutdown(unit)
*/
parse_statistics(parse);
TIMER_DEQUEUE(&parse->stattimer);
-
+
#if PPSPPS
{
/*
@@ -2151,7 +2151,7 @@ parse_shutdown(unit)
{
parse->parse_type->cl_end(parse);
}
-
+
if (parse->binding)
PARSE_END(parse);
@@ -2301,9 +2301,9 @@ parse_start(sysunit, peer)
memmove((char *)&peer->refid, parse->parse_type->cl_id, 4);
else
peer->refid = htonl(PARSEHSREFID);
-
+
parse->fd = fd232;
-
+
parse->peer = peer; /* marks it also as busy */
parse->binding = init_iobinding(parse);
@@ -2313,7 +2313,7 @@ parse_start(sysunit, peer)
syslog(LOG_ERR, "PARSE receiver #%d: parse_start: io sub system initialisation failed.");
parse_shutdown(parse->unit); /* let our cleaning staff do the work */
return 0; /* well, ok - special initialisation broke */
- }
+ }
/*
* configure terminal line
@@ -2392,7 +2392,7 @@ parse_start(sysunit, peer)
parse_shutdown(parse->unit); /* let our cleaning staff do the work */
return 0; /* well, ok - special initialisation broke */
}
-
+
#ifdef FREEBSD_CONRAD
{
int i,j;
@@ -2401,13 +2401,13 @@ parse_start(sysunit, peer)
j = TIOCM_RTS;
i = ioctl(fd232, TIOCMBIC, &j);
if (i < 0) {
- syslog(LOG_ERR,
- "PARSE receiver #%d: lowrts_poll: failed to lower RTS: %m",
+ syslog(LOG_ERR,
+ "PARSE receiver #%d: lowrts_poll: failed to lower RTS: %m",
CL_UNIT(parse->unit));
}
}
#endif
-
+
strcpy(tmp_ctl.parseformat.parse_buffer, parse->parse_type->cl_format);
tmp_ctl.parseformat.parse_count = strlen(tmp_ctl.parseformat.parse_buffer);
@@ -2417,7 +2417,7 @@ parse_start(sysunit, peer)
parse_shutdown(parse->unit); /* let our cleaning staff do the work */
return 0; /* well, ok - special initialisation broke */
}
-
+
#ifdef TCFLSH
/*
* get rid of all IO accumulated so far
@@ -2440,7 +2440,7 @@ parse_start(sysunit, peer)
parse_shutdown(parse->unit); /* let our cleaning staff do the work */
return 0; /* well, ok - special initialisation broke */
}
-
+
/*
* try to do any special initializations
*/
@@ -2702,7 +2702,7 @@ parse_control(unit, in, out)
parse->peer->stratum = (u_char)(in->fudgeval1 & 0xf);
if (parse->peer->stratum <= 1)
memmove((char *)&parse->peer->refid,
- parse->parse_type->cl_id,
+ parse->parse_type->cl_id,
4);
else
parse->peer->refid = htonl(PARSEHSREFID);
@@ -2823,7 +2823,7 @@ parse_control(unit, in, out)
{
strcpy(tt, prettydate(&parse->time.parse_time.fp));
t = tt + strlen(tt);
-
+
sprintf(t, " (%c%02d%02d)\"", sign, utcoff / 60, utcoff % 60);
}
@@ -2853,9 +2853,9 @@ parse_control(unit, in, out)
parse->badformat += tmpctl.parsegettc.parse_badformat;
}
-
+
tmpctl.parseformat.parse_format = tmpctl.parsegettc.parse_format;
-
+
if (!PARSE_GETFMT(parse, &tmpctl))
{
syslog (LOG_ERR, "PARSE receiver #%d: parse_control: parse_getfmt() FAILED", unit);
@@ -2882,7 +2882,7 @@ parse_control(unit, in, out)
register unsigned LONG stime;
register unsigned LONG div = current_time - parse->timestarted;
register unsigned LONG percent;
-
+
percent = stime = PARSE_STATETIME(parse, i);
while (((unsigned LONG)(~0) / 10000) < percent)
@@ -2890,7 +2890,7 @@ parse_control(unit, in, out)
percent /= 10;
div /= 10;
}
-
+
if (div)
percent = (percent * 10000) / div;
else
@@ -3048,7 +3048,7 @@ parse_process(parse, parsetime)
if (parse->lastformat != parsetime->parse_format)
{
parsectl_t tmpctl;
-
+
tmpctl.parseformat.parse_format = parsetime->parse_format;
if (!PARSE_GETFMT(parse, &tmpctl))
@@ -3073,10 +3073,10 @@ parse_process(parse, parsetime)
/*
* something happend
*/
-
+
(void) parsestate(parsetime->parse_state, tmp1);
(void) parsestate(parse->time.parse_state, tmp2);
-
+
syslog(LOG_INFO,"PARSE receiver #%d: STATE CHANGE: %s -> %s",
CL_UNIT(parse->unit), tmp2, tmp1);
}
@@ -3189,14 +3189,14 @@ parse_process(parse, parsetime)
* off = PARSE-timestamp + propagation delay - kernel time stamp
*/
offset = parse->basedelay;
-
+
off = parsetime->parse_time.fp;
reftime = off;
L_ADD(&off, &offset);
rectime = off; /* this makes org time and xmt time somewhat artificial */
-
+
L_SUB(&off, &parsetime->parse_stime.fp);
if ((parse->flags & PARSE_STAT_FILTER) &&
@@ -3361,7 +3361,7 @@ parse_process(parse, parsetime)
leap = LEAP_NOWARNING;
}
}
-
+
refclock_receive(parse->peer, &off, 0, LFPTOFP(&dispersion), &reftime, &rectime, leap);
}
@@ -3430,9 +3430,9 @@ poll_init(parse)
{
parse->localdata = (void *)malloc(sizeof(poll_timer_t));
memset((char *)parse->localdata, 0, sizeof(poll_timer_t));
-
+
pt = (poll_timer_t *)parse->localdata;
-
+
pt->timer.peer = (struct peer *)parse; /* well, only we know what it is */
pt->timer.event_handler = poll_poll;
poll_poll(parse);
@@ -3489,7 +3489,7 @@ trimbletaip_init(parse)
else
{
tm.c_cc[VEOL] = TRIMBLETAIP_EOL;
-
+
if (TTY_SETATTR(parse->fd, &tm) == -1)
{
syslog(LOG_ERR, "PARSE receiver #%d: trimbletaip_init: tcsetattr(fd, &tm): %m", CL_UNIT(parse->unit));
@@ -3585,7 +3585,7 @@ union {
float fv;
double dv;
} uval;
-
+
struct txbuf
{
short idx; /* index to first unused byte */
@@ -3625,7 +3625,7 @@ sendetx(buf, parse)
}
}
-void
+void
sendint(buf, a)
struct txbuf *buf;
int a;
@@ -3658,7 +3658,7 @@ trimbletsip_init(parse)
struct txbuf buf;
buf.txt = buffer;
-
+
if (!poll_init(parse))
{
sendcmd(&buf, 0x1f); /* request software versions */
diff --git a/usr.sbin/xntpd/xntpd/refclock_pst.c b/usr.sbin/xntpd/xntpd/refclock_pst.c
index 29cbfb1..edc77f9 100644
--- a/usr.sbin/xntpd/xntpd/refclock_pst.c
+++ b/usr.sbin/xntpd/xntpd/refclock_pst.c
@@ -17,7 +17,7 @@
* Receivers. No specific claim of accuracy is made for these receiver,
* but actual experience suggests that 10 ms would be a conservative
* assumption.
- *
+ *
* The DIPswitches should be set for 9600 bps line speed, 24-hour day-
* of-year format and UTC time zone. Automatic correction for DST should
* be disabled. It is very important that the year be set correctly in
diff --git a/usr.sbin/xntpd/xntpd/refclock_tpro.c b/usr.sbin/xntpd/xntpd/refclock_tpro.c
index 388103c..d530fbf 100644
--- a/usr.sbin/xntpd/xntpd/refclock_tpro.c
+++ b/usr.sbin/xntpd/xntpd/refclock_tpro.c
@@ -18,7 +18,7 @@
* This driver supports the KSI/Odetecs TPRO-S IRIG-B reader and TPRO-
* SAT GPS receiver for the Sun Microsystems SBus. It requires that the
* tpro.o device driver be installed and loaded.
- */
+ */
/*
* TPRO interface definitions
diff --git a/usr.sbin/xntpd/xntpdc/ntpdc.c b/usr.sbin/xntpd/xntpdc/ntpdc.c
index 387540b..bb42a19 100644
--- a/usr.sbin/xntpd/xntpdc/ntpdc.c
+++ b/usr.sbin/xntpd/xntpdc/ntpdc.c
@@ -292,7 +292,7 @@ char *argv[];
for (ihost = 0; ihost < numhosts; ihost++) {
if (openhost(chosts[ihost]))
for (icmd = 0; icmd < numcmds; icmd++) {
- if (numhosts > 1)
+ if (numhosts > 1)
printf ("--- %s ---\n",chosts[ihost]);
docmd(ccmds[icmd]);
}
@@ -325,7 +325,7 @@ openhost(hname)
if (!getnetnum(hname, &netnum, temphost))
return 0;
-
+
if (debug > 2)
printf("Opening host %s\n", temphost);
@@ -344,7 +344,7 @@ openhost(hname)
sockfd = socket(AF_INET, SOCK_DGRAM, 0);
if (sockfd == -1)
error("socket", "", "");
-
+
#if defined(SYS_HPUX) && (SYS_HPUX < 8)
#ifdef SO_RCVBUF
{ int rbufsize = INITDATASIZE + 2048; /* 2K for slop */
@@ -358,7 +358,7 @@ openhost(hname)
if (connect(sockfd, (struct sockaddr *)&hostaddr,
sizeof(hostaddr)) == -1)
error("connect", "", "");
-
+
havehost = 1;
return 1;
}
@@ -443,7 +443,7 @@ again:
tvo = tvout;
else
tvo = tvsout;
-
+
FD_SET(sockfd, &fds);
n = select(sockfd+1, &fds, (fd_set *)0, (fd_set *)0, &tvo);
@@ -747,7 +747,7 @@ doquery(implcode, reqcode, auth, qitems, qsize, qdata, ritems, rsize, rdata,
res = sendrequest(implcode, reqcode, auth, qitems, qsize, qdata);
if (res != 0)
return res;
-
+
/*
* Get the response. If we got a standard error, print a message
*/
@@ -848,7 +848,7 @@ docmd(cmdline)
tokenize(cmdline, tokens, &ntok);
if (ntok == 0)
return;
-
+
/*
* Find the appropriate command description.
*/
@@ -862,7 +862,7 @@ docmd(cmdline)
tokens[0]);
return;
}
-
+
/*
* Save the keyword, then walk through the arguments, interpreting
* as we go.
diff --git a/usr.sbin/xntpd/xntpdc/ntpdc_ops.c b/usr.sbin/xntpd/xntpdc/ntpdc_ops.c
index 4d50619..7010f9b 100644
--- a/usr.sbin/xntpd/xntpdc/ntpdc_ops.c
+++ b/usr.sbin/xntpd/xntpdc/ntpdc_ops.c
@@ -294,7 +294,7 @@ peerlist(pcmd, fp)
res = doquery(IMPL_XNTPD, REQ_PEER_LIST, 0, 0, 0, (char *)NULL, &items,
&itemsize, (char **)&plist, 0);
-
+
if (res != 0 && items == 0)
return;
@@ -356,7 +356,7 @@ dopeers(pcmd, fp, dmstyle)
res = doquery(IMPL_XNTPD, REQ_PEER_LIST_SUM, 0, 0, 0, (char *)NULL,
&items, &itemsize, (char **)&plist, 0);
-
+
if (res != 0 && items == 0)
return;
@@ -447,14 +447,14 @@ printpeer(pp, fp)
(void) fprintf(fp, "hmode %s, pmode %s, stratum %d, precision %d\n",
modetoa(pp->hmode), modetoa(pp->pmode),
pp->stratum, pp->precision);
-
+
(void) fprintf(fp,
"leap %c%c, refid [%s], rootdistance %s, rootdispersion %s\n",
pp->leap & 0x2 ? '1' : '0',
pp->leap & 0x1 ? '1' : '0',
refid_string(pp->refid, pp->stratum), fptoa(NTOHS_FP(pp->rootdelay), 5),
ufptoa(NTOHS_FP(pp->rootdispersion), 5));
-
+
(void) fprintf(fp,
"ppoll %d, hpoll %d, keyid %lu, version %d, association %u\n",
pp->ppoll, pp->hpoll, (u_long)pp->keyid, pp->version, ntohs(pp->associd));
@@ -465,7 +465,7 @@ printpeer(pp, fp)
(void) fprintf(fp, "boffset %s, ttl %d\n",
fptoa(NTOHS_FP(pp->estbdelay), 5), pp->ttl);
-
+
(void) fprintf(fp, "timer %lds, flags", (long)ntohl(pp->timer));
if (pp->flags == 0) {
(void) fprintf(fp, " none\n");
@@ -509,7 +509,7 @@ printpeer(pp, fp)
NTOHL_FP(&pp->xmt, &tempts);
(void) fprintf(fp, "transmit timestamp: %s\n",
prettydate(&tempts));
-
+
(void) fprintf(fp, "filter delay: ");
for (i = 0; i < NTP_SHIFT; i++) {
(void) fprintf(fp, " %-8.8s",
@@ -535,7 +535,7 @@ printpeer(pp, fp)
(void) fprintf(fp, "\n ");
}
(void) fprintf(fp, "\n");
-
+
NTOHL_FP(&pp->offset, &tempts);
(void) fprintf(fp,
@@ -571,7 +571,7 @@ showpeer(pcmd, fp)
res = doquery(IMPL_XNTPD, REQ_PEER_INFO, 0, qitems,
sizeof(struct info_peer_list), (char *)plist, &items,
&itemsize, (char **)&pp, 0);
-
+
if (res != 0 && items == 0)
return;
@@ -615,7 +615,7 @@ peerstats(pcmd, fp)
res = doquery(IMPL_XNTPD, REQ_PEER_STATS, 0, qitems,
sizeof(struct info_peer_list), (char *)plist, &items,
&itemsize, (char **)&pp, 0);
-
+
if (res != 0 && items == 0)
return;
@@ -687,7 +687,7 @@ loopinfo(pcmd, fp)
res = doquery(IMPL_XNTPD, REQ_LOOP_INFO, 0, 0, 0, (char *)NULL,
&items, &itemsize, (char **)&il, 0);
-
+
if (res != 0 && items == 0)
return;
@@ -741,7 +741,7 @@ sysinfo(pcmd, fp)
res = doquery(IMPL_XNTPD, REQ_SYS_INFO, 0, 0, 0, (char *)NULL,
&items, &itemsize, (char **)&is, 0);
-
+
if (res != 0 && items == 0)
return;
@@ -818,7 +818,7 @@ sysstats(pcmd, fp)
res = doquery(IMPL_XNTPD, REQ_SYS_STATS, 0, 0, 0, (char *)NULL,
&items, &itemsize, (char **)&ss, 0);
-
+
if (res != 0 && items == 0)
return;
@@ -852,7 +852,7 @@ sysstats(pcmd, fp)
(u_long)ntohl(ss->badauth));
if (itemsize != sizeof(struct info_sys_stats))
return;
-
+
(void) fprintf(fp, "limitation rejects: %ld\n",
(u_long)ntohl(ss->limitrejected));
}
@@ -875,7 +875,7 @@ iostats(pcmd, fp)
res = doquery(IMPL_XNTPD, REQ_IO_STATS, 0, 0, 0, (char *)NULL,
&items, &itemsize, (char **)&io, 0);
-
+
if (res != 0 && items == 0)
return;
@@ -929,7 +929,7 @@ memstats(pcmd, fp)
res = doquery(IMPL_XNTPD, REQ_MEM_STATS, 0, 0, 0, (char *)NULL,
&items, &itemsize, (char **)&mem, 0);
-
+
if (res != 0 && items == 0)
return;
@@ -980,7 +980,7 @@ timerstats(pcmd, fp)
res = doquery(IMPL_XNTPD, REQ_TIMER_STATS, 0, 0, 0, (char *)NULL,
&items, &itemsize, (char **)&tim, 0);
-
+
if (res != 0 && items == 0)
return;
@@ -1104,7 +1104,7 @@ doconfig(pcmd, fp, mode)
res = doquery(IMPL_XNTPD, REQ_CONFIG, 1, 1,
sizeof(struct conf_peer), (char *)&cpeer, &items,
&itemsize, &dummy, 0);
-
+
if (res == 0)
(void) fprintf(fp, "done!\n");
return;
@@ -1134,7 +1134,7 @@ unconfig(pcmd, fp)
res = doquery(IMPL_XNTPD, REQ_UNCONFIG, 1, qitems,
sizeof(struct conf_unpeer), (char *)plist, &items,
&itemsize, &dummy, 0);
-
+
if (res == 0)
(void) fprintf(fp, "done!\n");
}
@@ -1208,7 +1208,7 @@ doset(pcmd, fp, req)
res = doquery(IMPL_XNTPD, req, 1, 1,
sizeof(struct conf_sys_flags), (char *)&sys, &items,
&itemsize, &dummy, 0);
-
+
if (res == 0)
(void) fprintf(fp, "done!\n");
}
@@ -1266,7 +1266,7 @@ reslist(pcmd, fp)
res = doquery(IMPL_XNTPD, REQ_GET_RESTRICT, 0, 0, 0, (char *)NULL,
&items, &itemsize, (char **)&rl, 0);
-
+
if (res != 0 && items == 0)
return;
@@ -1438,7 +1438,7 @@ do_restrict(pcmd, fp, req_code)
res = doquery(IMPL_XNTPD, req_code, 1, 1,
sizeof(struct conf_restrict), (char *)&cres, &items,
&itemsize, &dummy, 0);
-
+
if (res == 0)
(void) fprintf(fp, "done!\n");
return;
@@ -1471,10 +1471,10 @@ monlist(pcmd, fp)
&items, &itemsize, &struct_star,
(version < 0) ? (1 << INFO_ERR_REQ) : 0);
- if (res == INFO_ERR_REQ && version < 0)
+ if (res == INFO_ERR_REQ && version < 0)
res = doquery(IMPL_XNTPD, REQ_MON_GETLIST, 0, 0, 0, (char *)NULL,
&items, &itemsize, &struct_star, 0);
-
+
if (res != 0 && items == 0)
return;
@@ -1490,7 +1490,7 @@ monlist(pcmd, fp)
"===============================================================================\n");
while (items > 0) {
addr.s_addr = ml->daddr;
- (void) fprintf(fp,
+ (void) fprintf(fp,
"%-22.22s %5d %-15s %8ld %1d %1d %6lu %6lu %7lu\n",
nntohost(ml->addr),
ntohs(ml->port),
@@ -1576,7 +1576,7 @@ monitor(pcmd, fp)
res = doquery(IMPL_XNTPD, req_code, 1, 0, 0, (char *)0,
&items, &itemsize, &dummy, 0);
-
+
if (res == 0)
(void) fprintf(fp, "done!\n");
return;
@@ -1640,7 +1640,7 @@ reset(pcmd, fp)
res = doquery(IMPL_XNTPD, REQ_RESET_STATS, 1, 1,
sizeof(struct reset_flags), (char *)&rflags, &items,
&itemsize, &dummy, 0);
-
+
if (res == 0)
(void) fprintf(fp, "done!\n");
return;
@@ -1671,7 +1671,7 @@ preset(pcmd, fp)
res = doquery(IMPL_XNTPD, REQ_RESET_PEER, 1, qitems,
sizeof(struct conf_unpeer), (char *)plist, &items,
&itemsize, &dummy, 0);
-
+
if (res == 0)
(void) fprintf(fp, "done!\n");
}
@@ -1693,7 +1693,7 @@ readkeys(pcmd, fp)
res = doquery(IMPL_XNTPD, REQ_REREAD_KEYS, 1, 0, 0, (char *)0,
&items, &itemsize, &dummy, 0);
-
+
if (res == 0)
(void) fprintf(fp, "done!\n");
return;
@@ -1748,7 +1748,7 @@ do_trustkey(pcmd, fp, req)
res = doquery(IMPL_XNTPD, req, 1, ritems, sizeof(u_long),
(char *)keyids, &items, &itemsize, &dummy, 0);
-
+
if (res == 0)
(void) fprintf(fp, "done!\n");
return;
@@ -1772,7 +1772,7 @@ authinfo(pcmd, fp)
res = doquery(IMPL_XNTPD, REQ_AUTHINFO, 0, 0, 0, (char *)NULL,
&items, &itemsize, (char **)&ia, 0);
-
+
if (res != 0 && items == 0)
return;
@@ -1815,7 +1815,7 @@ traps(pcmd, fp)
res = doquery(IMPL_XNTPD, REQ_TRAPS, 0, 0, 0, (char *)NULL,
&items, &itemsize, (char **)&it, 0);
-
+
if (res != 0 && items == 0)
return;
@@ -1839,7 +1839,7 @@ traps(pcmd, fp)
(void) fprintf(fp, "low priority\n");
else
(void) fprintf(fp, "normal priority\n");
-
+
(void) fprintf(fp, "set for %ld secs, last set %ld secs ago\n",
(long)it->origtime, (long)it->settime);
(void) fprintf(fp, "sequence %d, number of resets %ld\n",
@@ -1901,7 +1901,7 @@ do_addclr_trap(pcmd, fp, req)
res = doquery(IMPL_XNTPD, req, 1, 1, sizeof(struct conf_trap),
(char *)&ctrap, &items, &itemsize, &dummy, 0);
-
+
if (res == 0)
(void) fprintf(fp, "done!\n");
return;
@@ -1954,7 +1954,7 @@ do_changekey(pcmd, fp, req)
res = doquery(IMPL_XNTPD, req, 1, 1, sizeof(u_long),
(char *)&key, &items, &itemsize, &dummy, 0);
-
+
if (res == 0)
(void) fprintf(fp, "done!\n");
return;
@@ -1978,7 +1978,7 @@ ctlstats(pcmd, fp)
res = doquery(IMPL_XNTPD, REQ_GET_CTLSTATS, 0, 0, 0, (char *)NULL,
&items, &itemsize, (char **)&ic, 0);
-
+
if (res != 0 && items == 0)
return;
@@ -2056,7 +2056,7 @@ leapinfo(pcmd, fp)
res = doquery(IMPL_XNTPD, REQ_GET_LEAPINFO, 0, 0, 0, (char *)NULL,
&items, &itemsize, (char **)&il, 0);
-
+
if (res != 0 && items == 0)
return;
@@ -2124,7 +2124,7 @@ clockstat(pcmd, fp)
res = doquery(IMPL_XNTPD, REQ_GET_CLOCKINFO, 0, qitems,
sizeof(U_LONG), (char *)clist, &items,
&itemsize, (char **)&cl, 0);
-
+
if (res != 0 && items == 0)
return;
@@ -2282,7 +2282,7 @@ clkbug(pcmd, fp)
res = doquery(IMPL_XNTPD, REQ_GET_CLKBUGINFO, 0, qitems,
sizeof(U_LONG), (char *)clist, &items,
&itemsize, (char **)&cl, 0);
-
+
if (res != 0 && items == 0)
return;
@@ -2363,7 +2363,7 @@ setprecision(pcmd, fp)
res = doquery(IMPL_XNTPD, REQ_SET_PRECISION, 1, 1, sizeof(long),
(char *)&precision, &items, &itemsize, &dummy, 0);
-
+
if (res == 0)
(void) fprintf(fp, "done!\n");
return;
OpenPOWER on IntegriCloud