Author: sserapion
Date: Fri Oct 30 01:24:32 2009
New Revision: 43842
URL:
http://svn.reactos.org/svn/reactos?rev=43842&view=rev
Log:
Fix gdi32 build.
Modified:
branches/ros-amd64-bringup/reactos/dll/win32/gdi32/objects/bitmap.c
branches/ros-amd64-bringup/reactos/dll/win32/gdi32/objects/dc.c
branches/ros-amd64-bringup/reactos/dll/win32/gdi32/objects/eng.c
branches/ros-amd64-bringup/reactos/dll/win32/gdi32/objects/font.c
branches/ros-amd64-bringup/reactos/dll/win32/gdi32/objects/region.c
Modified: branches/ros-amd64-bringup/reactos/dll/win32/gdi32/objects/bitmap.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
==============================================================================
--- branches/ros-amd64-bringup/reactos/dll/win32/gdi32/objects/bitmap.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/dll/win32/gdi32/objects/bitmap.c [iso-8859-1] Fri
Oct 30 01:24:32 2009
@@ -418,7 +418,7 @@
}
}
- if ((ULONG)lpvBits & (sizeof(DWORD) - 1))
+ if ((PtrToUlong(lpvBits)) & (sizeof(DWORD) - 1))
{
pvSafeBits = RtlAllocateHeap(RtlGetProcessHeap(), 0, cjBmpScanSize);
if (!pvSafeBits)
Modified: branches/ros-amd64-bringup/reactos/dll/win32/gdi32/objects/dc.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
==============================================================================
--- branches/ros-amd64-bringup/reactos/dll/win32/gdi32/objects/dc.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/dll/win32/gdi32/objects/dc.c [iso-8859-1] Fri Oct
30 01:24:32 2009
@@ -322,7 +322,7 @@
/* From Wine: DeleteObject does not SetLastError() on a null object */
if(!hObject) return FALSE;
- if (0 != ((DWORD) hObject & GDI_HANDLE_STOCK_MASK))
+ if (0 != (HandleToUlong(hObject) & GDI_HANDLE_STOCK_MASK))
{ // Relax! This is a normal return!
DPRINT("Trying to delete system object 0x%x\n", hObject);
return TRUE;
@@ -1559,7 +1559,7 @@
switch (uType)
{
case GDI_OBJECT_TYPE_REGION:
- return (HGDIOBJ)ExtSelectClipRgn(hDC, hGdiObj, RGN_COPY);
+ return ULongToHandle(ExtSelectClipRgn(hDC, hGdiObj, RGN_COPY));
case GDI_OBJECT_TYPE_BITMAP:
return NtGdiSelectBitmap(hDC, hGdiObj);
Modified: branches/ros-amd64-bringup/reactos/dll/win32/gdi32/objects/eng.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
==============================================================================
--- branches/ros-amd64-bringup/reactos/dll/win32/gdi32/objects/eng.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/dll/win32/gdi32/objects/eng.c [iso-8859-1] Fri Oct
30 01:24:32 2009
@@ -163,7 +163,7 @@
if (pPDev->Sig != PDEV_UMPD_ID)
{
- pPDev = (PUMPDEV)pPDev->Sig;
+ pPDev = (PUMPDEV)ULongToPtr(pPDev->Sig);//wtf?
}
return pPDev->pdi5Info->pDriverPath;
}
@@ -180,7 +180,7 @@
if (pPDev->Sig != PDEV_UMPD_ID)
{
- pPDev = (PUMPDEV)pPDev->Sig;
+ pPDev = (PUMPDEV)ULongToPtr(pPDev->Sig);//wtf
}
return pPDev->pdi5Info->pDataFile;
}
Modified: branches/ros-amd64-bringup/reactos/dll/win32/gdi32/objects/font.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
==============================================================================
--- branches/ros-amd64-bringup/reactos/dll/win32/gdi32/objects/font.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/dll/win32/gdi32/objects/font.c [iso-8859-1] Fri Oct
30 01:24:32 2009
@@ -1021,19 +1021,19 @@
needed = sizeof(OUTLINETEXTMETRICA);
if(lpOTMW->otmpFamilyName)
needed += WideCharToMultiByte(CP_ACP, 0,
- (WCHAR*)((char*)lpOTMW + (int)lpOTMW->otmpFamilyName), -1,
+ (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpFamilyName), -1,
NULL, 0, NULL, NULL);
if(lpOTMW->otmpFaceName)
needed += WideCharToMultiByte(CP_ACP, 0,
- (WCHAR*)((char*)lpOTMW + (int)lpOTMW->otmpFaceName), -1,
+ (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpFaceName), -1,
NULL, 0, NULL, NULL);
if(lpOTMW->otmpStyleName)
needed += WideCharToMultiByte(CP_ACP, 0,
- (WCHAR*)((char*)lpOTMW + (int)lpOTMW->otmpStyleName), -1,
+ (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpStyleName), -1,
NULL, 0, NULL, NULL);
if(lpOTMW->otmpFullName)
needed += WideCharToMultiByte(CP_ACP, 0,
- (WCHAR*)((char*)lpOTMW + (int)lpOTMW->otmpFullName), -1,
+ (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpFullName), -1,
NULL, 0, NULL, NULL);
if(!lpOTM) {
@@ -1090,7 +1090,7 @@
if(lpOTMW->otmpFamilyName) {
output->otmpFamilyName = (LPSTR)(ptr - (char*)output);
len = WideCharToMultiByte(CP_ACP, 0,
- (WCHAR*)((char*)lpOTMW + (int)lpOTMW->otmpFamilyName), -1,
+ (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpFamilyName), -1,
ptr, left, NULL, NULL);
left -= len;
ptr += len;
@@ -1100,7 +1100,7 @@
if(lpOTMW->otmpFaceName) {
output->otmpFaceName = (LPSTR)(ptr - (char*)output);
len = WideCharToMultiByte(CP_ACP, 0,
- (WCHAR*)((char*)lpOTMW + (int)lpOTMW->otmpFaceName), -1,
+ (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpFaceName), -1,
ptr, left, NULL, NULL);
left -= len;
ptr += len;
@@ -1110,7 +1110,7 @@
if(lpOTMW->otmpStyleName) {
output->otmpStyleName = (LPSTR)(ptr - (char*)output);
len = WideCharToMultiByte(CP_ACP, 0,
- (WCHAR*)((char*)lpOTMW + (int)lpOTMW->otmpStyleName), -1,
+ (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpStyleName), -1,
ptr, left, NULL, NULL);
left -= len;
ptr += len;
@@ -1120,7 +1120,7 @@
if(lpOTMW->otmpFullName) {
output->otmpFullName = (LPSTR)(ptr - (char*)output);
len = WideCharToMultiByte(CP_ACP, 0,
- (WCHAR*)((char*)lpOTMW + (int)lpOTMW->otmpFullName), -1,
+ (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpFullName), -1,
ptr, left, NULL, NULL);
left -= len;
} else
Modified: branches/ros-amd64-bringup/reactos/dll/win32/gdi32/objects/region.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
==============================================================================
--- branches/ros-amd64-bringup/reactos/dll/win32/gdi32/objects/region.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/dll/win32/gdi32/objects/region.c [iso-8859-1] Fri
Oct 30 01:24:32 2009
@@ -142,7 +142,7 @@
WINAPI
CreatePolygonRgn( const POINT * lppt, int cPoints, int fnPolyFillMode)
{
- return (HRGN) NtGdiPolyPolyDraw( (HDC) fnPolyFillMode, (PPOINT) lppt, (PULONG)
&cPoints, 1, GdiPolyPolyRgn);
+ return (HRGN) NtGdiPolyPolyDraw( ULongToPtr(fnPolyFillMode), (PPOINT) lppt, (PULONG)
&cPoints, 1, GdiPolyPolyRgn);
}
@@ -156,7 +156,7 @@
int nCount,
int fnPolyFillMode)
{
- return (HRGN) NtGdiPolyPolyDraw( (HDC) fnPolyFillMode, (PPOINT) lppt, (PULONG)
lpPolyCounts, (ULONG) nCount, GdiPolyPolyRgn );
+ return (HRGN) NtGdiPolyPolyDraw( ULongToHandle(fnPolyFillMode), (PPOINT) lppt,
(PULONG) lpPolyCounts, (ULONG) nCount, GdiPolyPolyRgn );
}