summaryrefslogtreecommitdiff
path: root/src/WrBitF.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/WrBitF.c')
-rw-r--r--src/WrBitF.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/src/WrBitF.c b/src/WrBitF.c
index e8fad11d..f57bd930 100644
--- a/src/WrBitF.c
+++ b/src/WrBitF.c
@@ -26,6 +26,7 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
+/* $XFree86: xc/lib/X11/WrBitF.c,v 3.6 2003/04/13 19:22:18 dawes Exp $ */
#include "Xlibint.h"
#include <X11/Xos.h>
@@ -34,9 +35,9 @@ from The Open Group.
#define ERR_RETURN 0
-static char *Format_Image(image, resultsize)
-XImage *image;
-int *resultsize;
+static char *Format_Image(
+ XImage *image,
+ int *resultsize)
{
register int x, c, b;
register char *ptr;
@@ -81,8 +82,8 @@ int *resultsize;
#define BYTES_PER_OUTPUT_LINE 12
-#if NeedFunctionPrototypes
-int XWriteBitmapFile(
+int
+XWriteBitmapFile(
Display *display,
_Xconst char *filename,
Pixmap bitmap,
@@ -90,14 +91,6 @@ int XWriteBitmapFile(
unsigned int height,
int x_hot,
int y_hot)
-#else
-int XWriteBitmapFile(display, filename, bitmap, width, height, x_hot, y_hot)
- Display *display;
- char *filename;
- Pixmap bitmap;
- unsigned int width, height;
- int x_hot, y_hot;
-#endif
{
char *data, *ptr;
int size, byte;
@@ -111,6 +104,9 @@ int XWriteBitmapFile(display, filename, bitmap, width, height, x_hot, y_hot)
else
name++;
+#ifdef __UNIXOS2__
+ filename = (char*)__XOS2RedirRoot(filename);
+#endif
if (!(stream = fopen(filename, "w")))
return(BitmapOpenFailed);