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.

55 lines
1.4 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1997 - 1997
  6. //
  7. // File: debug.h
  8. //
  9. //--------------------------------------------------------------------------
  10. #define DEBUGLVL_BLAB 3
  11. #define DEBUGLVL_VERBOSE 2
  12. #define DEBUGLVL_TERSE 1
  13. #define DEBUGLVL_ERROR 0
  14. #if (DBG)
  15. ULONG DbgPrint( PCH pchFormat, ... );
  16. #if !defined( DEBUG_LEVEL )
  17. #if defined( DEBUG_VARIABLE )
  18. #if defined( DEBUG_INIT )
  19. ULONG DEBUG_VARIABLE = DEBUGLVL_TERSE;
  20. #else
  21. extern ULONG DEBUG_VARIABLE;
  22. #endif
  23. #else
  24. #define DEBUG_VARIABLE DEBUGLVL_TERSE
  25. #endif
  26. #else
  27. #if defined( DEBUG_VARIABLE )
  28. #if defined( DEBUG_INIT )
  29. ULONG DEBUG_VARIABLE = DEBUG_LEVEL;
  30. #else
  31. extern ULONG DEBUG_VARIABLE;
  32. #endif
  33. #else
  34. #define DEBUG_VARIABLE DEBUG_LEVEL
  35. #endif
  36. #endif
  37. #define _DbgPrintF(lvl, strings) \
  38. { \
  39. if ((lvl) <= DEBUG_VARIABLE) {\
  40. DbgPrint(STR_MODULENAME);\
  41. DbgPrint##strings;\
  42. DbgPrint("\n");\
  43. if ((lvl) == DEBUGLVL_ERROR) {\
  44. DebugBreak();\
  45. } \
  46. } \
  47. }
  48. #else // !DBG
  49. #define _DbgPrintF(lvl, strings)
  50. #endif // !DBG