Mozda ovo pomogne :)
Code:
POSIX 1003.1-2003 gives the following example of an implementation of
rand() and srand(), possibly useful when one needs the same sequence on
two different machines.
static unsigned long next = 1;
/* RAND_MAX assumed to be 32767 */
int myrand(void) {
next = next * 1103515245 + 12345;
return((unsigned)(next/65536) % 32768);
}
void mysrand(unsigned seed) {
next = seed;
}
CHUPCKO