[comp.windows.x] XPM 2.5 to 2.6 patches

lehors@avahi.inria.fr (Arnaud Le Hors) (10/30/90)

Here is a new set of patches (originaly from nazgul@alphalpha.com (Kee
Hinckley))
which fix some bugs, fix include files for C++ and avoid warnings on Apollo.
--
   Arnaud LE HORS
   BULL Research FRANCE -- Koala Project   |    Email : lehors@mirsa.inria.fr
         Inria - Sophia Antipolis          |    Phone : (33) 93 65 77 71
         2004, Route des Lucioles          |    Telex :      97 00 50 F
         06565 Valbonne CEDEX  France      |    Fax   : (33) 93 65 77 66

--- cut here xpm-2.5-to-2.6.patch

Go into the XPM v2.5 source directory, and pipe this file into "patch -p"
You may want to clean the directory afterwards by a:
find . \( -name \*.orig -o -size 0 \) -exec rm {} \;

diff -c0 -r -N ./Makefile /tmp/xpm-new/Makefile
*** ./Makefile	Mon Oct 29 10:28:54 1990
--- /tmp/xpm-new/Makefile	Mon Oct 29 10:28:51 1990
***************
*** 4,4 ****
! # $Id: xpm.shar,v 2.5 90/10/17 17:22:35 lehors Exp $
--- 4,4 ----
! # $Id: xpm.shar,v 2.6 90/10/29 10:26:17 lehors Exp $
diff -c0 -r -N ./README /tmp/xpm-new/README
*** ./README	Mon Oct 29 10:28:54 1990
--- /tmp/xpm-new/README	Mon Oct 29 10:28:51 1990
***************
*** 1,1 ****
! $Id: xpm.shar,v 2.5 90/10/17 17:22:35 lehors Exp $
--- 1,1 ----
! $Id: xpm.shar,v 2.6 90/10/29 10:26:17 lehors Exp $
diff -c0 -r -N ./XCrPFData.c /tmp/xpm-new/XCrPFData.c
*** ./XCrPFData.c	Mon Oct 29 10:28:54 1990
--- /tmp/xpm-new/XCrPFData.c	Mon Oct 29 10:28:51 1990
***************
*** 7,7 ****
!  *  $Id: xpm.shar,v 2.5 90/10/17 17:22:35 lehors Exp $
--- 7,7 ----
!  *  $Id: xpm.shar,v 2.6 90/10/29 10:26:17 lehors Exp $
diff -c0 -r -N ./XRdPixF.c /tmp/xpm-new/XRdPixF.c
*** ./XRdPixF.c	Mon Oct 29 10:28:54 1990
--- /tmp/xpm-new/XRdPixF.c	Mon Oct 29 10:28:51 1990
***************
*** 7,7 ****
!  *  $Id: xpm.shar,v 2.5 90/10/17 17:22:35 lehors Exp $
--- 7,7 ----
!  *  $Id: xpm.shar,v 2.6 90/10/29 10:26:17 lehors Exp $
***************
*** 23,23 ****
!      unsigned int *width_return, *height_return, *npixels_return;
--- 23,23 ----
!      unsigned int *width_return, *height_return;
***************
*** 24 ****
--- 25,25 ----
+      unsigned int *npixels_return;
***************
*** 46,46 ****
!   l = mnextw(mdata, buf);	/* skip the first word */
--- 47,47 ----
!   mnextw(mdata, buf);		/* skip the first word */
diff -c0 -r -N ./XWrPixF.c /tmp/xpm-new/XWrPixF.c
*** ./XWrPixF.c	Mon Oct 29 10:28:54 1990
--- /tmp/xpm-new/XWrPixF.c	Mon Oct 29 10:28:51 1990
***************
*** 6,6 ****
!  *  $Id: xpm.shar,v 2.5 90/10/17 17:22:35 lehors Exp $
--- 6,6 ----
!  *  $Id: xpm.shar,v 2.6 90/10/29 10:26:17 lehors Exp $
***************
*** 29,29 ****
!      Pixmap *pixmap;
--- 29,29 ----
!      Pixmap pixmap;
***************
*** 36,36 ****
!   XImage *ximage = NULL;
--- 36,36 ----
!   XImage *ximage;
***************
*** 38,38 ****
!   unsigned int pixgap;		/* length of pixels gap */
--- 38,38 ----
!   unsigned int pixgap = 0;	/* length of pixels gap */
***************
*** 40,40 ****
!   Pixel *index = NULL;		/* index of different pixels */
--- 40,40 ----
!   Pixel *index;			/* index of different pixels */
***************
*** 135,135 ****
-       bitplane = NULL;
--- 134 ----
diff -c0 -r -N ./create.c /tmp/xpm-new/create.c
*** ./create.c	Mon Oct 29 10:28:54 1990
--- /tmp/xpm-new/create.c	Mon Oct 29 10:28:51 1990
***************
*** 7,7 ****
!  *  $Id: xpm.shar,v 2.5 90/10/17 17:22:35 lehors Exp $
--- 7,7 ----
!  *  $Id: xpm.shar,v 2.6 90/10/29 10:26:17 lehors Exp $
***************
*** 27,27 ****
!      unsigned int *width_return, *height_return, *npixels_return;
--- 27,27 ----
!      unsigned int *width_return, *height_return;
***************
*** 28 ****
--- 29,29 ----
+      unsigned int *npixels_return;
***************
*** 48,48 ****
!   unsigned int a, b, x, y, l = 0;
--- 49,49 ----
!   unsigned int a, b, x, y, l;
***************
*** 233,233 ****
!       ximage = XCreateImage(display, visual, 1, XYBitmap, 0, bitplane, 
--- 234,234 ----
!       ximage = XCreateImage(display, visual, 1, XYBitmap, 0, (char
*)bitplane, 
diff -c0 -r -N ./demo.c /tmp/xpm-new/demo.c
*** ./demo.c	Mon Oct 29 10:28:54 1990
--- /tmp/xpm-new/demo.c	Mon Oct 29 10:28:51 1990
***************
*** 7,7 ****
!  *  $Id: xpm.shar,v 2.5 90/10/17 17:22:35 lehors Exp $
--- 7,7 ----
!  *  $Id: xpm.shar,v 2.6 90/10/29 10:26:17 lehors Exp $
***************
*** 69,69 ****
!     int winx, winy, winw, winh;
--- 69,70 ----
!     int winx, winy;
!     unsigned int winw, winh;
diff -c0 -r -N ./free.c /tmp/xpm-new/free.c
*** ./free.c	Mon Oct 29 10:28:54 1990
--- /tmp/xpm-new/free.c	Mon Oct 29 10:28:51 1990
***************
*** 7,7 ****
!  *  $Id: xpm.shar,v 2.5 90/10/17 17:22:35 lehors Exp $
--- 7,7 ----
!  *  $Id: xpm.shar,v 2.6 90/10/29 10:26:17 lehors Exp $
diff -c0 -r -N ./mio.c /tmp/xpm-new/mio.c
*** ./mio.c	Mon Oct 29 10:28:54 1990
--- /tmp/xpm-new/mio.c	Mon Oct 29 10:28:52 1990
***************
*** 7,7 ****
!  *  $Id: xpm.shar,v 2.5 90/10/17 17:22:35 lehors Exp $
--- 7,7 ----
!  *  $Id: xpm.shar,v 2.6 90/10/29 10:26:17 lehors Exp $
diff -c0 -r -N ./value.c /tmp/xpm-new/value.c
*** ./value.c	Mon Oct 29 10:28:55 1990
--- /tmp/xpm-new/value.c	Mon Oct 29 10:28:52 1990
***************
*** 27,27 ****
!  *  $Id: xpm.shar,v 2.5 90/10/17 17:22:35 lehors Exp $
--- 27,27 ----
!  *  $Id: xpm.shar,v 2.6 90/10/29 10:26:17 lehors Exp $
diff -c0 -r -N ./visual.c /tmp/xpm-new/visual.c
*** ./visual.c	Mon Oct 29 10:28:55 1990
--- /tmp/xpm-new/visual.c	Mon Oct 29 10:28:52 1990
***************
*** 7,7 ****
!  *  $Id: xpm.shar,v 2.5 90/10/17 17:22:35 lehors Exp $
--- 7,7 ----
!  *  $Id: xpm.shar,v 2.6 90/10/29 10:26:17 lehors Exp $
diff -c0 -r -N ./xpm.h /tmp/xpm-new/xpm.h
*** ./xpm.h	Mon Oct 29 10:28:55 1990
--- /tmp/xpm-new/xpm.h	Mon Oct 29 10:28:52 1990
***************
*** 7,7 ****
!  *  $Id: xpm.shar,v 2.5 90/10/17 17:22:35 lehors Exp $
--- 7,7 ----
!  *  $Id: xpm.shar,v 2.6 90/10/29 10:26:17 lehors Exp $
***************
*** 107,107 ****
! #if __STDC__				/* ANSI */
--- 107,107 ----
! #if __STDC__ || defined(__cplusplus) || defined(c_plusplus) /* ANSI || C++*/
***************
*** 114 ****
--- 115,117 ----
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
***************
*** 129,129 ****
! 				  ColorSymbol colorsymbols[],
--- 132,132 ----
! 				  ColorSymbol *colorsymbols,
***************
*** 144,144 ****
! 			    ColorSymbol colorsymbols[],
--- 147,147 ----
! 			    ColorSymbol *colorsymbols,
***************
*** 151,151 ****
! 			     Pixmap *pixmap,
--- 154,154 ----
! 			     Pixmap pixmap,
***************
*** 158 ****
--- 162,164 ----
+ #ifdef __cplusplus
+ }                                             /* for C++ V2.0 */
+ #endif
diff -c0 -r -N ./xpm.tex /tmp/xpm-new/xpm.tex
*** ./xpm.tex	Mon Oct 29 10:28:55 1990
--- /tmp/xpm-new/xpm.tex	Mon Oct 29 10:28:52 1990
***************
*** 5,5 ****
! % $Id: xpm.shar,v 2.5 90/10/17 17:22:35 lehors Exp $
--- 5,5 ----
! % $Id: xpm.shar,v 2.6 90/10/29 10:26:17 lehors Exp $
diff -c0 -r -N ./xpmP.h /tmp/xpm-new/xpmP.h
*** ./xpmP.h	Mon Oct 29 10:28:55 1990
--- /tmp/xpm-new/xpmP.h	Mon Oct 29 10:28:52 1990
***************
*** 7,7 ****
!  *  $Id: xpm.shar,v 2.5 90/10/17 17:22:35 lehors Exp $
--- 7,7 ----
!  *  $Id: xpm.shar,v 2.6 90/10/29 10:26:17 lehors Exp $
***************
*** 103,103 ****
! #if __STDC__				/* ANSI */
--- 103,103 ----
! #if __STDC__ || defined(__cplusplus) || defined(c_plusplus) /* ANSI || C++*/
***************
*** 125,125 ****
! 				  ColorSymbol colorsymbols[],
--- 125,125 ----
! 				  ColorSymbol *colorsymbols,
***************
*** 140,140 ****
! 			    ColorSymbol colorsymbols[],
--- 140,140 ----
! 			    ColorSymbol *colorsymbols,
***************
*** 147,147 ****
! 			     Pixmap *pixmap,
--- 147,147 ----
! 			     Pixmap pixmap,
***************
*** 167,167 ****
! 			    ColorSymbol colorsymbols[],
--- 167,167 ----
! 			    ColorSymbol *colorsymbols,