summaryrefslogtreecommitdiffstats
path: root/games/cribbage
diff options
context:
space:
mode:
authorbillf <billf@FreeBSD.org>1999-12-12 03:04:17 +0000
committerbillf <billf@FreeBSD.org>1999-12-12 03:04:17 +0000
commitaeee88b81a6982928d45c0d80c325cd8372bbab0 (patch)
tree8530eefc376ff7eb3db0b9a165163e773ae5ca49 /games/cribbage
parent645afe7387cdb4ae3254e7f93eea41923be3b689 (diff)
downloadFreeBSD-src-aeee88b81a6982928d45c0d80c325cd8372bbab0.zip
FreeBSD-src-aeee88b81a6982928d45c0d80c325cd8372bbab0.tar.gz
-Wall fixes.
Diffstat (limited to 'games/cribbage')
-rw-r--r--games/cribbage/crib.c4
-rw-r--r--games/cribbage/instr.c3
-rw-r--r--games/cribbage/support.c4
3 files changed, 5 insertions, 6 deletions
diff --git a/games/cribbage/crib.c b/games/cribbage/crib.c
index 9fccc63..fc3c3df 100644
--- a/games/cribbage/crib.c
+++ b/games/cribbage/crib.c
@@ -179,7 +179,6 @@ makeboard()
void
gamescore()
{
- extern int Lastscore[];
if (pgames || cgames) {
mvprintw(SCORE_Y + 1, SCORE_X + 28, "Games: %3d", pgames);
@@ -201,6 +200,7 @@ game()
BOOLEAN flag;
BOOLEAN compcrib;
+ compcrib = FALSE;
makedeck(deck);
shuffle(deck);
if (gamecount == 0) {
@@ -458,7 +458,7 @@ peg(mycrib)
}
Tcnt = 0; /* index to table of cards played */
sum = 0; /* sum of cards played */
- mego = ugo = FALSE;
+ played = mego = ugo = FALSE;
myturn = !mycrib;
for (;;) {
last = TRUE; /* enable last flag */
diff --git a/games/cribbage/instr.c b/games/cribbage/instr.c
index 2e310b9..b329e33 100644
--- a/games/cribbage/instr.c
+++ b/games/cribbage/instr.c
@@ -57,7 +57,6 @@ static const char rcsid[] =
void
instructions()
{
- extern int errno;
struct stat sb;
union wait pstat;
pid_t pid;
@@ -75,7 +74,7 @@ instructions()
case 0:
if (!(path = getenv("PAGER")))
path = _PATH_MORE;
- if (pager = rindex(path, '/'))
+ if ((pager = rindex(path, '/')) != NULL)
++pager;
pager = path;
execlp(path, pager, _PATH_INSTR, (char *)NULL);
diff --git a/games/cribbage/support.c b/games/cribbage/support.c
index 639151b..bc22ca6 100644
--- a/games/cribbage/support.c
+++ b/games/cribbage/support.c
@@ -188,8 +188,8 @@ chkscr(scr, inc)
myturn = (scr == &cscore);
if (inc != 0) {
- prpeg(Lastscore[myturn], '.', myturn);
- Lastscore[myturn] = *scr;
+ prpeg(Lastscore[myturn ? 1 : 0], '.', myturn);
+ Lastscore[myturn ? 1 : 0] = *scr;
*scr += inc;
prpeg(*scr, PEG, myturn);
refresh();
OpenPOWER on IntegriCloud