Return to BSD News archive
Newsgroups: comp.os.386bsd.questions Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!munnari.oz.au!spool.mu.edu!howland.reston.ans.net!pipex!uknet!demon!gnome.demon.co.uk!jacs From: jacs@gnome.co.uk ( Chris Stenton) Subject: Re: xfishtank & FreeBSD 1.1 Message-ID: <Crou3y.DB@gnome.co.uk> Organization: Gnome Computers Ltd X-Newsreader: TIN [version 1.2 PL2] References: <mldCrnv8p.Ay4@netcom.com> Date: Mon, 20 Jun 1994 08:55:08 GMT Lines: 27 Matthew Deter (mld@netcom.com) wrote: : Has anyone ported xfishtank to FreeBSD? Mine compiles cleanly, but seg : faults when I try to run it. If no one has ported it (it doesn't : appear to be in the ports section at cdrom.com) I plan to. : If anyone has any info on xfishtank (Version 2.2 from x.ftp.org) email : or post, please. This is the only platform I have at the moment, so I : cannot see if it faults on other platforms... gdb tells me that it is : doing a div by zero by leaping WAY out of the bounds on an array. I : haven't started hunting down the reason yet, tho. You have to change the defs in xfish.c to this. Otherwise it thinks it is using 16bit random numbers instead of 32bit #if defined(FreeBSD) #define RAND_I_1_16 (RAND_MAX>>4) #define RAND_F_1_8 ((float)(RAND_MAX>>3)) #define RAND_I_1_4 (RAND_MAX>>2) #define RAND_I_1_2 (RAND_MAX>>1) #define RAND_I_3_4 ((RAND_MAX>>2)*3) #define RAND_F_MAX ((float)RAND_MAX) -- ------------------------------------------------------------------------------- Dr Chris Stenton chris@gnome.co.uk Gnome Computers Ltd Tel/Fax: 44 (0)480 406164 25A Huntingdon St, St Neots, Cambridgeshire, PE19 1BG