-/* $NetBSD: misc.c,v 1.11 2001/01/04 06:33:18 itojun Exp $ */
+/* $NetBSD: misc.c,v 1.15 2004/11/05 21:30:32 dsl Exp $ */
/*
* Copyright (c) 1983, 1993
* 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.
*
#if 0
static char sccsid[] = "@(#)misc.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: misc.c,v 1.11 2001/01/04 06:33:18 itojun Exp $");
+__RCSID("$NetBSD: misc.c,v 1.15 2004/11/05 21:30:32 dsl Exp $");
#endif
#endif /* not lint */
#include <ctype.h>
#include <stdio.h>
#include <unistd.h>
+#include <stdlib.h>
#include <string.h>
#include "extern.h"
#include "pathnames.h"
#define distance(x,y) (abs(x) >= abs(y) ? abs(x) + abs(y)/2 : abs(y) + abs(x)/2)
-int range(struct ship *, struct ship *);
-struct ship *closestenemy(struct ship *, int, int);
static int angle(int, int);
-int gunsbear(struct ship *, struct ship *);
-int portside(struct ship *, struct ship *, int);
-int colours(struct ship *);
-void logger(struct ship *);
/* XXX */
int
if (sp->file->struck)
return flag;
flag = *countryname[capship(sp)->nationality];
- return sp->file->FS ? flag : tolower(flag);
+ return sp->file->FS ? flag : tolower((unsigned char)flag);
}
void