From 1b851fffc66f91fd3d393e70e0f9ee528005a5d6 Mon Sep 17 00:00:00 2001 From: jsm Date: Tue, 15 Feb 2005 12:58:21 +0000 Subject: Don't presume phantasia's internal bool (char) is the same as that in curses.h: define phbool and use it where necessary to avoid declaring functions with one bool and defining them with the other. Reviewed by . --- phantasia/gamesupport.c | 6 +++--- phantasia/interplayer.c | 4 ++-- phantasia/io.c | 4 ++-- phantasia/misc.c | 6 +++--- phantasia/phantstruct.h | 4 +++- 5 files changed, 13 insertions(+), 11 deletions(-) (limited to 'phantasia') diff --git a/phantasia/gamesupport.c b/phantasia/gamesupport.c index 97dd1cce..2bfc67f6 100644 --- a/phantasia/gamesupport.c +++ b/phantasia/gamesupport.c @@ -1,4 +1,4 @@ -/* $NetBSD: gamesupport.c,v 1.8 2004/04/11 13:35:06 he Exp $ */ +/* $NetBSD: gamesupport.c,v 1.9 2005/02/15 12:58:21 jsm Exp $ */ /* * gamesupport.c - auxiliary routines for support of Phantasia @@ -10,7 +10,7 @@ void changestats(ingameflag) - bool ingameflag; + phbool ingameflag; { static char flag[2] = /* for printing values of bools */ {'F', 'T'}; @@ -22,7 +22,7 @@ changestats(ingameflag) long loc; /* location in player file */ time_t now; /* time now */ double dtemp; /* temporary variable */ - bool *bptr; /* pointer to bool item to change */ + phbool *bptr; /* pointer to bool item to change */ double *dptr; /* pointer to double item to change */ short *sptr; /* pointer to short item to change */ diff --git a/phantasia/interplayer.c b/phantasia/interplayer.c index e10747d2..3cb786c0 100644 --- a/phantasia/interplayer.c +++ b/phantasia/interplayer.c @@ -1,4 +1,4 @@ -/* $NetBSD: interplayer.c,v 1.8 2004/04/11 13:35:06 he Exp $ */ +/* $NetBSD: interplayer.c,v 1.9 2005/02/15 12:58:21 jsm Exp $ */ /* * interplayer.c - player to player routines for Phantasia @@ -539,7 +539,7 @@ tampered(what, arg1, arg2) void userlist(ingameflag) - bool ingameflag; + phbool ingameflag; { int numusers = 0; /* number of users on file */ diff --git a/phantasia/io.c b/phantasia/io.c index 8caf069b..66f23637 100644 --- a/phantasia/io.c +++ b/phantasia/io.c @@ -1,4 +1,4 @@ -/* $NetBSD: io.c,v 1.8 2004/04/11 13:35:06 he Exp $ */ +/* $NetBSD: io.c,v 1.9 2005/02/15 12:58:21 jsm Exp $ */ /* * io.c - input/output routines for Phantasia @@ -156,7 +156,7 @@ interrupt() int getanswer(choices, def) const char *choices; - bool def; + phbool def; { int ch; /* input */ volatile int loop; /* counter */ diff --git a/phantasia/misc.c b/phantasia/misc.c index cf869ec7..d3f72b9d 100644 --- a/phantasia/misc.c +++ b/phantasia/misc.c @@ -1,4 +1,4 @@ -/* $NetBSD: misc.c,v 1.13 2005/02/15 12:56:20 jsm Exp $ */ +/* $NetBSD: misc.c,v 1.14 2005/02/15 12:58:21 jsm Exp $ */ /* * misc.c Phantasia miscellaneous support routines @@ -65,7 +65,7 @@ movelevel() const char * descrlocation(playerp, shortflag) struct player *playerp; - bool shortflag; + phbool shortflag; { double circle; /* corresponding circle for coordinates */ int quadrant; /* quandrant of grid */ @@ -447,7 +447,7 @@ allstatslist() const char * descrtype(playerp, shortflag) struct player *playerp; - bool shortflag; + phbool shortflag; { int type; /* for caluculating result subscript */ static const char *const results[] =/* description table */ diff --git a/phantasia/phantstruct.h b/phantasia/phantstruct.h index 7e023416..fef673f5 100644 --- a/phantasia/phantstruct.h +++ b/phantasia/phantstruct.h @@ -1,6 +1,8 @@ -/* $NetBSD: phantstruct.h,v 1.4 2004/04/07 17:46:47 ross Exp $ */ +/* $NetBSD: phantstruct.h,v 1.5 2005/02/15 12:58:21 jsm Exp $ */ #define bool char +/* phbool is used when we need this version of bool after . */ +#define phbool char /* * phantstruct.h - structure definitions for Phantasia -- cgit v1.2.3-56-ge451