From 6390e770b812f3df9943b72dff360a36cfd20cba Mon Sep 17 00:00:00 2001 From: perry Date: Thu, 3 Feb 2005 02:23:02 +0000 Subject: A preprocessor macro named "srand" was defined which seeded the random number generator. Unfortunately, it conflicted with a function of the same defined in stdlib.h. This was masked by the __P hack, which is now being purged. I've renamed "srand" to "seedrand" to eliminate the conflict. --- larn/header.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'larn/header.h') diff --git a/larn/header.h b/larn/header.h index 08bc6265..f2a4cf70 100644 --- a/larn/header.h +++ b/larn/header.h @@ -1,4 +1,4 @@ -/* $NetBSD: header.h,v 1.14 2003/10/21 07:26:39 agc Exp $ */ +/* $NetBSD: header.h,v 1.15 2005/02/03 02:23:02 perry Exp $ */ /* header.h Larn is copyrighted 1986 by Noah Morgan. */ @@ -429,7 +429,7 @@ extern int rmst, maxitm, lasttime; #define lprc(ch) ((lpnt>=lpend)?(*lpnt++ =(ch), lflush()):(*lpnt++ =(ch))) /* macro to seed the random number generator */ -#define srand(x) (randx=x) +#define seedrand(x) (randx=x) #ifdef MACRORND /* macros to generate random numbers 1<=rnd(N)<=N 0<=rund(N)<=N-1 */ #define rnd(x) ((((randx=randx*1103515245+12345)>>7)%(x))+1) -- cgit v1.2.3