diff options
-rw-r--r-- | atc/def.h | 7 | ||||
-rw-r--r-- | cribbage/cards.c | 8 | ||||
-rw-r--r-- | cribbage/cribbage.h | 4 | ||||
-rw-r--r-- | cribbage/io.c | 8 | ||||
-rw-r--r-- | mille/comp.c | 18 | ||||
-rw-r--r-- | mille/init.c | 6 | ||||
-rw-r--r-- | mille/mille.h | 14 | ||||
-rw-r--r-- | mille/move.c | 18 | ||||
-rw-r--r-- | mille/types.c | 6 | ||||
-rw-r--r-- | monop/misc.c | 8 | ||||
-rw-r--r-- | monop/monop.h | 4 | ||||
-rw-r--r-- | monop/trade.c | 6 | ||||
-rw-r--r-- | phantasia/phantdefs.h | 11 | ||||
-rw-r--r-- | robots/robots.h | 3 | ||||
-rw-r--r-- | sail/dr_1.c | 6 | ||||
-rw-r--r-- | sail/dr_2.c | 14 | ||||
-rw-r--r-- | sail/dr_3.c | 16 | ||||
-rw-r--r-- | sail/extern.h | 8 |
18 files changed, 94 insertions, 71 deletions
@@ -1,4 +1,4 @@ -/* $NetBSD: def.h,v 1.4 1998/09/11 12:53:28 hubertf Exp $ */ +/* $NetBSD: def.h,v 1.5 1999/09/30 18:01:31 jsm Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -74,6 +74,11 @@ #define T_EXIT 2 #define T_AIRPORT 3 +#undef S_NONE +#undef S_GONE +#undef S_MARKED +#undef S_UNMARKED +#undef S_IGNORED #define S_NONE 0 #define S_GONE 1 #define S_MARKED 2 diff --git a/cribbage/cards.c b/cribbage/cards.c index c4d2610f..29eed58c 100644 --- a/cribbage/cards.c +++ b/cribbage/cards.c @@ -1,4 +1,4 @@ -/* $NetBSD: cards.c,v 1.5 1999/09/08 21:17:47 jsm Exp $ */ +/* $NetBSD: cards.c,v 1.6 1999/09/30 18:01:32 jsm Exp $ */ /*- * Copyright (c) 1980, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)cards.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: cards.c,v 1.5 1999/09/08 21:17:47 jsm Exp $"); +__RCSID("$NetBSD: cards.c,v 1.6 1999/09/30 18:01:32 jsm Exp $"); #endif #endif /* not lint */ @@ -101,10 +101,10 @@ eq(a, b) } /* - * isone returns TRUE if a is in the set of cards b + * is_one returns TRUE if a is in the set of cards b */ int -isone(a, b, n) +is_one(a, b, n) CARD a; const CARD b[]; int n; diff --git a/cribbage/cribbage.h b/cribbage/cribbage.h index 844bcf4a..963242b7 100644 --- a/cribbage/cribbage.h +++ b/cribbage/cribbage.h @@ -1,4 +1,4 @@ -/* $NetBSD: cribbage.h,v 1.6 1999/09/10 00:03:14 jsm Exp $ */ +/* $NetBSD: cribbage.h,v 1.7 1999/09/30 18:01:32 jsm Exp $ */ /* * Copyright (c) 1980, 1993 @@ -85,7 +85,7 @@ int getuchar __P((void)); int incard __P((CARD *)); int infrom __P((const CARD [], int, const char *)); void instructions __P((void)); -int isone __P((CARD, const CARD [], int)); +int is_one __P((CARD, const CARD [], int)); void makeboard __P((void)); void makedeck __P((CARD [])); void makeknown __P((const CARD [], int)); diff --git a/cribbage/io.c b/cribbage/io.c index ef0740bf..dc61c253 100644 --- a/cribbage/io.c +++ b/cribbage/io.c @@ -1,4 +1,4 @@ -/* $NetBSD: io.c,v 1.13 1999/09/18 19:38:48 jsm Exp $ */ +/* $NetBSD: io.c,v 1.14 1999/09/30 18:01:32 jsm Exp $ */ /*- * Copyright (c) 1980, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)io.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: io.c,v 1.13 1999/09/18 19:38:48 jsm Exp $"); +__RCSID("$NetBSD: io.c,v 1.14 1999/09/30 18:01:32 jsm Exp $"); #endif #endif /* not lint */ @@ -203,7 +203,7 @@ infrom(hand, n, prompt) for (;;) { msg(prompt); if (incard(&crd)) { /* if card is full card */ - if (!isone(crd, hand, n)) + if (!is_one(crd, hand, n)) msg("That's not in your hand"); else { for (i = 0; i < n; i++) @@ -211,7 +211,7 @@ infrom(hand, n, prompt) hand[i].suit == crd.suit) break; if (i >= n) { - printf("\nINFROM: isone or something messed up\n"); + printf("\nINFROM: is_one or something messed up\n"); exit(77); } return (i); diff --git a/mille/comp.c b/mille/comp.c index 531fffd9..b184e6bb 100644 --- a/mille/comp.c +++ b/mille/comp.c @@ -1,4 +1,4 @@ -/* $NetBSD: comp.c,v 1.7 1999/09/18 19:38:52 jsm Exp $ */ +/* $NetBSD: comp.c,v 1.8 1999/09/30 18:01:32 jsm Exp $ */ /* * Copyright (c) 1982, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)comp.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: comp.c,v 1.7 1999/09/18 19:38:52 jsm Exp $"); +__RCSID("$NetBSD: comp.c,v 1.8 1999/09/30 18:01:32 jsm Exp $"); #endif #endif /* not lint */ @@ -131,7 +131,7 @@ norm: if (foundend) foundend = !check_ext(TRUE); for (i = 0; safe && i < HAND_SZ; i++) { - if (issafety(pp->hand[i])) { + if (is_safety(pp->hand[i])) { if (onecard(op) || (foundend && cango && !canstop)) { #ifdef DEBUG if (Debug) @@ -167,7 +167,7 @@ playsafe: playit[i] = cango; } } - if (!pp->can_go && !isrepair(pp->battle)) + if (!pp->can_go && !is_repair(pp->battle)) Numneed[opposite(pp->battle)]++; redoit: foundlow = (cango || count[C_END_LIMIT] != 0 @@ -183,7 +183,7 @@ redoit: value = valbuf; for (i = 0; i < HAND_SZ; i++) { card = pp->hand[i]; - if (issafety(card) || playit[i] == (cango != 0)) { + if (is_safety(card) || playit[i] == (cango != 0)) { #ifdef DEBUG if (Debug) fprintf(outf, "CALCMOVE: switch(\"%s\")\n", @@ -383,7 +383,7 @@ normbad: #endif value++; } - if (!pp->can_go && !isrepair(pp->battle)) + if (!pp->can_go && !is_repair(pp->battle)) Numneed[opposite(pp->battle)]++; if (cango) { play_it: @@ -392,7 +392,7 @@ play_it: Card_no = nummax; } else { - if (issafety(pp->hand[nummin])) { /* NEVER discard a safety */ + if (is_safety(pp->hand[nummin])) { /* NEVER discard a safety */ nummax = nummin; goto play_it; } @@ -415,7 +415,7 @@ onecard(pp) bat = pp->battle; spd = pp->speed; card = -1; - if (pp->can_go || ((isrepair(bat) || bat == C_STOP || spd == C_LIMIT) && + if (pp->can_go || ((is_repair(bat) || bat == C_STOP || spd == C_LIMIT) && Numseen[S_RIGHT_WAY] != 0) || (bat >= 0 && Numseen[safety(bat)] != 0)) switch (End - pp->mileage) { @@ -478,7 +478,7 @@ canplay(pp, op, card) break; case C_GO: if (!pp->can_go && - (isrepair(pp->battle) || pp->battle == C_STOP)) + (is_repair(pp->battle) || pp->battle == C_STOP)) return TRUE; break; case C_END_LIMIT: diff --git a/mille/init.c b/mille/init.c index 0fa3579c..99d7a55a 100644 --- a/mille/init.c +++ b/mille/init.c @@ -1,4 +1,4 @@ -/* $NetBSD: init.c,v 1.7 1997/10/12 00:53:59 lukem Exp $ */ +/* $NetBSD: init.c,v 1.8 1999/09/30 18:01:32 jsm Exp $ */ /* * Copyright (c) 1982, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)init.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: init.c,v 1.7 1997/10/12 00:53:59 lukem Exp $"); +__RCSID("$NetBSD: init.c,v 1.8 1999/09/30 18:01:32 jsm Exp $"); #endif #endif /* not lint */ @@ -69,7 +69,7 @@ init() pp->hand[j] = *--Topcard; if (i == COMP) { account(card = *Topcard); - if (issafety(card)) + if (is_safety(card)) pp->safety[card - S_CONV] = S_IN_HAND; } } diff --git a/mille/mille.h b/mille/mille.h index c110c6b2..58825c1c 100644 --- a/mille/mille.h +++ b/mille/mille.h @@ -1,4 +1,4 @@ -/* $NetBSD: mille.h,v 1.10 1999/09/08 21:17:50 jsm Exp $ */ +/* $NetBSD: mille.h,v 1.11 1999/09/30 18:01:32 jsm Exp $ */ /* * Copyright (c) 1982, 1993 @@ -109,6 +109,14 @@ * safety descriptions */ +# undef S_UNKNOWN +# undef S_IN_HAND +# undef S_PLAYED +# undef S_GAS_SAFE +# undef S_SPARE_SAFE +# undef S_DRIVE_SAFE +# undef S_RIGHT_WAY +# undef S_CONV # define S_UNKNOWN 0 /* location of safety unknown */ # define S_IN_HAND 1 /* safety in player's hand */ # define S_PLAYED 2 /* safety has been played */ @@ -199,7 +207,7 @@ typedef struct { # define nextplay() (Play = other(Play)) # define nextwin(x) (1 - x) # define opposite(x) (Opposite[x]) -# define issafety(x) (x >= C_GAS_SAFE) +# define is_safety(x) (x >= C_GAS_SAFE) /* * externals @@ -243,7 +251,7 @@ void getmove __P((void)); int getyn __P((int)); int haspicked __P((const PLAY *)); void init __P((void)); -int isrepair __P((CARD)); +int is_repair __P((CARD)); int main __P((int, char **)); void newboard __P((void)); void newscore __P((void)); diff --git a/mille/move.c b/mille/move.c index afc3acb6..4afa8207 100644 --- a/mille/move.c +++ b/mille/move.c @@ -1,4 +1,4 @@ -/* $NetBSD: move.c,v 1.10 1999/09/08 21:17:51 jsm Exp $ */ +/* $NetBSD: move.c,v 1.11 1999/09/30 18:01:32 jsm Exp $ */ /* * Copyright (c) 1983, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)move.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: move.c,v 1.10 1999/09/08 21:17:51 jsm Exp $"); +__RCSID("$NetBSD: move.c,v 1.11 1999/09/30 18:01:32 jsm Exp $"); #endif #endif /* not lint */ @@ -79,7 +79,7 @@ domove() else error("no card there"); else { - if (issafety(pp->hand[Card_no])) { + if (is_safety(pp->hand[Card_no])) { error("discard a safety?"); goodplay = FALSE; break; @@ -112,7 +112,7 @@ domove() acc: if (Play == COMP) { account(*Topcard); - if (issafety(*Topcard)) + if (is_safety(*Topcard)) pp->safety[*Topcard-S_CONV] = S_IN_HAND; } if (pp->hand[1] == C_INIT && Topcard > Deck) { @@ -171,11 +171,11 @@ check_go() op = (pp == &Player[COMP] ? &Player[PLAYER] : &Player[COMP]); for (i = 0; i < HAND_SZ; i++) { card = pp->hand[i]; - if (issafety(card) || canplay(pp, op, card)) { + if (is_safety(card) || canplay(pp, op, card)) { #ifdef DEBUG if (Debug) { fprintf(outf, "CHECK_GO: can play %s (%d), ", C_name[card], card); - fprintf(outf, "issafety(card) = %d, ", issafety(card)); + fprintf(outf, "is_safety(card) = %d, ", issafety(card)); fprintf(outf, "canplay(pp, op, card) = %d\n", canplay(pp, op, card)); } #endif @@ -248,7 +248,7 @@ mustpick: case C_GO: if (pp->battle != C_INIT && pp->battle != C_STOP - && !isrepair(pp->battle)) + && !is_repair(pp->battle)) return error("cannot play \"Go\" on a \"%s\"", C_name[pp->battle]); pp->battle = C_GO; @@ -290,7 +290,7 @@ protected: case C_DRIVE_SAFE: case C_RIGHT_WAY: if (pp->battle == opposite(card) || (card == C_RIGHT_WAY && pp->speed == C_LIMIT)) { - if (!(card == C_RIGHT_WAY && !isrepair(pp->battle))) { + if (!(card == C_RIGHT_WAY && !is_repair(pp->battle))) { pp->battle = C_GO; pp->can_go = TRUE; } @@ -323,7 +323,7 @@ protected: pp->can_go = TRUE; pp->battle = C_INIT; } - if (!pp->can_go && isrepair(pp->battle)) + if (!pp->can_go && is_repair(pp->battle)) pp->can_go = TRUE; } Next = -1; diff --git a/mille/types.c b/mille/types.c index a4cde54e..772ddbc0 100644 --- a/mille/types.c +++ b/mille/types.c @@ -1,4 +1,4 @@ -/* $NetBSD: types.c,v 1.6 1997/10/12 00:54:40 lukem Exp $ */ +/* $NetBSD: types.c,v 1.7 1999/09/30 18:01:32 jsm Exp $ */ /* * Copyright (c) 1982, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)types.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: types.c,v 1.6 1997/10/12 00:54:40 lukem Exp $"); +__RCSID("$NetBSD: types.c,v 1.7 1999/09/30 18:01:32 jsm Exp $"); #endif #endif /* not lint */ @@ -49,7 +49,7 @@ __RCSID("$NetBSD: types.c,v 1.6 1997/10/12 00:54:40 lukem Exp $"); */ int -isrepair(card) +is_repair(card) CARD card; { diff --git a/monop/misc.c b/monop/misc.c index 14fb4ca7..635604c6 100644 --- a/monop/misc.c +++ b/monop/misc.c @@ -1,4 +1,4 @@ -/* $NetBSD: misc.c,v 1.8 1999/09/08 21:17:52 jsm Exp $ */ +/* $NetBSD: misc.c,v 1.9 1999/09/30 18:01:32 jsm Exp $ */ /* * Copyright (c) 1980, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)misc.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: misc.c,v 1.8 1999/09/08 21:17:52 jsm Exp $"); +__RCSID("$NetBSD: misc.c,v 1.9 1999/09/30 18:01:32 jsm Exp $"); #endif #endif /* not lint */ @@ -223,7 +223,7 @@ set_ownlist(pl) if (num == orig->num_in) is_monop(orig, pl); else - isnot_monop(orig); + is_not_monop(orig); break; } } @@ -250,7 +250,7 @@ is_monop(mp, pl) * This routine sets things up as if it is no longer a monopoly */ void -isnot_monop(mp) +is_not_monop(mp) MON *mp; { int i; diff --git a/monop/monop.h b/monop/monop.h index 3e0cf7ab..23896e76 100644 --- a/monop/monop.h +++ b/monop/monop.h @@ -1,4 +1,4 @@ -/* $NetBSD: monop.h,v 1.9 1999/09/09 17:27:59 jsm Exp $ */ +/* $NetBSD: monop.h,v 1.10 1999/09/30 18:01:32 jsm Exp $ */ /* * Copyright (c) 1980, 1993 @@ -170,7 +170,7 @@ void next_play __P((void)); int get_int __P((const char *)); void set_ownlist __P((int)); void is_monop __P((MON *, int)); -void isnot_monop __P((MON *)); +void is_not_monop __P((MON *)); void list __P((void)); void list_all __P((void)); void quit __P((void)); diff --git a/monop/trade.c b/monop/trade.c index 9a9056e4..a13d8ac9 100644 --- a/monop/trade.c +++ b/monop/trade.c @@ -1,4 +1,4 @@ -/* $NetBSD: trade.c,v 1.6 1999/09/08 21:17:52 jsm Exp $ */ +/* $NetBSD: trade.c,v 1.7 1999/09/30 18:01:32 jsm Exp $ */ /* * Copyright (c) 1980, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)trade.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: trade.c,v 1.6 1999/09/08 21:17:52 jsm Exp $"); +__RCSID("$NetBSD: trade.c,v 1.7 1999/09/30 18:01:32 jsm Exp $"); #endif #endif /* not lint */ @@ -304,7 +304,7 @@ resign() sqp->owner = -1; sqp->desc->morg = FALSE; if (sqp->type == PRPTY) { - isnot_monop(sqp->desc->mon_desc); + is_not_monop(sqp->desc->mon_desc); sqp->desc->houses = 0; } } diff --git a/phantasia/phantdefs.h b/phantasia/phantdefs.h index 0e92cb51..88cd98b7 100644 --- a/phantasia/phantdefs.h +++ b/phantasia/phantdefs.h @@ -1,4 +1,4 @@ -/* $NetBSD: phantdefs.h,v 1.2 1995/03/24 03:59:28 cgd Exp $ */ +/* $NetBSD: phantdefs.h,v 1.3 1999/09/30 18:01:33 jsm Exp $ */ /* * phantdefs.h - important constants for Phantasia @@ -12,6 +12,15 @@ #define R_SPOILED 4 /* ring which has gone bad */ /* status constants */ +/* We must #undef these first since setup.c includes headers that reserve S_* */ +#undef S_NOTUSED +#undef S_OFF +#undef S_PLAYING +#undef S_CLOAKED +#undef S_INBATTLE +#undef S_MONSTER +#undef S_TRADING +#undef S_HUNGUP #define S_NOTUSED 0 /* record not in use */ #define S_OFF 1 /* not playing */ #define S_PLAYING 2 /* playing - nothing else */ diff --git a/robots/robots.h b/robots/robots.h index c826133e..23a761ba 100644 --- a/robots/robots.h +++ b/robots/robots.h @@ -1,4 +1,4 @@ -/* $NetBSD: robots.h,v 1.13 1999/09/18 19:38:54 jsm Exp $ */ +/* $NetBSD: robots.h,v 1.14 1999/09/30 18:01:33 jsm Exp $ */ /* * Copyright (c) 1980, 1993 @@ -60,6 +60,7 @@ # define MAXLEVELS 4 # define MAXROBOTS (MAXLEVELS * 10) # define ROB_SCORE 10 +# undef S_BONUS # define S_BONUS (60 * ROB_SCORE) # define Y_SCORE 21 # define X_SCORE (X_FIELDSIZE + 9) diff --git a/sail/dr_1.c b/sail/dr_1.c index 69ca2d30..3395deec 100644 --- a/sail/dr_1.c +++ b/sail/dr_1.c @@ -1,4 +1,4 @@ -/* $NetBSD: dr_1.c,v 1.9 1999/09/08 21:17:58 jsm Exp $ */ +/* $NetBSD: dr_1.c,v 1.10 1999/09/30 18:01:33 jsm Exp $ */ /* * Copyright (c) 1983, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)dr_1.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: dr_1.c,v 1.9 1999/09/08 21:17:58 jsm Exp $"); +__RCSID("$NetBSD: dr_1.c,v 1.10 1999/09/30 18:01:33 jsm Exp $"); #endif #endif /* not lint */ @@ -59,7 +59,7 @@ unfoul() nat = capship(sp)->nationality; foreachship(to) { if (nat != capship(to)->nationality && - !toughmelee(sp, to, 0, 0)) + !is_toughmelee(sp, to, 0, 0)) continue; for (i = fouled2(sp, to); --i >= 0;) if (die() <= 2) diff --git a/sail/dr_2.c b/sail/dr_2.c index 439c3218..ad0a5e4d 100644 --- a/sail/dr_2.c +++ b/sail/dr_2.c @@ -1,4 +1,4 @@ -/* $NetBSD: dr_2.c,v 1.10 1999/09/08 21:17:58 jsm Exp $ */ +/* $NetBSD: dr_2.c,v 1.11 1999/09/30 18:01:33 jsm Exp $ */ /* * Copyright (c) 1983, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)dr_2.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: dr_2.c,v 1.10 1999/09/08 21:17:58 jsm Exp $"); +__RCSID("$NetBSD: dr_2.c,v 1.11 1999/09/30 18:01:33 jsm Exp $"); #endif #endif /* not lint */ @@ -64,7 +64,7 @@ thinkofgrapples() if (range(sp, sq) != 1) continue; if (grappled2(sp, sq)) - if (toughmelee(sp, sq, 0, 0)) + if (is_toughmelee(sp, sq, 0, 0)) ungrap(sp, sq); else grap(sp, sq); @@ -128,7 +128,7 @@ prizecheck() } int -strend(str) +str_end(str) const char *str; { const char *p; @@ -243,7 +243,7 @@ char command[], temp[]; char st[4]; #define rakeyou (gunsbear(f, t) && !gunsbear(t, f)) - if ((n = strend(temp)) < '1' || n > '9') + if ((n = str_end(temp)) < '1' || n > '9') for (n = 1; vma - n >= 0; n++) { (void) sprintf(st, "%d", n); (void) strcat(temp, st); @@ -256,7 +256,7 @@ char command[], temp[]; dir, f, t, high, rakeme); rmend(temp); } - if ((ma > 0 && ta > 0 && (n = strend(temp)) != 'l' && n != 'r') || !strlen(temp)) { + if ((ma > 0 && ta > 0 && (n = str_end(temp)) != 'l' && n != 'r') || !strlen(temp)) { (void) strcat(temp, "r"); new = score(temp, f, t, rakeme); if (new > *high && (!rakeme || (gunsbear(f, t) && !gunsbear(t, f)))) { @@ -266,7 +266,7 @@ char command[], temp[]; try(command, temp, ma-1, ta-1, af, min(ma-1, maxmove(f, (dir == 8 ? 1 : dir+1), 0)), (dir == 8 ? 1 : dir+1),f,t,high,rakeme); rmend(temp); } - if ((ma > 0 && ta > 0 && (n = strend(temp)) != 'l' && n != 'r') || !strlen(temp)){ + if ((ma > 0 && ta > 0 && (n = str_end(temp)) != 'l' && n != 'r') || !strlen(temp)){ (void) strcat(temp, "l"); new = score(temp, f, t, rakeme); if (new > *high && (!rakeme || (gunsbear(f, t) && !gunsbear(t, f)))){ diff --git a/sail/dr_3.c b/sail/dr_3.c index 6c935269..77a83ede 100644 --- a/sail/dr_3.c +++ b/sail/dr_3.c @@ -1,4 +1,4 @@ -/* $NetBSD: dr_3.c,v 1.6 1999/02/10 00:45:45 hubertf Exp $ */ +/* $NetBSD: dr_3.c,v 1.7 1999/09/30 18:01:33 jsm Exp $ */ /* * Copyright (c) 1983, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)dr_3.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: dr_3.c,v 1.6 1999/02/10 00:45:45 hubertf Exp $"); +__RCSID("$NetBSD: dr_3.c,v 1.7 1999/09/30 18:01:33 jsm Exp $"); #endif #endif /* not lint */ @@ -119,7 +119,7 @@ moveall() /* move all comp ships */ */ n = 0; foreachship(sp) { - if (sp->file->dir == 0 || isolated(sp)) + if (sp->file->dir == 0 || is_isolated(sp)) goto cont1; l = 0; foreachship(sq) { @@ -195,7 +195,7 @@ int k; } int -isolated(ship) +is_isolated(ship) struct ship *ship; { struct ship *sp; @@ -288,7 +288,7 @@ char isdefense; } int -toughmelee(ship, to, isdefense, count) +is_toughmelee(ship, to, isdefense, count) struct ship *ship, *to; int isdefense, count; { @@ -311,9 +311,9 @@ int isdefense, count; } if (count || isdefense) return obp; - OBP = toughmelee(to, ship, 0, count + 1); - dbp = toughmelee(ship, to, 1, count + 1); - DBP = toughmelee(to, ship, 1, count + 1); + OBP = is_toughmelee(to, ship, 0, count + 1); + dbp = is_toughmelee(ship, to, 1, count + 1); + DBP = is_toughmelee(to, ship, 1, count + 1); if (OBP > obp + 10 || OBP + DBP >= obp + dbp + 10) return 1; else diff --git a/sail/extern.h b/sail/extern.h index 8cd2ccd1..794851c7 100644 --- a/sail/extern.h +++ b/sail/extern.h @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.11 1999/09/08 21:45:30 jsm Exp $ */ +/* $NetBSD: extern.h,v 1.12 1999/09/30 18:01:33 jsm Exp $ */ /* * Copyright (c) 1983, 1993 @@ -314,7 +314,7 @@ int next __P((void)); void thinkofgrapples __P((void)); void checkup __P((void)); void prizecheck __P((void)); -int strend __P((const char *)); +int str_end __P((const char *)); void closeon __P((struct ship *, struct ship *, char[], int, int, int)); int score __P((char[], struct ship *, struct ship *, int)); void move_ship __P((const char *, struct ship *, unsigned char *, short *, short *, char *)); @@ -325,11 +325,11 @@ void rmend __P((char *)); /* dr_3.c */ void moveall __P((void)); int stillmoving __P((int)); -int isolated __P((struct ship *)); +int is_isolated __P((struct ship *)); int push __P((struct ship *, struct ship *)); void step __P((int, struct ship *, char *)); void sendbp __P((struct ship *, struct ship *, int, int)); -int toughmelee __P((struct ship *, struct ship *, int, int)); +int is_toughmelee __P((struct ship *, struct ship *, int, int)); void reload __P((void)); void checksails __P((void)); |