ficl: Replace rand(3) with random(3).
While the later is a better random generator than the former, the main reason of the change is that random() has a better chance to work with libstand(3). At this time we don't include random number generators in bootforth so this has no effect.
This commit is contained in:
parent
1e97830083
commit
9868276d3b
@ -4822,7 +4822,7 @@ WORDKIND ficlWordClassify(FICL_WORD *pFW)
|
||||
**************************************************************************/
|
||||
static void ficlRandom(FICL_VM *pVM)
|
||||
{
|
||||
PUSHINT(rand());
|
||||
PUSHINT(random());
|
||||
}
|
||||
|
||||
|
||||
@ -4832,7 +4832,7 @@ static void ficlRandom(FICL_VM *pVM)
|
||||
**************************************************************************/
|
||||
static void ficlSeedRandom(FICL_VM *pVM)
|
||||
{
|
||||
srand(POPINT());
|
||||
srandom(POPUNS());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user