From 71b59b447fbb112530576ca7a0bd0824709de886 Mon Sep 17 00:00:00 2001 From: David Webster Date: Tue, 15 Feb 2000 19:44:04 +0000 Subject: [PATCH] A few more minor fixes for OS/2 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6053 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/xpm/MAKEFILE.VA | 4 ++-- src/xpm/scan.c | 5 ----- src/xpm/simx.h | 4 +++- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/xpm/MAKEFILE.VA b/src/xpm/MAKEFILE.VA index 9f7c573468..0aecccdd90 100644 --- a/src/xpm/MAKEFILE.VA +++ b/src/xpm/MAKEFILE.VA @@ -13,7 +13,7 @@ OBJSUFF=obj SRCSUFF=cpp -OS2FLAGS=/c /W2 /DOS232 /D__VISAGECPP__ /Dwx_msw /Ss /Q /N100 +OS2FLAGS=/c /W2 /DOS232 /D__VISAGECPP__ /Dwx_msw /Q /N100 OS2LINKFLAGS=/BASE:0x00010000 /PMTYPE:PM /NOE /NOD /ALIGN:16 OS2LIBFLAGS=/NOL /NOE OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB @@ -132,7 +132,7 @@ $(LIBOBJECTS): copy ..\xpm\$D\wrffrdat.obj copy ..\xpm\$D\wrffri.obj -all: $(OS2XPMLIB) +all: $(OBJECTS) $(OS2XPMLIB) $(WXDIR)\lib\os2xpm.lib: $(LIBOBJECTS) touch $(WXDIR)\lib\os2xpm.lib diff --git a/src/xpm/scan.c b/src/xpm/scan.c index 8ff2e47c95..f1b35d0e12 100644 --- a/src/xpm/scan.c +++ b/src/xpm/scan.c @@ -319,11 +319,9 @@ XpmCreateXpmImageFromImage(display, image, shapeimage, #else -#ifndef __OS2__ ErrorStatus = MSWGetImagePixels(display, image, width, height, &pmap, storePixel); /* calling convention all messed up OS/2 -- figure out later */ -#endif #endif @@ -1042,11 +1040,8 @@ MSWGetImagePixels(display, image, width, height, pmap, storeFunc) pixel = GetPixel(*display, x, y); #endif -#ifndef __OS2__ -/* calling convention all messed up under OS/2 */ if ((*storeFunc) (pixel, pmap, iptr)) return (XpmNoMemory); -#endif } } return (XpmSuccess); diff --git a/src/xpm/simx.h b/src/xpm/simx.h index 1e2d09ff54..0b3439dbc7 100644 --- a/src/xpm/simx.h +++ b/src/xpm/simx.h @@ -47,7 +47,9 @@ #include typedef unsigned long COLORREF; // RGB under OS2 is more like a PALETTEENTRY struct under Windows so we need a real RGB def -#define OS2RGB(r,g,b) ((ULONG ((BYTE) (r) | ((UINT) (g) << 8)) | (((ULONG)(BYTE)(b)) << 16))) +//#define OS2RGB(r,g,b) ((ULONG ((BYTE) (r) | ((UINT) (g) << 8)) | (((ULONG)(BYTE)(b)) << 16))) +#define OS2RGB(r,g,b) ((unsigned long)r<<16|(unsigned long)g<<8|(unsigned long)b) + #define GetBValue(rgb) ((BYTE)((rgb) >> 16)) #define GetGValue(rgb) ((BYTE)(((WORD)(rgb)) >> 8)) #define GetRValue(rgb) ((BYTE)(rgb)) -- 2.45.2