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. * 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. //
  20. // a ULONG Is always >= 0
  21. //
  22. #define dprintf(_x_) {{PlaceStamp(__FILE__,__LINE__);dbgPrintf _x_ ;}}
  23. #define dprintf1(_x_) {if (ModuleDebugLevel >= 1) {PlaceStamp(__FILE__,__LINE__);dbgPrintf _x_ ;}}
  24. #define dprintf2(_x_) {if (ModuleDebugLevel >= 2) {PlaceStamp(__FILE__,__LINE__);dbgPrintf _x_ ;}}
  25. #define dprintf3(_x_) {if (ModuleDebugLevel >= 3) {PlaceStamp(__FILE__,__LINE__);dbgPrintf _x_ ;}}
  26. #define dprintf4(_x_) {if (ModuleDebugLevel >= 4) {PlaceStamp(__FILE__,__LINE__);dbgPrintf _x_ ;}}
  27. //BOOL FAR PASCAL _Assert(BOOL fExpr, LPSTR szFile, int iLine, LPSTR szExpr);
  28. BOOL FAR PASCAL _Assert(BOOL fExpr, TCHAR * szFile, int iLine, TCHAR * szExpr);
  29. #define ASSERT(expr) _Assert((expr), __FILE__, __LINE__, #expr)
  30. #else
  31. #define ASSERT(expr)
  32. #define dbgPrintf 0?0:
  33. #define dprintf(_x_)
  34. #define dprintf1(_x_)
  35. #define dprintf2(_x_)
  36. #define dprintf3(_x_)
  37. #define dprintf4(_x_)
  38. #endif
  39. #endif // DEBUGH