summaryrefslogtreecommitdiffstats
path: root/trek/lrscan.c
diff options
context:
space:
mode:
authordholland <dholland@NetBSD.org>2009-05-24 21:44:56 +0000
committerdholland <dholland@NetBSD.org>2009-05-24 21:44:56 +0000
commit927a087250c6d788d6df6cc7fcb0359653e2efd3 (patch)
treee1bd8e6ccde5d2a67885bac40ac518b2a855e3f4 /trek/lrscan.c
parent4ae8fc90b11f51c654ce09c6a9bb74c163f33076 (diff)
downloadbsdgames-darwin-927a087250c6d788d6df6cc7fcb0359653e2efd3.tar.gz
bsdgames-darwin-927a087250c6d788d6df6cc7fcb0359653e2efd3.tar.zst
bsdgames-darwin-927a087250c6d788d6df6cc7fcb0359653e2efd3.zip
KNF: brace and comment placement. Object files identical.
Diffstat (limited to 'trek/lrscan.c')
-rw-r--r--trek/lrscan.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/trek/lrscan.c b/trek/lrscan.c
index 04138712..78b53ed9 100644
--- a/trek/lrscan.c
+++ b/trek/lrscan.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lrscan.c,v 1.8 2009/05/24 19:18:44 dholland Exp $ */
+/* $NetBSD: lrscan.c,v 1.9 2009/05/24 21:44:56 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)lrscan.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: lrscan.c,v 1.8 2009/05/24 19:18:44 dholland Exp $");
+__RCSID("$NetBSD: lrscan.c,v 1.9 2009/05/24 21:44:56 dholland Exp $");
#endif
#endif /* not lint */
@@ -60,15 +60,13 @@ lrscan(int v __unused)
int i, j;
struct quad *q;
- if (check_out(LRSCAN))
- {
+ if (check_out(LRSCAN)) {
return;
}
printf("Long range scan for quadrant %d,%d\n\n", Ship.quadx, Ship.quady);
/* print the header on top */
- for (j = Ship.quady - 1; j <= Ship.quady + 1; j++)
- {
+ for (j = Ship.quady - 1; j <= Ship.quady + 1; j++) {
if (j < 0 || j >= NQUADS)
printf(" ");
else
@@ -76,11 +74,9 @@ lrscan(int v __unused)
}
/* scan the quadrants */
- for (i = Ship.quadx - 1; i <= Ship.quadx + 1; i++)
- {
+ for (i = Ship.quadx - 1; i <= Ship.quadx + 1; i++) {
printf("\n -------------------\n");
- if (i < 0 || i >= NQUADS)
- {
+ if (i < 0 || i >= NQUADS) {
/* negative energy barrier */
printf(" ! * ! * ! * !");
continue;
@@ -88,17 +84,14 @@ lrscan(int v __unused)
/* print the left hand margin */
printf("%1d !", i);
- for (j = Ship.quady - 1; j <= Ship.quady + 1; j++)
- {
- if (j < 0 || j >= NQUADS)
- {
+ for (j = Ship.quady - 1; j <= Ship.quady + 1; j++) {
+ if (j < 0 || j >= NQUADS) {
/* negative energy barrier again */
printf(" * !");
continue;
}
q = &Quad[i][j];
- if (q->stars < 0)
- {
+ if (q->stars < 0) {
/* supernova */
printf(" /// !");
q->scanned = 1000;