diff --git a/reactos/ChangeLog b/reactos/ChangeLog index 21db6ba5bfc..570e2a11326 100644 --- a/reactos/ChangeLog +++ b/reactos/ChangeLog @@ -1,13 +1,37 @@ +2003-08-13 Casper S. Hornstrup + + * include/win32k/ntuser.h (NtUserGetClassName): Make nMaxCount an ULONG. + * subsys/win32k/dib/dib16bpp.c: Fix unsigned/signed warnings. + * subsys/win32k/dib/dib1bpp.c: Ditto. + * subsys/win32k/dib/dib32bpp.c: Ditto. + * subsys/win32k/dib/dib4bpp.c: Ditto. + * subsys/win32k/dib/dib8bpp.c: Ditto. + * subsys/win32k/eng/lineto.c: Ditto. + * subsys/win32k/eng/mouse.c: Ditto. + * subsys/win32k/eng/xlate.c: Ditto. + * subsys/win32k/misc/driver.c: Ditto. + * subsys/win32k/ntuser/class.c: Ditto. + * subsys/win32k/ntuser/keyboard.c: Ditto. + * subsys/win32k/ntuser/timer.c: Ditto. + * subsys/win32k/ntuser/window.c: Ditto. + * subsys/win32k/objects/bitmaps.c: Ditto. + * subsys/win32k/objects/color.c: Ditto. + * subsys/win32k/objects/coord.c: Ditto. + * subsys/win32k/objects/dib.c: Ditto. + * subsys/win32k/objects/path.c: Ditto. + * subsys/win32k/objects/region.c: Ditto. + * subsys/win32k/objects/text.c: Ditto. + 2003-08-13 Martin Fuchs - * subsys/system/explorer/taskbar/ex_bar.c, ex_menu.c - make explorer bar look more like windows taskbar bar + * subsys/system/explorer/taskbar/ex_bar.c, ex_menu.c: + Make explorer bar look more like windows taskbar bar 2003-08-09 Martin Fuchs - * subsys/system/explorer Subclassing of shell window for drawing - desktop background. - * open child folders by double click in ShellBrowserChild + * subsys/system/explorer/*.c: Subclassing of shell window for drawing + desktop background. Open child folders by double click in + ShellBrowserChild 2003-08-11 Casper S. Hornstrup diff --git a/reactos/include/win32k/ntuser.h b/reactos/include/win32k/ntuser.h index 3190e5342b8..89394ed3124 100644 --- a/reactos/include/win32k/ntuser.h +++ b/reactos/include/win32k/ntuser.h @@ -585,7 +585,7 @@ DWORD STDCALL NtUserGetClassName(HWND hWnd, LPWSTR lpClassName, - int nMaxCount); + ULONG nMaxCount); DWORD STDCALL diff --git a/reactos/subsys/win32k/dib/dib16bpp.c b/reactos/subsys/win32k/dib/dib16bpp.c index ffb45669e8b..38cee70d1ae 100644 --- a/reactos/subsys/win32k/dib/dib16bpp.c +++ b/reactos/subsys/win32k/dib/dib16bpp.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: dib16bpp.c,v 1.6 2003/08/12 21:55:47 gvg Exp $ */ +/* $Id: dib16bpp.c,v 1.7 2003/08/13 20:24:04 chorns Exp $ */ #undef WIN32_LEAN_AND_MEAN #include #include @@ -250,7 +250,7 @@ DIB_16BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, PULONG DestBits; BOOL UsesSource = ((Rop4 & 0xCC0000) >> 2) != (Rop4 & 0x330000); BOOL UsesPattern = ((Rop4 & 0xF00000) >> 4) != (Rop4 & 0x0F0000); - ULONG RoundedRight = DestRect->right - (DestRect->right & 0x1); + LONG RoundedRight = DestRect->right - (DestRect->right & 0x1); if (Rop4 == SRCCOPY) { diff --git a/reactos/subsys/win32k/dib/dib1bpp.c b/reactos/subsys/win32k/dib/dib1bpp.c index 80c1a6db473..50afd7ddd81 100644 --- a/reactos/subsys/win32k/dib/dib1bpp.c +++ b/reactos/subsys/win32k/dib/dib1bpp.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: dib1bpp.c,v 1.8 2003/08/12 21:55:47 gvg Exp $ */ +/* $Id: dib1bpp.c,v 1.9 2003/08/13 20:24:04 chorns Exp $ */ #undef WIN32_LEAN_AND_MEAN #include @@ -273,7 +273,7 @@ DIB_1BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, PULONG DestBits; BOOL UsesSource = ((Rop4 & 0xCC0000) >> 2) != (Rop4 & 0x330000); BOOL UsesPattern = ((Rop4 & 0xF00000) >> 4) != (Rop4 & 0x0F0000); - ULONG RoundedRight = DestRect->right - (DestRect->right & 0x7); + LONG RoundedRight = DestRect->right - (DestRect->right & 0x7); if (Rop4 == SRCCOPY) { diff --git a/reactos/subsys/win32k/dib/dib32bpp.c b/reactos/subsys/win32k/dib/dib32bpp.c index 3b931596ad8..a131ca57d31 100644 --- a/reactos/subsys/win32k/dib/dib32bpp.c +++ b/reactos/subsys/win32k/dib/dib32bpp.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: dib32bpp.c,v 1.4 2003/08/12 21:55:47 gvg Exp $ */ +/* $Id: dib32bpp.c,v 1.5 2003/08/13 20:24:04 chorns Exp $ */ #undef WIN32_LEAN_AND_MEAN #include #include @@ -80,7 +80,7 @@ DIB_32BPP_BitBltSrcCopy(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, PRECTL DestRect, POINTL *SourcePoint, XLATEOBJ *ColorTranslation) { - ULONG i, j, sx, sy, xColor, f1; + LONG i, j, sx, sy, xColor, f1; PBYTE SourceBits, DestBits, SourceLine, DestLine; PBYTE SourceBits_4BPP, SourceLine_4BPP; diff --git a/reactos/subsys/win32k/dib/dib4bpp.c b/reactos/subsys/win32k/dib/dib4bpp.c index 08a6d9b9ede..1e13ad2c6e9 100644 --- a/reactos/subsys/win32k/dib/dib4bpp.c +++ b/reactos/subsys/win32k/dib/dib4bpp.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: dib4bpp.c,v 1.17 2003/08/12 21:55:47 gvg Exp $ */ +/* $Id: dib4bpp.c,v 1.18 2003/08/13 20:24:04 chorns Exp $ */ #undef WIN32_LEAN_AND_MEAN #include #include @@ -244,7 +244,7 @@ DIB_4BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, PULONG DestBits; BOOL UsesSource = ((Rop4 & 0xCC0000) >> 2) != (Rop4 & 0x330000); BOOL UsesPattern = ((Rop4 & 0xF00000) >> 4) != (Rop4 & 0x0F0000); - ULONG RoundedRight = DestRect->right - (DestRect->right & 0x7); + LONG RoundedRight = DestRect->right - (DestRect->right & 0x7); static const ULONG ExpandSolidColor[16] = { 0x00000000 /* 0 */, diff --git a/reactos/subsys/win32k/dib/dib8bpp.c b/reactos/subsys/win32k/dib/dib8bpp.c index 4a4e0cbdd45..fa9fbaa81db 100644 --- a/reactos/subsys/win32k/dib/dib8bpp.c +++ b/reactos/subsys/win32k/dib/dib8bpp.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: dib8bpp.c,v 1.4 2003/08/12 21:55:47 gvg Exp $ */ +/* $Id: dib8bpp.c,v 1.5 2003/08/13 20:24:04 chorns Exp $ */ #undef WIN32_LEAN_AND_MEAN #include #include @@ -78,7 +78,7 @@ DIB_8BPP_BitBltSrcCopy(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, PRECTL DestRect, POINTL *SourcePoint, XLATEOBJ *ColorTranslation) { - ULONG i, j, sx, sy, xColor, f1; + LONG i, j, sx, sy, xColor, f1; PBYTE SourceBits, DestBits, SourceLine, DestLine; PBYTE SourceBits_4BPP, SourceLine_4BPP; @@ -250,7 +250,7 @@ DIB_8BPP_BitBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, PULONG DestBits; BOOL UsesSource = ((Rop4 & 0xCC0000) >> 2) != (Rop4 & 0x330000); BOOL UsesPattern = ((Rop4 & 0xF00000) >> 4) != (Rop4 & 0x0F0000); - ULONG RoundedRight = DestRect->right - (DestRect->right & 0x3); + LONG RoundedRight = DestRect->right - (DestRect->right & 0x3); if (Rop4 == SRCCOPY) { diff --git a/reactos/subsys/win32k/eng/lineto.c b/reactos/subsys/win32k/eng/lineto.c index 6e4b483dbc5..d36772dc519 100644 --- a/reactos/subsys/win32k/eng/lineto.c +++ b/reactos/subsys/win32k/eng/lineto.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: lineto.c,v 1.21 2003/08/04 19:57:05 royce Exp $ + * $Id: lineto.c,v 1.22 2003/08/13 20:24:04 chorns Exp $ */ #include @@ -343,7 +343,8 @@ EngLineTo(SURFOBJ *DestObj, RECTL *RectBounds, MIX mix) { - LONG x, y, deltax, deltay, i, xchange, ychange, hx, vy; + LONG x, y, deltax, deltay, xchange, ychange, hx, vy; + ULONG i; ULONG Pixel = Brush->iSolidColor; SURFOBJ *OutputObj; SURFGDI *OutputGDI; diff --git a/reactos/subsys/win32k/eng/mouse.c b/reactos/subsys/win32k/eng/mouse.c index 3b6f909fce0..eb07032a09a 100644 --- a/reactos/subsys/win32k/eng/mouse.c +++ b/reactos/subsys/win32k/eng/mouse.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: mouse.c,v 1.26 2003/08/09 11:59:27 gvg Exp $ +/* $Id: mouse.c,v 1.27 2003/08/13 20:24:04 chorns Exp $ * * PROJECT: ReactOS kernel * PURPOSE: Mouse @@ -46,7 +46,7 @@ static BOOLEAN SafetySwitch = FALSE; static BOOLEAN SafetySwitch2 = FALSE; static BOOLEAN MouseEnabled = FALSE; static LONG mouse_x, mouse_y; -static UINT mouse_width = 0, mouse_height = 0; +static LONG mouse_width = 0, mouse_height = 0; static ULONG PointerStatus; static UCHAR DefaultCursor[256] = { diff --git a/reactos/subsys/win32k/eng/xlate.c b/reactos/subsys/win32k/eng/xlate.c index 184fc1d4a82..5833bdcb4ef 100644 --- a/reactos/subsys/win32k/eng/xlate.c +++ b/reactos/subsys/win32k/eng/xlate.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: xlate.c,v 1.20 2003/07/11 15:59:37 royce Exp $ +/* $Id: xlate.c,v 1.21 2003/08/13 20:24:04 chorns Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -86,10 +86,11 @@ ClosestColorMatch(XLATEGDI *XlateGDI, ULONG SourceColor, ULONG *DestColors, { PVIDEO_CLUTDATA cSourceColor; PVIDEO_CLUTDATA cDestColors; - LONG idx = 0, i, rt; + LONG idx = 0; + ULONG i; ULONG SourceRGB; ULONG SourceRed, SourceGreen, SourceBlue; - ULONG cxRed, cxGreen, cxBlue, BestMatch = 16777215; + ULONG cxRed, cxGreen, cxBlue, rt, BestMatch = 16777215; // Simple cache -- only one value because we don't want to waste time // if the colors aren't very sequential @@ -185,7 +186,7 @@ BitMasksFromPal(USHORT PalType, PPALGDI Palette, */ static INT FASTCALL CalculateShift(ULONG Mask) { - INT Shift = 0; + ULONG Shift = 0; ULONG LeftmostBit = 1 << (8 * sizeof(ULONG) - 1); while (0 == (Mask & LeftmostBit) && Shift < 8 * sizeof(ULONG)) diff --git a/reactos/subsys/win32k/makefile b/reactos/subsys/win32k/makefile index 4940bdf8701..02749f095a9 100644 --- a/reactos/subsys/win32k/makefile +++ b/reactos/subsys/win32k/makefile @@ -1,4 +1,4 @@ -# $Id: makefile,v 1.75 2003/08/13 13:58:11 royce Exp $ +# $Id: makefile,v 1.76 2003/08/13 20:24:04 chorns Exp $ PATH_TO_TOP = ../.. @@ -26,8 +26,7 @@ TARGET_CFLAGS =\ $(CFLAGS_DBG) \ -I$(PATH_TO_TOP)/ntoskrnl/include \ -I$(FREETYPE_DIR)/include \ - -DUNICODE \ - -Wall -Werror + -DUNICODE # require os code to explicitly request A/W version of structs/functions TARGET_CFLAGS += -D_DISABLE_TIDENTS diff --git a/reactos/subsys/win32k/misc/driver.c b/reactos/subsys/win32k/misc/driver.c index 33345a6bf7c..8feecb194ad 100644 --- a/reactos/subsys/win32k/misc/driver.c +++ b/reactos/subsys/win32k/misc/driver.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: driver.c,v 1.25 2003/05/18 17:16:17 ea Exp $ +/* $Id: driver.c,v 1.26 2003/08/13 20:24:05 chorns Exp $ * * GDI Driver support routines * (mostly swiped from Wine) @@ -160,7 +160,7 @@ PGD_ENABLEDRIVER DRIVER_FindDDIDriver(LPCWSTR Name) BOOL DRIVER_BuildDDIFunctions(PDRVENABLEDATA DED, PDRIVER_FUNCTIONS DF) { - int i; + ULONG i; for (i=0; ic; i++) { diff --git a/reactos/subsys/win32k/ntuser/class.c b/reactos/subsys/win32k/ntuser/class.c index 5e9b71d3016..7060886f210 100644 --- a/reactos/subsys/win32k/ntuser/class.c +++ b/reactos/subsys/win32k/ntuser/class.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: class.c,v 1.28 2003/08/11 21:10:49 royce Exp $ +/* $Id: class.c,v 1.29 2003/08/13 20:24:05 chorns Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -190,7 +190,7 @@ NtUserGetClassInfo(HINSTANCE hInst, ULONG FASTCALL W32kGetClassName(struct _WINDOW_OBJECT *WindowObject, LPWSTR lpClassName, - int nMaxCount) + ULONG nMaxCount) { ULONG length; LPWSTR name; @@ -247,7 +247,7 @@ DWORD STDCALL NtUserGetClassName ( HWND hWnd, LPWSTR lpClassName, - int nMaxCount) + ULONG nMaxCount) { PWINDOW_OBJECT WindowObject; LONG Ret; diff --git a/reactos/subsys/win32k/ntuser/keyboard.c b/reactos/subsys/win32k/ntuser/keyboard.c index bcdfd4c4a24..f6ca2ff50f4 100644 --- a/reactos/subsys/win32k/ntuser/keyboard.c +++ b/reactos/subsys/win32k/ntuser/keyboard.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: keyboard.c,v 1.7 2003/08/11 21:10:49 royce Exp $ +/* $Id: keyboard.c,v 1.8 2003/08/13 20:24:05 chorns Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -212,7 +212,7 @@ static BOOL TryToTranslateChar( WORD wVirtKey, if( !vkPtr->VirtualKey ) return FALSE; if( wVirtKey == vkPtr->VirtualKey ) { for( j = 0; j < nStates; j++ ) { - if( j == ModBits ) { /* OK, we found a wchar with the correct + if( j == (int) ModBits ) { /* OK, we found a wchar with the correct shift state and vk */ *pbDead = vkPtr->wch[j] == WCH_DEAD; *pbLigature = vkPtr->wch[j] == WCH_LGTR; @@ -391,7 +391,7 @@ NtUserTranslateMessage(LPMSG lpMsg, NewMsg.message = (lpMsg->message == WM_KEYDOWN) ? WM_CHAR : WM_SYSCHAR; if (dead_char) { - int i; + ULONG i; if (wp[0] == ' ') wp[0] = dead_char; if (dead_char == 0xa2) dead_char = '('; diff --git a/reactos/subsys/win32k/ntuser/timer.c b/reactos/subsys/win32k/ntuser/timer.c index 418925b692d..c900ca3c772 100644 --- a/reactos/subsys/win32k/ntuser/timer.c +++ b/reactos/subsys/win32k/ntuser/timer.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: timer.c,v 1.9 2003/08/11 21:10:49 royce Exp $ +/* $Id: timer.c,v 1.10 2003/08/13 20:24:05 chorns Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -199,7 +199,7 @@ NtUserSetTimer /* find a free, handle-less timer id */ Index = RtlFindClearBitsAndSet(&HandleLessTimersBitMap, 1, HintIndex); - if(Index == -1) + if(Index == (ULONG) -1) { /* FIXME: set the last error */ ExReleaseFastMutex(&Mutex); diff --git a/reactos/subsys/win32k/ntuser/window.c b/reactos/subsys/win32k/ntuser/window.c index 194964a1daa..5e7264169fd 100644 --- a/reactos/subsys/win32k/ntuser/window.c +++ b/reactos/subsys/win32k/ntuser/window.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: window.c,v 1.89 2003/08/12 22:45:27 weiden Exp $ +/* $Id: window.c,v 1.90 2003/08/13 20:24:05 chorns Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -2218,7 +2218,7 @@ NtUserBuildHwndList( PUSER_HANDLE_TABLE HandleTable; PLIST_ENTRY Current; PUSER_HANDLE_BLOCK Block = NULL; - int i; + ULONG i; Status = PsLookupThreadByThreadId ( (PVOID)dwThreadId, &Thread ); if ( !NT_SUCCESS(Status) || !Thread ) diff --git a/reactos/subsys/win32k/objects/bitmaps.c b/reactos/subsys/win32k/objects/bitmaps.c index 4085964edae..78c40b74237 100644 --- a/reactos/subsys/win32k/objects/bitmaps.c +++ b/reactos/subsys/win32k/objects/bitmaps.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: bitmaps.c,v 1.31 2003/08/07 16:18:02 royce Exp $ */ +/* $Id: bitmaps.c,v 1.32 2003/08/13 20:24:05 chorns Exp $ */ #undef WIN32_LEAN_AND_MEAN #include #include @@ -357,8 +357,8 @@ LONG STDCALL W32kSetBitmapBits(HBITMAP hBitmap, DWORD Bytes, CONST VOID *Bits) { - DWORD height, ret; - PBITMAPOBJ bmp; + LONG height, ret; + PBITMAPOBJ bmp; bmp = BITMAPOBJ_HandleToPtr (hBitmap); if (bmp == NULL || Bits == NULL) @@ -549,20 +549,20 @@ INT STDCALL BITMAP_GetObject(BITMAPOBJ * bmp, INT count, LPVOID buffer) { if(bmp->dib) { - if(count < sizeof(DIBSECTION)) + if(count < (INT) sizeof(DIBSECTION)) { - if (count > sizeof(BITMAP)) count = sizeof(BITMAP); + if (count > (INT) sizeof(BITMAP)) count = sizeof(BITMAP); } else { - if (count > sizeof(DIBSECTION)) count = sizeof(DIBSECTION); + if (count > (INT) sizeof(DIBSECTION)) count = sizeof(DIBSECTION); } memcpy(buffer, bmp->dib, count); return count; } else { - if (count > sizeof(BITMAP)) count = sizeof(BITMAP); + if (count > (INT) sizeof(BITMAP)) count = sizeof(BITMAP); memcpy(buffer, &bmp->bitmap, count); return count; } diff --git a/reactos/subsys/win32k/objects/color.c b/reactos/subsys/win32k/objects/color.c index 9ca79fad5d2..1ed29f7e804 100644 --- a/reactos/subsys/win32k/objects/color.c +++ b/reactos/subsys/win32k/objects/color.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: color.c,v 1.18 2003/08/11 21:10:49 royce Exp $ */ +/* $Id: color.c,v 1.19 2003/08/13 20:24:05 chorns Exp $ */ // FIXME: Use PXLATEOBJ logicalToSystem instead of int *mapping @@ -458,7 +458,7 @@ UINT STDCALL W32kSetPaletteEntries(HPALETTE hpal, CONST LPPALETTEENTRY pe) { PPALOBJ palPtr; - INT numEntries; + WORD numEntries; palPtr = (PPALOBJ)AccessUserObject((ULONG)hpal); if (!palPtr) return 0; @@ -530,7 +530,7 @@ INT STDCALL COLOR_PaletteLookupPixel(PALETTEENTRY *palPalEntry, INT size, if( r < diff ) { best = i; diff = r; } } - return (XlateObj->pulXlate) ? XlateObj->pulXlate[best] : best; + return (XlateObj->pulXlate) ? (INT)XlateObj->pulXlate[best] : best; } COLORREF STDCALL COLOR_LookupNearestColor( PALETTEENTRY* palPalEntry, int size, COLORREF color ) diff --git a/reactos/subsys/win32k/objects/coord.c b/reactos/subsys/win32k/objects/coord.c index 1a864842d71..0dec42ae94f 100644 --- a/reactos/subsys/win32k/objects/coord.c +++ b/reactos/subsys/win32k/objects/coord.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: coord.c,v 1.13 2003/07/22 20:02:08 ekohl Exp $ +/* $Id: coord.c,v 1.14 2003/08/13 20:24:05 chorns Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -95,7 +95,7 @@ W32kDPtoLP(HDC hDC, int Count) { PDC Dc; - ULONG i; + INT i; LPPOINT Points = (LPPOINT) ExAllocatePool( PagedPool, Count*sizeof(POINT)); ASSERT(Points); @@ -180,7 +180,7 @@ BOOL STDCALL W32kLPtoDP(HDC hDC, LPPOINT UnsafePoints, INT Count) { PDC Dc; - ULONG i; + INT i; LPPOINT Points = (LPPOINT) ExAllocatePool( PagedPool, Count*sizeof(POINT)); ASSERT(Points); diff --git a/reactos/subsys/win32k/objects/dib.c b/reactos/subsys/win32k/objects/dib.c index b9476ef4967..d8b9eba03ee 100644 --- a/reactos/subsys/win32k/objects/dib.c +++ b/reactos/subsys/win32k/objects/dib.c @@ -1,5 +1,5 @@ /* - * $Id: dib.c,v 1.25 2003/08/13 00:50:24 royce Exp $ + * $Id: dib.c,v 1.26 2003/08/13 20:24:05 chorns Exp $ * * ReactOS W32 Subsystem * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team @@ -59,7 +59,7 @@ UINT STDCALL W32kSetDIBColorTable(HDC hDC, if (dc->w.bitsPerPixel <= 8) { palEntry = palette->logpalette->palPalEntry + StartIndex; - if (StartIndex + Entries > (1 << dc->w.bitsPerPixel)) + if (StartIndex + Entries > (UINT) (1 << dc->w.bitsPerPixel)) Entries = (1 << dc->w.bitsPerPixel) - StartIndex; if (StartIndex + Entries > palette->logpalette->palNumEntries) @@ -329,7 +329,7 @@ INT STDCALL W32kGetDIBits(HDC hDC, } Result = 1; } - else if (0 == StartScan && Info.bmiHeader.biHeight == StartScan + ScanLines && + else if (0 == StartScan && Info.bmiHeader.biHeight == (LONG) (StartScan + ScanLines) && Info.bmiHeader.biWidth == BitmapObj->bitmap.bmWidth && Info.bmiHeader.biHeight == BitmapObj->bitmap.bmHeight && Info.bmiHeader.biPlanes == BitmapObj->bitmap.bmPlanes && @@ -605,7 +605,8 @@ DIB_CreateDIBSection( // Fill BITMAP32 structure with DIB data BITMAPINFOHEADER *bi = &bmi->bmiHeader; - INT effHeight, totalSize; + INT effHeight; + ULONG totalSize; UINT Entries = 0; BITMAP bm; @@ -617,7 +618,7 @@ DIB_CreateDIBSection( bm.bmType = 0; bm.bmWidth = bi->biWidth; bm.bmHeight = effHeight; - bm.bmWidthBytes = ovr_pitch ? ovr_pitch : DIB_GetDIBWidthBytes(bm.bmWidth, bi->biBitCount); + bm.bmWidthBytes = ovr_pitch ? ovr_pitch : (ULONG) DIB_GetDIBWidthBytes(bm.bmWidth, bi->biBitCount); bm.bmPlanes = bi->biPlanes; bm.bmBitsPixel = bi->biBitCount; @@ -626,7 +627,7 @@ DIB_CreateDIBSection( // Get storage location for DIB bits. Only use biSizeImage if it's valid and // we're dealing with a compressed bitmap. Otherwise, use width * height. totalSize = bi->biSizeImage && bi->biCompression != BI_RGB - ? bi->biSizeImage : bm.bmWidthBytes * effHeight; + ? bi->biSizeImage : (ULONG) (bm.bmWidthBytes * effHeight); if (section) /* bm.bmBits = MapViewOfFile(section, FILE_MAP_ALL_ACCESS, @@ -868,7 +869,7 @@ RGBQUAD * FASTCALL DIB_MapPaletteColors(PDC dc, CONST BITMAPINFO* lpbmi) { RGBQUAD *lpRGB; - int nNumColors,i; + ULONG nNumColors,i; DWORD *lpIndex; PPALOBJ palObj; diff --git a/reactos/subsys/win32k/objects/path.c b/reactos/subsys/win32k/objects/path.c index 759fbeb0fae..794545e994d 100644 --- a/reactos/subsys/win32k/objects/path.c +++ b/reactos/subsys/win32k/objects/path.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: path.c,v 1.11 2003/08/11 21:10:49 royce Exp $ */ +/* $Id: path.c,v 1.12 2003/08/13 20:24:05 chorns Exp $ */ #undef WIN32_LEAN_AND_MEAN #include #include @@ -517,7 +517,7 @@ BOOL STDCALL PATH_PolyBezierTo(HDC hdc, const POINT *pts, DWORD cbPoints) { GdiPath *pPath; POINT pt; - INT i; + ULONG i; if(!PATH_GetPathFromHDC(hdc, &pPath)) return FALSE; @@ -550,7 +550,7 @@ BOOL STDCALL PATH_PolyBezier(HDC hdc, const POINT *pts, DWORD cbPoints) { GdiPath *pPath; POINT pt; - INT i; + ULONG i; if(!PATH_GetPathFromHDC(hdc, &pPath)) return FALSE; @@ -572,7 +572,7 @@ BOOL STDCALL PATH_Polyline(HDC hdc, const POINT *pts, DWORD cbPoints) { GdiPath *pPath; POINT pt; - INT i; + ULONG i; if(!PATH_GetPathFromHDC(hdc, &pPath)) return FALSE; @@ -594,7 +594,7 @@ BOOL STDCALL PATH_PolylineTo(HDC hdc, const POINT *pts, DWORD cbPoints) { GdiPath *pPath; POINT pt; - INT i; + ULONG i; if(!PATH_GetPathFromHDC(hdc, &pPath)) return FALSE; @@ -629,7 +629,7 @@ BOOL STDCALL PATH_Polygon(HDC hdc, const POINT *pts, DWORD cbPoints) { GdiPath *pPath; POINT pt; - INT i; + ULONG i; if(!PATH_GetPathFromHDC(hdc, &pPath)) return FALSE; @@ -654,7 +654,7 @@ BOOL STDCALL PATH_PolyPolygon( HDC hdc, const POINT* pts, const INT* counts, { GdiPath *pPath; POINT pt, startpt; - INT poly, point, i; + ULONG poly, point, i; if(!PATH_GetPathFromHDC(hdc, &pPath)) return FALSE; @@ -664,7 +664,7 @@ BOOL STDCALL PATH_PolyPolygon( HDC hdc, const POINT* pts, const INT* counts, return FALSE; for(i = 0, poly = 0; poly < polygons; poly++) { - for(point = 0; point < counts[poly]; point++, i++) { + for(point = 0; point < (ULONG) counts[poly]; point++, i++) { pt = pts[i]; if(!W32kLPtoDP(hdc, &pt, 1)) return FALSE; @@ -682,7 +682,7 @@ BOOL STDCALL PATH_PolyPolyline( HDC hdc, const POINT* pts, const DWORD* counts, { GdiPath *pPath; POINT pt; - INT poly, point, i; + ULONG poly, point, i; if(!PATH_GetPathFromHDC(hdc, &pPath)) return FALSE; diff --git a/reactos/subsys/win32k/objects/region.c b/reactos/subsys/win32k/objects/region.c index 0d9a27dea50..3592ff16625 100644 --- a/reactos/subsys/win32k/objects/region.c +++ b/reactos/subsys/win32k/objects/region.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: region.c,v 1.32 2003/08/13 00:50:25 royce Exp $ */ +/* $Id: region.c,v 1.33 2003/08/13 20:24:05 chorns Exp $ */ #undef WIN32_LEAN_AND_MEAN #include #include @@ -192,7 +192,7 @@ static BOOL FASTCALL REGION_CropAndOffsetRegion(const PPOINT off, const PRECT re if(xrect) { - INT i; + ULONG i; if(rgnDst != rgnSrc) RtlCopyMemory(rgnDst, rgnSrc, sizeof(ROSRGNDATA)); @@ -227,7 +227,7 @@ static BOOL FASTCALL REGION_CropAndOffsetRegion(const PPOINT off, const PRECT re else // region box and clipping rect appear to intersect { PRECT lpr, rpr; - INT i, j, clipa, clipb; + ULONG i, j, clipa, clipb; INT left = rgnSrc->rdh.rcBound.right + off->x; INT right = rgnSrc->rdh.rcBound.left + off->x; @@ -551,14 +551,13 @@ REGION_RegionOp( INT ybot; /* Bottom of intersection */ INT ytop; /* Top of intersection */ RECT *oldRects; /* Old rects for newReg */ - INT prevBand; /* Index of start of + ULONG prevBand; /* Index of start of * previous band in newReg */ - INT curBand; /* Index of start of current - * band in newReg */ + ULONG curBand; /* Index of start of current band in newReg */ RECT *r1BandEnd; /* End of current band in r1 */ RECT *r2BandEnd; /* End of current band in r2 */ - INT top; /* Top of non-overlapping band */ - INT bot; /* Bottom of non-overlapping band */ + ULONG top; /* Top of non-overlapping band */ + ULONG bot; /* Bottom of non-overlapping band */ /* * Initialization: @@ -1643,7 +1642,7 @@ W32kEqualRgn(HRGN hSrcRgn1, { PROSRGNDATA rgn1, rgn2; PRECT tRect1, tRect2; - int i; + ULONG i; BOOL bRet = FALSE; if( !(rgn1 = RGNDATA_LockRgn(hSrcRgn1))) @@ -1899,7 +1898,7 @@ W32kPtInRegion(HRGN hRgn, INT Y) { PROSRGNDATA rgn; - int i; + ULONG i; if( (rgn = RGNDATA_LockRgn(hRgn) ) ) return FALSE; diff --git a/reactos/subsys/win32k/objects/text.c b/reactos/subsys/win32k/objects/text.c index 096013b95ad..6451a5c8f76 100644 --- a/reactos/subsys/win32k/objects/text.c +++ b/reactos/subsys/win32k/objects/text.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: text.c,v 1.41 2003/08/11 21:10:49 royce Exp $ */ +/* $Id: text.c,v 1.42 2003/08/13 20:24:05 chorns Exp $ */ #undef WIN32_LEAN_AND_MEAN @@ -543,7 +543,7 @@ TextIntGetTextExtentPoint(PTEXTOBJ TextObj, FT_Face face; FT_GlyphSlot glyph; INT error, n, glyph_index, i, previous; - ULONG TotalWidth = 0, MaxHeight = 0; + LONG TotalWidth = 0, MaxHeight = 0; FT_CharMap charmap, found = NULL; BOOL use_kerning; @@ -1227,7 +1227,7 @@ W32kTranslateCharsetInfo(PDWORD Src, NTSTATUS FASTCALL TextIntRealizeFont(HFONT FontHandle) { - UINT i; + LONG i; NTSTATUS Status = STATUS_SUCCESS; PTEXTOBJ TextObj;