char needed;
};
+#define PRESETS 0
+
+#if PRESETS
static struct record preset[] = {
-#if 0
{36, 5, 0, 0, 0, 8, 1},
{ 2, 6, 0, 1, 0, 1, 1},
{53, 92, 0, 0, 0, 0, 1},
{99, 11, 0, 0, 7, 1, 1},
-#endif
};
+#endif
static struct record *recorded;
recorded = (struct record *)malloc(sizeof(*recorded) * numops);
for (n=0; n<numops; n++) {
+#if PRESETS
if (n < sizeof(preset) / sizeof(preset[0])) {
recorded[n] = preset[n];
} else {
+#endif
recorded[n].conn = random() % NCONNECTIONS;
recorded[n].f = random() % NFILES;
recorded[n].start = LOCKBASE + ((unsigned)random() % (LOCKRANGE-1));
recorded[n].r1 = random() % 100;
recorded[n].r2 = random() % 100;
recorded[n].needed = True;
+#if PRESETS
}
+#endif
}
reconnect(cli, fnum, share);