X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/38ff34bfdf7d560172c4cc0cffdb59dc4e6b309e..86af82ece770d2d27871e6083bc8eb4f7d2bbd3f:/sail/misc.c diff --git a/sail/misc.c b/sail/misc.c index 45e0da1d..ad3a647d 100644 --- a/sail/misc.c +++ b/sail/misc.c @@ -1,4 +1,4 @@ -/* $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 @@ -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,26 +34,21 @@ #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 #include #include +#include #include #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 @@ -197,7 +188,7 @@ colours(struct ship *sp) 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