2010-12-14 03:03:30 +00:00
|
|
|
/*
|
2010-12-14 03:27:51 +00:00
|
|
|
* PROJECT: ReactOS VGA Display Driver
|
2010-12-14 03:03:30 +00:00
|
|
|
* LICENSE: Microsoft NT4 DDK Sample Code License
|
2015-11-05 18:07:00 +00:00
|
|
|
* FILE: win32ss/drivers/displays/vga_new/debug.c
|
2010-12-14 03:03:30 +00:00
|
|
|
* PURPOSE: Debug Support
|
|
|
|
* PROGRAMMERS: Copyright (c) 1992-1995 Microsoft Corporation
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "driver.h"
|
|
|
|
|
|
|
|
#if DBG
|
|
|
|
|
|
|
|
ULONG DebugLevel = 0xFFFFFFFF;
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
*
|
|
|
|
* Routine Description:
|
|
|
|
*
|
|
|
|
* This function is variable-argument, level-sensitive debug print
|
|
|
|
* routine.
|
|
|
|
* If the specified debug level for the print statement is lower or equal
|
|
|
|
* to the current debug level, the message will be printed.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
*
|
|
|
|
* DebugPrintLevel - Specifies at which debugging level the string should
|
|
|
|
* be printed
|
|
|
|
*
|
|
|
|
* DebugMessage - Variable argument ascii c string
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
*
|
|
|
|
* None.
|
|
|
|
*
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
VOID
|
|
|
|
DebugPrint(
|
|
|
|
ULONG DebugPrintLevel,
|
|
|
|
PCHAR DebugMessage,
|
|
|
|
...
|
|
|
|
)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
va_list ap;
|
|
|
|
|
|
|
|
va_start(ap, DebugMessage);
|
|
|
|
|
|
|
|
if (DebugPrintLevel <= DebugLevel)
|
|
|
|
{
|
|
|
|
EngDebugPrint(STANDARD_DEBUG_PREFIX, DebugMessage, ap);
|
|
|
|
}
|
|
|
|
|
|
|
|
va_end(ap);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|