Clean up debugging stuff and silence debug messages

svn path=/trunk/; revision=4642
This commit is contained in:
Gé van Geldorp 2003-05-04 15:41:40 +00:00
parent d82ce80d6c
commit e16ddc6bdf
6 changed files with 40 additions and 72 deletions

View file

@ -1,9 +1,9 @@
/* /*
* entry.c * entry.c
* *
* $Revision: 1.27 $ * $Revision: 1.28 $
* $Author: gvg $ * $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, IN ULONG SizeOfDED,
OUT PDRVENABLEDATA DriveEnableData) OUT PDRVENABLEDATA DriveEnableData)
{ {
EngDebugPrint("VGADDI", "DrvEnableDriver called...\n", 0); /* EngDebugPrint("VGADDI", "DrvEnableDriver called...\n", 0); */
vgaPreCalc(); vgaPreCalc();
@ -456,7 +456,7 @@ DrvEnableSurface(IN DHPDEV PDev)
DHSURF dhsurf; DHSURF dhsurf;
HSURF hsurf; HSURF hsurf;
DPRINT1("DrvEnableSurface() called\n"); DPRINT("DrvEnableSurface() called\n");
// Initialize the VGA // Initialize the VGA
if (!VGAInitialized) if (!VGAInitialized)
@ -467,7 +467,6 @@ DrvEnableSurface(IN DHPDEV PDev)
} }
VGAInitialized = TRUE; VGAInitialized = TRUE;
} }
CHECKPOINT1;
// dhsurf is of type DEVSURF, which is the drivers specialized surface type // dhsurf is of type DEVSURF, which is the drivers specialized surface type
dhsurf = (DHSURF)EngAllocMem(0, sizeof(DEVSURF), ALLOC_TAG); 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 | if (EngAssociateSurface(hsurf, ppdev->GDIDevHandle, HOOK_BITBLT | HOOK_PAINT | HOOK_LINETO | HOOK_COPYBITS |
HOOK_TRANSPARENTBLT)) HOOK_TRANSPARENTBLT))
{ {
EngDebugPrint("VGADDI:", "Successfully associated surface\n", 0); /* EngDebugPrint("VGADDI:", "Successfully associated surface\n", 0); */
ppdev->SurfHandle = hsurf; ppdev->SurfHandle = hsurf;
ppdev->AssociatedSurf = pdsurf; ppdev->AssociatedSurf = pdsurf;

View file

@ -1,7 +1,9 @@
#include <ntddk.h> #include <ntddk.h>
#include <debug.h>
#include "vgavideo.h" #include "vgavideo.h"
#define NDEBUG
#include <debug.h>
void outxay(PUSHORT ad, UCHAR x, UCHAR y) void outxay(PUSHORT ad, UCHAR x, UCHAR y)
{ {
USHORT xy = (x << 8) + y; USHORT xy = (x << 8) + y;

View file

@ -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 * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS user32.dll * PROJECT: ReactOS user32.dll
@ -14,10 +14,12 @@
#include <windows.h> #include <windows.h>
#include <user32.h> #include <user32.h>
#include <window.h> #include <window.h>
#include <debug.h>
#include <user32/wininternal.h> #include <user32/wininternal.h>
#include <string.h> #include <string.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS *******************************************************************/ /* GLOBALS *******************************************************************/
static HBITMAP hbSysMenu; static HBITMAP hbSysMenu;
@ -498,7 +500,7 @@ DefWndDoPaintNC(HWND hWnd, HRGN clip)
/* FIXME: Draw menu bar. */ /* FIXME: Draw menu bar. */
DbgPrint("drawing scrollbars..\n"); DPRINT("drawing scrollbars..\n");
/* Draw scrollbars */ /* Draw scrollbars */
if (Style & WS_VSCROLL) if (Style & WS_VSCROLL)
SCROLL_DrawScrollBar(hWnd, hDC, SB_VERT, TRUE, TRUE); SCROLL_DrawScrollBar(hWnd, hDC, SB_VERT, TRUE, TRUE);
@ -996,9 +998,10 @@ User32DefWindowProc(HWND hWnd,
return(DefWndPaintNC(hWnd, (HRGN)wParam)); return(DefWndPaintNC(hWnd, (HRGN)wParam));
} }
case WM_WINDOWPOSCHANGING: case WM_WINDOWPOSCHANGING:
{ {
DbgPrint("WM_WINDOWPOSCHANGING\n\n"); DbgPrint("WM_WINDOWPOSCHANGING\n\n");
} break;
}
case WM_NCHITTEST: case WM_NCHITTEST:
{ {
POINT Point; POINT Point;

View file

@ -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 * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS user32.dll * PROJECT: ReactOS user32.dll
@ -14,9 +14,11 @@
#include <windows.h> #include <windows.h>
#include <user32.h> #include <user32.h>
#include <window.h> #include <window.h>
#include <debug.h>
#include <user32/callback.h> #include <user32/callback.h>
#define NDEBUG
#include <debug.h>
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/
ULONG ULONG
WinHasThickFrameStyle(ULONG Style, ULONG ExStyle) WinHasThickFrameStyle(ULONG Style, ULONG ExStyle)
@ -32,15 +34,15 @@ User32SendNCCALCSIZEMessageForKernel(PVOID Arguments, ULONG ArgumentLength)
SENDNCCALCSIZEMESSAGE_CALLBACK_RESULT Result; SENDNCCALCSIZEMESSAGE_CALLBACK_RESULT Result;
WNDPROC Proc; WNDPROC Proc;
DbgPrint("User32SendNCCALCSIZEMessageForKernel.\n"); DPRINT("User32SendNCCALCSIZEMessageForKernel.\n");
CallbackArgs = (PSENDNCCALCSIZEMESSAGE_CALLBACK_ARGUMENTS)Arguments; CallbackArgs = (PSENDNCCALCSIZEMESSAGE_CALLBACK_ARGUMENTS)Arguments;
if (ArgumentLength != sizeof(SENDNCCALCSIZEMESSAGE_CALLBACK_ARGUMENTS)) if (ArgumentLength != sizeof(SENDNCCALCSIZEMESSAGE_CALLBACK_ARGUMENTS))
{ {
DbgPrint("Wrong length.\n"); DPRINT("Wrong length.\n");
return(STATUS_INFO_LENGTH_MISMATCH); return(STATUS_INFO_LENGTH_MISMATCH);
} }
Proc = (WNDPROC)GetWindowLongW(CallbackArgs->Wnd, GWL_WNDPROC); 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. */ /* Call the window procedure; notice kernel messages are always unicode. */
if (CallbackArgs->Validate) if (CallbackArgs->Validate)
{ {
@ -55,7 +57,7 @@ User32SendNCCALCSIZEMessageForKernel(PVOID Arguments, ULONG ArgumentLength)
FALSE, (LPARAM)&CallbackArgs->Rect); FALSE, (LPARAM)&CallbackArgs->Rect);
Result.Rect = 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)); return(ZwCallbackReturn(&Result, sizeof(Result), STATUS_SUCCESS));
} }
@ -66,20 +68,20 @@ User32SendGETMINMAXINFOMessageForKernel(PVOID Arguments, ULONG ArgumentLength)
SENDGETMINMAXINFO_CALLBACK_RESULT Result; SENDGETMINMAXINFO_CALLBACK_RESULT Result;
WNDPROC Proc; WNDPROC Proc;
DbgPrint("User32SendGETMINAXINFOMessageForKernel.\n"); DPRINT("User32SendGETMINAXINFOMessageForKernel.\n");
CallbackArgs = (PSENDGETMINMAXINFO_CALLBACK_ARGUMENTS)Arguments; CallbackArgs = (PSENDGETMINMAXINFO_CALLBACK_ARGUMENTS)Arguments;
if (ArgumentLength != sizeof(SENDGETMINMAXINFO_CALLBACK_ARGUMENTS)) if (ArgumentLength != sizeof(SENDGETMINMAXINFO_CALLBACK_ARGUMENTS))
{ {
DbgPrint("Wrong length.\n"); DPRINT("Wrong length.\n");
return(STATUS_INFO_LENGTH_MISMATCH); return(STATUS_INFO_LENGTH_MISMATCH);
} }
Proc = (WNDPROC)GetWindowLongW(CallbackArgs->Wnd, GWL_WNDPROC); 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. */ /* Call the window procedure; notice kernel messages are always unicode. */
Result.Result = CallWindowProcW(Proc, CallbackArgs->Wnd, WM_GETMINMAXINFO, Result.Result = CallWindowProcW(Proc, CallbackArgs->Wnd, WM_GETMINMAXINFO,
0, (LPARAM)&CallbackArgs->MinMaxInfo); 0, (LPARAM)&CallbackArgs->MinMaxInfo);
Result.MinMaxInfo = 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)); return(ZwCallbackReturn(&Result, sizeof(Result), STATUS_SUCCESS));
} }
@ -90,19 +92,19 @@ User32SendCREATEMessageForKernel(PVOID Arguments, ULONG ArgumentLength)
WNDPROC Proc; WNDPROC Proc;
LRESULT Result; LRESULT Result;
DbgPrint("User32SendCREATEMessageForKernel.\n"); DPRINT("User32SendCREATEMessageForKernel.\n");
CallbackArgs = (PSENDCREATEMESSAGE_CALLBACK_ARGUMENTS)Arguments; CallbackArgs = (PSENDCREATEMESSAGE_CALLBACK_ARGUMENTS)Arguments;
if (ArgumentLength != sizeof(SENDCREATEMESSAGE_CALLBACK_ARGUMENTS)) if (ArgumentLength != sizeof(SENDCREATEMESSAGE_CALLBACK_ARGUMENTS))
{ {
DbgPrint("Wrong length.\n"); DPRINT("Wrong length.\n");
return(STATUS_INFO_LENGTH_MISMATCH); return(STATUS_INFO_LENGTH_MISMATCH);
} }
Proc = (WNDPROC)GetWindowLongW(CallbackArgs->Wnd, GWL_WNDPROC); 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. */ /* Call the window procedure; notice kernel messages are always unicode. */
Result = CallWindowProcW(Proc, CallbackArgs->Wnd, WM_CREATE, 0, Result = CallWindowProcW(Proc, CallbackArgs->Wnd, WM_CREATE, 0,
(LPARAM)&CallbackArgs->CreateStruct); (LPARAM)&CallbackArgs->CreateStruct);
DbgPrint("Returning result %d.\n", Result); DPRINT("Returning result %d.\n", Result);
return(ZwCallbackReturn(&Result, sizeof(LRESULT), STATUS_SUCCESS)); return(ZwCallbackReturn(&Result, sizeof(LRESULT), STATUS_SUCCESS));
} }
@ -113,19 +115,19 @@ User32SendNCCREATEMessageForKernel(PVOID Arguments, ULONG ArgumentLength)
WNDPROC Proc; WNDPROC Proc;
LRESULT Result; LRESULT Result;
DbgPrint("User32SendNCCREATEMessageForKernel.\n"); DPRINT("User32SendNCCREATEMessageForKernel.\n");
CallbackArgs = (PSENDNCCREATEMESSAGE_CALLBACK_ARGUMENTS)Arguments; CallbackArgs = (PSENDNCCREATEMESSAGE_CALLBACK_ARGUMENTS)Arguments;
if (ArgumentLength != sizeof(SENDNCCREATEMESSAGE_CALLBACK_ARGUMENTS)) if (ArgumentLength != sizeof(SENDNCCREATEMESSAGE_CALLBACK_ARGUMENTS))
{ {
DbgPrint("Wrong length.\n"); DPRINT("Wrong length.\n");
return(STATUS_INFO_LENGTH_MISMATCH); return(STATUS_INFO_LENGTH_MISMATCH);
} }
Proc = (WNDPROC)GetWindowLongW(CallbackArgs->Wnd, GWL_WNDPROC); 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. */ /* Call the window procedure; notice kernel messages are always unicode. */
Result = CallWindowProcW(Proc, CallbackArgs->Wnd, WM_NCCREATE, 0, Result = CallWindowProcW(Proc, CallbackArgs->Wnd, WM_NCCREATE, 0,
(LPARAM)&CallbackArgs->CreateStruct); (LPARAM)&CallbackArgs->CreateStruct);
DbgPrint("Returning result %d.\n", Result); DPRINT("Returning result %d.\n", Result);
return(ZwCallbackReturn(&Result, sizeof(LRESULT), STATUS_SUCCESS)); return(ZwCallbackReturn(&Result, sizeof(LRESULT), STATUS_SUCCESS));
} }
@ -134,7 +136,7 @@ User32CallSendAsyncProcForKernel(PVOID Arguments, ULONG ArgumentLength)
{ {
PSENDASYNCPROC_CALLBACK_ARGUMENTS CallbackArgs; PSENDASYNCPROC_CALLBACK_ARGUMENTS CallbackArgs;
DbgPrint("User32CallSendAsyncProcKernel()\n"); DPRINT("User32CallSendAsyncProcKernel()\n");
CallbackArgs = (PSENDASYNCPROC_CALLBACK_ARGUMENTS)Arguments; CallbackArgs = (PSENDASYNCPROC_CALLBACK_ARGUMENTS)Arguments;
if (ArgumentLength != sizeof(WINDOWPROC_CALLBACK_ARGUMENTS)) if (ArgumentLength != sizeof(WINDOWPROC_CALLBACK_ARGUMENTS))
{ {

View file

@ -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 * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -329,8 +329,6 @@ NtUserGetDCEx(HWND hWnd, HANDLE hRegion, ULONG Flags)
BOOL UpdateClipOrigin = FALSE; BOOL UpdateClipOrigin = FALSE;
HANDLE hRgnVisible = NULL; HANDLE hRgnVisible = NULL;
if (NULL == hWnd)
__asm__("int $3\n");
if (NULL == hWnd) if (NULL == hWnd)
{ {
Flags &= ~DCX_USESTYLE; Flags &= ~DCX_USESTYLE;

View file

@ -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 * DC.C - Device context functions
* *
@ -223,42 +223,6 @@ static BOOL STDCALL FindDriverFileNames(PUNICODE_STRING DriverFileNames)
return TRUE; 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, BOOL STDCALL W32kCreatePrimarySurface(LPCWSTR Driver,
LPCWSTR Device) LPCWSTR Device)