-/* $NetBSD: fly.c,v 1.13 2005/07/01 06:04:54 jmc Exp $ */
+/* $NetBSD: fly.c,v 1.15 2012/10/13 19:58:53 dholland Exp $ */
/*
* Copyright (c) 1983, 1993
#if 0
static char sccsid[] = "@(#)fly.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: fly.c,v 1.13 2005/07/01 06:04:54 jmc Exp $");
+__RCSID("$NetBSD: fly.c,v 1.15 2012/10/13 19:58:53 dholland Exp $");
#endif
#endif /* not lint */
#include "extern.h"
#undef UP
#include <curses.h>
+#include <assert.h>
#define MIDR (LINES/2 - 1)
#define MIDC (COLS/2 - 1)
static void target(void);
static void
-succumb(int dummy __attribute__((__unused__)))
+succumb(int dummy __unused)
{
if (oldsig == SIG_DFL) {
endfly();
if (torps) {
torps -= 2;
blast();
- if (row == MIDR && column - MIDC < 2 &&
- MIDC - column < 2) {
+ if (row == MIDR && column < MIDC + 2 &&
+ column > MIDC - 2) {
destroyed = 1;
alarm(0);
}
}
static void
-moveenemy(int dummy __attribute__((__unused__)))
+moveenemy(int dummy __unused)
{
double d;
int oldr, oldc;