Module Name:    src
Committed By:   dholland
Date:           Sun May 24 22:55:03 UTC 2009

Modified Files:
        src/games/trek: attack.c autover.c capture.c computer.c dcrept.c dock.c
            dumpme.c dumpssradio.c events.c help.c impulse.c kill.c klmove.c
            lrscan.c main.c move.c phaser.c ram.c schedule.c score.c shield.c
            snova.c srscan.c torped.c trek.h warp.c win.c

Log Message:
Split up lines > 80 chars. Object files unchanged.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/games/trek/attack.c src/games/trek/klmove.c \
    src/games/trek/snova.c src/games/trek/srscan.c
cvs rdiff -u -r1.6 -r1.7 src/games/trek/autover.c
cvs rdiff -u -r1.10 -r1.11 src/games/trek/capture.c src/games/trek/events.c \
    src/games/trek/kill.c src/games/trek/schedule.c src/games/trek/shield.c \
    src/games/trek/warp.c
cvs rdiff -u -r1.13 -r1.14 src/games/trek/computer.c src/games/trek/phaser.c
cvs rdiff -u -r1.9 -r1.10 src/games/trek/dcrept.c src/games/trek/dock.c \
    src/games/trek/impulse.c src/games/trek/lrscan.c src/games/trek/move.c \
    src/games/trek/win.c
cvs rdiff -u -r1.7 -r1.8 src/games/trek/dumpme.c src/games/trek/dumpssradio.c \
    src/games/trek/ram.c src/games/trek/score.c
cvs rdiff -u -r1.11 -r1.12 src/games/trek/help.c
cvs rdiff -u -r1.16 -r1.17 src/games/trek/main.c
cvs rdiff -u -r1.12 -r1.13 src/games/trek/torped.c
cvs rdiff -u -r1.14 -r1.15 src/games/trek/trek.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/games/trek/attack.c
diff -u src/games/trek/attack.c:1.8 src/games/trek/attack.c:1.9
--- src/games/trek/attack.c:1.8	Sun May 24 21:55:24 2009
+++ src/games/trek/attack.c	Sun May 24 22:55:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: attack.c,v 1.8 2009/05/24 21:55:24 dholland Exp $	*/
+/*	$NetBSD: attack.c,v 1.9 2009/05/24 22:55:03 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)attack.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: attack.c,v 1.8 2009/05/24 21:55:24 dholland Exp $");
+__RCSID("$NetBSD: attack.c,v 1.9 2009/05/24 22:55:03 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -94,7 +94,8 @@
 	klmove(0);
 	if (Ship.cond == DOCKED) {
 		if (!resting)
-			printf("Starbase shields protect the %s\n", Ship.shipname);
+			printf("Starbase shields protect the %s\n",
+				Ship.shipname);
 		return;
 	}
 	/* setup shield effectiveness */
@@ -120,7 +121,8 @@
 		hit = Etc.klingon[i].power * pow(dustfac, tothe) * Param.hitfac;
 		/* deplete his energy */
 		dustfac = Etc.klingon[i].power;
-		Etc.klingon[i].power = dustfac * Param.phasfac * (1.0 + (franf() - 0.5) * 0.2);
+		Etc.klingon[i].power = dustfac * Param.phasfac *
+			(1.0 + (franf() - 0.5) * 0.2);
 		/* see how much of hit shields will absorb */
 		shldabsb = 0;
 		if (Ship.shldup || Move.shldchg) {
@@ -134,7 +136,8 @@
 		/* actually do the hit */
 		printf("\aHIT: %d units", hit);
 		if (!damaged(SRSCAN))
-			printf(" from %d,%d", Etc.klingon[i].x, Etc.klingon[i].y);
+			printf(" from %d,%d",
+				Etc.klingon[i].x, Etc.klingon[i].y);
 		cas = (shldabsb * 100) / hit;
 		hit -= shldabsb;
 		if (shldabsb > 0)
@@ -155,12 +158,14 @@
 				cas -= Param.damprob[l];
 			l -= 1;
 			/* compute amount of damage */
-			extradm = (hit * Param.damfac[l]) / (75 + ranf(25)) + 0.5;
+			extradm = (hit * Param.damfac[l]) /
+				(75 + ranf(25)) + 0.5;
 			/* damage the device */
 			damage(l, extradm);
 			if (damaged(SHIELD)) {
 				if (Ship.shldup)
-					printf("Sulu: Shields knocked down, captain.\n");
+					printf("Sulu: Shields knocked down, "
+					       "captain.\n");
 				Ship.shldup = 0;
 				Move.shldchg = 0;
 			}
@@ -173,7 +178,8 @@
 	if (maxhit >= 200 || tothit >= 500) {
 		cas = tothit * 0.015 * franf();
 		if (cas >= 2) {
-			printf("McCoy: we suffered %d casualties in that attack.\n",
+			printf("McCoy: we suffered %d casualties in that "
+			       "attack.\n",
 				cas);
 			Game.deaths += cas;
 			Ship.crew -= cas;
Index: src/games/trek/klmove.c
diff -u src/games/trek/klmove.c:1.8 src/games/trek/klmove.c:1.9
--- src/games/trek/klmove.c:1.8	Sun May 24 21:44:56 2009
+++ src/games/trek/klmove.c	Sun May 24 22:55:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: klmove.c,v 1.8 2009/05/24 21:44:56 dholland Exp $	*/
+/*	$NetBSD: klmove.c,v 1.9 2009/05/24 22:55:03 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)klmove.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: klmove.c,v 1.8 2009/05/24 21:44:56 dholland Exp $");
+__RCSID("$NetBSD: klmove.c,v 1.9 2009/05/24 22:55:03 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -114,7 +114,8 @@
 		for (; motion > 0; motion--) {
 			lookx = nextx + dx;
 			looky = nexty + dy;
-			if (lookx < 0 || lookx >= NSECTS || looky < 0 || looky >= NSECTS) {
+			if (lookx < 0 || lookx >= NSECTS ||
+			    looky < 0 || looky >= NSECTS) {
 				/* new quadrant */
 				qx = Ship.quadx;
 				qy = Ship.quady;
@@ -128,18 +129,23 @@
 				else
 					if (looky >= NSECTS)
 						qy += 1;
-				if (qx < 0 || qx >= NQUADS || qy < 0 || qy >= NQUADS ||
-						Quad[qx][qy].stars < 0 || Quad[qx][qy].klings > MAXKLQUAD - 1)
+				if (qx < 0 || qx >= NQUADS ||
+				    qy < 0 || qy >= NQUADS ||
+				    Quad[qx][qy].stars < 0 ||
+				    Quad[qx][qy].klings > MAXKLQUAD - 1)
 					break;
 				if (!damaged(SRSCAN)) {
-					printf("Klingon at %d,%d escapes to quadrant %d,%d\n",
+					printf("Klingon at %d,%d escapes to "
+					       "quadrant %d,%d\n",
 						k->x, k->y, qx, qy);
 					motion = Quad[qx][qy].scanned;
 					if (motion >= 0 && motion < 1000)
 						Quad[qx][qy].scanned += 100;
-					motion = Quad[Ship.quadx][Ship.quady].scanned;
+					motion = Quad[Ship.quadx][Ship.quady]
+						.scanned;
 					if (motion >= 0 && motion < 1000)
-						Quad[Ship.quadx][Ship.quady].scanned -= 100;
+						Quad[Ship.quadx][Ship.quady]
+							.scanned -= 100;
 				}
 				Sect[k->x][k->y] = EMPTY;
 				Quad[qx][qy].klings += 1;
@@ -156,7 +162,8 @@
 				if (Sect[lookx][looky] != EMPTY) {
 					fudgex = -fudgex;
 					looky = nexty + fudgey;
-					if (looky < 0 || looky >= NSECTS || Sect[lookx][looky] != EMPTY) {
+					if (looky < 0 || looky >= NSECTS ||
+					    Sect[lookx][looky] != EMPTY) {
 						fudgey = -fudgey;
 						break;
 					}
Index: src/games/trek/snova.c
diff -u src/games/trek/snova.c:1.8 src/games/trek/snova.c:1.9
--- src/games/trek/snova.c:1.8	Sun May 24 21:55:24 2009
+++ src/games/trek/snova.c	Sun May 24 22:55:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: snova.c,v 1.8 2009/05/24 21:55:24 dholland Exp $	*/
+/*	$NetBSD: snova.c,v 1.9 2009/05/24 22:55:03 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)snova.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: snova.c,v 1.8 2009/05/24 21:55:24 dholland Exp $");
+__RCSID("$NetBSD: snova.c,v 1.9 2009/05/24 22:55:03 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -89,7 +89,8 @@
 			n = ranf(q->stars);
 			for (ix = 0; ix < NSECTS; ix++) {
 				for (iy = 0; iy < NSECTS; iy++)
-					if (Sect[ix][iy] == STAR || Sect[ix][iy] == INHABIT)
+					if (Sect[ix][iy] == STAR ||
+					    Sect[ix][iy] == INHABIT)
 						if ((n -= 1) <= 0)
 							break;
 				if (n <= 0)
@@ -120,8 +121,10 @@
 	} else {
 		if (!damaged(SSRADIO)) {
 			q->scanned = 1000;
-			printf("\nUhura: Captain, Starfleet Command reports a supernova\n");
-			printf("  in quadrant %d,%d.  Caution is advised\n", qx, qy);
+			printf("\nUhura: Captain, Starfleet Command reports "
+			       "a supernova\n");
+			printf("  in quadrant %d,%d.  Caution is advised\n",
+				qx, qy);
 		}
 	}
 
@@ -143,7 +146,8 @@
 	q->stars = -1;
 	q->klings = 0;
 	if (Now.klings <= 0) {
-		printf("Lucky devil, that supernova destroyed the last klingon\n");
+		printf("Lucky devil, that supernova destroyed the last "
+		       "klingon\n");
 		win();
 	}
 	return;
Index: src/games/trek/srscan.c
diff -u src/games/trek/srscan.c:1.8 src/games/trek/srscan.c:1.9
--- src/games/trek/srscan.c:1.8	Sun May 24 21:44:56 2009
+++ src/games/trek/srscan.c	Sun May 24 22:55:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: srscan.c,v 1.8 2009/05/24 21:44:56 dholland Exp $	*/
+/*	$NetBSD: srscan.c,v 1.9 2009/05/24 22:55:03 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)srscan.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: srscan.c,v 1.8 2009/05/24 21:44:56 dholland Exp $");
+__RCSID("$NetBSD: srscan.c,v 1.9 2009/05/24 22:55:03 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -120,7 +120,8 @@
 					printf(", CLOAKED");
 				break;
 			  case 2:
-				printf("position      %d,%d/%d,%d",Ship.quadx, Ship.quady, Ship.sectx, Ship.secty);
+				printf("position      %d,%d/%d,%d", Ship.quadx,
+					Ship.quady, Ship.sectx, Ship.secty);
 				break;
 			  case 3:
 				printf("warp factor   %.1f", Ship.warp);
@@ -149,7 +150,8 @@
 			  case 9:
 				printf("life support  ");
 				if (damaged(LIFESUP)) {
-					printf("damaged, reserves = %.2f", Ship.reserves);
+					printf("damaged, reserves = %.2f",
+						Ship.reserves);
 					break;
 				}
 				printf("active");

Index: src/games/trek/autover.c
diff -u src/games/trek/autover.c:1.6 src/games/trek/autover.c:1.7
--- src/games/trek/autover.c:1.6	Sun May 24 19:18:44 2009
+++ src/games/trek/autover.c	Sun May 24 22:55:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: autover.c,v 1.6 2009/05/24 19:18:44 dholland Exp $	*/
+/*	$NetBSD: autover.c,v 1.7 2009/05/24 22:55:03 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)autover.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: autover.c,v 1.6 2009/05/24 19:18:44 dholland Exp $");
+__RCSID("$NetBSD: autover.c,v 1.7 2009/05/24 22:55:03 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -65,8 +65,10 @@
 	double			dist;
 	int		course;
 
-	printf("\07RED ALERT:  The %s is in a supernova quadrant\n", Ship.shipname);
-	printf("***  Emergency override attempts to hurl %s to safety\n", Ship.shipname);
+	printf("\07RED ALERT:  The %s is in a supernova quadrant\n",
+		Ship.shipname);
+	printf("***  Emergency override attempts to hurl %s to safety\n",
+		Ship.shipname);
 	/* let's get our ass out of here */
 	Ship.warp = 6.0 + 2.0 * franf();
 	Ship.warp2 = Ship.warp * Ship.warp;

Index: src/games/trek/capture.c
diff -u src/games/trek/capture.c:1.10 src/games/trek/capture.c:1.11
--- src/games/trek/capture.c:1.10	Sun May 24 21:44:56 2009
+++ src/games/trek/capture.c	Sun May 24 22:55:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: capture.c,v 1.10 2009/05/24 21:44:56 dholland Exp $	*/
+/*	$NetBSD: capture.c,v 1.11 2009/05/24 22:55:03 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)capture.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: capture.c,v 1.10 2009/05/24 21:44:56 dholland Exp $");
+__RCSID("$NetBSD: capture.c,v 1.11 2009/05/24 22:55:03 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -99,7 +99,8 @@
 		printf("Klingon at %d,%d surrenders\n", k->x, k->y);
 		i = ranf(Param.klingcrew);
 		if ( i > 0 )
-			printf("%d klingons commit suicide rather than be taken captive\n", Param.klingcrew - i);
+			printf("%d klingons commit suicide rather than be "
+			       "taken captive\n", Param.klingcrew - i);
 		if (i > Ship.brigfree)
 			i = Ship.brigfree;
 		Ship.brigfree -= i;
Index: src/games/trek/events.c
diff -u src/games/trek/events.c:1.10 src/games/trek/events.c:1.11
--- src/games/trek/events.c:1.10	Sun May 24 21:44:56 2009
+++ src/games/trek/events.c	Sun May 24 22:55:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: events.c,v 1.10 2009/05/24 21:44:56 dholland Exp $	*/
+/*	$NetBSD: events.c,v 1.11 2009/05/24 22:55:03 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)events.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: events.c,v 1.10 2009/05/24 21:44:56 dholland Exp $");
+__RCSID("$NetBSD: events.c,v 1.11 2009/05/24 22:55:03 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -152,7 +152,8 @@
 					for (iy = 0; iy < NQUADS; iy++) {
 						q = &Quad[ix][iy];
 						if (q->stars >= 0)
-							if ((i -= q->klings) <= 0)
+							if ((i -= q->klings)
+							    <= 0)
 								break;
 					}
 					if (i <= 0)
@@ -166,8 +167,11 @@
 				/* nope, dump him in the new quadrant */
 				Ship.quadx = ix;
 				Ship.quady = iy;
-				printf("\n%s caught in long range tractor beam\n", Ship.shipname);
-				printf("*** Pulled to quadrant %d,%d\n", Ship.quadx, Ship.quady);
+				printf("\n%s caught in long range tractor "
+				       "beam\n",
+					Ship.shipname);
+				printf("*** Pulled to quadrant %d,%d\n",
+					Ship.quadx, Ship.quady);
 				Ship.sectx = ranf(NSECTS);
 				Ship.secty = ranf(NSECTS);
 				initquad(0);
@@ -208,23 +212,33 @@
 			}
 			e = ev;
 			if (i >= Now.bases) {
-				/* not now; wait a while and see if some Klingons move in */
+				/*
+				 * not now; wait a while and see if
+				 * some Klingons move in
+				 */
 				reschedule(e, 0.5 + 3.0 * franf());
 				break;
 			}
-			/* schedule a new attack, and a destruction of the base */
+			/*
+			 * schedule a new attack, and a destruction of
+			 * the base
+			 */
 			xresched(e, E_KATSB, 1);
 			e = xsched(E_KDESB, 1, ix, iy, 0);
 
 			/* report it if we can */
 			if (!damaged(SSRADIO)) {
-				printf("\nUhura:  Captain, we have received a distress signal\n");
-				printf("  from the starbase in quadrant %d,%d.\n",
+				printf("\nUhura:  Captain, we have received a "
+				       "distress signal\n");
+				printf("  from the starbase in quadrant "
+				       "%d,%d.\n",
 					ix, iy);
 				restcancel++;
 			} else {
-				/* SSRADIO out, make it so we can't see the distress call */
-				/* but it's still there!!! */
+				/*
+				 * SSRADIO out, make it so we can't see the
+				 * distress call but it's still there!!!
+				 */
 				e->evcode |= E_HIDDEN;
 			}
 			break;
@@ -232,8 +246,10 @@
 		  case E_KDESB:			/* Klingon destroys starbase */
 			unschedule(e);
 			q = &Quad[e->x][e->y];
-			/* if the base has mysteriously gone away, or if the Klingon
-			   got tired and went home, ignore this event */
+			/*
+			 * if the base has mysteriously gone away, or if the
+			 * Klingon got tired and went home, ignore this event
+			 */
 			if (q->bases <=0 || q->klings <= 0)
 				break;
 			/* are we in the same quadrant? */
@@ -252,18 +268,23 @@
 			/* if we already have too many, throw this one away */
 			if (Ship.distressed >= MAXDISTR)
 				break;
-			/* try a whole bunch of times to find something suitable */
+			/* try a bunch of times to find something suitable */
 			for (i = 0; i < 100; i++) {
 				ix = ranf(NQUADS);
 				iy = ranf(NQUADS);
 				q = &Quad[ix][iy];
-				/* need a quadrant which is not the current one,
-				   which has some stars which are inhabited and
-				   not already under attack, which is not
-				   supernova'ed, and which has some Klingons in it */
-				if (!((ix == Ship.quadx && iy == Ship.quady) || q->stars < 0 ||
-				    (q->qsystemname & Q_DISTRESSED) ||
-				    (q->qsystemname & Q_SYSTEM) == 0 || q->klings <= 0))
+				/*
+				 * need a quadrant which is not the current
+				 * one, which has some inhabited stars which
+				 * are not already under attack, which is not
+				 * supernova'ed, and which has some Klingons
+				 * in it
+				 */
+				if (!((ix == Ship.quadx && iy == Ship.quady) ||
+				      q->stars < 0 ||
+				      (q->qsystemname & Q_DISTRESSED) ||
+				      (q->qsystemname & Q_SYSTEM) == 0 ||
+				      q->klings <= 0))
 					break;
 			}
 			if (i >= 100)
@@ -277,7 +298,8 @@
 
 			/* tell the captain about it if we can */
 			if (!damaged(SSRADIO)) {
-				printf("\nUhura: Captain, starsystem %s in quadrant %d,%d is under attack\n",
+				printf("\nUhura: Captain, starsystem %s in "
+				       "quadrant %d,%d is under attack\n",
 					Systemname[e->systemname], ix, iy);
 				restcancel++;
 			} else {
@@ -298,11 +320,13 @@
 			}
 
 			/* play stork and schedule the first baby */
-			e = schedule(E_REPRO, Param.eventdly[E_REPRO] * franf(), e->x, e->y, e->systemname);
+			e = schedule(E_REPRO, Param.eventdly[E_REPRO] * franf(),
+				e->x, e->y, e->systemname);
 
 			/* report the disaster if we can */
 			if (!damaged(SSRADIO)) {
-				printf("\nUhura:  We've lost contact with starsystem %s\n",
+				printf("\nUhura:  We've lost contact with "
+				       "starsystem %s\n",
 					Systemname[e->systemname]);
 				printf("  in quadrant %d,%d.\n",
 					e->x, e->y);
@@ -335,8 +359,12 @@
 						if (j < 0 || j >= NQUADS)
 							continue;
 						q = &Quad[i][j];
-						/* check for this quad ok (not full & no snova) */
-						if (q->klings >= MAXKLQUAD || q->stars < 0)
+						/*
+						 * check for this quad ok (not
+						 * full & no snova)
+						 */
+						if (q->klings >= MAXKLQUAD ||
+						    q->stars < 0)
 							continue;
 						break;
 					}
@@ -361,7 +389,8 @@
 				k->y = iy;
 				k->power = Param.klingpwr;
 				k->srndreq = 0;
-				compkldist(Etc.klingon[0].dist == Etc.klingon[0].avgdist ? 0 : 1);
+				compkldist(Etc.klingon[0].dist ==
+					Etc.klingon[0].avgdist ? 0 : 1);
 			}
 
 			/* recompute time left */
@@ -406,9 +435,12 @@
 			  case SINS:
 				if (Ship.cond == DOCKED)
 					break;
-				printf("Spock has tried to recalibrate your Space Internal Navigation System,\n");
-				printf("  but he has no standard base to calibrate to.  Suggest you get\n");
-				printf("  to a starbase immediately so that you can properly recalibrate.\n");
+				printf("Spock has tried to recalibrate your "
+				       "Space Internal Navigation System,\n");
+				printf("  but he has no standard base to "
+				       "calibrate to.  Suggest you get\n");
+				printf("  to a starbase immediately so that "
+				       "you can properly recalibrate.\n");
 				Ship.sinsbad = 1;
 				break;
 
@@ -422,7 +454,8 @@
 			break;
 		}
 
-		if (restcancel && Move.resting && getynpar("Spock: Shall we cancel our rest period"))
+		if (restcancel && Move.resting &&
+		    getynpar("Spock: Shall we cancel our rest period"))
 			Move.time = xdate - idate;
 
 	}
Index: src/games/trek/kill.c
diff -u src/games/trek/kill.c:1.10 src/games/trek/kill.c:1.11
--- src/games/trek/kill.c:1.10	Sun May 24 21:44:56 2009
+++ src/games/trek/kill.c	Sun May 24 22:55:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: kill.c,v 1.10 2009/05/24 21:44:56 dholland Exp $	*/
+/*	$NetBSD: kill.c,v 1.11 2009/05/24 22:55:03 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)kill.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: kill.c,v 1.10 2009/05/24 21:44:56 dholland Exp $");
+__RCSID("$NetBSD: kill.c,v 1.11 2009/05/24 22:55:03 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -125,11 +125,14 @@
 		Sect[Etc.starbase.x][Etc.starbase.y] = EMPTY;
 		if (Ship.cond == DOCKED)
 			undock(0);
-		printf("Starbase at %d,%d destroyed\n", Etc.starbase.x, Etc.starbase.y);
+		printf("Starbase at %d,%d destroyed\n",
+			Etc.starbase.x, Etc.starbase.y);
 	} else {
 		if (!damaged(SSRADIO)) {
-			printf("Uhura: Starfleet command reports that the starbase in\n");
-			printf("   quadrant %d,%d has been destroyed\n", qx, qy);
+			printf("Uhura: Starfleet command reports that the "
+			       "starbase in\n");
+			printf("   quadrant %d,%d has been destroyed\n",
+				qx, qy);
 		}
 		else
 			schedule(E_KATSB | E_GHOST, TOOLARGE, qx, qy, 0);
@@ -200,7 +203,8 @@
 		switch (e->evcode) {
 		  case E_KDESB:
 			if (f) {
-				printf("Distress call for starbase in %d,%d nullified\n",
+				printf("Distress call for starbase in "
+				       "%d,%d nullified\n",
 					x, y);
 				unschedule(e);
 			}
@@ -209,7 +213,8 @@
 		  case E_ENSLV:
 		  case E_REPRO:
 			if (f) {
-				printf("Distress call for %s in quadrant %d,%d nullified\n",
+				printf("Distress call for %s in quadrant "
+				       "%d,%d nullified\n",
 					Systemname[e->systemname], x, y);
 				q->qsystemname = e->systemname;
 				unschedule(e);
Index: src/games/trek/schedule.c
diff -u src/games/trek/schedule.c:1.10 src/games/trek/schedule.c:1.11
--- src/games/trek/schedule.c:1.10	Sun May 24 21:44:56 2009
+++ src/games/trek/schedule.c	Sun May 24 22:55:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: schedule.c,v 1.10 2009/05/24 21:44:56 dholland Exp $	*/
+/*	$NetBSD: schedule.c,v 1.11 2009/05/24 22:55:03 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)schedule.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: schedule.c,v 1.10 2009/05/24 21:44:56 dholland Exp $");
+__RCSID("$NetBSD: schedule.c,v 1.11 2009/05/24 22:55:03 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -69,7 +69,8 @@
 		/* got a slot */
 #ifdef xTRACE
 		if (Trace)
-			printf("schedule: type %d @ %.2f slot %d parm %d %d %d\n",
+			printf("schedule: type %d @ %.2f "
+			       "slot %d parm %d %d %d\n",
 				type, date, i, x, y, z);
 #endif
 		e->evcode = type;
@@ -146,9 +147,11 @@
 xsched(int ev1, int factor, int x, int y, int z)
 {
 	int	ev;
+	double when;
 
 	ev = ev1;
-	return (schedule(ev, -Param.eventdly[ev] * Param.time * log(franf()) / factor, x, y, z));
+	when = -Param.eventdly[ev] * Param.time * log(franf()) / factor;
+	return (schedule(ev, when, x, y, z));
 }
 
 
@@ -164,8 +167,10 @@
 {
 	int		ev;
 	struct event	*e;
+	double when;
 
 	ev = ev1;
 	e = e1;
-	reschedule(e, -Param.eventdly[ev] * Param.time * log(franf()) / factor);
+	when = -Param.eventdly[ev] * Param.time * log(franf()) / factor;
+	reschedule(e, when);
 }
Index: src/games/trek/shield.c
diff -u src/games/trek/shield.c:1.10 src/games/trek/shield.c:1.11
--- src/games/trek/shield.c:1.10	Sun May 24 21:44:56 2009
+++ src/games/trek/shield.c	Sun May 24 22:55:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: shield.c,v 1.10 2009/05/24 21:44:56 dholland Exp $	*/
+/*	$NetBSD: shield.c,v 1.11 2009/05/24 22:55:03 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)shield.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: shield.c,v 1.10 2009/05/24 21:44:56 dholland Exp $");
+__RCSID("$NetBSD: shield.c,v 1.11 2009/05/24 22:55:03 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -80,7 +80,8 @@
 	if (f < 0) {
 		/* cloaking device */
 		if (Ship.ship == QUEENE) {
-			printf("Ye Faire Queene does not have the cloaking device.\n");
+			printf("Ye Faire Queene does not have the "
+			       "cloaking device.\n");
 			return;
 		}
 		device = "Cloaking device";
@@ -110,9 +111,11 @@
 		i = (long) r->value;
 	} else {
 		if (*stat)
-			(void)sprintf(s, "%s %s up.  Do you want %s down", device, dev2, dev3);
+			(void)sprintf(s, "%s %s up.  Do you want %s down",
+				device, dev2, dev3);
 		else
-			(void)sprintf(s, "%s %s down.  Do you want %s up", device, dev2, dev3);
+			(void)sprintf(s, "%s %s down.  Do you want %s up",
+				device, dev2, dev3);
 		if (!getynpar(s))
 			return;
 		i = !*stat;
Index: src/games/trek/warp.c
diff -u src/games/trek/warp.c:1.10 src/games/trek/warp.c:1.11
--- src/games/trek/warp.c:1.10	Sun May 24 21:44:56 2009
+++ src/games/trek/warp.c	Sun May 24 22:55:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: warp.c,v 1.10 2009/05/24 21:44:56 dholland Exp $	*/
+/*	$NetBSD: warp.c,v 1.11 2009/05/24 22:55:03 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)warp.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: warp.c,v 1.10 2009/05/24 21:44:56 dholland Exp $");
+__RCSID("$NetBSD: warp.c,v 1.11 2009/05/24 22:55:03 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -84,6 +84,7 @@
 	double		frac;
 	int		percent;
 	int		i;
+	double repairs;
 
 	if (Ship.cond == DOCKED) {
 		printf("%s is docked\n", Ship.shipname);
@@ -101,7 +102,8 @@
 	power = (dist + 0.05) * Ship.warp3;
 	percent = 100 * power / Ship.energy + 0.5;
 	if (percent >= 85) {
-		printf("Scotty: That would consume %d%% of our remaining energy.\n",
+		printf("Scotty: That would consume %d%% of our remaining "
+		       "energy.\n",
 			percent);
 		if (!getynpar("Are you sure that is wise"))
 			return;
@@ -125,7 +127,8 @@
 		frac = franf();
 		dist *= frac;
 		time *= frac;
-		damage(WARP, (frac + 1.0) * Ship.warp * (franf() + 0.25) * 0.20);
+		repairs = (frac + 1.0) * Ship.warp * (franf() + 0.25) * 0.20;
+		damage(WARP, repairs);
 	}
 
 	/* do the move */
@@ -157,7 +160,8 @@
 			/* positive time warp */
 			time = (Ship.warp - 8.0) * dist * (franf() + 1.0);
 			Now.date += time;
-			printf("Positive time portal entered -- it is now Stardate %.2f\n",
+			printf("Positive time portal entered -- "
+			       "it is now Stardate %.2f\n",
 				Now.date);
 			for (i = 0; i < MAXEVENTS; i++) {
 				percent = Event[i].evcode;
@@ -175,7 +179,8 @@
 		memcpy(p, Event, sizeof Event);
 		p += sizeof Event;
 		memcpy(p, &Now, sizeof Now);
-		printf("Negative time portal entered -- it is now Stardate %.2f\n",
+		printf("Negative time portal entered -- "
+		       "it is now Stardate %.2f\n",
 			Now.date);
 		for (i = 0; i < MAXEVENTS; i++)
 			if (Event[i].evcode == E_FIXDV)
@@ -186,7 +191,8 @@
 	/* test for just a lot of damage */
 	if (percent < 80)
 		lose(L_TOOFAST);
-	printf("Equilibrium restored -- extreme damage occurred to ship systems\n");
+	printf("Equilibrium restored -- "
+	       "extreme damage occurred to ship systems\n");
 	for (i = 0; i < NDEV; i++)
 		damage(i, (3.0 * (franf() + franf()) + 1.0) * Param.damfac[i]);
 	Ship.shldup = 0;

Index: src/games/trek/computer.c
diff -u src/games/trek/computer.c:1.13 src/games/trek/computer.c:1.14
--- src/games/trek/computer.c:1.13	Sun May 24 21:44:56 2009
+++ src/games/trek/computer.c	Sun May 24 22:55:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: computer.c,v 1.13 2009/05/24 21:44:56 dholland Exp $	*/
+/*	$NetBSD: computer.c,v 1.14 2009/05/24 22:55:03 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)computer.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: computer.c,v 1.13 2009/05/24 21:44:56 dholland Exp $");
+__RCSID("$NetBSD: computer.c,v 1.14 2009/05/24 22:55:03 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -128,7 +128,8 @@
 		switch ((long)r->value) {
 
 		  case 1:			/* star chart */
-			printf("Computer record of galaxy for all long range sensor scans\n\n");
+			printf("Computer record of galaxy for all long range "
+			       "sensor scans\n\n");
 			printf("  ");
 			/* print top header */
 			for (i = 0; i < NQUADS; i++)
@@ -137,7 +138,8 @@
 			for (i = 0; i < NQUADS; i++) {
 				printf("%d ", i);
 				for (j = 0; j < NQUADS; j++) {
-					if (i == Ship.quadx && j == Ship.quady) {
+					if (i == Ship.quadx &&
+					    j == Ship.quady) {
 						printf("$$$ ");
 						continue;
 					}
@@ -152,7 +154,8 @@
 						if (q->scanned < 0)
 							printf("... ");
 						else
-							printf("%3d ", q->scanned);
+							printf("%3d ",
+								q->scanned);
 				}
 				printf("%d\n", i);
 			}
@@ -173,8 +176,11 @@
 			}
 			/* for each Klingon, give the course & distance */
 			for (i = 0; i < Etc.nkling; i++) {
-				printf("Klingon at %d,%d", Etc.klingon[i].x, Etc.klingon[i].y);
-				course = kalc(Ship.quadx, Ship.quady, Etc.klingon[i].x, Etc.klingon[i].y, &dist);
+				printf("Klingon at %d,%d",
+					Etc.klingon[i].x, Etc.klingon[i].y);
+				course = kalc(Ship.quadx, Ship.quady,
+					      Etc.klingon[i].x,
+					      Etc.klingon[i].y, &dist);
 				prkalc(course, dist);
 			}
 			break;
@@ -205,7 +211,8 @@
 				break;
 			}
 			printf("%d,%d/%d,%d to %d,%d/%d,%d",
-				Ship.quadx, Ship.quady, Ship.sectx, Ship.secty, tqx, tqy, ix, iy);
+				Ship.quadx, Ship.quady, Ship.sectx, Ship.secty,
+				tqx, tqy, ix, iy);
 			prkalc(course, dist);
 			break;
 
@@ -219,7 +226,8 @@
 				break;
 			dist *= 10.0;
 			cost = pow(0.90, dist) * 98.0 + 0.5;
-			printf("Phasers are %d%% effective at that range\n", cost);
+			printf("Phasers are %d%% effective at that range\n",
+				cost);
 			break;
 
 		  case 6:			/* warp cost (time/energy) */
@@ -231,7 +239,8 @@
 				warpfact = Ship.warp;
 			cost = (dist + 0.05) * warpfact * warpfact * warpfact;
 			time = Param.warptime * dist / (warpfact * warpfact);
-			printf("Warp %.2f distance %.2f cost %.2f stardates %d (%d w/ shlds up) units\n",
+			printf("Warp %.2f distance %.2f cost %.2f "
+			       "stardates %d (%d w/ shlds up) units\n",
 				warpfact, dist, time, cost, cost + cost);
 			break;
 
@@ -257,15 +266,18 @@
 				switch (e->evcode & E_EVENT) {
 
 				  case E_KDESB:
-					printf("Klingon is attacking starbase in quadrant %d,%d\n",
+					printf("Klingon is attacking starbase "
+					       "in quadrant %d,%d\n",
 						e->x, e->y);
 					j = 0;
 					break;
 
 				  case E_ENSLV:
 				  case E_REPRO:
-					printf("Starsystem %s in quadrant %d,%d is distressed\n",
-						Systemname[e->systemname], e->x, e->y);
+					printf("Starsystem %s in quadrant "
+					       "%d,%d is distressed\n",
+						Systemname[e->systemname],
+						e->x, e->y);
 					j = 0;
 					break;
 				}
Index: src/games/trek/phaser.c
diff -u src/games/trek/phaser.c:1.13 src/games/trek/phaser.c:1.14
--- src/games/trek/phaser.c:1.13	Sun May 24 21:44:56 2009
+++ src/games/trek/phaser.c	Sun May 24 22:55:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: phaser.c,v 1.13 2009/05/24 21:44:56 dholland Exp $	*/
+/*	$NetBSD: phaser.c,v 1.14 2009/05/24 22:55:03 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)phaser.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: phaser.c,v 1.13 2009/05/24 21:44:56 dholland Exp $");
+__RCSID("$NetBSD: phaser.c,v 1.14 2009/05/24 22:55:03 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -121,7 +121,8 @@
 		return;
 	}
 	if (Ship.cloaked) {
-		printf("Sulu: Captain, surely you must realize that we cannot fire\n");
+		printf("Sulu: Captain, surely you must realize that we cannot "
+		       "fire\n");
 		printf("  phasers with the cloaking device up.\n");
 		return;
 	}
@@ -190,7 +191,8 @@
 	} else {
 		/* automatic distribution of power */
 		if (Etc.nkling <= 0) {
-			printf("Sulu: But there are no Klingons in this quadrant\n");
+			printf("Sulu: But there are no Klingons in this "
+			       "quadrant\n");
 			return;
 		}
 		printf("Phasers locked on target.  ");
@@ -215,7 +217,8 @@
 				k = &Etc.klingon[i];
 				b = &bank[i];
 				distfactor = k->dist;
-				anglefactor = ALPHA * BETA * OMEGA / (distfactor * distfactor + EPSILON);
+				anglefactor = ALPHA * BETA * OMEGA /
+					(distfactor * distfactor + EPSILON);
 				anglefactor *= GAMMA;
 				distfactor = k->power;
 				distfactor /= anglefactor;

Index: src/games/trek/dcrept.c
diff -u src/games/trek/dcrept.c:1.9 src/games/trek/dcrept.c:1.10
--- src/games/trek/dcrept.c:1.9	Sun May 24 21:44:56 2009
+++ src/games/trek/dcrept.c	Sun May 24 22:55:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: dcrept.c,v 1.9 2009/05/24 21:44:56 dholland Exp $	*/
+/*	$NetBSD: dcrept.c,v 1.10 2009/05/24 22:55:03 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)dcrept.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: dcrept.c,v 1.9 2009/05/24 21:44:56 dholland Exp $");
+__RCSID("$NetBSD: dcrept.c,v 1.10 2009/05/24 22:55:03 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -89,7 +89,8 @@
 		/* compute time till fixed, then adjust by the magic factors */
 		x = e->date - Now.date;
 		printf("%-24s%7.2f  %7.2f\n",
-			Device[e->systemname].name, x * m1 + 0.005, x * m2 + 0.005);
+			Device[e->systemname].name, x * m1 + 0.005,
+			x * m2 + 0.005);
 
 		/* do a little consistancy checking */
 	}
Index: src/games/trek/dock.c
diff -u src/games/trek/dock.c:1.9 src/games/trek/dock.c:1.10
--- src/games/trek/dock.c:1.9	Sun May 24 21:44:56 2009
+++ src/games/trek/dock.c	Sun May 24 22:55:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: dock.c,v 1.9 2009/05/24 21:44:56 dholland Exp $	*/
+/*	$NetBSD: dock.c,v 1.10 2009/05/24 22:55:03 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)dock.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: dock.c,v 1.9 2009/05/24 21:44:56 dholland Exp $");
+__RCSID("$NetBSD: dock.c,v 1.10 2009/05/24 22:55:03 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -83,7 +83,8 @@
 		}
 	}
 	if (!ok) {
-		printf("Chekov: But captain, we are not adjacent to a starbase.\n");
+		printf("Chekov: But captain, we are not adjacent to a "
+		       "starbase.\n");
 		return;
 	}
 
Index: src/games/trek/impulse.c
diff -u src/games/trek/impulse.c:1.9 src/games/trek/impulse.c:1.10
--- src/games/trek/impulse.c:1.9	Sun May 24 21:44:56 2009
+++ src/games/trek/impulse.c	Sun May 24 22:55:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: impulse.c,v 1.9 2009/05/24 21:44:56 dholland Exp $	*/
+/*	$NetBSD: impulse.c,v 1.10 2009/05/24 22:55:03 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)impulse.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: impulse.c,v 1.9 2009/05/24 21:44:56 dholland Exp $");
+__RCSID("$NetBSD: impulse.c,v 1.10 2009/05/24 22:55:03 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -68,7 +68,8 @@
 	power = 20 + 100 * dist;
 	percent = 100 * power / Ship.energy + 0.5;
 	if (percent >= 85) {
-		printf("Scotty: That would consume %d%% of our remaining energy.\n",
+		printf("Scotty: That would consume %d%% of our remaining "
+		       "energy.\n",
 			percent);
 		if (!getynpar("Are you sure that is wise"))
 			return;
Index: src/games/trek/lrscan.c
diff -u src/games/trek/lrscan.c:1.9 src/games/trek/lrscan.c:1.10
--- src/games/trek/lrscan.c:1.9	Sun May 24 21:44:56 2009
+++ src/games/trek/lrscan.c	Sun May 24 22:55:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: lrscan.c,v 1.9 2009/05/24 21:44:56 dholland Exp $	*/
+/*	$NetBSD: lrscan.c,v 1.10 2009/05/24 22:55:03 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.9 2009/05/24 21:44:56 dholland Exp $");
+__RCSID("$NetBSD: lrscan.c,v 1.10 2009/05/24 22:55:03 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -63,7 +63,8 @@
 	if (check_out(LRSCAN)) {
 		return;
 	}
-	printf("Long range scan for quadrant %d,%d\n\n", Ship.quadx, Ship.quady);
+	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++) {
Index: src/games/trek/move.c
diff -u src/games/trek/move.c:1.9 src/games/trek/move.c:1.10
--- src/games/trek/move.c:1.9	Sun May 24 21:44:56 2009
+++ src/games/trek/move.c	Sun May 24 22:55:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: move.c,v 1.9 2009/05/24 21:44:56 dholland Exp $	*/
+/*	$NetBSD: move.c,v 1.10 2009/05/24 22:55:03 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)move.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: move.c,v 1.9 2009/05/24 21:44:56 dholland Exp $");
+__RCSID("$NetBSD: move.c,v 1.10 2009/05/24 22:55:03 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -118,7 +118,8 @@
 	evtime = Now.eventptr[E_LRTB]->date - Now.date;
 #ifdef xTRACE
 	if (Trace)
-		printf("E.ep = %p, ->evcode = %d, ->date = %.2f, evtime = %.2f\n",
+		printf("E.ep = %p, ->evcode = %d, ->date = %.2f, "
+		       "evtime = %.2f\n",
 			Now.eventptr[E_LRTB], Now.eventptr[E_LRTB]->evcode,
 			Now.eventptr[E_LRTB]->date, evtime);
 #endif
@@ -138,7 +139,8 @@
 	n = xn + 0.5;
 #ifdef xTRACE
 	if (Trace)
-		printf("dx = %.2f, dy = %.2f, xn = %.2f, n = %d\n", dx, dy, xn, n);
+		printf("dx = %.2f, dy = %.2f, xn = %.2f, n = %d\n",
+			dx, dy, xn, n);
 #endif
 	Move.free = 0;
 
@@ -147,7 +149,8 @@
 		iy = (y += dy);
 #ifdef xTRACE
 		if (Trace)
-			printf("ix = %d, x = %.2f, iy = %d, y = %.2f\n", ix, x, iy, y);
+			printf("ix = %d, x = %.2f, iy = %d, y = %.2f\n",
+				ix, x, iy, y);
 #endif
 		if (x < 0.0 || y < 0.0 || x >= sectsize || y >= sectsize) {
 			/* enter new quadrant */
@@ -191,7 +194,8 @@
 			if (!damaged(COMPUTER) && ramflag <= 0) {
 				ix = x - dx;
 				iy = y - dy;
-				printf("Computer reports navigation error; %s stopped at %d,%d\n",
+				printf("Computer reports navigation error; "
+				       "%s stopped at %d,%d\n",
 					Ship.shipname, ix, iy);
 				Ship.energy -= Param.stopengy * speed;
 				break;
Index: src/games/trek/win.c
diff -u src/games/trek/win.c:1.9 src/games/trek/win.c:1.10
--- src/games/trek/win.c:1.9	Sun May 24 21:44:56 2009
+++ src/games/trek/win.c	Sun May 24 22:55:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: win.c,v 1.9 2009/05/24 21:44:56 dholland Exp $	*/
+/*	$NetBSD: win.c,v 1.10 2009/05/24 22:55:03 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)win.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: win.c,v 1.9 2009/05/24 21:44:56 dholland Exp $");
+__RCSID("$NetBSD: win.c,v 1.10 2009/05/24 22:55:03 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -73,8 +73,9 @@
 	s = score();
 
 	/* decide if she gets a promotion */
-	if (Game.helps == 0 && Game.killb == 0 && Game.killinhab == 0 && 5 * Game.kills + Game.deaths < 100 &&
-			s >= 1000 && Ship.ship == ENTERPRISE) {
+	if (Game.helps == 0 && Game.killb == 0 && Game.killinhab == 0 &&
+	    5 * Game.kills + Game.deaths < 100 &&
+	    s >= 1000 && Ship.ship == ENTERPRISE) {
 		printf("In fact, you are promoted one step in rank,\n");
 		if (Game.skill >= 6) {
 			printf("to the exalted rank of Commodore Emeritus\n");

Index: src/games/trek/dumpme.c
diff -u src/games/trek/dumpme.c:1.7 src/games/trek/dumpme.c:1.8
--- src/games/trek/dumpme.c:1.7	Sun May 24 21:44:56 2009
+++ src/games/trek/dumpme.c	Sun May 24 22:55:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: dumpme.c,v 1.7 2009/05/24 21:44:56 dholland Exp $	*/
+/*	$NetBSD: dumpme.c,v 1.8 2009/05/24 22:55:03 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)dumpme.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: dumpme.c,v 1.7 2009/05/24 21:44:56 dholland Exp $");
+__RCSID("$NetBSD: dumpme.c,v 1.8 2009/05/24 22:55:03 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -71,8 +71,10 @@
 	if (f) {
 		printf("%s falls into a black hole.\n", Ship.shipname);
 	} else {
-		printf("Computer applies full reverse power to avoid hitting the\n");
-		printf("   negative energy barrier.  A space warp was entered.\n");
+		printf("Computer applies full reverse power to avoid hitting "
+		       "the\n");
+		printf("   negative energy barrier.  A space warp was "
+		       "entered.\n");
 	}
 	/* bump repair dates forward */
 	for (i = 0; i < MAXEVENTS; i++) {
Index: src/games/trek/dumpssradio.c
diff -u src/games/trek/dumpssradio.c:1.7 src/games/trek/dumpssradio.c:1.8
--- src/games/trek/dumpssradio.c:1.7	Sun May 24 21:44:56 2009
+++ src/games/trek/dumpssradio.c	Sun May 24 22:55:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: dumpssradio.c,v 1.7 2009/05/24 21:44:56 dholland Exp $	*/
+/*	$NetBSD: dumpssradio.c,v 1.8 2009/05/24 22:55:03 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)dumpssradio.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: dumpssradio.c,v 1.7 2009/05/24 21:44:56 dholland Exp $");
+__RCSID("$NetBSD: dumpssradio.c,v 1.8 2009/05/24 22:55:03 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -60,7 +60,8 @@
 			continue;
 		if (e->evcode & E_GHOST) {
 			unschedule(e);
-			printf("Starsystem %s in quadrant %d,%d is no longer distressed\n",
+			printf("Starsystem %s in quadrant %d,%d is no longer "
+			       "distressed\n",
 				systemname(&Quad[e->x][e->y]), e->x, e->y);
 			continue;
 		}
@@ -75,7 +76,8 @@
 
 		  case E_ENSLV:
 		  case E_REPRO:
-			printf("Starsystem %s in quadrant %d,%d is distressed\n",
+			printf("Starsystem %s in quadrant %d,%d is "
+			       "distressed\n",
 				systemname(&Quad[e->x][e->y]), e->x, e->y);
 			chkrest++;
 			break;
Index: src/games/trek/ram.c
diff -u src/games/trek/ram.c:1.7 src/games/trek/ram.c:1.8
--- src/games/trek/ram.c:1.7	Sun May 24 21:44:56 2009
+++ src/games/trek/ram.c	Sun May 24 22:55:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ram.c,v 1.7 2009/05/24 21:44:56 dholland Exp $	*/
+/*	$NetBSD: ram.c,v 1.8 2009/05/24 22:55:03 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)ram.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: ram.c,v 1.7 2009/05/24 21:44:56 dholland Exp $");
+__RCSID("$NetBSD: ram.c,v 1.8 2009/05/24 22:55:03 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -72,7 +72,8 @@
 	  case INHABIT:
 		printf("Yeoman Rand: Captain, isn't it getting hot in here?\n");
 		sleep(2);
-		printf("Spock: Hull temperature approaching 550 Degrees Kelvin.\n");
+		printf("Spock: Hull temperature approaching 550 Degrees "
+		       "Kelvin.\n");
 		lose(L_STAR);
 
 	  case BASE:
Index: src/games/trek/score.c
diff -u src/games/trek/score.c:1.7 src/games/trek/score.c:1.8
--- src/games/trek/score.c:1.7	Sun May 24 21:44:56 2009
+++ src/games/trek/score.c	Sun May 24 22:55:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: score.c,v 1.7 2009/05/24 21:44:56 dholland Exp $	*/
+/*	$NetBSD: score.c,v 1.8 2009/05/24 22:55:03 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)score.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: score.c,v 1.7 2009/05/24 21:44:56 dholland Exp $");
+__RCSID("$NetBSD: score.c,v 1.8 2009/05/24 22:55:03 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -69,10 +69,12 @@
 	r /= Game.killk + 1;
 	s += (t = -400 * r);
 	if (t != 0)
-		printf("Penalty for %d klingons remaining\t%6d\n", Now.klings, t);
+		printf("Penalty for %d klingons remaining\t%6d\n", Now.klings,
+			t);
 	if (Move.endgame > 0) {
 		s += (t = 100 * (u = Game.skill));
-		printf("Bonus for winning a %s%s game\t\t%6d\n", Skitab[u - 1].abrev, Skitab[u - 1].full, t);
+		printf("Bonus for winning a %s%s game\t\t%6d\n",
+			Skitab[u - 1].abrev, Skitab[u - 1].full, t);
 	}
 	if (Game.killed) {
 		s -= 500;

Index: src/games/trek/help.c
diff -u src/games/trek/help.c:1.11 src/games/trek/help.c:1.12
--- src/games/trek/help.c:1.11	Sun May 24 21:44:56 2009
+++ src/games/trek/help.c	Sun May 24 22:55:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: help.c,v 1.11 2009/05/24 21:44:56 dholland Exp $	*/
+/*	$NetBSD: help.c,v 1.12 2009/05/24 22:55:03 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)help.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: help.c,v 1.11 2009/05/24 21:44:56 dholland Exp $");
+__RCSID("$NetBSD: help.c,v 1.12 2009/05/24 22:55:03 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -140,7 +140,8 @@
 				if (dx < 0 || dx >= NSECTS)
 					continue;
 				dy = Etc.starbase.y + ranf(3) - 1;
-				if (dy < 0 || dy >= NSECTS || Sect[dx][dy] != EMPTY)
+				if (dy < 0 || dy >= NSECTS ||
+				    Sect[dx][dy] != EMPTY)
 					continue;
 				break;
 			}

Index: src/games/trek/main.c
diff -u src/games/trek/main.c:1.16 src/games/trek/main.c:1.17
--- src/games/trek/main.c:1.16	Sun May 24 21:44:56 2009
+++ src/games/trek/main.c	Sun May 24 22:55:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.16 2009/05/24 21:44:56 dholland Exp $	*/
+/*	$NetBSD: main.c,v 1.17 2009/05/24 22:55:03 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: main.c,v 1.16 2009/05/24 21:44:56 dholland Exp $");
+__RCSID("$NetBSD: main.c,v 1.17 2009/05/24 22:55:03 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -230,7 +230,8 @@
 		f_log = fopen(av[0], opencode);
 	*/
 
-	printf("\n   * * *   S T A R   T R E K   * * *\n\nPress return to continue.\n");
+	printf("\n   * * *   S T A R   T R E K   * * *\n\n"
+	       "Press return to continue.\n");
 
 	if (setjmp(env)) {
 		if ( !getynpar("Another game") )

Index: src/games/trek/torped.c
diff -u src/games/trek/torped.c:1.12 src/games/trek/torped.c:1.13
--- src/games/trek/torped.c:1.12	Sun May 24 21:44:56 2009
+++ src/games/trek/torped.c	Sun May 24 22:55:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: torped.c,v 1.12 2009/05/24 21:44:56 dholland Exp $	*/
+/*	$NetBSD: torped.c,v 1.13 2009/05/24 22:55:03 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)torped.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: torped.c,v 1.12 2009/05/24 21:44:56 dholland Exp $");
+__RCSID("$NetBSD: torped.c,v 1.13 2009/05/24 22:55:03 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -80,7 +80,8 @@
 	int		n;
 
 	if (Ship.cloaked) {
-		printf("Federation regulations do not permit attack while cloaked.\n");
+		printf("Federation regulations do not permit attack while "
+		       "cloaked.\n");
 		return;
 	}
 	if (check_out(TORPED))
@@ -150,7 +151,8 @@
 		while (1) {
 			ix = x += dx;
 			iy = y += dy;
-			if (x < 0.0 || x >= sectsize || y < 0.0 || y >= sectsize) {
+			if (x < 0.0 || x >= sectsize ||
+			    y < 0.0 || y >= sectsize) {
 				printf("Torpedo missed\n");
 				break;
 			}
@@ -160,16 +162,20 @@
 				continue;
 
 			  case HOLE:
-				printf("Torpedo disappears into a black hole\n");
+				printf("Torpedo disappears into a black "
+				       "hole\n");
 				break;
 
 			  case KLINGON:
 				for (k = 0; k < Etc.nkling; k++) {
-					if (Etc.klingon[k].x != ix || Etc.klingon[k].y != iy)
+					if (Etc.klingon[k].x != ix ||
+					    Etc.klingon[k].y != iy)
 						continue;
 					Etc.klingon[k].power -= 500 + ranf(501);
 					if (Etc.klingon[k].power > 0) {
-						printf("*** Hit on Klingon at %d,%d: extensive damages\n",
+						printf("*** Hit on Klingon at "
+						       "%d,%d: extensive "
+						       "damages\n",
 							ix, iy);
 						break;
 					}

Index: src/games/trek/trek.h
diff -u src/games/trek/trek.h:1.14 src/games/trek/trek.h:1.15
--- src/games/trek/trek.h:1.14	Sun May 24 21:44:56 2009
+++ src/games/trek/trek.h	Sun May 24 22:55:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: trek.h,v 1.14 2009/05/24 21:44:56 dholland Exp $	*/
+/*	$NetBSD: trek.h,v 1.15 2009/05/24 22:55:03 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -232,7 +232,7 @@
 	int	secty;		/* sector y coord */
 	unsigned char	cond;	/* condition code */
 	/* sinsbad is set if SINS is working but not calibrated */
-	char	sinsbad;	/* Space Inertial Navigation System condition */
+	char	sinsbad;	/* Space Inertial Navigation System condition*/
 	const char *shipname;	/* name of current starship */
 	char	ship;		/* current starship */
 	int	distressed;	/* number of distress calls */
@@ -321,13 +321,14 @@
 
 /* Other stuff, not dumped in a snapshot */
 struct Etc_struct {
-	struct kling	klingon[MAXKLQUAD];	/* sorted Klingon list */
-	short		nkling;			/* number of Klingons in this sector */
-						/* < 0 means automatic override mode */
-	char		fast;			/* set if speed > 300 baud */
-	struct xy	starbase;	/* starbase in current quadrant */
-	char		snapshot[sizeof Quad + sizeof Event + sizeof Now];	/* snapshot for time warp */
-	char		statreport;		/* set to get a status report on a srscan */
+	struct kling klingon[MAXKLQUAD];/* sorted Klingon list */
+	short nkling;			/* number of Klingons in this sector */
+					/* < 0 means automatic override mode */
+	char fast;			/* set if speed > 300 baud */
+	struct xy starbase;		/* starbase in current quadrant */
+	char snapshot[sizeof Quad + sizeof Event + sizeof Now];
+					/* snapshot for time warp */
+	char statreport;	/* set to get a status report on a srscan */
 };
 extern struct Etc_struct Etc;
 

Reply via email to