🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.chess
Article #5343

Output problems with gnuchessc

#5343
From: andrew.sun
Date: Tue, 18 Jan 1994 00:50
150 lines
5007 bytes

     I'm trying to get gnuchessc
from the gnuchess-4.0.pl63.tar.gz distribution to work with
/usr/games/chesstool running on a SUN sparc system, SUN 4.1.3.

     gnuchess was compiled with gcc-2.5.7.

     gnuchessc is generating output that is not compatible with chesstool,
as the following output shows.  As a result, chesstool does not work
with gnuchessc.

$ gnuchessc
Chess
e2e4
1. ... e2e41. ... c7c6
My move is: c7c6
quit
$ exit

Listed below are some of the my patches to attempt to fix the problems.
However, without really studying the code in detail, there isn't
much more I can do with limited time.

The patches below attempt to fix the following:
     1. chesstool does not expect bell characters.
     2. the "My move is . . ." should not be printed.
     3. Each half move should be on separate output lines.
     4. A printz (CP[15]) prints a wrong message.
     5. gnuchessc should terminate on SIGINT.

The following problems remain:
     1. A control-D, EOF character as input should terminate gnuchessc.
     2. The response for castle
        as o-o or o-o-o is not compatible with chesstool.

Any official patches appreciated.


Thanks,
Andrew Sun


()()()()()()()()()()()


*** book.c.ORIG	Mon Jul 26 18:50:46 1993
--- book.c	Mon Jul 26 18:50:45 1993
***************
*** 250,256 ****
      short int l;
  
      flag.illegal = flag.mate = flag.post = flag.quit = flag.reverse = flag.bothsides = flag.onemove = flag.force = false;
!     flag.material = flag.coords = flag.hash = flag.easy = flag.beep = flag.rcptr = true;
      flag.stars = flag.shade = flag.back = flag.musttimeout = false;
  #ifdef CLIENT
      flag.gamein = true;
--- 250,261 ----
      short int l;
  
      flag.illegal = flag.mate = flag.post = flag.quit = flag.reverse = flag.bothsides = flag.onemove = flag.force = false;
!     flag.material = flag.coords = flag.hash = flag.easy = flag.rcptr = true;
! #ifdef CHESSTOOL
!     flag.beep = false;
! #else
!     flag.beep = true;
! #endif
      flag.stars = flag.shade = flag.back = flag.musttimeout = false;
  #ifdef CLIENT
      flag.gamein = true;
*** dspcom.c.ORIG	Mon Jul 26 18:50:48 1993
--- dspcom.c	Mon Jul 26 18:50:47 1993
***************
*** 171,177 ****
  	{
  	  UnmakeMove (opponent, &xnode, &tempb, &tempc, &tempsf, &tempst);
  #if defined CHESSTOOL
! 	  printz (CP[15]);
  #else
  #ifdef NONDSP
  /* Illegal move in check */
--- 171,177 ----
  	{
  	  UnmakeMove (opponent, &xnode, &tempb, &tempc, &tempsf, &tempst);
  #if defined CHESSTOOL
! 	  printz (CP[78]);
  #else
  #ifdef NONDSP
  /* Illegal move in check */
***************
*** 1257,1266 ****
  #if defined CHESSTOOL || defined XBOARD
  #if defined CHESSTOOL
    if (normal)
!     if (computer == white)
!       printz ("%d. %s", ++mycnt2, s);
      else
!       printz ("%d. ... %s", ++mycnt2, s);
  #else
    printz ("%d. %s\n", ++mycnt2, s);
  #endif
--- 1257,1266 ----
  #if defined CHESSTOOL || defined XBOARD
  #if defined CHESSTOOL
    if (normal)
!     if (computer == black)
!       printz ("%d. %s\n", ++mycnt2, s);
      else
!       printz ("%d. ... %s\n", ++mycnt2, s);
  #else
    printz ("%d. %s\n", ++mycnt2, s);
  #endif
***************
*** 1279,1285 ****
--- 1279,1287 ----
    printz ("\n");
  #endif
  #endif /* CHESSTOOL */
+ #if !defined CHESSTOOL
    signal (SIGINT, TerminateSearch);
+ #endif
  #ifndef MSDOS
    signal (SIGQUIT, TerminateSearch);
  #endif /* MSDOS */
*** nondsp.c.ORIG	Mon Jul 26 18:50:49 1993
--- nondsp.c	Mon Jul 26 18:50:48 1993
***************
*** 164,170 ****
--- 164,172 ----
    /*printz ("Time Control %s %d moves %d seconds %d opr %d depth\n", (TCflag) ? "ON" : "OFF",*/
    printz (CP[110], (TCflag) ? CP[93] : CP[92],
  	  TimeControl.moves[white], TimeControl.clock[white] / 100, TCadd/100, MaxSearchDepth);
+ #if !defined CHESSTOOL
    signal (SIGINT, TerminateSearch);
+ #endif
  #ifndef MSDOS
    signal (SIGQUIT, TerminateSearch);
  #endif /* MSDOS */
***************
*** 450,456 ****
--- 452,460 ----
      }
    UpdateDisplay (root->f, root->t, 0, root->flags);
    /*printf ("My move is: %s\n", mvstr[0]);*/
+ #if !defined CHESSTOOL
    printf (CP[83], mvstr[0]);
+ #endif
    if (flag.beep)
      printz ("%c", 7);
  #endif /* CHESSTOOL */
Technical Details
Message-ID: <CJsvnH.JJ9@cbnewsh.cb.att.com>
Path: arc1-ca.pugleaf.net!gmd.de!urmel.informatik.rwth-aachen.de!news.rhrz.uni-bonn.de!mpifr-bonn.mpg.de!uniol!zib-berlin.de!news.th-darmstadt.de!fauern!xlink.net!howland.reston.ans.net!agate!headwall.Stanford.EDU!rutgers!att-out!cbnewsh!asun

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d71d,f67f499404987e45,start
X-Google-Attributes: gid10d71d,public
X-Google-ArrivalTime: 1994-01-18 22:26:06 PST
Path: arc1-ca.pugleaf.net!gmd.de!urmel.informatik.rwth-aachen.de!news.rhrz.uni-bonn.de!mpifr-bonn.mpg.de!uniol!zib-berlin.de!news.th-darmstadt.de!fauern!xlink.net!howland.reston.ans.net!agate!headwall.Stanford.EDU!rutgers!att-out!cbnewsh!asun
From: asun@cbnewsh.cb.att.com (andrew.sun)
Newsgroups: gnu.chess
Subject: Output problems with gnuchessc
Message-ID: <CJsvnH.JJ9@cbnewsh.cb.att.com>
Date: 18 Jan 94 00:50:02 GMT
Distribution: na
Organization: AT&T
Lines: 150