#define COUNT (1 << NSTEPS)
#define CELL(c, r) cell[((unsigned int)(c)) + ((unsigned int) (r)) * xmax]
-static enum mode_t { MODE_H, MODE_S, MODE_V, MODE_RANDOM } mode;
+static enum imsmap_mode { MODE_H, MODE_S, MODE_V, MODE_RANDOM } mode;
static GC gc, gc2;
static XWindowAttributes xgwa;
int fg_h, bg_h;
double fg_s, fg_v, bg_s, bg_v;
- enum mode_t this_mode;
+ enum imsmap_mode this_mode;
static Bool rv_p;
XGCValues gcv;
if (ncolors <= 2) ncolors = 0;
if (ncolors == 0) mono_p = True;
+ if (ncolors > 255) ncolors = 255; /* too many look bad */
fg_pixel = get_pixel_resource ("background", "Background", dpy, cmap);
bg_pixel = get_pixel_resource ("foreground", "Foreground", dpy, cmap);