http://www.uw-madison.lkams.kernel.org/pub/mirrors/fink/distfiles/xscreensaver-4...
[xscreensaver] / hacks / glx / xpm-ximage.c
index 901ce678281dd7cc8e3735a3520b8cb2145fac09..a524e7659adb6ed55495592577e1176e08503fb7 100644 (file)
@@ -1,5 +1,5 @@
 /* xpm-ximage.c --- converts XPM data to an XImage for use with OpenGL.
- * xscreensaver, Copyright (c) 1998, 2001, 2002 Jamie Zawinski <jwz@jwz.org>
+ * xscreensaver, Copyright (c) 1998-2003 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -18,6 +18,7 @@
 
 #include <stdlib.h>
 #include <stdio.h>
+#include <X11/Xlib.h>
 
 extern char *progname;
 
@@ -205,7 +206,7 @@ xpm_to_ximage_1 (Display *dpy, Visual *visual, Colormap cmap,
       xpm_data = 0;
       if (! XpmReadFileToData ((char *) filename, &xpm_data))
         {
-          fprintf (stderr, "%s: unable to read XPM file %f\n",
+          fprintf (stderr, "%s: unable to read XPM file %s\n",
                    progname, filename);
           exit (1);
         }
@@ -240,7 +241,7 @@ xpm_to_ximage_1 (Display *dpy, Visual *visual, Colormap cmap,
       const char *c = xpm_image.colorTable[i].c_color;
       if (!c)
         {
-          fprintf(stderr, "%s: bogus color table?  ($d)\n", progname, i);
+          fprintf(stderr, "%s: bogus color table?  (%d)\n", progname, i);
           exit (1);
         }
       else if (!strncasecmp (c, "None", 4))