diff options
Diffstat (limited to 'battlestar/fly.c')
| -rw-r--r-- | battlestar/fly.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/battlestar/fly.c b/battlestar/fly.c index d0353a31..e2e298d3 100644 --- a/battlestar/fly.c +++ b/battlestar/fly.c @@ -1,4 +1,4 @@ -/* $NetBSD: fly.c,v 1.12 2004/01/27 20:30:29 jsm Exp $ */ +/* $NetBSD: fly.c,v 1.13 2005/07/01 06:04:54 jmc Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)fly.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: fly.c,v 1.12 2004/01/27 20:30:29 jsm Exp $"); +__RCSID("$NetBSD: fly.c,v 1.13 2005/07/01 06:04:54 jmc Exp $"); #endif #endif /* not lint */ @@ -61,8 +61,7 @@ static void succumb(int); static void target(void); static void -succumb(dummy) - int dummy __attribute__((__unused__)); +succumb(int dummy __attribute__((__unused__))) { if (oldsig == SIG_DFL) { endfly(); @@ -75,7 +74,7 @@ succumb(dummy) } int -visual() +visual(void) { destroyed = 0; if (initscr() == NULL) { @@ -151,7 +150,8 @@ visual() if (torps) { torps -= 2; blast(); - if (row == MIDR && column - MIDC < 2 && MIDC - column < 2) { + if (row == MIDR && column - MIDC < 2 && + MIDC - column < 2) { destroyed = 1; alarm(0); } @@ -182,7 +182,7 @@ visual() } static void -screen() +screen(void) { int r, c, n; int i; @@ -199,7 +199,7 @@ screen() } static void -target() +target(void) { int n; @@ -212,7 +212,7 @@ target() } static void -notarget() +notarget(void) { int n; @@ -225,7 +225,7 @@ notarget() } static void -blast() +blast(void) { int n; @@ -247,8 +247,7 @@ blast() } static void -moveenemy(dummy) - int dummy __attribute__((__unused__)); +moveenemy(int dummy __attribute__((__unused__))) { double d; int oldr, oldc; @@ -265,7 +264,8 @@ moveenemy(dummy) fuel = 0; mvaddstr(0, 60, "*** Out of fuel ***"); } - d = (double) ((row - MIDR) * (row - MIDR) + (column - MIDC) * (column - MIDC)); + d = (double) ((row - MIDR) * (row - MIDR) + (column - MIDC) * + (column - MIDC)); if (d < 16) { row += (rnd(9) - 4) % (4 - abs(row - MIDR)); column += (rnd(9) - 4) % (4 - abs(column - MIDC)); @@ -287,7 +287,7 @@ moveenemy(dummy) } static void -endfly() +endfly(void) { alarm(0); signal(SIGALRM, SIG_DFL); |
