WZDARK = false, ZZWORD;
FILE *logfp;
bool oldstyle = false;
+int debug;
lcg_state lcgstate;
extern void initialise();
/* Options. */
- while ((ch = getopt(argc, argv, "l:o")) != EOF) {
+ while ((ch = getopt(argc, argv, "dl:o")) != EOF) {
switch (ch) {
+ case 'd':
+ debug += 1;
+ break;
case 'l':
logfp = fopen(optarg, "w+");
if (logfp == NULL)
extern signed char rawbuf[LINESIZE], INLINE[LINESIZE+1], MAP1[], MAP2[];
extern FILE *logfp;
extern bool oldstyle;
+extern int debug;
extern lcg_state lcgstate;
/* 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;
+ if (debug) {
+ printf("# random %lu\n", old_x);
+ }
return(old_x);
}