ftp://ftp.demon.nl/disk1/redhat-contrib/libc5/SRPMS/xscreensaver-2.14-1.src.rpm
[xscreensaver] / hacks / rd-bomb.c
index c648bd66546758a04d0fb387ceb6f06bb523e10a..9dfe8d38ec6388558ad73f8a04bfdc2bec8927c4 100644 (file)
@@ -43,7 +43,6 @@ char *defaults [] = {
   "*width:     100",
   "*height:    100",
   "*epoch:     40000",
-  "*palette:   -1",
   "*reaction:  -1",
   "*diffusion: -1",
   "*verbose:   off",
@@ -59,10 +58,9 @@ XrmOptionDescRec options [] = {
   { "-width",          ".width",       XrmoptionSepArg, 0 },
   { "-height",         ".height",      XrmoptionSepArg, 0 },
   { "-epoch",          ".epoch",       XrmoptionSepArg, 0 },
-  { "-palette",                ".palette",     XrmoptionSepArg, 0 },
   { "-reaction",       ".reaction",    XrmoptionSepArg, 0 },
   { "-diffusion",      ".diffusion",   XrmoptionSepArg, 0 },
-  { "-verbose",                ".verbose",     XrmoptionSepArg, 0 },
+  { "-verbose",                ".verbose",     XrmoptionNoArg, "True" },
   { "-radius",         ".radius",      XrmoptionSepArg, 0 },
   { "-speed",          ".speed",       XrmoptionSepArg, 0 },
   { "-size",           ".size",        XrmoptionSepArg, 0 },
@@ -231,10 +229,14 @@ screenhack (Display *dpy, Window win)
     if (verbose) {
       double tm = 0;
       struct timeval tp;
-      struct timezone tzp;
       if (!(frame%100)) {
        double tm2;
+#ifdef GETTIMEOFDAY_TWO_ARGS
+        struct timezone tzp;
        gettimeofday(&tp, &tzp);
+#else
+        gettimeofday(&tp);
+#endif
        tm2 = tp.tv_sec + tp.tv_usec * 1e-6;
        if (frame > 0)
          printf("fps = %2.4g\n", 100.0 / (tm2 - tm));
@@ -303,11 +305,9 @@ screenhack (Display *dpy, Window win)
       if (2 == reaction && 2 == diffusion)
        reaction = diffusion = 0;
       
-/*      if (verbose)
-       printf("reaction = %d\ndiffusion = %d\n"
-              "palette = %d\nradius = %d\n",
-              reaction, diffusion, palette, radius);
-*/
+      if (verbose)
+       printf("reaction = %d\ndiffusion = %d\nradius = %d\n",
+              reaction, diffusion, radius);
     }
     for (i = 0; i <= width+1; i++) {
       r1[i] = r1[i + w2 * height];