summaryrefslogtreecommitdiff
path: root/src/WrFFrI.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/WrFFrI.c')
-rw-r--r--src/WrFFrI.c9
1 files changed, 5 insertions, 4 deletions
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 */