diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/RdFToI.c | 4 | ||||
-rw-r--r-- | src/XpmI.h | 4 | ||||
-rw-r--r-- | src/simx.h | 17 |
3 files changed, 24 insertions, 1 deletions
diff --git a/src/RdFToI.c b/src/RdFToI.c index 35fe78e..60db54a 100644 --- a/src/RdFToI.c +++ b/src/RdFToI.c @@ -44,6 +44,10 @@ #include <errno.h> #include <sys/types.h> #include <sys/wait.h> +#else +#ifdef FOR_MSW +#include <fcntl.h> +#endif #endif LFUNC(OpenReadFile, int, (char *filename, xpmData *mdata)); @@ -58,9 +58,13 @@ extern FILE *popen(); #endif +#ifdef FOR_MSW +#include "simx.h" +#else #include <X11/Xos.h> #include <X11/Xfuncs.h> #include <X11/Xmd.h> +#endif #ifdef VMS #include <unixio.h> @@ -40,6 +40,9 @@ #ifdef FOR_MSW #include "windows.h" /* MS windows GDI types */ +#define _XFUNCPROTOBEGIN +#define _XFUNCPROTOEND +#define NO_ZPIPE /* * minimal portability layer between ansi and KR C @@ -101,7 +104,7 @@ extern "C" { /* color related */ FUNC(XParseColor, int, (Display *, Colormap *, char *, XColor *)); - FUNC(XAllocColor, int, (Display *, Colormap *, XColor *)); + FUNC(XAllocColor, int, (Display *, Colormap, XColor *)); FUNC(XQueryColors, void, (Display *display, Colormap *colormap, XColor *xcolors, int ncolors)); FUNC(XFreeColors, int, (Display *d, Colormap cmap, @@ -134,6 +137,18 @@ typedef BOOL Bool; /* take MSW bool */ #undef LFUNC #undef FUNC +/* Some functions and constants that have non-standard names in the + MS library. */ +#define bzero(addr,sz) memset(addr, 0, sz) +#define close _close +#define fdopen _fdopen +#define index strchr +#define open _open +#define O_RDONLY _O_RDONLY +#define rindex strrchr +#define strdup _strdup + + #endif /* def FOR_MSW */ #endif /* _SIMX_H */ |