summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
Diffstat (limited to 'games')
-rw-r--r--games/backgammon/backgammon/extra.c23
-rw-r--r--games/backgammon/backgammon/move.c12
-rw-r--r--games/backgammon/common_source/back.h4
-rw-r--r--games/backgammon/common_source/init.c6
4 files changed, 23 insertions, 22 deletions
diff --git a/games/backgammon/backgammon/extra.c b/games/backgammon/backgammon/extra.c
index e0f18f7b596..f51776a68bb 100644
--- a/games/backgammon/backgammon/extra.c
+++ b/games/backgammon/backgammon/extra.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: extra.c,v 1.4 2003/06/03 03:01:38 millert Exp $ */
+/* $OpenBSD: extra.c,v 1.5 2006/12/14 10:14:05 martin Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -33,7 +33,7 @@
#if 0
static char sccsid[] = "@(#)extra.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: extra.c,v 1.4 2003/06/03 03:01:38 millert Exp $";
+static char rcsid[] = "$OpenBSD: extra.c,v 1.5 2006/12/14 10:14:05 martin Exp $";
#endif
#endif /* not lint */
@@ -112,17 +112,18 @@ dblgood()
#ifdef DEBUG
int i;
- if (trace == NULL)
- trace = fopen("bgtrace", "w");
+ if (ftrace == NULL)
+ ftrace = fopen("bgtrace", "w");
+ printf ("fopen\n");
#endif
/* get real pip value */
n = eval() * cturn;
#ifdef DEBUG
- fputs("\nDoubles:\nBoard: ", trace);
+ fputs("\nDoubles:\nBoard: ", ftrace);
for (i = 0; i < 26; i++)
- fprintf(trace, " %d", board[i]);
- fprintf(trace, "\n\tpip = %d, ", n);
+ fprintf(ftrace, " %d", board[i]);
+ fprintf(ftrace, "\n\tpip = %d, ", n);
#endif
/* below adjusts pip value according to position judgments */
@@ -156,7 +157,7 @@ dblgood()
}
#ifdef DEBUG
- fprintf(trace, "off = %d, ", n);
+ fprintf(ftrace, "off = %d, ", n);
#endif
/* see if men are trapped */
@@ -166,9 +167,9 @@ dblgood()
n -= trapped(bar, cturn);
#ifdef DEBUG
- fprintf(trace, "free = %d\n", n);
- fprintf(trace, "\tOFFC = %d, OFFO = %d\n", OFFC, OFFO);
- fflush(trace);
+ fprintf(ftrace, "free = %d\n", n);
+ fprintf(ftrace, "\tOFFC = %d, OFFO = %d\n", OFFC, OFFO);
+ fflush(ftrace);
#endif
/* double if 2-3 moves ahead */
diff --git a/games/backgammon/backgammon/move.c b/games/backgammon/backgammon/move.c
index 005c08a3f77..29ed30029c3 100644
--- a/games/backgammon/backgammon/move.c
+++ b/games/backgammon/backgammon/move.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: move.c,v 1.8 2006/10/29 20:02:41 martin Exp $ */
+/* $OpenBSD: move.c,v 1.9 2006/12/14 10:14:05 martin Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -33,7 +33,7 @@
#if 0
static char sccsid[] = "@(#)move.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: move.c,v 1.8 2006/10/29 20:02:41 martin Exp $";
+static char rcsid[] = "$OpenBSD: move.c,v 1.9 2006/12/14 10:14:05 martin Exp $";
#endif
#endif /* not lint */
@@ -335,10 +335,10 @@ pickmove()
struct BOARD *next; /* next move */
#ifdef DEBUG
- if (trace == NULL)
- trace = fopen("bgtrace", "w");
- fprintf(trace, "\nRoll: %d %d%s\n", D0, D1, race ? " (race)" : "");
- fflush(trace);
+ if (ftrace == NULL)
+ ftrace = fopen("bgtrace", "w");
+ fprintf(ftrace, "\nRoll: %d %d%s\n", D0, D1, race ? " (race)" : "");
+ fflush(ftrace);
#endif
do { /* compare moves */
boardcopy(checkq);
diff --git a/games/backgammon/common_source/back.h b/games/backgammon/common_source/back.h
index 255eaae3105..351342f46a4 100644
--- a/games/backgammon/common_source/back.h
+++ b/games/backgammon/common_source/back.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: back.h,v 1.10 2006/10/29 20:02:41 martin Exp $ */
+/* $OpenBSD: back.h,v 1.11 2006/12/14 10:14:05 martin Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -51,7 +51,7 @@
#define CIN_SIZE 40
#ifdef DEBUG
-extern FILE *trace;
+extern FILE *ftrace;
#endif
/*
diff --git a/games/backgammon/common_source/init.c b/games/backgammon/common_source/init.c
index ab50537eef5..85ae503e1f9 100644
--- a/games/backgammon/common_source/init.c
+++ b/games/backgammon/common_source/init.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init.c,v 1.8 2006/10/29 20:02:41 martin Exp $ */
+/* $OpenBSD: init.c,v 1.9 2006/12/14 10:14:05 martin Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -33,7 +33,7 @@
#if 0
static char sccsid[] = "@(#)init.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: init.c,v 1.8 2006/10/29 20:02:41 martin Exp $";
+static char rcsid[] = "$OpenBSD: init.c,v 1.9 2006/12/14 10:14:05 martin Exp $";
#endif
#endif /* not lint */
@@ -43,7 +43,7 @@ static char rcsid[] = "$OpenBSD: init.c,v 1.8 2006/10/29 20:02:41 martin Exp $";
#ifdef DEBUG
#include <stdio.h>
-FILE *trace;
+FILE *ftrace;
#endif
#include <back.h>