Article View: gnu.chess
Article #6198GNU chess diffs for 386/ix
From: Francois Pinard
Date: Wed, 04 Apr 1990 03:24
Date: Wed, 04 Apr 1990 03:24
249 lines
7535 bytes
7535 bytes
These diffs were made on GNU chess 3.0, as grabbed on 90-03-09 on
prep.ai.mit.edu:u/emacs/gnuchess-3.0.tar.Z. These are for ISC's 386/ix.
I wonder if this is the proper forum to submit these; but I do not
know who is coordinating the modifications for GNU chess...
I tried to use gcc to compile GNU chess, but I went into two problems:
there is a preprocessor strangeness around MAXPATHLEN in nuxdsp.c, and
the generated executable aborts silenciously right at the beginning.
So, I compiled GNU chess using the bundled C compiler.
Most of these diffs are to avoid a name collision with the `timeout'
routine in the 386/ix curses package. I renamed the variable
`TimeOut'. I also left some crude code to have MAXPATHLEN working
with gcc. One have to add -DUSG on CFLAGS, too, because of the
<string.h> vs <strings.h> peculiarity.
*** chess/gnuchess.h- Fri Mar 9 23:29:48 1990
--- chess/gnuchess.h Fri Mar 9 23:33:40 1990
***************
*** 103,109 ****
extern long ResponseTime,ExtraTime,Level,et,et0,time0,ft;
extern long NodeCnt,ETnodes,EvalNodes,HashCnt,HashCol;
extern short quit,reverse,bothsides,hashflag,InChk,player,force,easy,beep;
! extern short timeout,xwndw;
extern struct GameRec GameList[500];
extern short GameCnt,Game50,epsquare,lpost,rcptr,contempt;
extern short MaxSearchDepth;
--- 103,109 ----
extern long ResponseTime,ExtraTime,Level,et,et0,time0,ft;
extern long NodeCnt,ETnodes,EvalNodes,HashCnt,HashCol;
extern short quit,reverse,bothsides,hashflag,InChk,player,force,easy,beep;
! extern short TimeOut,xwndw;
extern struct GameRec GameList[500];
extern short GameCnt,Game50,epsquare,lpost,rcptr,contempt;
extern short MaxSearchDepth;
*** chess/nondsp.c- Fri Mar 9 23:30:22 1990
--- chess/nondsp.c Fri Mar 9 23:33:39 1990
***************
*** 93,99 ****
TerminateSearch (sig)
int sig;
{
! timeout = true;
bothsides = false;
}
--- 93,99 ----
TerminateSearch (sig)
int sig;
{
! TimeOut = true;
bothsides = false;
}
***************
*** 564,570 ****
/*
Determine the time that has passed since the search was started. If the
! elapsed time exceeds the target (ResponseTime+ExtraTime) then set timeout
to true which will terminate the search.
*/
--- 564,570 ----
/*
Determine the time that has passed since the search was started. If the
! elapsed time exceeds the target (ResponseTime+ExtraTime) then set TimeOut
to true which will terminate the search.
*/
***************
*** 575,581 ****
long nchar;
ioctl(0, FIONREAD, &nchar);
if (nchar) {
! timeout= true;
bothsides = false;
}
}
--- 575,581 ----
long nchar;
ioctl(0, FIONREAD, &nchar);
if (nchar) {
! TimeOut= true;
bothsides = false;
}
}
***************
*** 587,593 ****
if (et > et0 || iop == 1)
{
if (et > ResponseTime + ExtraTime && Sdepth > 1)
! timeout = true;
et0 = et;
if (iop == 1)
{
--- 587,593 ----
if (et > et0 || iop == 1)
{
if (et > ResponseTime + ExtraTime && Sdepth > 1)
! TimeOut = true;
et0 = et;
if (iop == 1)
{
***************
*** 602,608 ****
#ifdef MSDOS
if (kbhit () && Sdepth > 1)
{
! timeout = true;
bothsides = false;
}
#endif /* MSDOS */
--- 602,608 ----
#ifdef MSDOS
if (kbhit () && Sdepth > 1)
{
! TimeOut = true;
bothsides = false;
}
#endif /* MSDOS */
*** chess/nuxdsp.c- Fri Mar 9 23:31:08 1990
--- chess/nuxdsp.c Fri Mar 9 23:42:22 1990
***************
*** 42,48 ****
--- 42,55 ----
#include <sys/param.h>
#include <curses.h>
#include <signal.h>
+ #ifdef USG
+ /* #include <limits.h> */
+ /* #define MAXPATHLEN PATH_MAX */
+ #define MAXPATHLEN 256
+ #include <string.h>
+ #else
#include <strings.h>
+ #endif
#include "gnuchess.h"
***************
*** 124,130 ****
{
signal (SIGINT, SIG_IGN);
signal (SIGQUIT, SIG_IGN);
! timeout = true;
bothsides = false;
signal (SIGINT, Die);
signal (SIGQUIT, Die);
--- 131,137 ----
{
signal (SIGINT, SIG_IGN);
signal (SIGQUIT, SIG_IGN);
! TimeOut = true;
bothsides = false;
signal (SIGINT, Die);
signal (SIGQUIT, Die);
***************
*** 573,579 ****
/*
Determine the time that has passed since the search was started. If
the elapsed time exceeds the target (ResponseTime+ExtraTime) then set
! timeout to true which will terminate the search.
*/
--- 580,586 ----
/*
Determine the time that has passed since the search was started. If
the elapsed time exceeds the target (ResponseTime+ExtraTime) then set
! TimeOut to true which will terminate the search.
*/
***************
*** 585,591 ****
if (et > et0 || iop == 1)
{
if (et > ResponseTime + ExtraTime && Sdepth > 1)
! timeout = true;
et0 = et;
if (iop == 1)
{
--- 592,598 ----
if (et > et0 || iop == 1)
{
if (et > ResponseTime + ExtraTime && Sdepth > 1)
! TimeOut = true;
et0 = et;
if (iop == 1)
{
*** chess/uxdsp.c- Fri Mar 9 23:31:59 1990
--- chess/uxdsp.c Fri Mar 9 23:33:39 1990
***************
*** 125,131 ****
{
signal (SIGINT, SIG_IGN);
signal (SIGQUIT, SIG_IGN);
! timeout = true;
bothsides = false;
signal (SIGINT, Die);
signal (SIGQUIT, Die);
--- 125,131 ----
{
signal (SIGINT, SIG_IGN);
signal (SIGQUIT, SIG_IGN);
! TimeOut = true;
bothsides = false;
signal (SIGINT, Die);
signal (SIGQUIT, Die);
***************
*** 571,577 ****
short int iop;
/*
Determine the time that has passed since the search was started. If the
! elapsed time exceeds the target (ResponseTime+ExtraTime) then set timeout
to true which will terminate the search.
*/
--- 571,577 ----
short int iop;
/*
Determine the time that has passed since the search was started. If the
! elapsed time exceeds the target (ResponseTime+ExtraTime) then set TimeOut
to true which will terminate the search.
*/
***************
*** 584,590 ****
if (et > et0 || iop == 1)
{
if (et > ResponseTime + ExtraTime && Sdepth > 1)
! timeout = true;
et0 = et;
if (iop == 1)
{
--- 584,590 ----
if (et > et0 || iop == 1)
{
if (et > ResponseTime + ExtraTime && Sdepth > 1)
! TimeOut = true;
et0 = et;
if (iop == 1)
{
--
Franc,ois Pinard ``Vivement GNU!'' pinard@iro.umontreal.ca
(514) 588-4656 cp 886 L'Epiphanie (Qc) J0K 1J0 ...!uunet!iros1!pinard
Technical Details
Message-ID:
<PINARD.90Apr3232410@kovic.IRO.UMontreal.CA>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cs.utexas.edu!news-server.csri.toronto.edu!clyde.concordia.ca!IRO.UMontreal.CA!pinardShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d71d,e9bb5e887acee66a,start X-Google-Attributes: gid10d71d,public X-Google-ArrivalTime: 1990-04-04 13:30:55 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cs.utexas.edu!news-server.csri.toronto.edu!clyde.concordia.ca!IRO.UMontreal.CA!pinard From: pinard@IRO.UMontreal.CA (Francois Pinard) Newsgroups: gnu.chess Subject: GNU chess diffs for 386/ix Message-ID: <PINARD.90Apr3232410@kovic.IRO.UMontreal.CA> Date: 4 Apr 90 03:24:10 GMT Sender: news@IRO.UMontreal.CA Distribution: gnu Organization: Universite' de Montre'al Lines: 249 Posted: Wed Apr 4 04:24:10 1990