summaryrefslogtreecommitdiffstats
path: root/sail
diff options
context:
space:
mode:
authorjsm <jsm@NetBSD.org>1999-09-30 18:01:31 +0000
committerjsm <jsm@NetBSD.org>1999-09-30 18:01:31 +0000
commit963f40fabfbfc47378585a05f5b465cbd4e0c7b6 (patch)
tree7d2ead721965b1afb7d25682629c2f61932820fc /sail
parente2f2d09292b8ac5c5390ab1b7e6fa09ab554080f (diff)
downloadbsdgames-darwin-963f40fabfbfc47378585a05f5b465cbd4e0c7b6.tar.gz
bsdgames-darwin-963f40fabfbfc47378585a05f5b465cbd4e0c7b6.tar.zst
bsdgames-darwin-963f40fabfbfc47378585a05f5b465cbd4e0c7b6.zip
Fix uses of namespaces reserved by ISO C or POSIX.1.
Diffstat (limited to 'sail')
-rw-r--r--sail/dr_1.c6
-rw-r--r--sail/dr_2.c14
-rw-r--r--sail/dr_3.c16
-rw-r--r--sail/extern.h8
4 files changed, 22 insertions, 22 deletions
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));