xref: /original-bsd/lib/libc/stdlib/rand.c (revision 6c57d260)
1 /* @(#)rand.c	4.1 (Berkeley) 12/21/80 */
2 static	long	randx = 1;
3 
4 srand(x)
5 unsigned x;
6 {
7 	randx = x;
8 }
9 
10 rand()
11 {
12 	return((randx = randx * 1103515245 + 12345) & 0x7fffffff);
13 }
14