Article View: gnu.chess
Article #5503gnuchess-4.0 (pl61): a shame in the family?
From: Piet Tutelaers
Date: Mon, 31 May 1993 22:37
Date: Mon, 31 May 1993 22:37
36 lines
2107 bytes
2107 bytes
In a attempt to port gnuchess-4.0 (pl61) to my 386BSD system I got the
strong impression that this program does not get the same carefull
treatment as the other members of the GNU-family. Here is why I think so:
- (cd src; make ; make install)
inevitable generates `NO LANGFILE'. Somebody implemented a `-L language'
option in main.c but forgot that InitConst(Lang) does not initiate the
language file `Lang' but LANGFILE.
- the option -DAG4 which is still present in the Makefile is never used.
- the most ugly code I saw is in the function Initialize_ttable () from
init.c (from the indentation one can see that the programmer was in a
great hurry and certainly had memory enough on his computer - what
happens if ttblsize <= (1<<13)?)
(I think I can easily find more proves ...)
I sincerely hope that the next version will be a lot more reliable.
--Piet
--from init.c ----
Initialize_ttable ()
{
int doit = true;
if (rehash < 0)
rehash = MAXrehash;
while(doit && ttblsize > (1<<13)){
ttable[0] = (struct hashentry *)malloc((unsigned)(sizeof(struct hashentry))*(ttblsize+rehash));
ttable[1] = (struct hashentry *)malloc((unsigned)(sizeof(struct hashentry))*(ttblsize+rehash));
if(ttable[0] == NULL || ttable[1] == NULL){
if(ttable[0] != NULL)free(ttable[0]);
ttblsize = ttblsize>>1;
} else doit = false;
}
if(ttable[0] == NULL || ttable[1] == NULL){ perror("memory alloc");exit(1);}
printf("transposition table is %d\n",ttblsize);
}
Technical Details
Message-ID:
<rcpt.738886385@rw7.urc.tue.nl>Path:
arc1-ca.pugleaf.net!gmd.de!Germany.EU.net!mcsun!sun4nl!tuegate.tue.nl!rw7.urc.tue.nl!rcptShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d71d,dc63986348593f8b,start X-Google-Attributes: gid10d71d,public X-Google-ArrivalTime: 1993-05-31 15:52:49 PST Path: arc1-ca.pugleaf.net!gmd.de!Germany.EU.net!mcsun!sun4nl!tuegate.tue.nl!rw7.urc.tue.nl!rcpt From: rcpt@rw7.urc.tue.nl (Piet Tutelaers) Newsgroups: gnu.chess Subject: gnuchess-4.0 (pl61): a shame in the family? Date: 1 Jun 1993 00:37:28 +0200 Organization: Eindhoven University of Technology, The Netherlands Lines: 36 Distribution: world Message-ID: <rcpt.738886385@rw7.urc.tue.nl> NNTP-Posting-Host: rw7.urc.tue.nl