From 89c36ff09babfeca63709c57d46eff1d26798313 Mon Sep 17 00:00:00 2001 From: Yann Dirson Date: Sun, 25 May 2014 23:52:32 +0200 Subject: [PATCH] Bool transition: util.c and friends --- gnushogi/gnushogi.h | 14 +++++++------- gnushogi/search.c | 4 ++-- gnushogi/util.c | 10 +++++----- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/gnushogi/gnushogi.h b/gnushogi/gnushogi.h index a7baf2d..09fc28d 100644 --- a/gnushogi/gnushogi.h +++ b/gnushogi/gnushogi.h @@ -854,7 +854,7 @@ extern hashcode_array *hashcode; extern drop_hashcode_array *drop_hashcode; #ifdef QUIETBACKGROUND -extern short background; +extern bool background; #endif /* QUIETBACKGROUND */ #if ttblsz @@ -941,12 +941,12 @@ search(short side, #ifdef CACHE void PutInEETable(short side, int score); -int CheckEETable(short side); -int ProbeEETable(short side, short *score); +bool CheckEETable(short side); +bool ProbeEETable(short side, short *score); #endif #if ttblsz -extern int +extern bool ProbeTTable(short side, short depth, short ply, @@ -954,7 +954,7 @@ ProbeTTable(short side, short *beta, short *score); -extern int +extern bool PutInTTable(short side, short score, short depth, @@ -970,7 +970,7 @@ extern unsigned int urand(void); # ifdef HASHFILE extern void gsrand(unsigned int); -extern int +extern bool ProbeFTable(short side, short depth, short ply, @@ -1097,7 +1097,7 @@ extern void skipb(void); extern void EnPassant(short xside, short f, short t, short iop); extern void ShowNodeCnt(long NodeCnt); extern void ShowLine(unsigned short *bstline); -extern int pick(short p1, short p2); +extern bool pick(short p1, short p2); extern short repetition(void); extern void TimeCalc(void); extern void ElapsedTime(ElapsedTime_mode iop); diff --git a/gnushogi/search.c b/gnushogi/search.c index 0d173e2..f12a4ac 100644 --- a/gnushogi/search.c +++ b/gnushogi/search.c @@ -32,7 +32,7 @@ #include "gnushogi.h" -short background = 0; +bool background = 0; static short DepthBeyond; unsigned short PrVar[MAXDEPTH]; extern short recycle, ISZERO; @@ -90,7 +90,7 @@ int plyscore, globalscore; * move into the p1 element. */ -int +bool pick(short p1, short p2) { struct leaf *p, *q, *r, *k; diff --git a/gnushogi/util.c b/gnushogi/util.c index 92f381d..9e915aa 100644 --- a/gnushogi/util.c +++ b/gnushogi/util.c @@ -136,7 +136,7 @@ CB(short sq) * Look for the current board position in the transposition table. */ -int +bool ProbeTTable (short side, short depth, short ply, @@ -222,7 +222,7 @@ ProbeTTable (short side, * Store the current board position in the transposition table. */ -int +bool PutInTTable(short side, short score, short depth, @@ -324,7 +324,7 @@ Fbdcmp(unsigned char *a, unsigned char *b) * Look for the current board position in the persistent transposition table. */ -int +bool ProbeFTable(short side, short depth, short ply, @@ -521,7 +521,7 @@ PutInEETable(short side, int score) /* Get an evaluation from the transposition table */ -int +bool CheckEETable(short side) { struct etable *ptbl; @@ -538,7 +538,7 @@ CheckEETable(short side) /* Get an evaluation from the transposition table */ -int +bool ProbeEETable(short side, short *score) { struct etable *ptbl; -- 2.11.4.GIT