From 1e4cbe0f46ce2a2fe8530b4ede7d7bda70095fa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Mon, 24 Nov 2003 16:19:58 +0000 Subject: [PATCH] Silence debug messages svn path=/trunk/; revision=6782 --- reactos/drivers/bus/pci/fdo.c | 4 ++-- reactos/drivers/input/psaux/mouse.c | 2 ++ reactos/drivers/input/psaux/psaux.c | 12 +++++++----- reactos/lib/user32/controls/scrollbar.c | 3 +-- reactos/ntoskrnl/mm/balance.c | 4 ++-- reactos/subsys/smss/init.c | 6 +++--- reactos/subsys/win32k/ntuser/class.c | 8 ++++---- reactos/subsys/win32k/ntuser/input.c | 10 +++++----- reactos/subsys/win32k/ntuser/keyboard.c | 20 ++++++++++---------- reactos/subsys/win32k/ntuser/misc.c | 6 +++--- reactos/subsys/win32k/ntuser/winsta.c | 4 ++-- 11 files changed, 41 insertions(+), 38 deletions(-) diff --git a/reactos/drivers/bus/pci/fdo.c b/reactos/drivers/bus/pci/fdo.c index 02f5d4b2c55..5a4baf558a1 100644 --- a/reactos/drivers/bus/pci/fdo.c +++ b/reactos/drivers/bus/pci/fdo.c @@ -1,4 +1,4 @@ -/* $Id: fdo.c,v 1.3 2003/09/25 15:21:11 navaraf Exp $ +/* $Id: fdo.c,v 1.4 2003/11/24 16:15:00 gvg Exp $ * * PROJECT: ReactOS PCI bus driver * FILE: fdo.c @@ -9,7 +9,7 @@ */ #include -//#define NDEBUG +#define NDEBUG #include /*** PRIVATE *****************************************************************/ diff --git a/reactos/drivers/input/psaux/mouse.c b/reactos/drivers/input/psaux/mouse.c index 78031a038bf..d001a7f9a75 100644 --- a/reactos/drivers/input/psaux/mouse.c +++ b/reactos/drivers/input/psaux/mouse.c @@ -10,6 +10,8 @@ #include "controller.h" #include "mouse.h" #include "psaux.h" + +#define NDEBUG #include diff --git a/reactos/drivers/input/psaux/psaux.c b/reactos/drivers/input/psaux/psaux.c index 4327b7ca96c..f467d905253 100644 --- a/reactos/drivers/input/psaux/psaux.c +++ b/reactos/drivers/input/psaux/psaux.c @@ -13,6 +13,9 @@ #include "mouse.h" #include "psaux.h" +#define NDEBUG +#include + static PIRP CurrentIrp; static ULONG MouseDataRead; static ULONG MouseDataRequired; @@ -87,7 +90,7 @@ PS2MouseDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp) break; default: - DbgPrint("NOT IMPLEMENTED\n"); + DPRINT1("NOT IMPLEMENTED\n"); Status = STATUS_NOT_IMPLEMENTED; break; } @@ -201,8 +204,7 @@ AllocatePointerDevice(PDRIVER_OBJECT DriverObject) Status = IoCreateDevice(DriverObject, sizeof(DEVICE_EXTENSION), &DeviceName, FILE_DEVICE_SERIAL_MOUSE_PORT, 0, TRUE, &DeviceObject); RtlUnicodeStringToAnsiString(&DebugString, &DeviceName, TRUE); - DbgPrint(DebugString.Buffer); - DbgPrint("\n"); + DPRINT("%s", DebugString.Buffer); RtlFreeAnsiString(&DebugString); /* Device successfully created, leave the cyclus */ if (NT_SUCCESS(Status)) @@ -242,9 +244,9 @@ DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) PDEVICE_OBJECT DeviceObject; if (DetectPS2Port() == TRUE) { - DbgPrint("PS2 Port Driver version 0.0.2\n"); + DPRINT("PS2 Port Driver version 0.0.2\n"); } else { - DbgPrint("PS2 port not found.\n"); + DPRINT1("PS2 port not found.\n"); return STATUS_UNSUCCESSFUL; } diff --git a/reactos/lib/user32/controls/scrollbar.c b/reactos/lib/user32/controls/scrollbar.c index f2069be7200..f72c42620e8 100644 --- a/reactos/lib/user32/controls/scrollbar.c +++ b/reactos/lib/user32/controls/scrollbar.c @@ -1,4 +1,4 @@ -/* $Id: scrollbar.c,v 1.19 2003/10/02 23:21:42 weiden Exp $ +/* $Id: scrollbar.c,v 1.20 2003/11/24 16:15:00 gvg Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -127,7 +127,6 @@ arrowSize, PSCROLLBARINFO psbi) HPEN hSavePen; HBRUSH hSaveBrush, hBrush; BOOLEAN top_selected = FALSE, bottom_selected = FALSE; -DbgPrint("[SCROLL_DrawInterior:%d]\n", nBar); if(psbi->rgstate[SCROLL_TOP_RECT] & STATE_SYSTEM_PRESSED) { top_selected = TRUE; diff --git a/reactos/ntoskrnl/mm/balance.c b/reactos/ntoskrnl/mm/balance.c index 37a9a70984d..18b90a539c4 100644 --- a/reactos/ntoskrnl/mm/balance.c +++ b/reactos/ntoskrnl/mm/balance.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: balance.c,v 1.23 2003/11/16 15:20:39 hbirr Exp $ +/* $Id: balance.c,v 1.24 2003/11/24 16:15:00 gvg Exp $ * * PROJECT: ReactOS kernel * FILE: ntoskrnl/mm/balance.c @@ -391,7 +391,7 @@ MiInitBalancerThread(VOID) KPRIORITY Priority; NTSTATUS Status; - CHECKPOINT1; + CHECKPOINT; KeInitializeEvent(&MiBalancerEvent, SynchronizationEvent, FALSE); KeInitializeTimerEx(&MiBalancerTimer, SynchronizationTimer); diff --git a/reactos/subsys/smss/init.c b/reactos/subsys/smss/init.c index a23e9fa9527..a4cd2ce15ce 100644 --- a/reactos/subsys/smss/init.c +++ b/reactos/subsys/smss/init.c @@ -1,4 +1,4 @@ -/* $Id: init.c,v 1.52 2003/11/17 02:12:51 hyperion Exp $ +/* $Id: init.c,v 1.53 2003/11/24 16:15:00 gvg Exp $ * * init.c - Session Manager initialization * @@ -616,8 +616,8 @@ SmPagingFilesQueryRoutine(PWSTR ValueName, return (STATUS_SUCCESS); } - DbgPrint("SMSS: Created paging file %wZ with size %dKB\n", - &FileName, InitialSize.QuadPart / 1024); + DPRINT("SMSS: Created paging file %wZ with size %dKB\n", + &FileName, InitialSize.QuadPart / 1024); Status = NtCreatePagingFile(&FileName, &InitialSize, &MaximumSize, diff --git a/reactos/subsys/win32k/ntuser/class.c b/reactos/subsys/win32k/ntuser/class.c index 406c2967669..6e9fb4363fc 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.40 2003/11/23 11:39:48 navaraf Exp $ +/* $Id: class.c,v 1.41 2003/11/24 16:15:00 gvg Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -453,14 +453,14 @@ IntGetClassLong(struct _WINDOW_OBJECT *WindowObject, ULONG Offset, BOOL Ansi) if ((int)Offset >= 0) { - DbgPrint("GetClassLong(%x, %d)\n", WindowObject->Self, Offset); + DPRINT("GetClassLong(%x, %d)\n", WindowObject->Self, Offset); if (Offset > WindowObject->Class->cbClsExtra - sizeof(LONG)) { SetLastWin32Error(ERROR_INVALID_PARAMETER); return 0; } Ret = *((LONG *)(WindowObject->Class->ExtraData + Offset)); - DbgPrint("Result: %x\n", Ret); + DPRINT("Result: %x\n", Ret); return Ret; } @@ -538,7 +538,7 @@ IntSetClassLong(PWINDOW_OBJECT WindowObject, ULONG Offset, LONG dwNewLong, BOOL if ((int)Offset >= 0) { - DbgPrint("SetClassLong(%x, %d, %x)\n", WindowObject->Self, Offset, dwNewLong); + DPRINT("SetClassLong(%x, %d, %x)\n", WindowObject->Self, Offset, dwNewLong); if (Offset > WindowObject->Class->cbClsExtra - sizeof(LONG)) { SetLastWin32Error(ERROR_INVALID_PARAMETER); diff --git a/reactos/subsys/win32k/ntuser/input.c b/reactos/subsys/win32k/ntuser/input.c index f585749cb01..955db01bcec 100644 --- a/reactos/subsys/win32k/ntuser/input.c +++ b/reactos/subsys/win32k/ntuser/input.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: input.c,v 1.21 2003/11/24 00:22:53 arty Exp $ +/* $Id: input.c,v 1.22 2003/11/24 16:15:00 gvg Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -90,13 +90,13 @@ KeyboardThreadMain(PVOID StartContext) /* * Wait to start input. */ - DbgPrint( "Input Thread Waiting for start event\n" ); + DPRINT( "Input Thread Waiting for start event\n" ); Status = KeWaitForSingleObject(&InputThreadsStart, 0, UserMode, TRUE, NULL); - DbgPrint( "Input Thread Starting...\n" ); + DPRINT( "Input Thread Starting...\n" ); /* * Receive and process keyboard input. @@ -218,7 +218,7 @@ KeyboardThreadMain(PVOID StartContext) MsqPostKeyboardMessage(msg.message,msg.wParam,msg.lParam); } } - DbgPrint( "Input Thread Stopped...\n" ); + DPRINT( "Input Thread Stopped...\n" ); } } @@ -228,7 +228,7 @@ NtUserAcquireOrReleaseInputOwnership(BOOLEAN Release) { if (Release && InputThreadsRunning && !pmPrimitiveMessageQueue) { - DbgPrint( "Releasing input: PM = %08x\n", pmPrimitiveMessageQueue ); + DPRINT( "Releasing input: PM = %08x\n", pmPrimitiveMessageQueue ); KeClearEvent(&InputThreadsStart); InputThreadsRunning = FALSE; diff --git a/reactos/subsys/win32k/ntuser/keyboard.c b/reactos/subsys/win32k/ntuser/keyboard.c index 9e53fa6e20e..28f656de20a 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.15 2003/11/24 00:22:53 arty Exp $ +/* $Id: keyboard.c,v 1.16 2003/11/24 16:15:00 gvg Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -484,7 +484,7 @@ void InitKbdLayout( PVOID *pkKeyboardLayout ) { Status = ReadRegistryValue(&KeyName,&ValueName,&DefaultLocale); if( !NT_SUCCESS(Status) ) { - DbgPrint( "Could not get default locale (%08x).\n", Status ); + DPRINT1( "Could not get default locale (%08x).\n", Status ); } else { DPRINT( "DefaultLocale = %wZ\n", &DefaultLocale ); @@ -501,7 +501,7 @@ void InitKbdLayout( PVOID *pkKeyboardLayout ) { RtlInitUnicodeString(&FullLayoutPath,SYSTEMROOT_DIR); if( !NT_SUCCESS(Status) ) { - DbgPrint("Got default locale but not layout file. (%08x)\n", + DPRINT1("Got default locale but not layout file. (%08x)\n", Status); RtlFreeUnicodeString(&LayoutFile); } else { @@ -520,7 +520,7 @@ void InitKbdLayout( PVOID *pkKeyboardLayout ) { sizeof(WCHAR)); if( !KeyboardLayoutWSTR ) { - DbgPrint("Couldn't allocate a string for the keyboard layout name.\n"); + DPRINT1("Couldn't allocate a string for the keyboard layout name.\n"); RtlFreeUnicodeString(&FullLayoutPath); return; } @@ -532,7 +532,7 @@ void InitKbdLayout( PVOID *pkKeyboardLayout ) { DPRINT( "Load Keyboard Layout: %S\n", KeyboardLayoutWSTR ); if( !kbModule ) - DbgPrint( "Load Keyboard Layout: No %wZ\n", &FullLayoutPath ); + DPRINT1( "Load Keyboard Layout: No %wZ\n", &FullLayoutPath ); } RtlFreeUnicodeString(&FullLayoutPath); @@ -540,12 +540,12 @@ void InitKbdLayout( PVOID *pkKeyboardLayout ) { if( !kbModule ) { - DbgPrint("Trying to load US Keyboard Layout\n"); + DPRINT1("Trying to load US Keyboard Layout\n"); kbModule = EngLoadImage(L"\\SystemRoot\\system32\\kbdus.dll"); if (!kbModule) { - DbgPrint("Failed to load any Keyboard Layout\n"); + DPRINT1("Failed to load any Keyboard Layout\n"); return; } } @@ -563,7 +563,7 @@ void InitKbdLayout( PVOID *pkKeyboardLayout ) { } while (FALSE); if( !*pkKeyboardLayout ) { - DbgPrint("Failed to load the keyboard layout.\n"); + DPRINT1("Failed to load the keyboard layout.\n"); } #undef XX_STATUS @@ -828,12 +828,12 @@ NtUserToUnicodeEx( if( !NT_SUCCESS(MmCopyFromCaller(KeyStateBuf, lpKeyState, sizeof(KeyStateBuf))) ) { - DbgPrint( "Couldn't copy key state from caller.\n" ); + DPRINT1( "Couldn't copy key state from caller.\n" ); return 0; } OutPwszBuff = ExAllocatePool(NonPagedPool,sizeof(WCHAR) * cchBuff); if( !OutPwszBuff ) { - DbgPrint( "ExAllocatePool(%d) failed\n", sizeof(WCHAR) * cchBuff); + DPRINT1( "ExAllocatePool(%d) failed\n", sizeof(WCHAR) * cchBuff); return 0; } RtlZeroMemory( OutPwszBuff, sizeof( WCHAR ) * cchBuff ); diff --git a/reactos/subsys/win32k/ntuser/misc.c b/reactos/subsys/win32k/ntuser/misc.c index 9bb0dfac615..2e1377e76c5 100644 --- a/reactos/subsys/win32k/ntuser/misc.c +++ b/reactos/subsys/win32k/ntuser/misc.c @@ -1,4 +1,4 @@ -/* $Id: misc.c,v 1.30 2003/11/23 13:46:33 weiden Exp $ +/* $Id: misc.c,v 1.31 2003/11/24 16:19:58 gvg Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -32,10 +32,10 @@ void W32kRegisterPrimitiveMessageQueue() { pThread = PsGetWin32Thread(); if( pThread && pThread->MessageQueue ) { pmPrimitiveMessageQueue = pThread->MessageQueue; - DbgPrint( "Installed primitive input queue.\n" ); + DPRINT( "Installed primitive input queue.\n" ); } } else { - DbgPrint( "Alert! Someone is trying to steal the primitive queue.\n" ); + DPRINT1( "Alert! Someone is trying to steal the primitive queue.\n" ); } } diff --git a/reactos/subsys/win32k/ntuser/winsta.c b/reactos/subsys/win32k/ntuser/winsta.c index 30ec5f5ec0f..8a13bfd5a14 100644 --- a/reactos/subsys/win32k/ntuser/winsta.c +++ b/reactos/subsys/win32k/ntuser/winsta.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: winsta.c,v 1.45 2003/11/23 11:39:48 navaraf Exp $ + * $Id: winsta.c,v 1.46 2003/11/24 16:15:00 gvg Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -1042,7 +1042,7 @@ NtUserCreateDesktop( DesktopObject->WorkArea.right, DesktopObject->WorkArea.bottom); - DPRINT1("Created Desktop Window: %08x\n", DesktopObject->DesktopWindow); + DPRINT("Created Desktop Window: %08x\n", DesktopObject->DesktopWindow); Status = ObInsertObject( (PVOID)DesktopObject,