summaryrefslogtreecommitdiffstats
path: root/atc
diff options
context:
space:
mode:
authorrillig <rillig@NetBSD.org>2021-05-02 12:50:43 +0000
committerCameron Katri <me@cameronkatri.com>2021-05-05 14:56:21 -0400
commit1c75ca2e2dc72d118edbb854455e602d70d80a52 (patch)
treea815eb983fa15e7c407095122e37acb90093be9a /atc
parent2442661e769456700d67fac92056d18b3046633e (diff)
downloadbsdgames-darwin-1c75ca2e2dc72d118edbb854455e602d70d80a52.tar.gz
bsdgames-darwin-1c75ca2e2dc72d118edbb854455e602d70d80a52.tar.zst
bsdgames-darwin-1c75ca2e2dc72d118edbb854455e602d70d80a52.zip
games: remove trailing whitespace in *.c and *.h
Diffstat (limited to 'atc')
-rw-r--r--atc/extern.h4
-rw-r--r--atc/graphics.c8
-rw-r--r--atc/input.c36
-rw-r--r--atc/list.c6
-rw-r--r--atc/log.c20
-rw-r--r--atc/main.c10
-rw-r--r--atc/update.c18
7 files changed, 51 insertions, 51 deletions
diff --git a/atc/extern.h b/atc/extern.h
index 3bbe1202..1c2a23b0 100644
--- a/atc/extern.h
+++ b/atc/extern.h
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.19 2015/06/25 05:33:02 dholland Exp $ */
+/* $NetBSD: extern.h,v 1.20 2021/05/02 12:50:43 rillig Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -54,7 +54,7 @@ extern time_t start_time;
#if 0
extern FILE *filein, *fileout;
-#endif
+#endif
extern C_SCREEN *sp;
diff --git a/atc/graphics.c b/atc/graphics.c
index a6887c71..0ed74828 100644
--- a/atc/graphics.c
+++ b/atc/graphics.c
@@ -1,4 +1,4 @@
-/* $NetBSD: graphics.c,v 1.20 2015/06/25 05:33:02 dholland Exp $ */
+/* $NetBSD: graphics.c,v 1.21 2021/05/02 12:50:43 rillig Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -46,7 +46,7 @@
#if 0
static char sccsid[] = "@(#)graphics.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: graphics.c,v 1.20 2015/06/25 05:33:02 dholland Exp $");
+__RCSID("$NetBSD: graphics.c,v 1.21 2021/05/02 12:50:43 rillig Exp $");
#endif
#endif /* not lint */
@@ -130,7 +130,7 @@ init_gr(void)
errx(0, "couldn't initialize screen");
setbuf(stdout, buffer);
input = newwin(INPUT_LINES, COLS - PLANE_COLS, LINES - INPUT_LINES, 0);
- credit = newwin(INPUT_LINES, PLANE_COLS, LINES - INPUT_LINES,
+ credit = newwin(INPUT_LINES, PLANE_COLS, LINES - INPUT_LINES,
COLS - PLANE_COLS);
planes = newwin(LINES - INPUT_LINES, PLANE_COLS, 0, COLS - PLANE_COLS);
}
@@ -230,7 +230,7 @@ setup_screen(const C_SCREEN *scp)
(void)wmove(radar, scp->airport[iu].y, scp->airport[iu].x * 2);
(void)waddstr(radar, str);
}
-
+
(void)overwrite(radar, cleanradar);
(void)wrefresh(radar);
(void)wrefresh(credit);
diff --git a/atc/input.c b/atc/input.c
index 3b44be09..c8b96931 100644
--- a/atc/input.c
+++ b/atc/input.c
@@ -1,4 +1,4 @@
-/* $NetBSD: input.c,v 1.29 2015/06/19 06:02:31 dholland Exp $ */
+/* $NetBSD: input.c,v 1.30 2021/05/02 12:50:43 rillig Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -46,7 +46,7 @@
#if 0
static char sccsid[] = "@(#)input.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: input.c,v 1.29 2015/06/19 06:02:31 dholland Exp $");
+__RCSID("$NetBSD: input.c,v 1.30 2021/05/02 12:50:43 rillig Exp $");
#endif
#endif /* not lint */
@@ -138,17 +138,17 @@ static
RULE state0[] = { { ALPHATOKEN, 1, "%c:", setplane},
{ RETTOKEN, -1, "", NULL },
{ HELPTOKEN, 12, " [a-z]<ret>", NULL }},
- state1[] = { { 't', 2, " turn", turn },
- { 'a', 3, " altitude:", NULL },
+ state1[] = { { 't', 2, " turn", turn },
+ { 'a', 3, " altitude:", NULL },
{ 'c', 4, " circle", circle },
{ 'm', 7, " mark", mark },
{ 'u', 7, " unmark", unmark },
{ 'i', 7, " ignore", ignore },
{ HELPTOKEN, 12, " tacmui", NULL }},
- state2[] = { { 'l', 6, " left", left },
- { 'r', 6, " right", right },
+ state2[] = { { 'l', 6, " left", left },
+ { 'r', 6, " right", right },
{ 'L', 4, " left 90", Left },
- { 'R', 4, " right 90", Right },
+ { 'R', 4, " right 90", Right },
{ 't', 11, " towards", NULL },
{ 'w', 4, " to 0", to_dir },
{ 'e', 4, " to 45", to_dir },
@@ -159,14 +159,14 @@ RULE state0[] = { { ALPHATOKEN, 1, "%c:", setplane},
{ 'a', 4, " to 270", to_dir },
{ 'q', 4, " to 315", to_dir },
{ HELPTOKEN, 12, " lrLRt<dir>", NULL }},
- state3[] = { { '+', 10, " climb", climb },
- { 'c', 10, " climb", climb },
- { '-', 10, " descend", descend },
- { 'd', 10, " descend", descend },
+ state3[] = { { '+', 10, " climb", climb },
+ { 'c', 10, " climb", climb },
+ { '-', 10, " descend", descend },
+ { 'd', 10, " descend", descend },
{ NUMTOKEN, 7, " %c000 feet", setalt },
{ HELPTOKEN, 12, " +-cd[0-9]", NULL }},
- state4[] = { { '@', 9, " at", NULL },
- { 'a', 9, " at", NULL },
+ state4[] = { { '@', 9, " at", NULL },
+ { 'a', 9, " at", NULL },
{ RETTOKEN, -1, "", NULL },
{ HELPTOKEN, 12, " @a<ret>", NULL }},
state5[] = { { NUMTOKEN, 7, "%c", delayb },
@@ -181,7 +181,7 @@ RULE state0[] = { { ALPHATOKEN, 1, "%c:", setplane},
{ 'z', 4, " 225", rel_dir },
{ 'a', 4, " 270", rel_dir },
{ 'q', 4, " 315", rel_dir },
- { RETTOKEN, -1, "", NULL },
+ { RETTOKEN, -1, "", NULL },
{ HELPTOKEN, 12, " @a<dir><ret>",NULL }},
state7[] = { { RETTOKEN, -1, "", NULL },
{ HELPTOKEN, 12, " <ret>", NULL }},
@@ -192,7 +192,7 @@ RULE state0[] = { { ALPHATOKEN, 1, "%c:", setplane},
{ HELPTOKEN, 12, " b*", NULL }},
state10[] = { { NUMTOKEN, 7, " %c000 ft", setrelalt},
{ HELPTOKEN, 12, " [0-9]", NULL }},
- state11[] = { { 'b', 8, " beacon #", beacon },
+ state11[] = { { 'b', 8, " beacon #", beacon },
{ '*', 8, " beacon #", beacon },
{ 'e', 8, " exit #", ex_it },
{ 'a', 8, " airport #", airport },
@@ -305,12 +305,12 @@ getcommand(void)
return (1); /* forced update */
dest_type = T_NODEST;
-
+
for (i = 0; i < level; i++) {
func = st[stack[i].state].rule[stack[i].rule].func;
if (func != NULL)
if ((s = (*func)(stack[i].ch)) != NULL) {
- ioerror(stack[i].pos,
+ ioerror(stack[i].pos,
(int)strlen(stack[i].str), s);
return (-1);
}
@@ -370,7 +370,7 @@ gettoken(void)
(void)execl(shell, base, (char *) 0);
}
else
- (void)execl(_PATH_BSHELL, "sh",
+ (void)execl(_PATH_BSHELL, "sh",
(char *) 0);
exit(0); /* oops */
diff --git a/atc/list.c b/atc/list.c
index af43b485..642f5785 100644
--- a/atc/list.c
+++ b/atc/list.c
@@ -1,4 +1,4 @@
-/* $NetBSD: list.c,v 1.9 2015/06/19 06:02:31 dholland Exp $ */
+/* $NetBSD: list.c,v 1.10 2021/05/02 12:50:43 rillig Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -46,7 +46,7 @@
#if 0
static char sccsid[] = "@(#)list.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: list.c,v 1.9 2015/06/19 06:02:31 dholland Exp $");
+__RCSID("$NetBSD: list.c,v 1.10 2021/05/02 12:50:43 rillig Exp $");
#endif
#endif /* not lint */
@@ -105,7 +105,7 @@ delete(LIST *l, PLANE *p)
{
if (l->head == NULL)
loser(p, "deleted a non-existent plane! Get help!");
-
+
if (l->head == p && l->tail == p)
l->head = l->tail = NULL;
else if (l->head == p) {
diff --git a/atc/log.c b/atc/log.c
index 08e092bb..bd6b73e5 100644
--- a/atc/log.c
+++ b/atc/log.c
@@ -1,4 +1,4 @@
-/* $NetBSD: log.c,v 1.24 2019/03/19 00:11:34 pgoyette Exp $ */
+/* $NetBSD: log.c,v 1.25 2021/05/02 12:50:43 rillig Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -46,7 +46,7 @@
#if 0
static char sccsid[] = "@(#)log.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: log.c,v 1.24 2019/03/19 00:11:34 pgoyette Exp $");
+__RCSID("$NetBSD: log.c,v 1.25 2021/05/02 12:50:43 rillig Exp $");
#endif
#endif /* not lint */
@@ -141,7 +141,7 @@ open_score_file(void)
if (fcntl(score_fd, F_SETFD, flags) == -1)
err(1, "fcntl F_SETFD");
/*
- * This is done to take advantage of stdio, while still
+ * This is done to take advantage of stdio, while still
* allowing a O_CREAT during the open(2) of the log file.
*/
score_fp = fdopen(score_fd, "r+");
@@ -184,10 +184,10 @@ log_score(int list_em)
}
for (;;) {
good = fscanf(score_fp, SCORE_SCANF_FMT,
- score[num_scores].name,
- score[num_scores].host,
+ score[num_scores].name,
+ score[num_scores].host,
score[num_scores].game,
- &score[num_scores].planes,
+ &score[num_scores].planes,
&score[num_scores].time,
&score[num_scores].real_time);
if (good != 6 || ++num_scores >= NUM_SCORES)
@@ -195,19 +195,19 @@ log_score(int list_em)
}
if (!test_mode && !list_em) {
if ((pw = (struct passwd *) getpwuid(getuid())) == NULL) {
- (void)fprintf(stderr,
+ (void)fprintf(stderr,
"getpwuid failed for uid %d. Who are you?\n",
(int)getuid());
return (-1);
}
(void)strlcpy(thisscore.name, pw->pw_name, SCORE_NAME_LEN);
(void)uname(&lname);
- (void)strlcpy(thisscore.host, lname.nodename,
+ (void)strlcpy(thisscore.host, lname.nodename,
sizeof(thisscore.host));
cp = strrchr(filename, '/');
if (cp == NULL) {
- (void)fprintf(stderr, "log: where's the '/' in %s?\n",
+ (void)fprintf(stderr, "log: where's the '/' in %s?\n",
filename);
return (-1);
}
@@ -264,7 +264,7 @@ log_score(int list_em)
rewind(score_fp);
for (i = 0; i < num_scores; i++)
(void)fprintf(score_fp, "%s %s %s %d %d %d\n",
- score[i].name, score[i].host,
+ score[i].name, score[i].host,
score[i].game, score[i].planes,
score[i].time, score[i].real_time);
(void)fflush(score_fp);
diff --git a/atc/main.c b/atc/main.c
index db089651..9ef6ce11 100644
--- a/atc/main.c
+++ b/atc/main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.24 2015/06/25 05:33:02 dholland Exp $ */
+/* $NetBSD: main.c,v 1.25 2021/05/02 12:50:43 rillig Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -51,7 +51,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 1993\
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: main.c,v 1.24 2015/06/25 05:33:02 dholland Exp $");
+__RCSID("$NetBSD: main.c,v 1.25 2021/05/02 12:50:43 rillig Exp $");
#endif
#endif /* not lint */
@@ -101,7 +101,7 @@ main(int argc, char *argv[])
switch (ch) {
case '?':
case 'u':
- default:
+ default:
f_usage = 1;
break;
case 'l':
@@ -128,7 +128,7 @@ main(int argc, char *argv[])
srandom(seed);
if (f_usage)
- (void)fprintf(stderr,
+ (void)fprintf(stderr,
"Usage: %s -[u?lstp] [-[gf] game_name] [-r random seed]\n",
argv[0]);
if (f_showscore)
@@ -141,7 +141,7 @@ main(int argc, char *argv[])
(void)strlcpy(buf, _PATH_GAMES, 100);
(void)puts(buf);
}
-
+
if (f_usage || f_showscore || f_list || f_printpath)
exit(0);
diff --git a/atc/update.c b/atc/update.c
index b736624a..52a8418a 100644
--- a/atc/update.c
+++ b/atc/update.c
@@ -1,4 +1,4 @@
-/* $NetBSD: update.c,v 1.27 2015/06/25 05:33:02 dholland Exp $ */
+/* $NetBSD: update.c,v 1.28 2021/05/02 12:50:43 rillig Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -46,7 +46,7 @@
#if 0
static char sccsid[] = "@(#)update.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: update.c,v 1.27 2015/06/25 05:33:02 dholland Exp $");
+__RCSID("$NetBSD: update.c,v 1.28 2021/05/02 12:50:43 rillig Exp $");
#endif
#endif /* not lint */
@@ -172,10 +172,10 @@ update(int dummy __unused)
if (pp->xpos == sp->airport[i].x &&
pp->ypos == sp->airport[i].y) {
if (pp->dest_type == T_AIRPORT)
- loser(pp,
+ loser(pp,
"landed at the wrong airport.");
else
- loser(pp,
+ loser(pp,
"landed instead of exited.");
}
loser(pp, "crashed on the ground.");
@@ -186,10 +186,10 @@ update(int dummy __unused)
if (pp->xpos == sp->exit[i].x &&
pp->ypos == sp->exit[i].y) {
if (pp->dest_type == T_EXIT)
- loser(pp,
+ loser(pp,
"exited via the wrong exit.");
else
- loser(pp,
+ loser(pp,
"exited instead of landed.");
}
loser(pp, "illegally left the flight arena.");
@@ -267,7 +267,7 @@ command(const PLANE *pp)
buf[0] = '\0';
bp = buf;
bpsize = sizeof(buf);
- (void)snprintf(bp, bpsize, "%c%d%c%c%u: ", name(pp), pp->altitude,
+ (void)snprintf(bp, bpsize, "%c%d%c%c%u: ", name(pp), pp->altitude,
(pp->fuel < LOWFUEL) ? '*' : ' ',
(pp->dest_type == T_AIRPORT) ? 'A' : 'E', pp->dest_no);
@@ -287,7 +287,7 @@ command(const PLANE *pp)
bp = strchr(buf, '\0');
bpsize = buf + sizeof(buf) - bp;
- if (*comm_start == '\0' &&
+ if (*comm_start == '\0' &&
(pp->status == S_UNMARKED || pp->status == S_IGNORED))
(void)snprintf(bp, bpsize, "---------");
return (buf);
@@ -432,7 +432,7 @@ static int
too_close(const PLANE *p1, const PLANE *p2, int dist)
{
if (ABS(p1->altitude - p2->altitude) <= dist &&
- ABS(p1->xpos - p2->xpos) <= dist &&
+ ABS(p1->xpos - p2->xpos) <= dist &&
ABS(p1->ypos - p2->ypos) <= dist)
return (1);
else