X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/e05192c777ae9a285d9681d4284a44502080945d..ccaf446a63995afde0c89b9c24ab8734e727bbf3:/sail/dr_5.c diff --git a/sail/dr_5.c b/sail/dr_5.c index 22957744..5846ccbb 100644 --- a/sail/dr_5.c +++ b/sail/dr_5.c @@ -1,4 +1,4 @@ -/* $NetBSD: dr_5.c,v 1.3 1995/04/22 10:36:51 cgd Exp $ */ +/* $NetBSD: dr_5.c,v 1.14 2009/03/14 22:52:52 dholland 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. * @@ -33,22 +29,23 @@ * SUCH DAMAGE. */ +#include <sys/cdefs.h> #ifndef lint #if 0 -static char sccsid[] = "@(#)dr_5.c 8.1 (Berkeley) 5/31/93"; +static char sccsid[] = "@(#)dr_5.c 8.2 (Berkeley) 4/28/95"; #else -static char rcsid[] = "$NetBSD: dr_5.c,v 1.3 1995/04/22 10:36:51 cgd Exp $"; +__RCSID("$NetBSD: dr_5.c,v 1.14 2009/03/14 22:52:52 dholland Exp $"); #endif #endif /* not lint */ -#include "externs.h" +#include <sys/types.h> +#include "extern.h" -subtract(from, totalfrom, crewfrom, fromcap, pcfrom) -struct ship *from, *fromcap; -int pcfrom; -register int totalfrom, crewfrom[3]; +void +subtract(struct ship *from, struct ship *fromcap, int totalfrom, int *crewfrom, + int pcfrom) { - register int n; + int n; if (fromcap == from && totalfrom) { /* if not captured */ for (n = 0; n < 3; n++) { @@ -60,23 +57,22 @@ register int totalfrom, crewfrom[3]; totalfrom = 0; } } - Write(W_CREW, from, 0, crewfrom[0], crewfrom[1], crewfrom[2], 0); + send_crew(from, crewfrom[0], crewfrom[1], crewfrom[2]); } else if (totalfrom) { pcfrom -= totalfrom; pcfrom = pcfrom < 0 ? 0 : pcfrom; - Write(W_PCREW, from, 0, pcfrom, 0, 0, 0); + send_pcrew(from, pcfrom); } } -mensent(from, to, crew, captured, pc, isdefense) -struct ship *from, *to, **captured; -int crew[3], *pc; -char isdefense; +int +mensent(struct ship *from, struct ship *to, int *crew, struct ship **captured, + int *pc, int isdefense) { /* returns # of crew squares sent */ int men = 0; - register int n; + int n; int c1, c2, c3; - register struct BP *bp; + struct BP *bp; *pc = from->file->pcrew; *captured = from->file->captured;