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.

49 lines
1.3 KiB

  1. /*
  2. * debug macros
  3. *
  4. */
  5. #if DBG
  6. #ifndef _DEBUG
  7. #define _DEBUG
  8. #endif
  9. #endif
  10. #ifndef _DEBUGH
  11. #define _DEBUGH
  12. #ifdef _DEBUG
  13. #define ModuleDebugLevel MsYuvDebugLevel
  14. #define ModuleDebugStamp MsYuvDebugStamp
  15. extern DWORD ModuleDebugLevel;
  16. extern DWORD ModuleStamp;
  17. void PlaceStamp(TCHAR * lpszFile, int iLineNum);
  18. void dbgPrintf(TCHAR * szFormat, ...);
  19. #define dprintf1(_x_) {if (ModuleDebugLevel >= 1) {PlaceStamp(__FILE__,__LINE__);dbgPrintf _x_ ;}}
  20. #define dprintf2(_x_) {if (ModuleDebugLevel >= 2) {PlaceStamp(__FILE__,__LINE__);dbgPrintf _x_ ;}}
  21. #define dprintf3(_x_) {if (ModuleDebugLevel >= 3) {PlaceStamp(__FILE__,__LINE__);dbgPrintf _x_ ;}}
  22. #define dprintf4(_x_) {if (ModuleDebugLevel >= 4) {PlaceStamp(__FILE__,__LINE__);dbgPrintf _x_ ;}}
  23. //BOOL FAR PASCAL _Assert(BOOL fExpr, LPSTR szFile, int iLine, LPSTR szExpr);
  24. BOOL FAR PASCAL _Assert(BOOL fExpr, TCHAR * szFile, int iLine, TCHAR * szExpr);
  25. #define ASSERT(expr) _Assert((expr), __FILE__, __LINE__, #expr)
  26. #else
  27. #define ASSERT(expr)
  28. #define dbgPrintf 0?0:
  29. #define dprintf(_x_)
  30. #define dprintf1(_x_)
  31. #define dprintf2(_x_)
  32. #define dprintf3(_x_)
  33. #define dprintf4(_x_)
  34. #endif
  35. #endif // DEBUGH