# include "config.h"
#endif
-#ifdef HAVE_XPM /* whole file */
-
#include <stdlib.h>
#include <stdio.h>
#include <X11/Intrinsic.h>
-#include <X11/Xutil.h>
-#include <X11/xpm.h>
extern char *progname;
+#ifdef HAVE_XPM /* whole file */
+
+#include <X11/Xutil.h>
+#include <X11/xpm.h>
+
static Bool
bigendian (void)
{
int bpl, wpl;
XColor colors[255];
+ memset (&xpm_image, 0, sizeof(xpm_image));
+ memset (&xpm_info, 0, sizeof(xpm_info));
result = XpmCreateXpmImageFromData (xpm_data, &xpm_image, &xpm_info);
if (result != XpmSuccess)
{
#else /* !HAVE_XPM */
-static XImage *
+XImage *
xpm_to_ximage (char **xpm_data)
{
fprintf(stderr, "%s: not compiled with XPM support.\n", progname);