Article View: gnu.chess
Article #4996Re: pl70 on DEC-alpha
From: Tim Mann
Date: Fri, 20 May 1994 18:18
Date: Fri, 20 May 1994 18:18
121 lines
3450 bytes
3450 bytes
The following patches to pl70 allow it to run on the Alpha.
In book.c, it seems a buffer was overflowing. I don't know why this doesn't
show up on other machines too; I didn't look into it too deeply.
In ttable.c, the #ifdef LONG64 code causes xrand to be called twice as often,
which means that 4000 is too small a dimension for the array it uses.
[NOTE: These patches are more complete than what I sent to bug-gnu-chess
yesterday. I had forgotten to compile with LONG64, so I didn't find the
ttable.c bug until today.]
--Tim
*** book.c.~1~ Tue May 10 05:44:19 1994
--- book.c Thu May 19 17:37:38 1994
***************
*** 374,380 ****
Vparse (FILE * fd, UTSHORT *mv, SHORT side, CHAR *opening, int moveno)
{
register int c, i;
! CHAR s[128];
CHAR *p;
while (true)
--- 374,380 ----
Vparse (FILE * fd, UTSHORT *mv, SHORT side, CHAR *opening, int moveno)
{
register int c, i;
! CHAR s[1024];
CHAR *p;
while (true)
***************
*** 579,586 ****
*/
{
register SHORT i;
! CHAR opening[256];
! CHAR msg[256];
int mustwrite = false;
UTSHORT xside, doit, side;
SHORT c;
--- 579,586 ----
*/
{
register SHORT i;
! CHAR opening[1024];
! CHAR msg[1024];
int mustwrite = false;
UTSHORT xside, doit, side;
SHORT c;
***************
*** 1041,1048 ****
register struct bookentry *OB = NULL;
register struct bookentry *OC = NULL;
register SHORT i;
! CHAR opening[80];
! CHAR msg[80];
UTSHORT xside, doit, side;
SHORT c;
UTSHORT mv;
--- 1041,1048 ----
register struct bookentry *OB = NULL;
register struct bookentry *OC = NULL;
register SHORT i;
! CHAR opening[1024];
! CHAR msg[1024];
UTSHORT xside, doit, side;
SHORT c;
UTSHORT mv;
*** ttable.c.~1~ Fri May 20 09:50:46 1994
--- ttable.c Fri May 20 10:43:42 1994
***************
*** 734,739 ****
--- 734,744 ----
unsigned long hashkey, hashbd;
struct hashval hashcode[2][7][64];
+ #ifdef LONG64
+ #define XRANDTSIZE 8000
+ #else
+ #define XRANDTSIZE 4000
+ #endif
#if !defined NOXRAND
unsigned int
***************
*** 744,750 ****
unsigned int msk;
if (!a)
{
! for (i = 0; i < 4000; i++)
b[i] = 0;
return 0;
}
--- 749,755 ----
unsigned int msk;
if (!a)
{
! for (i = 0; i < XRANDTSIZE; i++)
b[i] = 0;
return 0;
}
***************
*** 785,791 ****
InitHashCode(unsigned int seed)
{
SHORT l, c, p;
! unsigned int t[4000];
int cnt = 0;
xrand(cnt++,t);
--- 790,796 ----
InitHashCode(unsigned int seed)
{
SHORT l, c, p;
! unsigned int t[XRANDTSIZE];
int cnt = 0;
xrand(cnt++,t);
Technical Details
Message-ID:
<2riuud$56s@src-news.pa.dec.com>Path:
arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!get.hooked.net!decwrl!pa.dec.com!src.dec.com!mannReferences:
<1994May20.090745.10090@puh.cb.uu.se>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d71d,11b100961de89373,start X-Google-Attributes: gid10d71d,public X-Google-ArrivalTime: 1994-05-20 11:34:12 PST Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!get.hooked.net!decwrl!pa.dec.com!src.dec.com!mann From: mann@src.dec.com (Tim Mann) Newsgroups: gnu.chess Subject: Re: pl70 on DEC-alpha Date: 20 May 1994 18:18:53 GMT Organization: DEC Systems Research Center Lines: 121 Message-ID: <2riuud$56s@src-news.pa.dec.com> References: <1994May20.090745.10090@puh.cb.uu.se> NNTP-Posting-Host: cypress.pa.dec.com