X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/82852318e37fa7eddacc3dd162a2d16d3a7487b9..46062f71bb0dbda76cf0bde5c52bc325c97fd7a9:/trek/destruct.c diff --git a/trek/destruct.c b/trek/destruct.c index eac87c53..d792f90e 100644 --- a/trek/destruct.c +++ b/trek/destruct.c @@ -1,4 +1,4 @@ -/* $NetBSD: destruct.c,v 1.5 1999/09/08 21:45:32 jsm Exp $ */ +/* $NetBSD: destruct.c,v 1.10 2009/05/24 21:44:56 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -12,11 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -38,11 +34,12 @@ #if 0 static char sccsid[] = "@(#)destruct.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: destruct.c,v 1.5 1999/09/08 21:45:32 jsm Exp $"); +__RCSID("$NetBSD: destruct.c,v 1.10 2009/05/24 21:44:56 dholland Exp $"); #endif #endif /* not lint */ #include +#include #include #include "trek.h" #include "getpar.h" @@ -69,8 +66,7 @@ __RCSID("$NetBSD: destruct.c,v 1.5 1999/09/08 21:45:32 jsm Exp $"); /*ARGSUSED*/ void -destruct(v) - int v __attribute__((__unused__)); +destruct(int v __unused) { char checkpass[15]; int i, j; @@ -83,8 +79,7 @@ destruct(v) printf("\n\07 --- WORKING ---\07\n"); sleep(3); /* output the count 10 9 8 7 6 */ - for (i = 10; i > 5; i--) - { + for (i = 10; i > 5; i--) { for (j = 10; j > i; j--) printf(" "); printf("%d\n", i); @@ -101,8 +96,7 @@ destruct(v) printf("Password verified; self destruct sequence continues:\n"); sleep(2); /* output count 5 4 3 2 1 0 */ - for (i = 5; i >= 0; i--) - { + for (i = 5; i >= 0; i--) { sleep(1); for (j = 5; j > i; j--) printf(" "); @@ -114,8 +108,7 @@ destruct(v) /* let's see what we can blow up!!!! */ zap = 20.0 * Ship.energy; Game.deaths += Ship.crew; - for (i = 0; i < Etc.nkling; ) - { + for (i = 0; i < Etc.nkling; ) { if (Etc.klingon[i].power * Etc.klingon[i].dist <= zap) killk(Etc.klingon[i].x, Etc.klingon[i].y); else