X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/c8a08e056ff2a0f7268ba7df647b69afcc26d11e..06d189c50fe0f27b79aa1e494c3b39d7478c1189:/sail/pl_5.c?ds=inline diff --git a/sail/pl_5.c b/sail/pl_5.c index f2762186..b3bdd77a 100644 --- a/sail/pl_5.c +++ b/sail/pl_5.c @@ -1,4 +1,4 @@ -/* $NetBSD: pl_5.c,v 1.11 2001/01/04 03:51:24 jwise Exp $ */ +/* $NetBSD: pl_5.c,v 1.17 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,20 +34,22 @@ #if 0 static char sccsid[] = "@(#)pl_5.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: pl_5.c,v 1.11 2001/01/04 03:51:24 jwise Exp $"); +__RCSID("$NetBSD: pl_5.c,v 1.17 2004/11/05 21:30:32 dsl Exp $"); #endif #endif /* not lint */ #include +#include #include #include +#include +#include "extern.h" #include "player.h" +#include "display.h" #define turnfirst(x) (*x == 'r' || *x == 'l') -void acceptmove(void); -void acceptboard(void); -static void parties(int *, struct ship *, int, int); +static void parties(struct ship *, int *, int, int); void acceptmove(void) @@ -124,7 +122,7 @@ acceptmove(void) *p-- = '\0'; break; default: - if (!isspace(*p)) { + if (!isspace((unsigned char)*p)) { Msg("Input error."); *p-- = '\0'; } @@ -191,16 +189,16 @@ acceptboard(void) if (meleeing(ms, sp) && crew[2]) { c = sgetch("How many more to board the $$? ", sp, 1); - parties(crew, sp, 0, c); + parties(sp, crew, 0, c); } else if ((fouled2(ms, sp) || grappled2(ms, sp)) && crew[2]) { c = sgetch("Crew sections to board the $$ (3 max) ?", sp, 1); - parties(crew, sp, 0, c); + parties(sp, crew, 0, c); } } if (crew[2]) { c = sgetch("How many sections to repel boarders? ", (struct ship *)0, 1); - parties(crew, ms, 1, c); + parties(ms, crew, 1, c); } blockalarm(); draw_slot(); @@ -208,7 +206,7 @@ acceptboard(void) } static void -parties(int *crew, struct ship *to, int isdefense, int buf) +parties(struct ship *to, int *crew, int isdefense, int buf) { int k, j, men; struct BP *ptr;