From e16ddc6bdf6d8b7e0a86812ef67192ad72ef1351 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Sun, 4 May 2003 15:41:40 +0000 Subject: [PATCH] Clean up debugging stuff and silence debug messages svn path=/trunk/; revision=4642 --- reactos/drivers/dd/vga/display/main/enable.c | 11 +++--- reactos/drivers/dd/vga/miniport/initvga.c | 4 +- reactos/lib/user32/windows/defwnd.c | 15 +++++--- reactos/lib/user32/windows/window.c | 40 ++++++++++---------- reactos/subsys/win32k/ntuser/windc.c | 4 +- reactos/subsys/win32k/objects/dc.c | 38 +------------------ 6 files changed, 40 insertions(+), 72 deletions(-) diff --git a/reactos/drivers/dd/vga/display/main/enable.c b/reactos/drivers/dd/vga/display/main/enable.c index 7d80e0c6a4e..34b2f9ffb1d 100644 --- a/reactos/drivers/dd/vga/display/main/enable.c +++ b/reactos/drivers/dd/vga/display/main/enable.c @@ -1,9 +1,9 @@ /* * entry.c * - * $Revision: 1.27 $ + * $Revision: 1.28 $ * $Author: gvg $ - * $Date: 2003/05/03 13:39:05 $ + * $Date: 2003/05/04 15:41:40 $ * */ @@ -185,7 +185,7 @@ DrvEnableDriver(IN ULONG EngineVersion, IN ULONG SizeOfDED, OUT PDRVENABLEDATA DriveEnableData) { - EngDebugPrint("VGADDI", "DrvEnableDriver called...\n", 0); +/* EngDebugPrint("VGADDI", "DrvEnableDriver called...\n", 0); */ vgaPreCalc(); @@ -456,7 +456,7 @@ DrvEnableSurface(IN DHPDEV PDev) DHSURF dhsurf; HSURF hsurf; - DPRINT1("DrvEnableSurface() called\n"); + DPRINT("DrvEnableSurface() called\n"); // Initialize the VGA if (!VGAInitialized) @@ -467,7 +467,6 @@ DrvEnableSurface(IN DHPDEV PDev) } VGAInitialized = TRUE; } -CHECKPOINT1; // dhsurf is of type DEVSURF, which is the drivers specialized surface type dhsurf = (DHSURF)EngAllocMem(0, sizeof(DEVSURF), ALLOC_TAG); @@ -515,7 +514,7 @@ CHECKPOINT1; if (EngAssociateSurface(hsurf, ppdev->GDIDevHandle, HOOK_BITBLT | HOOK_PAINT | HOOK_LINETO | HOOK_COPYBITS | HOOK_TRANSPARENTBLT)) { - EngDebugPrint("VGADDI:", "Successfully associated surface\n", 0); +/* EngDebugPrint("VGADDI:", "Successfully associated surface\n", 0); */ ppdev->SurfHandle = hsurf; ppdev->AssociatedSurf = pdsurf; diff --git a/reactos/drivers/dd/vga/miniport/initvga.c b/reactos/drivers/dd/vga/miniport/initvga.c index 212efcc7490..2486a39a5bc 100644 --- a/reactos/drivers/dd/vga/miniport/initvga.c +++ b/reactos/drivers/dd/vga/miniport/initvga.c @@ -1,7 +1,9 @@ #include -#include #include "vgavideo.h" +#define NDEBUG +#include + void outxay(PUSHORT ad, UCHAR x, UCHAR y) { USHORT xy = (x << 8) + y; diff --git a/reactos/lib/user32/windows/defwnd.c b/reactos/lib/user32/windows/defwnd.c index e708e5427f4..8e132febcdf 100644 --- a/reactos/lib/user32/windows/defwnd.c +++ b/reactos/lib/user32/windows/defwnd.c @@ -1,4 +1,4 @@ -/* $Id: defwnd.c,v 1.42 2003/03/26 01:01:21 rcampbell Exp $ +/* $Id: defwnd.c,v 1.43 2003/05/04 15:41:40 gvg Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS user32.dll @@ -14,10 +14,12 @@ #include #include #include -#include #include #include +#define NDEBUG +#include + /* GLOBALS *******************************************************************/ static HBITMAP hbSysMenu; @@ -498,7 +500,7 @@ DefWndDoPaintNC(HWND hWnd, HRGN clip) /* FIXME: Draw menu bar. */ - DbgPrint("drawing scrollbars..\n"); + DPRINT("drawing scrollbars..\n"); /* Draw scrollbars */ if (Style & WS_VSCROLL) SCROLL_DrawScrollBar(hWnd, hDC, SB_VERT, TRUE, TRUE); @@ -996,9 +998,10 @@ User32DefWindowProc(HWND hWnd, return(DefWndPaintNC(hWnd, (HRGN)wParam)); } case WM_WINDOWPOSCHANGING: - { - DbgPrint("WM_WINDOWPOSCHANGING\n\n"); - } + { + DbgPrint("WM_WINDOWPOSCHANGING\n\n"); + break; + } case WM_NCHITTEST: { POINT Point; diff --git a/reactos/lib/user32/windows/window.c b/reactos/lib/user32/windows/window.c index f2939f78d7e..5b9f66e6ee2 100644 --- a/reactos/lib/user32/windows/window.c +++ b/reactos/lib/user32/windows/window.c @@ -1,4 +1,4 @@ -/* $Id: window.c,v 1.26 2003/03/28 19:25:00 rcampbell Exp $ +/* $Id: window.c,v 1.27 2003/05/04 15:41:40 gvg Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS user32.dll @@ -14,9 +14,11 @@ #include #include #include -#include #include +#define NDEBUG +#include + /* FUNCTIONS *****************************************************************/ ULONG WinHasThickFrameStyle(ULONG Style, ULONG ExStyle) @@ -32,15 +34,15 @@ User32SendNCCALCSIZEMessageForKernel(PVOID Arguments, ULONG ArgumentLength) SENDNCCALCSIZEMESSAGE_CALLBACK_RESULT Result; WNDPROC Proc; - DbgPrint("User32SendNCCALCSIZEMessageForKernel.\n"); + DPRINT("User32SendNCCALCSIZEMessageForKernel.\n"); CallbackArgs = (PSENDNCCALCSIZEMESSAGE_CALLBACK_ARGUMENTS)Arguments; if (ArgumentLength != sizeof(SENDNCCALCSIZEMESSAGE_CALLBACK_ARGUMENTS)) { - DbgPrint("Wrong length.\n"); + DPRINT("Wrong length.\n"); return(STATUS_INFO_LENGTH_MISMATCH); } Proc = (WNDPROC)GetWindowLongW(CallbackArgs->Wnd, GWL_WNDPROC); - DbgPrint("Proc %X\n", Proc); + DPRINT("Proc %X\n", Proc); /* Call the window procedure; notice kernel messages are always unicode. */ if (CallbackArgs->Validate) { @@ -55,7 +57,7 @@ User32SendNCCALCSIZEMessageForKernel(PVOID Arguments, ULONG ArgumentLength) FALSE, (LPARAM)&CallbackArgs->Rect); Result.Rect = CallbackArgs->Rect; } - DbgPrint("Returning result %d.\n", Result); + DPRINT("Returning result %d.\n", Result); return(ZwCallbackReturn(&Result, sizeof(Result), STATUS_SUCCESS)); } @@ -66,20 +68,20 @@ User32SendGETMINMAXINFOMessageForKernel(PVOID Arguments, ULONG ArgumentLength) SENDGETMINMAXINFO_CALLBACK_RESULT Result; WNDPROC Proc; - DbgPrint("User32SendGETMINAXINFOMessageForKernel.\n"); + DPRINT("User32SendGETMINAXINFOMessageForKernel.\n"); CallbackArgs = (PSENDGETMINMAXINFO_CALLBACK_ARGUMENTS)Arguments; if (ArgumentLength != sizeof(SENDGETMINMAXINFO_CALLBACK_ARGUMENTS)) { - DbgPrint("Wrong length.\n"); + DPRINT("Wrong length.\n"); return(STATUS_INFO_LENGTH_MISMATCH); } Proc = (WNDPROC)GetWindowLongW(CallbackArgs->Wnd, GWL_WNDPROC); - DbgPrint("Proc %X\n", Proc); + DPRINT("Proc %X\n", Proc); /* Call the window procedure; notice kernel messages are always unicode. */ Result.Result = CallWindowProcW(Proc, CallbackArgs->Wnd, WM_GETMINMAXINFO, 0, (LPARAM)&CallbackArgs->MinMaxInfo); Result.MinMaxInfo = CallbackArgs->MinMaxInfo; - DbgPrint("Returning result %d.\n", Result); + DPRINT("Returning result %d.\n", Result); return(ZwCallbackReturn(&Result, sizeof(Result), STATUS_SUCCESS)); } @@ -90,19 +92,19 @@ User32SendCREATEMessageForKernel(PVOID Arguments, ULONG ArgumentLength) WNDPROC Proc; LRESULT Result; - DbgPrint("User32SendCREATEMessageForKernel.\n"); + DPRINT("User32SendCREATEMessageForKernel.\n"); CallbackArgs = (PSENDCREATEMESSAGE_CALLBACK_ARGUMENTS)Arguments; if (ArgumentLength != sizeof(SENDCREATEMESSAGE_CALLBACK_ARGUMENTS)) { - DbgPrint("Wrong length.\n"); + DPRINT("Wrong length.\n"); return(STATUS_INFO_LENGTH_MISMATCH); } Proc = (WNDPROC)GetWindowLongW(CallbackArgs->Wnd, GWL_WNDPROC); - DbgPrint("Proc %X\n", Proc); + DPRINT("Proc %X\n", Proc); /* Call the window procedure; notice kernel messages are always unicode. */ Result = CallWindowProcW(Proc, CallbackArgs->Wnd, WM_CREATE, 0, (LPARAM)&CallbackArgs->CreateStruct); - DbgPrint("Returning result %d.\n", Result); + DPRINT("Returning result %d.\n", Result); return(ZwCallbackReturn(&Result, sizeof(LRESULT), STATUS_SUCCESS)); } @@ -113,19 +115,19 @@ User32SendNCCREATEMessageForKernel(PVOID Arguments, ULONG ArgumentLength) WNDPROC Proc; LRESULT Result; - DbgPrint("User32SendNCCREATEMessageForKernel.\n"); + DPRINT("User32SendNCCREATEMessageForKernel.\n"); CallbackArgs = (PSENDNCCREATEMESSAGE_CALLBACK_ARGUMENTS)Arguments; if (ArgumentLength != sizeof(SENDNCCREATEMESSAGE_CALLBACK_ARGUMENTS)) { - DbgPrint("Wrong length.\n"); + DPRINT("Wrong length.\n"); return(STATUS_INFO_LENGTH_MISMATCH); } Proc = (WNDPROC)GetWindowLongW(CallbackArgs->Wnd, GWL_WNDPROC); - DbgPrint("Proc %X\n", Proc); + DPRINT("Proc %X\n", Proc); /* Call the window procedure; notice kernel messages are always unicode. */ Result = CallWindowProcW(Proc, CallbackArgs->Wnd, WM_NCCREATE, 0, (LPARAM)&CallbackArgs->CreateStruct); - DbgPrint("Returning result %d.\n", Result); + DPRINT("Returning result %d.\n", Result); return(ZwCallbackReturn(&Result, sizeof(LRESULT), STATUS_SUCCESS)); } @@ -134,7 +136,7 @@ User32CallSendAsyncProcForKernel(PVOID Arguments, ULONG ArgumentLength) { PSENDASYNCPROC_CALLBACK_ARGUMENTS CallbackArgs; - DbgPrint("User32CallSendAsyncProcKernel()\n"); + DPRINT("User32CallSendAsyncProcKernel()\n"); CallbackArgs = (PSENDASYNCPROC_CALLBACK_ARGUMENTS)Arguments; if (ArgumentLength != sizeof(WINDOWPROC_CALLBACK_ARGUMENTS)) { diff --git a/reactos/subsys/win32k/ntuser/windc.c b/reactos/subsys/win32k/ntuser/windc.c index 1d78b10bc69..9ca834f3f98 100644 --- a/reactos/subsys/win32k/ntuser/windc.c +++ b/reactos/subsys/win32k/ntuser/windc.c @@ -1,4 +1,4 @@ -/* $Id: windc.c,v 1.9 2003/05/03 14:12:14 gvg Exp $ +/* $Id: windc.c,v 1.10 2003/05/04 15:41:40 gvg Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -329,8 +329,6 @@ NtUserGetDCEx(HWND hWnd, HANDLE hRegion, ULONG Flags) BOOL UpdateClipOrigin = FALSE; HANDLE hRgnVisible = NULL; -if (NULL == hWnd) -__asm__("int $3\n"); if (NULL == hWnd) { Flags &= ~DCX_USESTYLE; diff --git a/reactos/subsys/win32k/objects/dc.c b/reactos/subsys/win32k/objects/dc.c index 698582a6b6f..c6197f28f6d 100644 --- a/reactos/subsys/win32k/objects/dc.c +++ b/reactos/subsys/win32k/objects/dc.c @@ -1,4 +1,4 @@ -/* $Id: dc.c,v 1.58 2003/05/03 13:39:06 gvg Exp $ +/* $Id: dc.c,v 1.59 2003/05/04 15:41:40 gvg Exp $ * * DC.C - Device context functions * @@ -223,42 +223,6 @@ static BOOL STDCALL FindDriverFileNames(PUNICODE_STRING DriverFileNames) return TRUE; } -#ifdef TODO -static void -SetupDevCaps(GDIDEVICE *GDIDev) -{ - RtlZeroMemory(&(GDIDev->DevCaps), sizeof(DEVICECAPS)); - GDIDev->DevCaps.version = GDIDev->GDIInfo.ulVersion; - GDIDev->DevCaps.technology = GDIDev->GDIInfo.ulTechnology; - GDIDev->DevCaps.horzSize = GDIDev->GDIInfo.ulHorzSize; - GDIDev->DevCaps.vertSize = GDIDev->GDIInfo.ulVertSize; - GDIDev->DevCaps.horzRes = GDIDev->GDIInfo.ulHorzRes; - GDIDev->DevCaps.vertRes = GDIDev->GDIInfo.ulVertRes; - GDIDev->DevCaps.bitsPixel = GDIDev->GDIInfo.cBitsPixel; - GDIDev->DevCaps.planes = GDIDev->GDIInfo.cPlanes; - GDIDev->DevCaps.numBrushes = 0; /* FIXME */ - GDIDev->DevCaps.numPens = 0; /* FIXME */ - GDIDev->DevCaps.numMarkers = 0; /* FIXME */ - GDIDev->DevCaps.numFonts = 0; /* FIXME */ - GDIDev->DevCaps.numColors = GDIDev->GDIInfo.ulNumColors; - GDIDev->DevCaps.pdeviceSize = 0; /* FIXME */ - GDIDev->DevCaps.curveCaps = 0; /* FIXME */ - GDIDev->DevCaps.lineCaps = 0; /* FIXME */ - GDIDev->DevCaps.polygonalCaps = 0; /* FIXME */ - GDIDev->DevCaps.textCaps = GDIDev->GDIInfo.flTextCaps; - GDIDev->DevCaps.clipCaps = 0; /* FIXME */ - GDIDev->DevCaps.rasterCaps = 0; /* FIXME */ - GDIDev->DevCaps.aspectX = GDIDev->GDIInfo.ulAspectX; - GDIDev->DevCaps.aspectY = GDIDev->GDIInfo.ulAspectY; - GDIDev->DevCaps.aspectXY = GDIDev->GDIInfo.ulAspectXY; - GDIDev->DevCaps.logPixelsX = GDIDev->GDIInfo.ulLogPixelsX; - GDIDev->DevCaps.logPixelsY = GDIDev->GDIInfo.ulLogPixelsY; - GDIDev->DevCaps.sizePalette = GDIDev->GDIInfo.ulNumPalReg; /* FIXME not sure */ - GDIDev->DevCaps.numReserved = 0; /* FIXME */ - GDIDev->DevCaps.colorRes = 0; /* FIXME */ -} -#endif - BOOL STDCALL W32kCreatePrimarySurface(LPCWSTR Driver, LPCWSTR Device)