ReactOS  0.4.15-dev-3428-g0609db5
debug.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS VGA Display Driver
3  * LICENSE: Microsoft NT4 DDK Sample Code License
4  * FILE: win32ss/drivers/displays/vga_new/debug.c
5  * PURPOSE: Debug Support
6  * PROGRAMMERS: Copyright (c) 1992-1995 Microsoft Corporation
7  */
8 
9 #include "driver.h"
10 
11 #if DBG
12 
13 ULONG DebugLevel = 0xFFFFFFFF;
14 
15 /*****************************************************************************
16  *
17  * Routine Description:
18  *
19  * This function is variable-argument, level-sensitive debug print
20  * routine.
21  * If the specified debug level for the print statement is lower or equal
22  * to the current debug level, the message will be printed.
23  *
24  * Arguments:
25  *
26  * DebugPrintLevel - Specifies at which debugging level the string should
27  * be printed
28  *
29  * DebugMessage - Variable argument ascii c string
30  *
31  * Return Value:
32  *
33  * None.
34  *
35  ***************************************************************************/
36 
37 VOID
39  ULONG DebugPrintLevel,
40  PCHAR DebugMessage,
41  ...
42  )
43 
44 {
45 
46  va_list ap;
47 
48  va_start(ap, DebugMessage);
49 
50  if (DebugPrintLevel <= DebugLevel)
51  {
52  EngDebugPrint(STANDARD_DEBUG_PREFIX, DebugMessage, ap);
53  }
54 
55  va_end(ap);
56 
57 }
58 
59 #endif
signed char * PCHAR
Definition: retypes.h:7
ULONG DebugLevel
Definition: fbtusb.c:26
#define va_end(ap)
Definition: acmsvcex.h:90
char * va_list
Definition: acmsvcex.h:78
#define STANDARD_DEBUG_PREFIX
Definition: driver.h:74
va_start(ap, x)
ULONG NTAPI DebugPrint(IN PSTRING DebugString, IN ULONG ComponentId, IN ULONG Level)
Definition: debug.c:23
VOID APIENTRY EngDebugPrint(_In_z_ PCHAR StandardPrefix, _In_z_ PCHAR DebugMessage, _In_ va_list ap)
Definition: debug.c:19
void int int ULONGLONG int va_list * ap
Definition: winesup.h:32
unsigned int ULONG
Definition: retypes.h:1