tumbledemerald-legacy/agbcc/libc/stdlib/rand_r.c

8 lines
143 B
C
Raw Normal View History

2022-05-19 19:14:13 +02:00
#include <stdlib.h>
int
_DEFUN (rand_r, (seed), unsigned int *seed)
{
return (((*seed) = (*seed) * 1103515245 + 12345) & RAND_MAX);
}