(main): switch to use standard srandom() and random().
Remove the SRANDOM and RANDOM defines.
This commit is contained in:
parent
750f351a94
commit
f6666518c7
1 changed files with 2 additions and 8 deletions
|
@ -126,13 +126,7 @@ static int DISTINCT_ISLANDS = 1;
|
||||||
#if !defined(_WIN32)
|
#if !defined(_WIN32)
|
||||||
#define max(a,b) (a>b?a:b)
|
#define max(a,b) (a>b?a:b)
|
||||||
#endif
|
#endif
|
||||||
#ifndef SRANDOM
|
#define rnd(x) (random() % (x))
|
||||||
#define SRANDOM srandom
|
|
||||||
#endif
|
|
||||||
#ifndef RANDOM
|
|
||||||
#define RANDOM random
|
|
||||||
#endif
|
|
||||||
#define rnd(x) (RANDOM() % (x))
|
|
||||||
|
|
||||||
int secs; /* number of sectors grown */
|
int secs; /* number of sectors grown */
|
||||||
int ctot; /* total number of continents and islands grown */
|
int ctot; /* total number of continents and islands grown */
|
||||||
|
@ -230,7 +224,7 @@ main(int argc, char *argv[])
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SRANDOM(rnd_seed);
|
srandom(rnd_seed);
|
||||||
if (config_file == NULL) {
|
if (config_file == NULL) {
|
||||||
sprintf(tbuf, "%s/econfig", datadir);
|
sprintf(tbuf, "%s/econfig", datadir);
|
||||||
config_file = tbuf;
|
config_file = tbuf;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue