🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Francois Pinard Wed, 04 Apr 1990 03:24
GNU chess diffs for 386/ix
#6198
Author: Francois Pinard
Date: Wed, 04 Apr 1990 03:24
249 lines
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads