summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthorpej <thorpej@NetBSD.org>2002-12-06 01:48:24 +0000
committerthorpej <thorpej@NetBSD.org>2002-12-06 01:48:24 +0000
commitdea17044cc7c872686fc5ac96e59e518340e7f67 (patch)
treeb8e873e7ad94d4dabcacafaac53a8a65d4122bb3
parenta8bfdad49d7620b77f20ab86a8e20ac0229e392e (diff)
downloadbsdgames-darwin-dea17044cc7c872686fc5ac96e59e518340e7f67.tar.gz
bsdgames-darwin-dea17044cc7c872686fc5ac96e59e518340e7f67.tar.zst
bsdgames-darwin-dea17044cc7c872686fc5ac96e59e518340e7f67.zip
Avoid confict with reserved identifier "expl".
-rw-r--r--cribbage/cribbage.h4
-rw-r--r--cribbage/extern.c6
-rw-r--r--cribbage/score.c32
-rw-r--r--cribbage/support.c6
4 files changed, 24 insertions, 24 deletions
diff --git a/cribbage/cribbage.h b/cribbage/cribbage.h
index 963242b7..c0759fc8 100644
--- a/cribbage/cribbage.h
+++ b/cribbage/cribbage.h
@@ -1,4 +1,4 @@
-/* $NetBSD: cribbage.h,v 1.7 1999/09/30 18:01:32 jsm Exp $ */
+/* $NetBSD: cribbage.h,v 1.8 2002/12/06 01:48:24 thorpej Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -59,7 +59,7 @@ extern BOOLEAN rflag; /* if all cuts random */
extern BOOLEAN quiet; /* if suppress random mess */
extern BOOLEAN playing; /* currently playing game */
-extern char expl[]; /* string for explanation */
+extern char explan[]; /* string for explanation */
void addmsg __P((const char *, ...));
int adjust __P((const CARD [], CARD));
diff --git a/cribbage/extern.c b/cribbage/extern.c
index c4c9fc32..12e23bae 100644
--- a/cribbage/extern.c
+++ b/cribbage/extern.c
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.c,v 1.5 1999/09/19 18:12:09 jsm Exp $ */
+/* $NetBSD: extern.c,v 1.6 2002/12/06 01:48:24 thorpej Exp $ */
/*-
* Copyright (c) 1980, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)extern.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: extern.c,v 1.5 1999/09/19 18:12:09 jsm Exp $");
+__RCSID("$NetBSD: extern.c,v 1.6 2002/12/06 01:48:24 thorpej Exp $");
#endif
#endif /* not lint */
@@ -52,7 +52,7 @@ BOOLEAN iwon = FALSE; /* if comp won last game */
BOOLEAN quiet = FALSE; /* if suppress random mess */
BOOLEAN rflag = FALSE; /* if all cuts random */
-char expl[128]; /* explanation */
+char explan[128]; /* explanation */
int cgames = 0; /* number games comp won */
int cscore = 0; /* comp score in this game */
diff --git a/cribbage/score.c b/cribbage/score.c
index 3d2a8707..6677314e 100644
--- a/cribbage/score.c
+++ b/cribbage/score.c
@@ -1,4 +1,4 @@
-/* $NetBSD: score.c,v 1.8 1999/09/08 21:45:26 jsm Exp $ */
+/* $NetBSD: score.c,v 1.9 2002/12/06 01:48:24 thorpej Exp $ */
/*-
* Copyright (c) 1980, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)score.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: score.c,v 1.8 1999/09/08 21:45:26 jsm Exp $");
+__RCSID("$NetBSD: score.c,v 1.9 2002/12/06 01:48:24 thorpej Exp $");
#endif
#endif /* not lint */
@@ -122,7 +122,7 @@ scorehand(hand, starter, n, crb, do_explain)
CARD h[(CINHAND + 1)];
char buf[32];
- expl[0] = '\0'; /* initialize explanation */
+ explan[0] = '\0'; /* initialize explanation */
score = 0;
flag = TRUE;
k = hand[0].suit;
@@ -132,29 +132,29 @@ scorehand(hand, starter, n, crb, do_explain)
if (hand[i].suit == starter.suit) {
score++;
if (do_explain)
- strcat(expl, "His Nobs");
+ strcat(explan, "His Nobs");
}
h[i] = hand[i];
}
if (flag && n >= CINHAND) {
- if (do_explain && expl[0] != '\0')
- strcat(expl, ", ");
+ if (do_explain && explan[0] != '\0')
+ strcat(explan, ", ");
if (starter.suit == k) {
score += 5;
if (do_explain)
- strcat(expl, "Five-flush");
+ strcat(explan, "Five-flush");
} else
if (!crb) {
score += 4;
- if (do_explain && expl[0] != '\0')
- strcat(expl, ", Four-flush");
+ if (do_explain && explan[0] != '\0')
+ strcat(explan, ", Four-flush");
else
- strcpy(expl, "Four-flush");
+ strcpy(explan, "Four-flush");
}
}
- if (do_explain && expl[0] != '\0')
- strcat(expl, ", ");
+ if (do_explain && explan[0] != '\0')
+ strcat(explan, ", ");
h[n] = starter;
sorthand(h, n + 1); /* sort by rank */
i = 2 * fifteens(h, n + 1);
@@ -162,9 +162,9 @@ scorehand(hand, starter, n, crb, do_explain)
if (do_explain) {
if (i > 0) {
(void) sprintf(buf, "%d points in fifteens", i);
- strcat(expl, buf);
+ strcat(explan, buf);
} else
- strcat(expl, "No fifteens");
+ strcat(explan, "No fifteens");
}
i = pairuns(h, n + 1);
score += i;
@@ -172,9 +172,9 @@ scorehand(hand, starter, n, crb, do_explain)
if (i > 0) {
(void) sprintf(buf, ", %d points in pairs, %d in runs",
pairpoints, runpoints);
- strcat(expl, buf);
+ strcat(explan, buf);
} else
- strcat(expl, ", No pairs/runs");
+ strcat(explan, ", No pairs/runs");
}
return (score);
}
diff --git a/cribbage/support.c b/cribbage/support.c
index 2f3c076a..288bb0c6 100644
--- a/cribbage/support.c
+++ b/cribbage/support.c
@@ -1,4 +1,4 @@
-/* $NetBSD: support.c,v 1.5 1999/09/08 21:17:47 jsm Exp $ */
+/* $NetBSD: support.c,v 1.6 2002/12/06 01:48:25 thorpej Exp $ */
/*-
* Copyright (c) 1980, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)support.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: support.c,v 1.5 1999/09/08 21:17:47 jsm Exp $");
+__RCSID("$NetBSD: support.c,v 1.6 2002/12/06 01:48:25 thorpej Exp $");
#endif
#endif /* not lint */
@@ -152,7 +152,7 @@ plyrhand(hand, s)
msg("You should have taken %d, not %d!", i, j);
}
if (explain)
- msg("Explanation: %s", expl);
+ msg("Explanation: %s", explan);
do_wait();
} else
win = chkscr(&pscore, i);