lcgstate.a = 1093;
lcgstate.c = 221587;
lcgstate.m = 1048576;
- set_seed((long)time(NULL));
+ long seedval = (long)time(NULL);
+ set_seed(seedval);
/* Read the database if we have not yet done so */
LIMIT=330;
if(NOVICE)LIMIT=1000;
+ if (logfp)
+ fprintf(logfp, "seed %ld\n", seedval);
+
for (;;) {
do_command(stdin);
}
static bool fallback_handler(signed char *buf)
/* fallback handler for commands not handled by FORTRANish parser */
{
- printf("Fallback handler sees: %s\n", buf);
+ long sv;
+ if (sscanf(buf, "seed %ld", &sv) == 1) {
+ set_seed(sv);
+ printf("Seed set to %ld\n", sv);
+ return true;
+ }
return false;
}