Added missing version tags, clean-up
[AROS.git] / compiler / clib / rand_rom.c
blob45e02997b051aee916e98e0415926dd6eef7b7b8
1 /*
2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
3 $Id$
5 C99 functions rand() and srand().
6 */
8 #include <stdlib.h>
10 /* This is the version ofo rand() and srand() for in librom.a */
11 /* For more info on the functions look in rand.c */
12 static unsigned int srand_seed = 1;
14 int rand (void)
16 srand_seed = srand_seed * 1103515245 + 12345;
17 return srand_seed % RAND_MAX;
18 } /* rand */
20 void srand (unsigned int seed)
22 srand_seed = seed;
23 } /* srand */