diff options
author | marha <marha@users.sourceforge.net> | 2013-10-01 12:33:20 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-10-01 12:33:20 +0200 |
commit | be0d35a4a1b1dc5bde14d1b027f4f0cb58b5a779 (patch) | |
tree | 807b5640d1fedc88ddcda752f101ffdb3071092a /libXpm/src/WrFFrI.c | |
parent | 11b60c4ebaf348b01051bfff19f947b073028a99 (diff) | |
parent | 6dd755aa923291db2501cc5c22e409c41a70e3c1 (diff) | |
download | vcxsrv-be0d35a4a1b1dc5bde14d1b027f4f0cb58b5a779.tar.gz vcxsrv-be0d35a4a1b1dc5bde14d1b027f4f0cb58b5a779.tar.bz2 vcxsrv-be0d35a4a1b1dc5bde14d1b027f4f0cb58b5a779.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
Update following packages:
Conflicts:
X11/Xwinsock.h
apps/xhost/xhost.c
libXaw/src/Vendor.c
libXfont/include/X11/fonts/bdfint.h
libXfont/src/fontfile/catalogue.c
Diffstat (limited to 'libXpm/src/WrFFrI.c')
-rw-r--r-- | libXpm/src/WrFFrI.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/libXpm/src/WrFFrI.c b/libXpm/src/WrFFrI.c index b592fa154..067c96b3a 100644 --- a/libXpm/src/WrFFrI.c +++ b/libXpm/src/WrFFrI.c @@ -45,11 +45,12 @@ #ifndef NO_ZPIPE #include "sys/wait.h" #include "sys/types.h" -#include "fcntl.h" #include "unistd.h" #include "errno.h" #endif +#include "fcntl.h" + /* MS Windows define a function called WriteFile @#%#&!!! */ LFUNC(xpmWriteFile, int, (FILE *file, XpmImage *image, const char *name, XpmInfo *info)); @@ -63,13 +64,13 @@ LFUNC(WritePixels, int, (FILE *file, unsigned int width, unsigned int height, LFUNC(WriteExtensions, void, (FILE *file, XpmExtension *ext, unsigned int num)); -LFUNC(OpenWriteFile, int, (char *filename, xpmData *mdata)); +LFUNC(OpenWriteFile, int, (const char *filename, xpmData *mdata)); LFUNC(xpmDataClose, void, (xpmData *mdata)); int XpmWriteFileFromImage( Display *display, - char *filename, + const char *filename, XImage *image, XImage *shapeimage, XpmAttributes *attributes) @@ -99,7 +100,7 @@ XpmWriteFileFromImage( int XpmWriteFileFromXpmImage( - char *filename, + const char *filename, XpmImage *image, XpmInfo *info) { @@ -319,7 +320,7 @@ FUNC(xpmPipeThrough, FILE*, (int fd, */ static int OpenWriteFile( - char *filename, + const char *filename, xpmData *mdata) { if (!filename) { @@ -346,8 +347,10 @@ OpenWriteFile( mdata->stream.file = fdopen(fd, "w"); mdata->type = XPMFILE; } - if (!mdata->stream.file) + if (!mdata->stream.file) { + close(fd); return (XpmOpenFailed); + } } return (XpmSuccess); } |