aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--config/open-axiom.m413
-rw-r--r--config/openaxiom-c-macros.h.in3
-rwxr-xr-xconfigure47
-rw-r--r--configure.ac2
-rw-r--r--src/ChangeLog6
-rw-r--r--src/include/xpm.h486
-rw-r--r--src/lib/pixmap.c4
8 files changed, 56 insertions, 510 deletions
diff --git a/ChangeLog b/ChangeLog
index 5a9355a3..fb3e39e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-09-03 Igor Pashev <pashev.igor@gmail.com>
+ Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * config/open-axiom.m4 (OPENAXIOM_CHECK_X11): Check for <X11/xpm.h>.
+
2011-08-23 Gabriel Dos Reis <gdr@cs.tamu.edu>
* Makefile.am (OA_SRC_TARGETS): Include all-algstrap
diff --git a/config/open-axiom.m4 b/config/open-axiom.m4
index 4fef7459..92c510a0 100644
--- a/config/open-axiom.m4
+++ b/config/open-axiom.m4
@@ -874,25 +874,28 @@ AC_SUBST(X_LIBS)
AC_SUBST(X_EXTRA_LIBS)
## Finally, output the list of libraries that need to appear before -lX11
-## Some part of OpenAxiom depends on Xpm. That library has kind uncertain
+## Some part of OpenAxiom depends on Xpm. That library has kind of uncertain
## future. At some point in the past, it was deprecated, to be
## replaced by xpm-nox; then came back again. So, its support may
## vary from system to system. For the moment, we assume that if X11
-## is found then, Xpm is already present. Though, clearly that is a
+## is found then, Xpm is also present. Though, clearly that is a
## very optimistic assumption. Long term, OpenAxiom should get rid of
## dependence on Xpm. A nearly fool-proof test would be probably
## inspired by AC_PATH_XTRA. I don't have time to get to that
## complication right now. Will fix later.
+## But we can check for the existence of <X11/xpm.h>
X_PRE_LIBS="-lXpm $X_PRE_LIBS"
AC_SUBST(X_PRE_LIBS)
## If the system supports X11, then build graphics
axiom_use_x=no
-if test -z "$no_x"; then
+if test x"$no_x" = xyes; then
+ AC_MSG_NOTICE([The Graphics component is disabled.])
+else
+ AC_CHECK_HEADERS([X11/xpm.h],[],
+ [AC_MSG_ERROR([The header <X11/xpm.h> could not be found. Install Xpm development package and re-start the configuration process.])])
axiom_use_x=yes
oa_c_runtime="$oa_c_runtime graphics"
-else
- AC_MSG_NOTICE([The Garphics component is disabled.])
fi
AC_SUBST(axiom_use_x)
])
diff --git a/config/openaxiom-c-macros.h.in b/config/openaxiom-c-macros.h.in
index 1eb6df78..1f9f1bc8 100644
--- a/config/openaxiom-c-macros.h.in
+++ b/config/openaxiom-c-macros.h.in
@@ -156,6 +156,9 @@
/* Define to 1 if you have the <winsock2.h> header file. */
#undef HAVE_WINSOCK2_H
+/* Define to 1 if you have the <X11/xpm.h> header file. */
+#undef HAVE_X11_XPM_H
+
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
diff --git a/configure b/configure
index d0ddbf1d..24db3418 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for OpenAxiom 1.5.0-2011-07-07.
+# Generated by GNU Autoconf 2.65 for OpenAxiom 1.5.0-2011-09-03.
#
# Report bugs to <open-axiom-bugs@lists.sf.net>.
#
@@ -701,8 +701,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='OpenAxiom'
PACKAGE_TARNAME='openaxiom'
-PACKAGE_VERSION='1.5.0-2011-07-07'
-PACKAGE_STRING='OpenAxiom 1.5.0-2011-07-07'
+PACKAGE_VERSION='1.5.0-2011-09-03'
+PACKAGE_STRING='OpenAxiom 1.5.0-2011-09-03'
PACKAGE_BUGREPORT='open-axiom-bugs@lists.sf.net'
PACKAGE_URL=''
@@ -1493,7 +1493,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures OpenAxiom 1.5.0-2011-07-07 to adapt to many kinds of systems.
+\`configure' configures OpenAxiom 1.5.0-2011-09-03 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1568,7 +1568,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of OpenAxiom 1.5.0-2011-07-07:";;
+ short | recursive ) echo "Configuration of OpenAxiom 1.5.0-2011-09-03:";;
esac
cat <<\_ACEOF
@@ -1679,7 +1679,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-OpenAxiom configure 1.5.0-2011-07-07
+OpenAxiom configure 1.5.0-2011-09-03
generated by GNU Autoconf 2.65
Copyright (C) 2009 Free Software Foundation, Inc.
@@ -2669,7 +2669,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by OpenAxiom $as_me 1.5.0-2011-07-07, which was
+It was created by OpenAxiom $as_me 1.5.0-2011-09-03, which was
generated by GNU Autoconf 2.65. Invocation command line was
$ $0 $@
@@ -5570,7 +5570,7 @@ fi
# Define the identity of the package.
PACKAGE='openaxiom'
- VERSION='1.5.0-2011-07-07'
+ VERSION='1.5.0-2011-09-03'
cat >>confdefs.h <<_ACEOF
@@ -20577,26 +20577,41 @@ fi
## Finally, output the list of libraries that need to appear before -lX11
-## Some part of OpenAxiom depends on Xpm. That library has kind uncertain
+## Some part of OpenAxiom depends on Xpm. That library has kind of uncertain
## future. At some point in the past, it was deprecated, to be
## replaced by xpm-nox; then came back again. So, its support may
## vary from system to system. For the moment, we assume that if X11
-## is found then, Xpm is already present. Though, clearly that is a
+## is found then, Xpm is also present. Though, clearly that is a
## very optimistic assumption. Long term, OpenAxiom should get rid of
## dependence on Xpm. A nearly fool-proof test would be probably
## inspired by AC_PATH_XTRA. I don't have time to get to that
## complication right now. Will fix later.
+## But we can check for the existence of <X11/xpm.h>
X_PRE_LIBS="-lXpm $X_PRE_LIBS"
## If the system supports X11, then build graphics
axiom_use_x=no
-if test -z "$no_x"; then
+if test x"$no_x" = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The Graphics component is disabled." >&5
+$as_echo "$as_me: The Graphics component is disabled." >&6;}
+else
+ for ac_header in X11/xpm.h
+do :
+ ac_fn_cxx_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
+if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_X11_XPM_H 1
+_ACEOF
+
+else
+ as_fn_error "The header <X11/xpm.h> could not be found. Install Xpm development package and re-start the configuration process." "$LINENO" 5
+fi
+
+done
+
axiom_use_x=yes
oa_c_runtime="$oa_c_runtime graphics"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: The Garphics component is disabled." >&5
-$as_echo "$as_me: The Garphics component is disabled." >&6;}
fi
@@ -21560,7 +21575,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by OpenAxiom $as_me 1.5.0-2011-07-07, which was
+This file was extended by OpenAxiom $as_me 1.5.0-2011-09-03, which was
generated by GNU Autoconf 2.65. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -21626,7 +21641,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-OpenAxiom config.status 1.5.0-2011-07-07
+OpenAxiom config.status 1.5.0-2011-09-03
configured by $0, generated by GNU Autoconf 2.65,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 1ca4d740..1a6bbc30 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,7 +33,7 @@ dnl Makefiles for building OpenAxiom interpreter, compiler, libraries, and
dnl auxiliary tools where appropriate.
dnl
-AC_INIT([OpenAxiom], [1.5.0-2011-07-07],
+AC_INIT([OpenAxiom], [1.5.0-2011-09-03],
[open-axiom-bugs@lists.sf.net])
dnl Most of the macros used in this configure.ac are defined in files
diff --git a/src/ChangeLog b/src/ChangeLog
index d5b3ad1f..f7f3c51e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2011-09-03 Igor Pashev <pashev.igor@gmail.com>
+ Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * lib/pixmap.c: Include standard header.
+ * include/xpm.h: Remove.
+
2011-09-03 Gabriel Dos Reis <gdr@cse.tamu.edu>
* interp/property.lisp: Remove unused codes.
diff --git a/src/include/xpm.h b/src/include/xpm.h
deleted file mode 100644
index fd346b5d..00000000
--- a/src/include/xpm.h
+++ /dev/null
@@ -1,486 +0,0 @@
-/*
- * Copyright (C) 1989-95 GROUPE BULL
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * GROUPE BULL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of GROUPE BULL shall not be
- * used in advertising or otherwise to promote the sale, use or other dealings
- * in this Software without prior written authorization from GROUPE BULL.
- */
-
-/*****************************************************************************\
-* xpm.h: *
-* *
-* XPM library *
-* Include file *
-* *
-* Developed by Arnaud Le Hors *
-\*****************************************************************************/
-
-/*
- * The code related to FOR_MSW has been added by
- * HeDu (hedu@cul-ipn.uni-kiel.de) 4/94
- */
-
-#ifndef XPM_h
-#define XPM_h
-
-/*
- * first some identification numbers:
- * the version and revision numbers are determined with the following rule:
- * SO Major number = LIB minor version number.
- * SO Minor number = LIB sub-minor version number.
- * e.g: Xpm version 3.2f
- * we forget the 3 which is the format number, 2 gives 2, and f gives 6.
- * thus we have XpmVersion = 2 and XpmRevision = 6
- * which gives SOXPMLIBREV = 2.6
- *
- * Then the XpmIncludeVersion number is built from these numbers.
- */
-#define XpmFormat 3
-#define XpmVersion 4
-#define XpmRevision 9
-#define XpmIncludeVersion ((XpmFormat * 100 + XpmVersion) * 100 + XpmRevision)
-
-#ifndef XPM_NUMBERS
-
-#ifdef FOR_MSW
-# define SYSV /* uses memcpy string.h etc. */
-# include "simx.h" /* defines some X stuff using MSW types */
-#define NEED_STRCASECMP /* at least for MSVC++ */
-#else /* FOR_MSW */
-# include <X11/Xlib.h>
-# include <X11/Xutil.h>
-#endif /* FOR_MSW */
-
-/* let's define Pixel if it is not done yet */
-#if ! defined(_XtIntrinsic_h) && ! defined(PIXEL_ALREADY_TYPEDEFED)
-typedef unsigned long Pixel; /* Index into colormap */
-# define PIXEL_ALREADY_TYPEDEFED
-#endif
-
-/* make sure we know whether function prototypes are needed or not */
-#ifndef NeedFunctionPrototypes
-# if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
-# define NeedFunctionPrototypes 1
-# else
-# define NeedFunctionPrototypes 0
-# endif
-#endif
-
-
-/* Return ErrorStatus codes:
- * null if full success
- * positive if partial success
- * negative if failure
- */
-
-#define XpmColorError 1
-#define XpmSuccess 0
-#define XpmOpenFailed -1
-#define XpmFileInvalid -2
-#define XpmNoMemory -3
-#define XpmColorFailed -4
-
-typedef struct {
- char *name; /* Symbolic color name */
- char *value; /* Color value */
- Pixel pixel; /* Color pixel */
-} XpmColorSymbol;
-
-typedef struct {
- char *name; /* name of the extension */
- unsigned int nlines; /* number of lines in this extension */
- char **lines; /* pointer to the extension array of strings */
-} XpmExtension;
-
-typedef struct {
- char *string; /* characters string */
- char *symbolic; /* symbolic name */
- char *m_color; /* monochrom default */
- char *g4_color; /* 4 level grayscale default */
- char *g_color; /* other level grayscale default */
- char *c_color; /* color default */
-} XpmColor;
-
-typedef struct {
- unsigned int width; /* image width */
- unsigned int height; /* image height */
- unsigned int cpp; /* number of characters per pixel */
- unsigned int ncolors; /* number of colors */
- XpmColor *colorTable; /* list of related colors */
- unsigned int *data; /* image data */
-} XpmImage;
-
-typedef struct {
- unsigned long valuemask; /* Specifies which attributes are defined */
- char *hints_cmt; /* Comment of the hints section */
- char *colors_cmt; /* Comment of the colors section */
- char *pixels_cmt; /* Comment of the pixels section */
- unsigned int x_hotspot; /* Returns the x hotspot's coordinate */
- unsigned int y_hotspot; /* Returns the y hotspot's coordinate */
- unsigned int nextensions; /* number of extensions */
- XpmExtension *extensions; /* pointer to array of extensions */
-} XpmInfo;
-
-typedef int (*XpmAllocColorFunc)(
-#if NeedFunctionPrototypes
- Display* /* display */,
- Colormap /* colormap */,
- char* /* colorname */,
- XColor* /* xcolor */,
- void* /* closure */
-#endif
-);
-
-typedef int (*XpmFreeColorsFunc)(
-#if NeedFunctionPrototypes
- Display* /* display */,
- Colormap /* colormap */,
- Pixel* /* pixels */,
- int /* npixels */,
- void* /* closure */
-#endif
-);
-
-typedef struct {
- unsigned long valuemask; /* Specifies which attributes are
- defined */
-
- Visual *visual; /* Specifies the visual to use */
- Colormap colormap; /* Specifies the colormap to use */
- unsigned int depth; /* Specifies the depth */
- unsigned int width; /* Returns the width of the created
- pixmap */
- unsigned int height; /* Returns the height of the created
- pixmap */
- unsigned int x_hotspot; /* Returns the x hotspot's
- coordinate */
- unsigned int y_hotspot; /* Returns the y hotspot's
- coordinate */
- unsigned int cpp; /* Specifies the number of char per
- pixel */
- Pixel *pixels; /* List of used color pixels */
- unsigned int npixels; /* Number of used pixels */
- XpmColorSymbol *colorsymbols; /* List of color symbols to override */
- unsigned int numsymbols; /* Number of symbols */
- char *rgb_fname; /* RGB text file name */
- unsigned int nextensions; /* Number of extensions */
- XpmExtension *extensions; /* List of extensions */
-
- unsigned int ncolors; /* Number of colors */
- XpmColor *colorTable; /* List of colors */
-/* 3.2 backward compatibility code */
- char *hints_cmt; /* Comment of the hints section */
- char *colors_cmt; /* Comment of the colors section */
- char *pixels_cmt; /* Comment of the pixels section */
-/* end 3.2 bc */
- unsigned int mask_pixel; /* Color table index of transparent
- color */
-
- /* Color Allocation Directives */
- Bool exactColors; /* Only use exact colors for visual */
- unsigned int closeness; /* Allowable RGB deviation */
- unsigned int red_closeness; /* Allowable red deviation */
- unsigned int green_closeness; /* Allowable green deviation */
- unsigned int blue_closeness; /* Allowable blue deviation */
- int color_key; /* Use colors from this color set */
-
- Pixel *alloc_pixels; /* Returns the list of alloc'ed color
- pixels */
- Bool nalloc_pixels; /* Returns the number of alloc'ed
- color pixels */
-
- Bool alloc_close_colors; /* Specify whether close colors should
- be allocated using XAllocColor
- or not */
- int bitmap_format; /* Specify the format of 1bit depth
- images: ZPixmap or XYBitmap */
-
- /* Color functions */
- XpmAllocColorFunc alloc_color; /* Application color allocator */
- XpmFreeColorsFunc free_colors; /* Application color de-allocator */
- void *color_closure; /* Application private data to pass to
- alloc_color and free_colors */
-
-} XpmAttributes;
-
-/* XpmAttributes value masks bits */
-#define XpmVisual (1L<<0)
-#define XpmColormap (1L<<1)
-#define XpmDepth (1L<<2)
-#define XpmSize (1L<<3) /* width & height */
-#define XpmHotspot (1L<<4) /* x_hotspot & y_hotspot */
-#define XpmCharsPerPixel (1L<<5)
-#define XpmColorSymbols (1L<<6)
-#define XpmRgbFilename (1L<<7)
-/* 3.2 backward compatibility code */
-#define XpmInfos (1L<<8)
-#define XpmReturnInfos XpmInfos
-/* end 3.2 bc */
-#define XpmReturnPixels (1L<<9)
-#define XpmExtensions (1L<<10)
-#define XpmReturnExtensions XpmExtensions
-
-#define XpmExactColors (1L<<11)
-#define XpmCloseness (1L<<12)
-#define XpmRGBCloseness (1L<<13)
-#define XpmColorKey (1L<<14)
-
-#define XpmColorTable (1L<<15)
-#define XpmReturnColorTable XpmColorTable
-
-#define XpmReturnAllocPixels (1L<<16)
-#define XpmAllocCloseColors (1L<<17)
-#define XpmBitmapFormat (1L<<18)
-
-#define XpmAllocColor (1L<<19)
-#define XpmFreeColors (1L<<20)
-#define XpmColorClosure (1L<<21)
-
-
-/* XpmInfo value masks bits */
-#define XpmComments XpmInfos
-#define XpmReturnComments XpmComments
-
-/* XpmAttributes mask_pixel value when there is no mask */
-#ifndef FOR_MSW
-#define XpmUndefPixel 0x80000000
-#else
-/* int is only 16 bit for MSW */
-#define XpmUndefPixel 0x8000
-#endif
-
-/*
- * color keys for visual type, they must fit along with the number key of
- * each related element in xpmColorKeys[] defined in XpmI.h
- */
-#define XPM_MONO 2
-#define XPM_GREY4 3
-#define XPM_GRAY4 3
-#define XPM_GREY 4
-#define XPM_GRAY 4
-#define XPM_COLOR 5
-
-
-/* macros for forward declarations of functions with prototypes */
-#if NeedFunctionPrototypes
-#define FUNC(f, t, p) extern t f p
-#define LFUNC(f, t, p) static t f p
-#else
-#define FUNC(f, t, p) extern t f()
-#define LFUNC(f, t, p) static t f()
-#endif
-
-
-/*
- * functions declarations
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* FOR_MSW, all ..Pixmap.. are excluded, only the ..XImage.. are used */
-
-#ifndef FOR_MSW
- FUNC(XpmCreatePixmapFromData, int, (Display *display,
- Drawable d,
- char **data,
- Pixmap *pixmap_return,
- Pixmap *shapemask_return,
- XpmAttributes *attributes));
-
- FUNC(XpmCreateDataFromPixmap, int, (Display *display,
- char ***data_return,
- Pixmap pixmap,
- Pixmap shapemask,
- XpmAttributes *attributes));
-
- FUNC(XpmReadFileToPixmap, int, (Display *display,
- Drawable d,
- char *filename,
- Pixmap *pixmap_return,
- Pixmap *shapemask_return,
- XpmAttributes *attributes));
-
- FUNC(XpmWriteFileFromPixmap, int, (Display *display,
- char *filename,
- Pixmap pixmap,
- Pixmap shapemask,
- XpmAttributes *attributes));
-#endif /* ndef FOR_MSW */
-
- FUNC(XpmCreateImageFromData, int, (Display *display,
- char **data,
- XImage **image_return,
- XImage **shapemask_return,
- XpmAttributes *attributes));
-
- FUNC(XpmCreateDataFromImage, int, (Display *display,
- char ***data_return,
- XImage *image,
- XImage *shapeimage,
- XpmAttributes *attributes));
-
- FUNC(XpmReadFileToImage, int, (Display *display,
- char *filename,
- XImage **image_return,
- XImage **shapeimage_return,
- XpmAttributes *attributes));
-
- FUNC(XpmWriteFileFromImage, int, (Display *display,
- char *filename,
- XImage *image,
- XImage *shapeimage,
- XpmAttributes *attributes));
-
- FUNC(XpmCreateImageFromBuffer, int, (Display *display,
- char *buffer,
- XImage **image_return,
- XImage **shapemask_return,
- XpmAttributes *attributes));
-#ifndef FOR_MSW
- FUNC(XpmCreatePixmapFromBuffer, int, (Display *display,
- Drawable d,
- char *buffer,
- Pixmap *pixmap_return,
- Pixmap *shapemask_return,
- XpmAttributes *attributes));
-
- FUNC(XpmCreateBufferFromImage, int, (Display *display,
- char **buffer_return,
- XImage *image,
- XImage *shapeimage,
- XpmAttributes *attributes));
-
- FUNC(XpmCreateBufferFromPixmap, int, (Display *display,
- char **buffer_return,
- Pixmap pixmap,
- Pixmap shapemask,
- XpmAttributes *attributes));
-#endif /* ndef FOR_MSW */
- FUNC(XpmReadFileToBuffer, int, (char *filename, char **buffer_return));
- FUNC(XpmWriteFileFromBuffer, int, (char *filename, char *buffer));
-
- FUNC(XpmReadFileToData, int, (char *filename, char ***data_return));
- FUNC(XpmWriteFileFromData, int, (char *filename, char **data));
-
- FUNC(XpmAttributesSize, int, ());
- FUNC(XpmFreeAttributes, void, (XpmAttributes *attributes));
- FUNC(XpmFreeExtensions, void, (XpmExtension *extensions,
- int nextensions));
-
- FUNC(XpmFreeXpmImage, void, (XpmImage *image));
- FUNC(XpmFreeXpmInfo, void, (XpmInfo *info));
- FUNC(XpmGetErrorString, char *, (int errcode));
- FUNC(XpmLibraryVersion, int, ());
-
- /* XpmImage functions */
- FUNC(XpmReadFileToXpmImage, int, (char *filename,
- XpmImage *image,
- XpmInfo *info));
-
- FUNC(XpmWriteFileFromXpmImage, int, (char *filename,
- XpmImage *image,
- XpmInfo *info));
-#ifndef FOR_MSW
- FUNC(XpmCreatePixmapFromXpmImage, int, (Display *display,
- Drawable d,
- XpmImage *image,
- Pixmap *pixmap_return,
- Pixmap *shapemask_return,
- XpmAttributes *attributes));
-#endif
- FUNC(XpmCreateImageFromXpmImage, int, (Display *display,
- XpmImage *image,
- XImage **image_return,
- XImage **shapeimage_return,
- XpmAttributes *attributes));
-
- FUNC(XpmCreateXpmImageFromImage, int, (Display *display,
- XImage *image,
- XImage *shapeimage,
- XpmImage *xpmimage,
- XpmAttributes *attributes));
-#ifndef FOR_MSW
- FUNC(XpmCreateXpmImageFromPixmap, int, (Display *display,
- Pixmap pixmap,
- Pixmap shapemask,
- XpmImage *xpmimage,
- XpmAttributes *attributes));
-#endif
- FUNC(XpmCreateDataFromXpmImage, int, (char ***data_return,
- XpmImage *image,
- XpmInfo *info));
-
- FUNC(XpmCreateXpmImageFromData, int, (char **data,
- XpmImage *image,
- XpmInfo *info));
-
- FUNC(XpmCreateXpmImageFromBuffer, int, (char *buffer,
- XpmImage *image,
- XpmInfo *info));
-
- FUNC(XpmCreateBufferFromXpmImage, int, (char **buffer_return,
- XpmImage *image,
- XpmInfo *info));
-
- FUNC(XpmFree, void, (void *ptr));
-
-#ifdef __cplusplus
-} /* for C++ V2.0 */
-#endif
-
-
-/* backward compatibility */
-
-/* for version 3.0c */
-#define XpmPixmapColorError XpmColorError
-#define XpmPixmapSuccess XpmSuccess
-#define XpmPixmapOpenFailed XpmOpenFailed
-#define XpmPixmapFileInvalid XpmFileInvalid
-#define XpmPixmapNoMemory XpmNoMemory
-#define XpmPixmapColorFailed XpmColorFailed
-
-#define XpmReadPixmapFile(dpy, d, file, pix, mask, att) \
- XpmReadFileToPixmap(dpy, d, file, pix, mask, att)
-#define XpmWritePixmapFile(dpy, file, pix, mask, att) \
- XpmWriteFileFromPixmap(dpy, file, pix, mask, att)
-
-/* for version 3.0b */
-#define PixmapColorError XpmColorError
-#define PixmapSuccess XpmSuccess
-#define PixmapOpenFailed XpmOpenFailed
-#define PixmapFileInvalid XpmFileInvalid
-#define PixmapNoMemory XpmNoMemory
-#define PixmapColorFailed XpmColorFailed
-
-#define ColorSymbol XpmColorSymbol
-
-#define XReadPixmapFile(dpy, d, file, pix, mask, att) \
- XpmReadFileToPixmap(dpy, d, file, pix, mask, att)
-#define XWritePixmapFile(dpy, file, pix, mask, att) \
- XpmWriteFileFromPixmap(dpy, file, pix, mask, att)
-#define XCreatePixmapFromData(dpy, d, data, pix, mask, att) \
- XpmCreatePixmapFromData(dpy, d, data, pix, mask, att)
-#define XCreateDataFromPixmap(dpy, data, pix, mask, att) \
- XpmCreateDataFromPixmap(dpy, data, pix, mask, att)
-
-#endif /* XPM_NUMBERS */
-#endif
diff --git a/src/lib/pixmap.c b/src/lib/pixmap.c
index bc1f548f..c09af5a6 100644
--- a/src/lib/pixmap.c
+++ b/src/lib/pixmap.c
@@ -1,7 +1,7 @@
/*
Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
All rights reserved.
- Copyright (C) 2007-2010, Gabriel Dos Reis.
+ Copyright (C) 2007-2011, Gabriel Dos Reis.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -38,6 +38,7 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xos.h>
+#include <X11/xpm.h>
#include <stdlib.h>
#include <stdio.h>
#include <netinet/in.h>
@@ -263,7 +264,6 @@ read_pixmap_file(Display *display, int screen, char *filename,
#else /*OLD*/
-#include "xpm.h"
int
read_pixmap_file(Display *display, int screen, char *filename,