xref: /minix3/lib/libc/stdlib/rand48.h (revision f14fb602092e015ff630df58e17c2a9cd57d29b3)
1*f14fb602SLionel Sambuc /*	$NetBSD: rand48.h,v 1.6 2011/05/18 19:36:36 dsl Exp $	*/
22fe8fb19SBen Gras 
32fe8fb19SBen Gras /*
42fe8fb19SBen Gras  * Copyright (c) 1993 Martin Birgmeier
52fe8fb19SBen Gras  * All rights reserved.
62fe8fb19SBen Gras  *
72fe8fb19SBen Gras  * You may redistribute unmodified or modified versions of this source
82fe8fb19SBen Gras  * code provided that the above copyright notice and this and the
92fe8fb19SBen Gras  * following conditions are retained.
102fe8fb19SBen Gras  *
112fe8fb19SBen Gras  * This software is provided ``as is'', and comes with no warranties
122fe8fb19SBen Gras  * of any kind. I shall in no event be liable for anything that happens
132fe8fb19SBen Gras  * to anyone/anything when using this software.
142fe8fb19SBen Gras  */
152fe8fb19SBen Gras 
162fe8fb19SBen Gras #ifndef _RAND48_H_
172fe8fb19SBen Gras #define _RAND48_H_
182fe8fb19SBen Gras 
192fe8fb19SBen Gras #include <stdlib.h>
202fe8fb19SBen Gras 
21*f14fb602SLionel Sambuc extern void		__dorand48(unsigned short[3]);
222fe8fb19SBen Gras extern unsigned short	__rand48_seed[3];
232fe8fb19SBen Gras extern unsigned short	__rand48_mult[3];
242fe8fb19SBen Gras extern unsigned short	__rand48_add;
252fe8fb19SBen Gras 
262fe8fb19SBen Gras #define	RAND48_SEED_0	(0x330e)
272fe8fb19SBen Gras #define	RAND48_SEED_1	(0xabcd)
282fe8fb19SBen Gras #define	RAND48_SEED_2	(0x1234)
292fe8fb19SBen Gras #define	RAND48_MULT_0	(0xe66d)
302fe8fb19SBen Gras #define	RAND48_MULT_1	(0xdeec)
312fe8fb19SBen Gras #define	RAND48_MULT_2	(0x0005)
322fe8fb19SBen Gras #define	RAND48_ADD	(0x000b)
332fe8fb19SBen Gras 
342fe8fb19SBen Gras #endif /* _RAND48_H_ */
35