}
unsigned long get_next_lcg_value(void)
/* Return the LCG's current value, and then iterate it. */
{
}
unsigned long get_next_lcg_value(void)
/* Return the LCG's current value, and then iterate it. */
{
- unsigned long old_x = lcgstate.x;
- lcgstate.x = (lcgstate.a * lcgstate.x + lcgstate.c) % lcgstate.m;
+ unsigned long old_x = game.lcg_x;
+ game.lcg_x = (game.lcg_a * game.lcg_x + game.lcg_c) % game.lcg_m;
return old_x;
}
long randrange(long range)
/* Return a random integer from [0, range). */
{
return old_x;
}
long randrange(long range)
/* Return a random integer from [0, range). */
{
* in which you want to echo commands. One is when shipping them to
* a log under the -l option, in which case you want to suppress
* prompt generation (so test logs are unadorned command sequences).
* in which you want to echo commands. One is when shipping them to
* a log under the -l option, in which case you want to suppress
* prompt generation (so test logs are unadorned command sequences).
if (!eof) {
strncpy(rawbuf, cp, sizeof(rawbuf)-1);
linenoiseHistoryAdd(rawbuf);
if (!eof) {
strncpy(rawbuf, cp, sizeof(rawbuf)-1);
linenoiseHistoryAdd(rawbuf);