static void randomBlots (struct nerverotstate *st) { int which = RAND_FLOAT_01 * 11; freeBlots (st); setupBlots(st,which); st->cur_num=which; }
static void nerverot_free (Display *dpy, Window window, void *closure) { struct state *st = (struct state *) closure; freeBlots (st); free (st); }
/* set up the initial arrays of blots */ static void setupBlots (struct state *st) { int which = RAND_FLOAT_01 * 11; freeBlots (st); switch (which) { case 0: setupBlotsCube (st); break; case 1: setupBlotsSphere (st); break; case 2: setupBlotsCylinder (st); break; case 3: setupBlotsSquiggle (st); break; case 4: setupBlotsCubeCorners (st); break; case 5: setupBlotsTetrahedron (st); break; case 6: setupBlotsSheet (st); break; case 7: setupBlotsSwirlyCone (st); break; case 8: case 9: case 10: setupBlotsDuo (st); break; } }
static void commandBlots (struct nerverotstate *st) { freeBlots (st); setupBlots(st, st->please_num); st->cur_num=st->please_num; }
static void nerverot_free (struct nerverotstate *st) { freeBlots (st); free (st); }