🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sources.bugs
Article #746

Fix to BSD version of "chess"

#746
From: Danny
Date: Fri, 29 May 1987 17:25
23 lines
1227 bytes
In adding the changes for BSD, Rich used
    "bzero((char *)a, sizeof a);"
BUT, the variable "a" is an array passed as an argument.  The sizeof (a)
is the sizeof (pointer to (typeof (a))), which on my machine is 4.

Around line 985 (your line numbers may differ) in the routine "ataks",
change the "bzero((char *)a, sizeof a);" to
           "bzero((char *)a, 64*sizeof(short));".

Recompile, and stand back.

Below appears the final version of the lines in question:

#ifdef  BSD
        bzero((char *)a, 64*sizeof (short));
#else
        a = (short *)memset(a,0,64*sizeof(short));
#endif  /* BSD */

                                                Danny
-- 
				Daniel S. Cox
				({seismo!gatech|ihnp4!akgua}!itm!danny)
Technical Details
Message-ID: <1168@itm.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!gatech!itm!danny

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!gatech!itm!danny
From: danny@itm.UUCP (Danny)
Newsgroups: comp.sources.bugs
Subject: Fix to BSD version of "chess"
Message-ID: <1168@itm.UUCP>
Date: Fri, 29-May-87 13:25:27 EDT
Article-I.D.: itm.1168
Posted: Fri May 29 13:25:27 1987
Date-Received: Sun, 31-May-87 07:41:29 EDT
Reply-To: danny@itm.UUCP (Danny)
Distribution: world
Organization: In Touch Ministries, Atlanta, GA
Lines: 23