#include <stdio.h>
#include <math.h>
+#include <time.h>
#include <sys/time.h> /* for gettimeofday() */
#include <X11/Xlib.h>
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);
if (cycle_p)
{
struct timeval now;
- static struct timeval then = { 0, };
+ static struct timeval then = { 0, 0 };
unsigned long diff;
#ifdef GETTIMEOFDAY_TWO_ARGS
struct timezone tzp;