Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.3 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: debug.c
  3. *
  4. * debug helpers routine
  5. *
  6. * Copyright (c) 1992-1995 Microsoft Corporation
  7. *
  8. \**************************************************************************/
  9. #include "precomp.h"
  10. #if DBG
  11. ULONG DebugLevel = 0;
  12. /*****************************************************************************
  13. *
  14. * Routine Description:
  15. *
  16. * This function is variable-argument, level-sensitive debug print
  17. * routine.
  18. * If the specified debug level for the print statement is lower or equal
  19. * to the current debug level, the message will be printed.
  20. *
  21. * Arguments:
  22. *
  23. * DebugPrintLevel - Specifies at which debugging level the string should
  24. * be printed
  25. *
  26. * DebugMessage - Variable argument ascii c string
  27. *
  28. * Return Value:
  29. *
  30. * None.
  31. *
  32. ***************************************************************************/
  33. VOID
  34. DebugPrint(
  35. ULONG DebugPrintLevel,
  36. PCHAR DebugMessage,
  37. ...
  38. )
  39. {
  40. va_list ap;
  41. va_start(ap, DebugMessage);
  42. if (DebugPrintLevel <= DebugLevel)
  43. {
  44. EngDebugPrint(STANDARD_DEBUG_PREFIX, DebugMessage, ap);
  45. EngDebugPrint("", "\n", ap);
  46. }
  47. va_end(ap);
  48. }
  49. #endif // DBG