Avoid confict with reserved identifier "expl".

This commit is contained in:
thorpej 2002-12-06 01:48:24 +00:00
parent 5759456a18
commit 15edfc1544
4 changed files with 24 additions and 24 deletions

View File

@ -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));

View File

@ -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 */

View File

@ -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);
}

View File

@ -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);