From 5f8448ef6b85a9ff72c5af4cec99183c8bb60dc6 Mon Sep 17 00:00:00 2001 From: marha Date: Tue, 10 Apr 2012 14:58:33 +0200 Subject: Updated following packages: bigreqsproto-1.1.2 fontsproto-2.1.2 recordproto-1.14.2 scrnsaverproto-1.2.2 xcmiscproto-1.2.2 libXt-1.1.3 xhost-1.0.5 kbproto-1.0.6 libXrender-0.9.7 libxkbfile-1.0.8 freetype-2.4.9 libXaw-1.0.10 libXpm-3.5.10 xproto-7.0.23 --- libXpm/src/WrFFrI.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'libXpm/src/WrFFrI.c') diff --git a/libXpm/src/WrFFrI.c b/libXpm/src/WrFFrI.c index f2726f995..b592fa154 100644 --- a/libXpm/src/WrFFrI.c +++ b/libXpm/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 */ @@ -256,8 +257,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); -- cgit v1.2.3