ftp://ftp.uni-heidelberg.de/pub/X11/contrib/applications/xscreensaver-1.25.tar.Z
[xscreensaver] / hacks / imsmap.c
index 8c36bccbe5351f29736b99698c0640e8ce84db52..fc4f2ca1e00d3351e0af5a443fc59bfd991b702d 100644 (file)
@@ -139,12 +139,10 @@ initwin (dsp, win)
        }
       else
        {
+         XQueryColor (dsp, cmap, &fg_color);
+         XQueryColor (dsp, cmap, &bg_color);
          fg_color.pixel = fg_pixel;
-         if (! XQueryColor (dsp, cmap, &fg_color))
-           abort ();
          bg_color.pixel = bg_pixel;
-         if (! XQueryColor (dsp, cmap, &bg_color))
-           abort ();
        }
       fg_color.flags = DoRed|DoGreen|DoBlue;
       bg_color.flags = DoRed|DoGreen|DoBlue;
@@ -369,7 +367,7 @@ static void
 cycle (dpy)
      Display *dpy;
 {
-  XColor *colors = malloc (npixels * sizeof (XColor));
+  XColor *colors = (XColor *) malloc (npixels * sizeof (XColor));
   time_t stop;
   int i;
   for (i = 0; i < npixels; i++)
@@ -394,8 +392,8 @@ cycle (dpy)
 char *progclass = "Imsmap";
 
 char *defaults [] = {
-  "*background:        black",
-  "*foreground:        black",
+  "Imsmap.background:  black",         /* to placate SGI */
+  "Imsmap.foreground:  black",
   "*mode:      random",
   "*ncolors:   50",
   "*iterations:        7",