word_t test_randword(rand_t state) { switch (randint(3, state)) { case 0: return randword(state); case 1: return test_randword1(state); case 2: return test_randword2(state); default: printf("Random generator broken!\n"); abort(); } }
static void checkpoint_rand(char *s) { printf(s); bsdnt_printf("%wx\n", randword(state)); }
word_t randint(word_t m, rand_t state) { return (randword(state) % m); }