[comp.os.minix] gnuchess patches

meulenbr@cstw01.UUCP (Frans Meulenbroeks) (11/21/88)

Hi!

Here are the promised patches to get gnuchess running under Minix.
I only tried it on an ST.
To get it running you'll also need the rand.c I just posted, and
the Minix version of BSD curses (for which I posted patches last week)
Everything else is in the README.MINIX file.

Enjoy!

echo x - README.MINIX
gres '^X' '' > README.MINIX << '/'
XTo get the gnuchess running under Minix you'll need to have:
X- gnuchess (version june '88; mine has one patch applied)
X- Minix version of BSD curses
X- the srand function (which I will post separately)
X- the two cdiff files in this archive
X
XWhat you need to do:
X- make gnuchess.c
X- patch the gnuchess and uxdsp sources
X- add -DMINIX to the makefile
X  In most cases you'll also have to compile using the -T. option and to 
X  chmem your compiler and linker passes to something huge
X- Do all what is mentioned in the gnuchess README file
X- run make; this will take a lot of time.
X  One can only make gnuchess
X- chmem to something big
X  (If you have a memory problem, you can also change ttblsz in the beginning
X  of gnuchess.c)
X- play and enjoy.
X
XNotes:
XI've only tested this on an ST. I've no reason to think that it won't run on
Xa PC though.
X
XNovember 1988, Frans Meulenbroeks./
echo x - gnuchess.cdiff
gres '^X' '' > gnuchess.cdiff << '/'
X*** gnuchess.c.bak	Thu Jan  1 00:04:29 1970
X--- gnuchess.c	Thu Jan  1 01:40:27 1970
X***************
X*** 34,39 ****
X--- 34,41 ----
X  #include <alloc.h>
X  #define ttblsz 4096
X  #else
X+ char *malloc();
X+ #include <sys/types.h>
X  #include <sys/param.h>
X  #include <sys/times.h>
X  #define ttblsz 16384
/
echo x - uxdsp.cdiff
gres '^X' '' > uxdsp.cdiff << '/'
X*** uxdsp.c.orig	Thu Jan  1 01:14:59 1970
X--- uxdsp.c	Thu Jan  1 02:16:46 1970
X***************
X*** 30,35 ****
X--- 30,36 ----
X  
X  #include <stdio.h>
X  #include <ctype.h>
X+ #include <sys/types.h>
X  #include <sys/param.h>
X  #include <sys/times.h>
X  #include <sys/file.h>
X***************
X*** 39,44 ****
X--- 40,46 ----
X  
X  struct tms tmbuf1,tmbuf2;
X  int TerminateSearch(),Die();
X+ char *malloc();
X  
X  #define scanz fflush(stdout),scanw
X  #define printz printw
X***************
X*** 686,692 ****
X    ShowMessage("File name: ");
X    scanz("%s",fname);
X    
X!   if (fname[0] == '\0' || access(fname,W_OK) == -1) strcpy(fname,"chess.000");
X    fd = fopen(fname,"w");
X    fprintf(fd,"%d %d %d\n",computer+1,opponent+1,Game50);
X    fprintf(fd,"%d %d %d %d\n",
X--- 688,698 ----
X    ShowMessage("File name: ");
X    scanz("%s",fname);
X    
X!   if (fname[0] == '\0'
X! #ifndef MINIX
X!       || access(fname,W_OK) == -1
X! #endif
X!      ) strcpy(fname,"chess.000");
X    fd = fopen(fname,"w");
X    fprintf(fd,"%d %d %d\n",computer+1,opponent+1,Game50);
X    fprintf(fd,"%d %d %d %d\n",
/
-- 
Frans Meulenbroeks        (meulenbr@cst.prl.philips.nl)
	Centre for Software Technology
	( or try: ...!mcvax!philmds!prle!cst!meulenbr)