summaryrefslogtreecommitdiffstats
path: root/usr.sbin/xntpd/parse/util
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/parse/util
parent30ef9631c5eac7f8254bd3d7ad274d34d9f518b8 (diff)
downloadFreeBSD-src-4f960dd75f181e9fa2edc44324f15f0ab5c64b37.zip
FreeBSD-src-4f960dd75f181e9fa2edc44324f15f0ab5c64b37.tar.gz
Remove trailing whitespace.
Diffstat (limited to 'usr.sbin/xntpd/parse/util')
-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
3 files changed, 41 insertions, 38 deletions
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
*/
OpenPOWER on IntegriCloud