From 8636e5cc7ce7ce5ac913e6a59e2a8e1ea9065b1e Mon Sep 17 00:00:00 2001 From: Kaleb Keithley Date: Wed, 26 Nov 2003 22:48:20 +0000 Subject: merge latest (4.3.99.16) from XFree86 (vendor) branch --- cxpm/cxpm.c | 8 +++++--- include/X11/xpm.h | 21 +-------------------- src/XpmI.h | 3 ++- src/create.c | 16 +++++----------- sxpm/sxpm.man | 7 ++++--- 5 files changed, 17 insertions(+), 38 deletions(-) diff --git a/cxpm/cxpm.c b/cxpm/cxpm.c index 20b4905..f7a7c5e 100644 --- a/cxpm/cxpm.c +++ b/cxpm/cxpm.c @@ -22,7 +22,7 @@ * used in advertising or otherwise to promote the sale, use or other dealings * in this Software without prior written authorization from Arnaud LE HORS. */ -/* $XFree86: xc/extras/Xpm/cxpm/cxpm.c,v 1.2 2001/08/01 00:44:34 tsi Exp $ */ +/* $XFree86: xc/extras/Xpm/cxpm/cxpm.c,v 1.3 2003/05/27 16:45:41 tsi Exp $ */ /*****************************************************************************\ * cxpm.c: * @@ -47,8 +47,9 @@ * note that 's' could stand both for "special" and "slow" ;-) */ static int -sGetc(data) +sGetc(data, file) xpmData *data; + FILE *file; { int c = getc(data->stream.file); if (c == '\n') { @@ -61,9 +62,10 @@ sGetc(data) } static void -sUngetc(data, c) +sUngetc(data, c, file) xpmData *data; int c; + FILE *file; { ungetc(c, data->stream.file); if (c == '\n') { diff --git a/include/X11/xpm.h b/include/X11/xpm.h index 786f3c3..8895323 100644 --- a/include/X11/xpm.h +++ b/include/X11/xpm.h @@ -22,7 +22,7 @@ * used in advertising or otherwise to promote the sale, use or other dealings * in this Software without prior written authorization from GROUPE BULL. */ -/* $XFree86: xc/extras/Xpm/lib/xpm.h,v 1.2 2001/08/22 23:36:44 dawes Exp $ */ +/* $XFree86: xc/extras/Xpm/lib/xpm.h,v 1.3 2003/11/17 22:20:02 dawes Exp $ */ /*****************************************************************************\ * xpm.h: * @@ -85,16 +85,6 @@ 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 @@ -150,23 +140,19 @@ typedef struct { } 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 { @@ -290,13 +276,8 @@ typedef struct { /* 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 /* diff --git a/src/XpmI.h b/src/XpmI.h index 237a535..ccbc96d 100644 --- a/src/XpmI.h +++ b/src/XpmI.h @@ -22,7 +22,7 @@ * used in advertising or otherwise to promote the sale, use or other dealings * in this Software without prior written authorization from GROUPE BULL. */ -/* $XFree86: xc/extras/Xpm/lib/XpmI.h,v 1.8 2002/01/07 19:40:23 dawes Exp $ */ +/* $XFree86: xc/extras/Xpm/lib/XpmI.h,v 1.9 2003/08/06 14:03:58 eich Exp $ */ /*****************************************************************************\ * XpmI.h: * @@ -58,6 +58,7 @@ extern FILE *popen(); #include #include +#include #ifdef VMS #include diff --git a/src/create.c b/src/create.c index 770fbf8..2fba038 100644 --- a/src/create.c +++ b/src/create.c @@ -32,7 +32,7 @@ * * * Developed by Arnaud Le Hors * \*****************************************************************************/ -/* $XFree86: xc/extras/Xpm/lib/create.c,v 1.3 2002/01/07 19:40:49 dawes Exp $ */ +/* $XFree86: xc/extras/Xpm/lib/create.c,v 1.5 2003/10/07 21:25:37 herrb Exp $ */ /* * The code related to FOR_MSW has been added by @@ -126,7 +126,9 @@ LFUNC(PutImagePixels1, void, (XImage *image, unsigned int width, LFUNC(PutPixel1, int, (XImage *ximage, int x, int y, unsigned long pixel)); LFUNC(PutPixel, int, (XImage *ximage, int x, int y, unsigned long pixel)); +#if !defined(WORD64) && !defined(LONG64) LFUNC(PutPixel32, int, (XImage *ximage, int x, int y, unsigned long pixel)); +#endif LFUNC(PutPixel32MSB, int, (XImage *ximage, int x, int y, unsigned long pixel)); LFUNC(PutPixel32LSB, int, (XImage *ximage, int x, int y, unsigned long pixel)); LFUNC(PutPixel16MSB, int, (XImage *ximage, int x, int y, unsigned long pixel)); @@ -765,7 +767,6 @@ XpmCreateImageFromXpmImage(display, image, unsigned int depth; int bitmap_format; XpmFreeColorsFunc freeColors; - void *closure; /* variables to return */ XImage *ximage = NULL; @@ -812,10 +813,6 @@ XpmCreateImageFromXpmImage(display, image, freeColors = attributes->free_colors; else freeColors = FreeColors; - if (attributes && (attributes->valuemask & XpmColorClosure)) - closure = attributes->color_closure; - else - closure = NULL; ErrorStatus = XpmSuccess; @@ -1812,6 +1809,7 @@ PutPixel(ximage, x, y, pixel) return 1; } +#if !defined(WORD64) && !defined(LONG64) static int PutPixel32(ximage, x, y, pixel) register XImage *ximage; @@ -1825,6 +1823,7 @@ PutPixel32(ximage, x, y, pixel) *((unsigned long *)addr) = pixel; return 1; } +#endif static int PutPixel32MSB(ximage, x, y, pixel) @@ -1951,7 +1950,6 @@ xpmParseDataAndCreate(display, data, image_return, shapeimage_return, unsigned int depth; int bitmap_format; XpmFreeColorsFunc freeColors; - void *closure; /* variables to return */ XImage *ximage = NULL; @@ -2009,10 +2007,6 @@ xpmParseDataAndCreate(display, data, image_return, shapeimage_return, freeColors = attributes->free_colors; else freeColors = FreeColors; - if (attributes && (attributes->valuemask & XpmColorClosure)) - closure = attributes->color_closure; - else - closure = NULL; cmts = info && (info->valuemask & XpmReturnComments); diff --git a/sxpm/sxpm.man b/sxpm/sxpm.man index 8e5d593..806ba1d 100644 --- a/sxpm/sxpm.man +++ b/sxpm/sxpm.man @@ -21,6 +21,7 @@ .\"used in advertising or otherwise to promote the sale, use or other dealings .\"in this Software without prior written authorization from GROUPE BULL. .\" +.\" $XFree86: xc/extras/Xpm/sxpm/sxpm.man,v 1.3 2003/10/22 20:39:36 tsi Exp $ .nr )S 12 .TH SXPM 1 .PD @@ -102,13 +103,13 @@ Do not display the pixmap in a window. (Useful when using as converter) Do not use the clipmask if there is any. .TP 8 .B \-sc \fIsymbol colorname\fP -Override default color to \fIsymbol\fP to \fIcolorname\fp. +Override default color to \fIsymbol\fP to \fIcolorname\fP. .TP 8 .B \-sp \fIsymbol pixelvalue\fP -Override default color to \fIsymbol\fP to \fIpixelvalue\fp. +Override default color to \fIsymbol\fP to \fIpixelvalue\fP. .TP 8 .B \-cp \fIcolorname pixelvalue\fP -Override default color to \fIcolorname\fP to \fIpixelvalue\fp. +Override default color to \fIcolorname\fP to \fIpixelvalue\fP. .TP 8 .B \-rgb \fIfilename\fP Search color names in the file \fIfilename\fP and write them out instead of -- cgit v1.2.1