mirror of
https://github.com/diegocr/libnix.git
synced 2026-09-12 03:30:29 +00:00
10 lines
149 B
C
10 lines
149 B
C
#include <stdlib.h>
|
|
|
|
static unsigned int a=1;
|
|
|
|
int rand(void)
|
|
{ return (a=a*1103515245+12345)%RAND_MAX; }
|
|
|
|
void srand(unsigned int seed)
|
|
{ a=seed; }
|