aboutsummaryrefslogtreecommitdiff
path: root/libXpm/src/WrFFrI.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-04-10 14:58:33 +0200
committermarha <marha@users.sourceforge.net>2012-04-10 14:58:33 +0200
commit5f8448ef6b85a9ff72c5af4cec99183c8bb60dc6 (patch)
treec10939819ba1167cdc905a0c105c7ae4091abbc3 /libXpm/src/WrFFrI.c
parent67326634496ef21b4acbf4cef2f05040d34aef9b (diff)
downloadvcxsrv-5f8448ef6b85a9ff72c5af4cec99183c8bb60dc6.tar.gz
vcxsrv-5f8448ef6b85a9ff72c5af4cec99183c8bb60dc6.tar.bz2
vcxsrv-5f8448ef6b85a9ff72c5af4cec99183c8bb60dc6.zip
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
Diffstat (limited to 'libXpm/src/WrFFrI.c')
-rw-r--r--libXpm/src/WrFFrI.c13
1 files changed, 7 insertions, 6 deletions
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);