From: Damian Yerrick Newsgroups: comp.os.msdos.djgpp Subject: Re: Uptime and entropy in DOS Organization: Pin Eight Software http://pineight.8m.com/ Message-ID: References: <38A82321 DOT 952B55DA AT americasm01 DOT nt DOT com> <88btpi$128uk$2 AT fu-berlin DOT de> X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 35 X-Trace: /bNDCy2ZYyKJww1Kj+M5HGaliNV4UanmEl1oYCqCdeHjpnFPUXeKnnPjszUrQHKp1IN5KwMwdV6y!DSgITUDh71VohDQUwkkhO0oXb8TYlbhgtQtuJi/TkImXgBPoAb5zYRiXeWNhTGecq6tzkpsudizg!o7EL2C4= X-Complaints-To: abuse AT gte DOT net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly NNTP-Posting-Date: Tue, 15 Feb 2000 18:05:22 GMT Distribution: world Date: Tue, 15 Feb 2000 18:05:22 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On 15 Feb 2000 16:10:29 GMT, buers AT gmx DOT de (Dieter Buerssner) wrote: >REPLYTOd_yerrick AT hotmail DOT comNO2CANNEDHAM (Damian Yerrick) wrote in >: > >>On Tue, 15 Feb 2000 09:53:49 +0200 (IST), Eli Zaretskii >> wrote: >>>But I don't see the above calculation anywhere in the sources of >>>`random.c', at least as it appears in DJGPP v2.03. >> >>I saw it in the FreeBSD sources. It replaces >> x = (x * 1103515245) + 12345; >>in the seed generator. > >[I am not sure, what you mean by seed generator] initstate()/srandom() to initialize the PRNG >There may be a misunderstanding here. If I am not mistaken, >your code is the classic (bad) implementation of rand() >in BSD unices, while Eli is referring to BSD random(). Old versions of BSD random() (including the DJGPP version) use classic rand() to initialize random()'s state. Recent FreeBSD random() uses a different generator to do this; I might get to work on porting the new random() to DJGPP. -- Damian Yerrick http://yerricde.tripod.com/ Comment on story ideas: http://home1.gte.net/frodo/quickjot.html AOL is sucks! Find out why: http://anti-aol.org/faqs/aas/ View full sig: http://www.rose-hulman.edu/~yerricde/sig.html This is McAfee VirusScan. Add these two lines to your .sig to prevent the spread of .sig viruses. http://www.mcafee.com/