[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

libxpm: Changes to 'upstream-unstable'



 COPYRIGHT           |    4 -
 Makefile.am         |    2 
 NEWS.old            |   16 +++---
 configure.ac        |   14 ++---
 cxpm/Makefile.am    |   17 ------
 cxpm/cxpm.c         |    4 -
 cxpm/cxpm.man       |   49 -------------------
 doc/FAQ.html        |   20 +++----
 doc/README.MSW      |   20 +++----
 doc/README.html     |    4 -
 man/Makefile.am     |   34 +++++++++++++
 man/cxpm.man        |   49 +++++++++++++++++++
 man/sxpm.man        |  131 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/Attrib.c        |    2 
 src/CrBufFrI.c      |    2 
 src/RdFToBuf.c      |   12 ++--
 src/WrFFrI.c        |   13 ++---
 src/XpmI.h          |   31 +++++-------
 src/amigax.c        |   60 +++++++++++------------
 src/create.c        |   28 +++++------
 src/data.c          |    6 +-
 src/hashtab.c       |    2 
 src/parse.c         |    7 +-
 src/rgb.c           |    2 
 src/scan.c          |   30 +++++------
 src/simx.c          |   18 +++----
 sxpm/Makefile.am    |   19 -------
 sxpm/plaid.xpm      |   42 ++++++++--------
 sxpm/plaid_ext.xpm  |   42 ++++++++--------
 sxpm/plaid_mask.xpm |   42 ++++++++--------
 sxpm/sxpm.c         |   16 +++---
 sxpm/sxpm.man       |  131 ----------------------------------------------------
 32 files changed, 437 insertions(+), 432 deletions(-)

New commits:
commit acaaea96776b36c097d5413040c5ce85d3ae6cb9
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Wed Mar 7 20:39:55 2012 -0800

    libXpm 3.5.10
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/configure.ac b/configure.ac
index 00a4c8f..ba7e3b4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 
 # Initialize Autoconf
 AC_PREREQ([2.60])
-AC_INIT([libXpm], [3.5.9],
+AC_INIT([libXpm], [3.5.10],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXpm])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([config.h])

commit 1450186652cb9d2efe55c8da7cb64996eddd34c7
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Nov 18 23:25:16 2011 -0800

    closeness_cmp: maintain constness when casting pointers
    
    create.c: In function 'closeness_cmp':
    create.c:224:5: warning: cast discards qualifiers from pointer target type
    create.c:224:5: warning: cast discards qualifiers from pointer target type
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/src/create.c b/src/create.c
index dc09370..98678d8 100644
--- a/src/create.c
+++ b/src/create.c
@@ -221,7 +221,7 @@ typedef struct {
 static int
 closeness_cmp(const void *a, const void *b)
 {
-    CloseColor *x = (CloseColor *) a, *y = (CloseColor *) b;
+    const CloseColor *x = (const CloseColor *) a, *y = (const CloseColor *) b;
 
     /* cast to int as qsort requires */
     return (int) (x->closeness - y->closeness);

commit 7aa7b34491de534da56d637552ee86f94f038cc3
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Nov 18 23:22:12 2011 -0800

    sxpm: make ErrorMessage take const char * arg to fix -Wwrite-strings warnings
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/sxpm/sxpm.c b/sxpm/sxpm.c
index 9585abe..a5eaa32 100644
--- a/sxpm/sxpm.c
+++ b/sxpm/sxpm.c
@@ -110,7 +110,7 @@ static char *plaid[] = {
 static Colormap colormap;
 
 void Usage(void);
-void ErrorMessage(int ErrorStatus, char *tag);
+void ErrorMessage(int ErrorStatus, const char *tag);
 void Punt(int i);
 void VersionInfo(void);
 void kinput(Widget widget, char *tag, XEvent *xe, Boolean *b);
@@ -615,7 +615,7 @@ if no input is specified sxpm reads from standard input.\n\
 void
 ErrorMessage(
     int		 ErrorStatus,
-    char	*tag)
+    const char	*tag)
 {
     char *error = NULL;
     char *warning = NULL;

commit 4cedf181bcfe13e5d206554c51edb82cb17e7ad5
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Fri Nov 11 10:17:11 2011 -0800

    Include missing headers
    
    This fixes implicit declarations for strdup and strcasecmp.
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

diff --git a/src/XpmI.h b/src/XpmI.h
index 280525d..122aea5 100644
--- a/src/XpmI.h
+++ b/src/XpmI.h
@@ -312,6 +312,7 @@ FUNC(xpmstrdup, char *, (char *s1));
 #else
 #undef xpmstrdup
 #define xpmstrdup strdup
+#include <string.h>
 #endif
 
 #ifdef NEED_STRCASECMP
@@ -319,6 +320,7 @@ FUNC(xpmstrcasecmp, int, (char *s1, char *s2));
 #else
 #undef xpmstrcasecmp
 #define xpmstrcasecmp strcasecmp
+#include <strings.h>
 #endif
 
 FUNC(xpmatoui, unsigned int,

commit 933b5d1f1fe9273d1a984707687b36ec61c4c5af
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Thu Nov 10 21:32:15 2011 -0800

    Fix gcc -Wwrite-strings warnings that don't require public API changes
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/src/WrFFrI.c b/src/WrFFrI.c
index 83c11fa..b592fa1 100644
--- a/src/WrFFrI.c
+++ b/src/WrFFrI.c
@@ -51,7 +51,7 @@
 #endif
 
 /* MS Windows define a function called WriteFile @#%#&!!! */
-LFUNC(xpmWriteFile, int, (FILE *file, XpmImage *image, char *name,
+LFUNC(xpmWriteFile, int, (FILE *file, XpmImage *image, const char *name,
 			  XpmInfo *info));
 
 LFUNC(WriteColors, void, (FILE *file, XpmColor *colors, unsigned int ncolors));
@@ -104,7 +104,8 @@ XpmWriteFileFromXpmImage(
     XpmInfo	*info)
 {
     xpmData mdata;
-    char *name, *dot, *s, new_name[BUFSIZ] = {0};
+    const char *name;
+    char *dot, *s, new_name[BUFSIZ] = {0};
     int ErrorStatus;
 
     /* open file to write */
@@ -143,7 +144,7 @@ XpmWriteFileFromXpmImage(
 		name = new_name;
 	    }
 	    /* change '-' to '_' */
-	    s = name;
+	    s = new_name;
 	    while ((dot = strchr(s, '-'))) {
 		*dot = '_';
 		s = dot;
@@ -165,7 +166,7 @@ static int
 xpmWriteFile(
     FILE	*file,
     XpmImage	*image,
-    char	*name,
+    const char	*name,
     XpmInfo	*info)
 {
     /* calculation variables */
diff --git a/src/XpmI.h b/src/XpmI.h
index 9690622..280525d 100644
--- a/src/XpmI.h
+++ b/src/XpmI.h
@@ -114,7 +114,8 @@ typedef struct {
     unsigned int line;
     int CommentLength;
     char Comment[XPMMAXCMTLEN];
-    char *Bcmt, *Ecmt, Bos, Eos;
+    const char *Bcmt, *Ecmt;
+    char Bos, Eos;
     int format;			/* 1 if XPM1, 0 otherwise */
 #ifdef CXPMPROG
     int lineNum;
@@ -132,15 +133,15 @@ typedef struct {
 #define SPC ' '
 
 typedef struct {
-    char *type;			/* key word */
-    char *Bcmt;			/* string beginning comments */
-    char *Ecmt;			/* string ending comments */
+    const char *type;		/* key word */
+    const char *Bcmt;		/* string beginning comments */
+    const char *Ecmt;		/* string ending comments */
     char Bos;			/* character beginning strings */
     char Eos;			/* character ending strings */
-    char *Strs;			/* strings separator */
-    char *Dec;			/* data declaration string */
-    char *Boa;			/* string beginning assignment */
-    char *Eoa;			/* string ending assignment */
+    const char *Strs;		/* strings separator */
+    const char *Dec;		/* data declaration string */
+    const char *Boa;		/* string beginning assignment */
+    const char *Eoa;		/* string ending assignment */
 }      xpmDataType;
 
 extern xpmDataType xpmDataTypes[];
@@ -157,7 +158,7 @@ typedef struct {
 /* Maximum number of rgb mnemonics allowed in rgb text file. */
 #define MAX_RGBNAMES 1024
 
-extern char *xpmColorKeys[];
+extern const char *xpmColorKeys[];
 
 #define TRANSPARENT_COLOR "None"	/* this must be a string! */
 
diff --git a/src/data.c b/src/data.c
index 347aa46..898889c 100644
--- a/src/data.c
+++ b/src/data.c
@@ -61,7 +61,8 @@ ParseComment(xpmData *data)
 	register char c;
 	register unsigned int n = 0;
 	unsigned int notend;
-	char *s, *s2;
+	char *s;
+	const char *s2;
 
 	s = data->Comment;
 	*s = data->Bcmt[0];
@@ -119,7 +120,8 @@ ParseComment(xpmData *data)
 	register int c;
 	register unsigned int n = 0, a;
 	unsigned int notend;
-	char *s, *s2;
+	char *s;
+	const char *s2;
 
 	s = data->Comment;
 	*s = data->Bcmt[0];
diff --git a/src/parse.c b/src/parse.c
index 7dc2aa7..ff23a47 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -70,7 +70,7 @@ LFUNC(ParsePixels, int, (xpmData *data, unsigned int width,
 			 unsigned int cpp, XpmColor *colorTable,
 			 xpmHashTable *hashtable, unsigned int **pixels));
 
-char *xpmColorKeys[] = {
+const char *xpmColorKeys[] = {
     "s",				/* key #1: symbol */
     "m",				/* key #2: mono visual */
     "g4",				/* key #3: 4 grays visual */
@@ -205,7 +205,8 @@ xpmParseColors(
     unsigned int lastwaskey;		/* key read */
     char buf[BUFSIZ+1];
     char curbuf[BUFSIZ];		/* current buffer */
-    char **sptr, *s;
+    const char **sptr;
+    char *s;
     XpmColor *color;
     XpmColor *colorTable;
     char **defaults;
diff --git a/src/scan.c b/src/scan.c
index e51d1ab..54c8da5 100644
--- a/src/scan.c
+++ b/src/scan.c
@@ -53,7 +53,7 @@
 					 * minus \ and " for string compat
 					 * and ? to avoid ANSI trigraphs. */
 
-static char *printable =
+static const char *printable =
 " .XoO+@#$%&*=-;:>,<1234567890qwertyuipasdfghjklzxcvbnmMNBVCZ\
 ASDFGHJKLPIUYTREWQ!~^/()_`'][{}|";
 

commit 696be14bcb4daef5280b425e297223c6ae530cb5
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Thu Nov 10 21:03:44 2011 -0800

    Assume C89 and just use const, not local Const macro
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/src/XpmI.h b/src/XpmI.h
index e6885da..9690622 100644
--- a/src/XpmI.h
+++ b/src/XpmI.h
@@ -306,12 +306,6 @@ FUNC(xpm_znormalizeimagebits, void, (register unsigned char *bp,
 #define ZINDEX1(x, y, img) ((y) * img->bytes_per_line) + ((x) >> 3)
 #endif /* not AMIGA */
 
-#ifdef __STDC__
-#define Const const
-#else
-#define Const /**/
-#endif
-
 #ifdef NEED_STRDUP
 FUNC(xpmstrdup, char *, (char *s1));
 #else
diff --git a/src/create.c b/src/create.c
index 00084d4..dc09370 100644
--- a/src/create.c
+++ b/src/create.c
@@ -219,7 +219,7 @@ typedef struct {
 }      CloseColor;
 
 static int
-closeness_cmp(Const void *a, Const void *b)
+closeness_cmp(const void *a, const void *b)
 {
     CloseColor *x = (CloseColor *) a, *y = (CloseColor *) b;
 
@@ -1028,7 +1028,7 @@ LFUNC(_putbits, void, (register char *src, int dstoffset,
 
 LFUNC(_XReverse_Bytes, int, (register unsigned char *bpt, register unsigned int nb));
 
-static unsigned char Const _reverse_byte[0x100] = {
+static unsigned char const _reverse_byte[0x100] = {
     0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
     0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
     0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
@@ -1146,9 +1146,9 @@ xpm_znormalizeimagebits(
     }
 }
 
-static unsigned char Const _lomask[0x09] = {
+static unsigned char const _lomask[0x09] = {
 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff};
-static unsigned char Const _himask[0x09] = {
+static unsigned char const _himask[0x09] = {
 0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x00};
 
 static void
diff --git a/src/scan.c b/src/scan.c
index 858f274..e51d1ab 100644
--- a/src/scan.c
+++ b/src/scan.c
@@ -589,7 +589,7 @@ ScanOtherColors(
  * level.
  */
 
-static unsigned long Const low_bits_table[] = {
+static unsigned long const low_bits_table[] = {
     0x00000000, 0x00000001, 0x00000003, 0x00000007,
     0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f,
     0x000000ff, 0x000001ff, 0x000003ff, 0x000007ff,

commit 29972ebbb2409bcba87637069a7ad9a958b3325d
Author: Julien Cristau <jcristau@debian.org>
Date:   Sat Sep 24 19:18:56 2011 +0200

    Link sxpm against -lX11
    
    It calls various Xlib functions so should link with -lX11 directly.
    
    Signed-off-by: Julien Cristau <jcristau@debian.org>

diff --git a/configure.ac b/configure.ac
index 5577803..00a4c8f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,7 +25,7 @@ AC_CHECK_FUNCS([strlcat])
 
 # Obtain compiler/linker options for dependencies
 PKG_CHECK_MODULES(XPM, xproto x11)
-PKG_CHECK_MODULES(SXPM, xt xext xextproto, build_sxpm=true, build_sxpm=false)
+PKG_CHECK_MODULES(SXPM, x11 xt xext xextproto, build_sxpm=true, build_sxpm=false)
 AM_CONDITIONAL(BUILD_SXPM, test x$build_sxpm = xtrue)
 
 # Internationalization & localization support

commit 3ea70059805b3ebc795f797b5880b90b6b3a9235
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Sep 16 22:48:53 2011 -0700

    Strip trailing whitespace
    
    Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}'
    git diff -w & git diff -b show no diffs from this change
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/COPYRIGHT b/COPYRIGHT
index 446fa4c..378d563 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -23,9 +23,9 @@
  * in this Software without prior written authorization from GROUPE BULL.
  */
 
-Arnaud LE HORS      BULL Research FRANCE -- Koala Project 
+Arnaud LE HORS      BULL Research FRANCE -- Koala Project
                     (XPM - X PixMap format version 2 & 3)
     Internet:       lehors@sophia.inria.fr
-Surface Mail:       Arnaud LE HORS, INRIA - Sophia Antipolis, 
+Surface Mail:       Arnaud LE HORS, INRIA - Sophia Antipolis,
                     2004, route des Lucioles, 06565 Valbonne Cedex -- FRANCE
  Voice phone:       (33) 93.65.77.71, Fax: (33) 93 65 77 66, Telex: 97 00 50 F
diff --git a/NEWS.old b/NEWS.old
index b90e6cd..ccec85f 100644
--- a/NEWS.old
+++ b/NEWS.old
@@ -53,7 +53,7 @@
 		fixed creation of the mask in SetColor()
 		- patch from Jan Wielemaker <jan@swi.psy.uva.nl>
 	- makefiles are provided for VMS
-		- given by Martin P.J. Zinser m.zinser@gsi.de  
+		- given by Martin P.J. Zinser m.zinser@gsi.de
 	- Imakefiles reworked to get smoother builds and fixes from:
 		- Paul DuBois dubois@primate.wisc.edu
 		- Larry Schwimmer schwim@cyclone.stanford.edu
@@ -513,7 +513,7 @@
 	  increasing this became a requisite).
 
     BUGS CORRECTED:
-	- Many warnings have been fixed - patch from Daniel Dardailler 
+	- Many warnings have been fixed - patch from Daniel Dardailler
 	  daniel@osf.org
 
 3.2e		(93/02/05)
@@ -544,7 +544,7 @@
 
     ENHANCEMENTS:
     	- parsing optimized for single and double characters color
-		- patch originally from Martin Brunecky 
+		- patch originally from Martin Brunecky
 				       marbru@build1.auto-trol.com
 
     BUGS CORRECTED:
@@ -578,7 +578,7 @@
     BUGS CORRECTED:
 	- SVR4 defines for including <string.h> instead of <strings.h>
 		- Jason Patterson <jasonp@fitmail.qut.edu.au>
-	- attributes->extensions and attributes->nextensions fields were not 
+	- attributes->extensions and attributes->nextensions fields were not
 	  set correctly when no extensions present in file.
 		- Simon_Scott Cornish <cornish@ecr.mu.oz.au>
 
@@ -640,7 +640,7 @@
 3.1		(92/02/03)
 
     ENHANCEMENTS:
-    	- sxpm now have more standard options (mainly suggested by 
+    	- sxpm now have more standard options (mainly suggested by
 	Rainer Sinkwitz <sinkwitz@ifi.unizh.ch>):
 
 	Usage:  sxpm [options...]
@@ -743,7 +743,7 @@
 
 	- xpmtoppm.c has is own strstr function which is used if NEED_STRSTR
 	is defined when compiling - Hugues.Leroy@irisa.fr (Hugues Leroy).
-	
+
     BUGS CORRECTED:
 	- many bugs have been fixed, especially for ansi compilers -
 	       Doyle C. Davidson (doyle@doyled.b23b.ingr.com) and
@@ -802,7 +802,7 @@
 	word colorname. Lionel Mallet (mallet@ipvpel.unipv.it).
 	- parser was triggered by the "/" character inside string.
 	Doyle C. Davidson (doyle@doyled.b23b.ingr.com). This is corrected.
-	- sxpm maps the window only if the option "-nod" is not selected. 
+	- sxpm maps the window only if the option "-nod" is not selected.
 
     CHANGES TO THE DOC:
 	- the documentation presents the new API and features.
@@ -868,7 +868,7 @@
 	to override default colors by giving a pixel value (in such a case
 	symbol value must be set to NULL),
 	- the XpmInfo struct contains the new member 'rgb_fname' in which one
-	can specify an rgb text file name while writing a pixmap with the 
+	can specify an rgb text file name while writing a pixmap with the
 	XWritePixmapFile function (otherwise this member should be set to
 	NULL). This way colorname will be searched and written out if found
 	instead of the RGB value,
diff --git a/configure.ac b/configure.ac
index 3514053..5577803 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,7 +43,7 @@ else
 fi
 
 if test "x$USE_GETTEXT" = "xyes" ; then
-	AC_DEFINE([USE_GETTEXT], 1, 
+	AC_DEFINE([USE_GETTEXT], 1,
 		  [Define to 1 if you want to use the gettext() function.])
 fi
 AM_CONDITIONAL(USE_GETTEXT, test "x$USE_GETTEXT" = "xyes")
diff --git a/cxpm/cxpm.c b/cxpm/cxpm.c
index 49296ee..8b8af9a 100644
--- a/cxpm/cxpm.c
+++ b/cxpm/cxpm.c
@@ -100,7 +100,7 @@ ErrorMessage(
     case XpmSuccess:
 	return;
     case XpmOpenFailed:
-	/* L10N_Comments : Error produced when filename does not exist 
+	/* L10N_Comments : Error produced when filename does not exist
 	   or insufficient permissions to open (i.e. cxpm /no/such/file ) */
 	error = gettext("Cannot open file");
 	break;
@@ -111,7 +111,7 @@ ErrorMessage(
 	break;
     case XpmNoMemory:
 	/* L10N_Comments : Error produced when filename can be read, but
-	   is too big for memory 
+	   is too big for memory
 	   (i.e. limit datasize 32 ; cxpm /usr/dt/backdrops/Crochet.pm ) */
 	error = gettext("Not enough memory");
 	break;
diff --git a/doc/FAQ.html b/doc/FAQ.html
index 18d4ee6..3ac9c0d 100644
--- a/doc/FAQ.html
+++ b/doc/FAQ.html
@@ -291,26 +291,26 @@ href="mailto:dan@bristol.com";>dan@bristol.com</a>
 --- xpm-A4.PS   Thu Nov 21 09:27:28 1996
 ***************
 *** 647,668 ****
-        0 ne /edown exch def 
+        0 ne /edown exch def
         /yscale exch def
         /xscale exch def
 -       FMLevel1 {
 -               manualfeed {setmanualfeed} if
--               /FMdicttop countdictstack 1 add def 
--               /FMoptop count def 
--               setpapername 
--               manualfeed {true} {papersize} ifelse 
--               {manualpapersize} {false} ifelse 
--               {desperatepapersize} {false} ifelse 
+-               /FMdicttop countdictstack 1 add def
+-               /FMoptop count def
+-               setpapername
+-               manualfeed {true} {papersize} ifelse
+-               {manualpapersize} {false} ifelse
+-               {desperatepapersize} {false} ifelse
 -               { (Can't select requested paper size for Frame print job!) FMFAILURE } if
 -               count -1 FMoptop {pop pop} for
--               countdictstack -1 FMdicttop {pop end} for 
+-               countdictstack -1 FMdicttop {pop end} for
 -               }
 -               {{1 dict dup /PageSize [paperwidth paperheight]put setpagedevice}stopped
 -               { (Can't select requested paper size for Frame print job!) FMFAILURE } if
 -                {1 dict dup /ManualFeed manualfeed put setpagedevice } stopped pop }
--       ifelse 
-        
+-       ifelse
+
         FMPColor {
                 currentcolorscreen
 --- 647,652 ----
diff --git a/doc/README.MSW b/doc/README.MSW
index f631525..6746bc8 100644
--- a/doc/README.MSW
+++ b/doc/README.MSW
@@ -2,15 +2,15 @@
 README.MSW	hedu@cul-ipn.uni-kiel.de	5/94
 
 		The XPM library for MS-Windows
-		
+
 Motivated by the wxWindows library, which is a (freely available) toolkit
-for developing multi-platform, graphical applications from the same body 
-of C++ code, I wanted to have XPM pixmaps for MS-windows. Instead of rewriting 
+for developing multi-platform, graphical applications from the same body
+of C++ code, I wanted to have XPM pixmaps for MS-windows. Instead of rewriting
 a XPM-parser I managed to port the XPM-library-code to MS-windows.
 Thanks to Anaud Le Hors this became a part of the official XPM-library.
 
-Until now it's only used together with wxWindows. And even there it's more 
-a kind of beta. But it should be possible to run it as a simple libxpm.a 
+Until now it's only used together with wxWindows. And even there it's more
+a kind of beta. But it should be possible to run it as a simple libxpm.a
 without wxWindows.
 
 The key is a transformation of some X types plus some basic X functions.
@@ -36,12 +36,12 @@ typedef struct {
 With these defines and the according functions from simx.c you can call
 XPM-functions the way it's done under X windows. It can look like this:
 
-	ErrorStatus=XpmCreateImageFromData(&dc, data, 
+	ErrorStatus=XpmCreateImageFromData(&dc, data,
 				&ximage,(XImage **)NULL, &xpmAttr);
 	ms_bitmap = ximage->bitmap;
 	// releases the malloc,but do not destroy the bitmap
 	XImageFree(ximage);
-	
+
 Supported functions are the Xpm*Image* but not the Xpm*Pixmap*.
 
 DRAWBACKS:
@@ -62,7 +62,7 @@ into your project except the files related to Pixmap operations: *P*.c.
 (You might uncomment NEED_STRCASECMP in xpm.h if it's in your lib)
 This should compile into libxpm.a. Good luck...
 
-FTP:  
+FTP:
 wxWindows is currently available from the Artificial Intelligence
 Applications Institute (University of Edinburgh) by anonymous FTP.
 	skye.aiai.ed.ac.uk  pub/wxwin/
@@ -71,7 +71,7 @@ or read http://burray.aiai.ed.ac.uk/aiai/aiai.html
 wxxpm, XPM support for wxWindows, the latest version is available at
 	yoda.cul-ipn.uni-kiel.de pub/wxxpm/
 	and maybe in the contrib or tools of wxWindows
-	
+
 Please contact me if you have suggestions, comments or problems!
 
 ================================================================
@@ -87,7 +87,7 @@ Changes:
 
 	* I've used the xpm package under NT 4.0 and MSVC++ 4.2.
 
-	* I've made a big performance improvement in 
+	* I've made a big performance improvement in
 	ParseAndPutPixels(), fixed creation of the mask in
 	SetColor() in create.c.  I looked into XCreateImage()
 	in simx.c, but commented out my improvement for reasons
diff --git a/doc/README.html b/doc/README.html
index 6711f23..c3175c1 100644
--- a/doc/README.html
+++ b/doc/README.html
@@ -127,12 +127,12 @@ Then you can either compile XPM via "imake" or in a stand-alone way.
 		make depend		(optional)
 </pre>
 <p>
-	Then simply execute: 
+	Then simply execute:
 <pre>
 		make
 </pre>
 <p>
-	which will build the XPM library and the sxpm application. 
+	which will build the XPM library and the sxpm application.
 	Then do:
 <pre>
 	     	make install
diff --git a/src/Attrib.c b/src/Attrib.c
index cb304df..1b38047 100644
--- a/src/Attrib.c
+++ b/src/Attrib.c
@@ -57,7 +57,7 @@ CreateOldColorTable(
     XpmColor **colorTable, **color;
     unsigned int a;
 
-    if (ncolors >= UINT_MAX / sizeof(XpmColor *)) 
+    if (ncolors >= UINT_MAX / sizeof(XpmColor *))
 	return XpmNoMemory;
 
     colorTable = (XpmColor **) XpmMalloc(ncolors * sizeof(XpmColor *));
diff --git a/src/CrBufFrI.c b/src/CrBufFrI.c
index 113a45c..398c645 100644
--- a/src/CrBufFrI.c
+++ b/src/CrBufFrI.c
@@ -214,7 +214,7 @@ XpmCreateBufferFromXpmImage(
     }
     ErrorStatus = WriteColors(&ptr, &ptr_size, &used_size,
 			      image->colorTable, image->ncolors, image->cpp);
- 
+
     if (ErrorStatus != XpmSuccess)
 	RETURN(ErrorStatus);
 
diff --git a/src/RdFToBuf.c b/src/RdFToBuf.c
index b719960..8501d23 100644
--- a/src/RdFToBuf.c
+++ b/src/RdFToBuf.c
@@ -98,12 +98,12 @@ XpmReadFileToBuffer(
     fclose(fp);
 #ifdef VMS
     /* VMS often stores text files in a variable-length record format,
-       where there are two bytes of size followed by the record.  fread	
-       converts this so it looks like a record followed by a newline.	
-       Unfortunately, the size reported by fstat() (and fseek/ftell)	
-       counts the two bytes for the record terminator, while fread()	
-       counts only one.  So, fread() sees fewer bytes in the file (size	
-       minus # of records) and thus when asked to read the amount	
+       where there are two bytes of size followed by the record.  fread
+       converts this so it looks like a record followed by a newline.
+       Unfortunately, the size reported by fstat() (and fseek/ftell)
+       counts the two bytes for the record terminator, while fread()
+       counts only one.  So, fread() sees fewer bytes in the file (size
+       minus # of records) and thus when asked to read the amount
        returned by stat(), it fails.
        The best solution, suggested by DEC, seems to consider the length
        returned from fstat() as an upper bound and call fread() with
diff --git a/src/WrFFrI.c b/src/WrFFrI.c
index f2726f9..83c11fa 100644
--- a/src/WrFFrI.c
+++ b/src/WrFFrI.c
@@ -256,8 +256,8 @@ WritePixels(
     unsigned int x, y, h;
 
     h = height - 1;
-    if (cpp != 0 && width >= (UINT_MAX - 3)/cpp) 
-	return XpmNoMemory;    
+    if (cpp != 0 && width >= (UINT_MAX - 3)/cpp)
+	return XpmNoMemory;
     p = buf = (char *) XpmMalloc(width * cpp + 3);
     if (!buf)
 	return (XpmNoMemory);
diff --git a/src/XpmI.h b/src/XpmI.h
index 9d4b1ae..e6885da 100644
--- a/src/XpmI.h
+++ b/src/XpmI.h
@@ -98,7 +98,7 @@ extern FILE *popen();
 #ifndef SIZE_MAX
 # ifdef ULONG_MAX
 #  define SIZE_MAX ULONG_MAX
-# else 
+# else
 #  define SIZE_MAX UINT_MAX
 # endif
 #endif
@@ -319,7 +319,7 @@ FUNC(xpmstrdup, char *, (char *s1));
 #define xpmstrdup strdup
 #endif
 
-#ifdef NEED_STRCASECMP                   
+#ifdef NEED_STRCASECMP
 FUNC(xpmstrcasecmp, int, (char *s1, char *s2));
 #else
 #undef xpmstrcasecmp
diff --git a/src/amigax.c b/src/amigax.c
index eb3bc3a..f163960 100644
--- a/src/amigax.c
+++ b/src/amigax.c
@@ -58,7 +58,7 @@ AllocRastPort (
     unsigned int   depth)
 {
     struct RastPort  *rp;
-    
+
     rp = XpmMalloc (sizeof (*rp));
     if (rp != NULL)
     {
@@ -75,14 +75,14 @@ AllocRastPort (
 	else
 	{
 	    unsigned int   i;
-	    
+
 	    rp->BitMap = XpmMalloc (sizeof (*rp->BitMap));
 	    if (rp->BitMap == NULL)
 	    {
 		FreeRastPort (rp, width, height);
 		return NULL;
 	    }
-	    
+
 	    InitBitMap (rp->BitMap, depth, width, height);
 	    for (i = 0; i < depth; ++i)
 		rp->BitMap->Planes[i] = NULL;
@@ -97,7 +97,7 @@ AllocRastPort (
 	    }
 	}
     }
-    
+
     return rp;
 }
 
@@ -118,7 +118,7 @@ FreeRastPort (
 	    else
 	    {
 		unsigned int   i;
-		
+
 		for (i = 0; i < rp->BitMap->Depth; ++i)
 		{
 		    if (rp->BitMap->Planes[i] != NULL)
@@ -139,7 +139,7 @@ AllocXImage (
     unsigned int   depth)
 {
     XImage  *img;
-    
+
     img = XpmMalloc (sizeof (*img));
     if (img != NULL)
     {
@@ -152,7 +152,7 @@ AllocXImage (
 	    return NULL;
 	}
     }
-    
+
     return img;
 }
 
@@ -166,7 +166,7 @@ FreeXImage (
 	FreeRastPort (ximage->rp, ximage->width, ximage->height);
 	XpmFree (ximage);
     }
-    
+
     return Success;
 }
 
@@ -180,7 +180,7 @@ XPutPixel (
 {
     SetAPen (ximage->rp, pixel);
     WritePixel (ximage->rp, x, y);
-    
+
     return Success;
 }
 
@@ -195,7 +195,7 @@ AllocBestPen (
     if (GfxBase->LibNode.lib_Version >= 39)
     {
 	unsigned long   r, g, b;
-	
+
 	r = screen_in_out->red * 0x00010001;
 	g = screen_in_out->green * 0x00010001;
 	b = screen_in_out->blue * 0x00010001;
@@ -205,7 +205,7 @@ AllocBestPen (
 					      TAG_DONE);
 	if (screen_in_out->pixel == -1)
 	    return False;
-	
+
 	QueryColor (colormap, screen_in_out);
     }
     else
@@ -213,7 +213,7 @@ AllocBestPen (
 	XColor   nearest, trial;
 	long     nearest_delta, trial_delta;
 	int      num_cells, i;
-	
+
 	num_cells = colormap->Count;
 	nearest.pixel = 0;
 	QueryColor (colormap, &nearest);
@@ -249,7 +249,7 @@ AllocBestPen (
 	screen_in_out->green = nearest.green;
 	screen_in_out->blue = nearest.blue;
     }
-    
+
     return True;
 }
 
@@ -263,11 +263,11 @@ FreePens (
     if (GfxBase->LibNode.lib_Version >= 39)
     {
 	int   i;
-	
+
 	for (i = 0; i < npixels; i++)
 	    ReleasePen (colormap, pixels[i]);
     }
-    
+
     return Success;
 }
 
@@ -278,20 +278,20 @@ ParseColor (
     XColor  *exact_def_return)
 {
     int spec_length;
-    
+
     if (spec == 0)
 	return False;
-    
+
     spec_length = strlen(spec);
     if (spec[0] == '#')
     {
 	int hexlen;
 	char hexstr[10];
-	
+
 	hexlen = (spec_length - 1) / 3;
 	if (hexlen < 1 || hexlen > 4 || hexlen * 3 != spec_length - 1)
 	    return False;
-	
+
 	hexstr[hexlen] = '\0';
 	strncpy (hexstr, spec + 1, hexlen);
 	exact_def_return->red = strtoul (hexstr, NULL, 16) << (16 - 4*hexlen);
@@ -299,7 +299,7 @@ ParseColor (
 	exact_def_return->green = strtoul (hexstr, NULL, 16) << (16 - 4*hexlen);
 	strncpy (hexstr, spec + 1 + 2 * hexlen, hexlen);
 	exact_def_return->blue = strtoul (hexstr, NULL, 16) << (16 - 4*hexlen);
-	
+
 	return True;
     }
     else
@@ -308,25 +308,25 @@ ParseColor (
 	int    items, red, green, blue;
 	char   line[512], name[512];
 	Bool   success = False;
-	
+
 	rgbf = fopen ("LIBS:rgb.txt", "r");
 	if (rgbf == NULL)
 	    return False;
-	
+
 	while (fgets(line, sizeof (line), rgbf) && !success)
 	{
 	    items = sscanf (line, "%d %d %d %[^\n]\n",
 			    &red, &green, &blue, name);
 	    if (items != 4)
 		continue;
-	    
+
 	    if (red < 0 || red > 0xFF
 		|| green < 0 || green > 0xFF
 		|| blue < 0 || blue > 0xFF)
 	    {
 		continue;
 	    }
-	    
+
 	    if (0 == xpmstrcasecmp (spec, name))
 	    {
 		exact_def_return->red = red * 0x0101;
@@ -336,7 +336,7 @@ ParseColor (
 	    }
 	}
 	fclose (rgbf);
-	
+
 	return success;
     }
 }
@@ -350,7 +350,7 @@ QueryColor (
     if (GfxBase->LibNode.lib_Version >= 39)
     {
 	unsigned long   rgb[3];
-	
+
 	GetRGB32 (colormap, def_in_out->pixel, 1, rgb);
 	def_in_out->red = rgb[0] >> 16;
 	def_in_out->green = rgb[1] >> 16;
@@ -359,13 +359,13 @@ QueryColor (
     else
     {
 	unsigned short   rgb;
-	
+
 	rgb = GetRGB4 (colormap, def_in_out->pixel);
 	def_in_out->red = ((rgb >> 8) & 0xF) * 0x1111;
 	def_in_out->green = ((rgb >> 4) & 0xF) * 0x1111;
 	def_in_out->blue = (rgb & 0xF) * 0x1111;
     }
-    
+
     return Success;
 }
 
@@ -377,9 +377,9 @@ QueryColors (
     int        ncolors)
 {
     int   i;
-    
+
     for (i = 0; i < ncolors; i++)
 	QueryColor (colormap, &defs_in_out[i]);
-    
+
     return Success;
 }
diff --git a/src/create.c b/src/create.c
index 7c75a42..00084d4 100644
--- a/src/create.c
+++ b/src/create.c
@@ -309,17 +309,17 @@ SetCloseColor(
      * occurred, so we try the next closest color, and so on, until no more
      * colors are within closeness of the target. If we knew that the


Reply to: