home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
LIB
/
unix.zoo
/
rand.c
< prev
next >
Wrap
Text File
|
2009-11-06
|
272b
|
15 lines
static long seed = 1L;
int rand()
{
seed = (1103515245L * seed + 12345) & 0x7FFFFFFF;
return((int) (seed & 077777));
}
int srand (new_seed)
long new_seed;
{
seed = new_seed & 0x7FFFFFFF;
}