Source code of Windows XP (NT5)
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.

26 lines
675 B

  1. #ifndef _PHBKDEBUG
  2. #define _PHBKDEBUG
  3. //extern "C" {
  4. void Dprintf(LPCSTR pcsz, ...);
  5. //}
  6. #ifdef DEBUG
  7. //#ifdef __cplusplus
  8. //extern "C" {
  9. //#endif // __cplusplus
  10. BOOL FAssertProc(LPCSTR szFile, DWORD dwLine, LPCSTR szMsg, DWORD dwFlags);
  11. void DebugSz(LPCSTR psz);
  12. //#ifdef __cplusplus
  13. //}
  14. //#endif // __cplusplus
  15. #define AssertSzFlg(f, sz, dwFlg) ( (f) ? 0 : FAssertProc(__FILE__, __LINE__, sz, dwFlg) ? DebugBreak() : 1 )
  16. #define AssertSz(f, sz) AssertSzFlg(f, sz, 0)
  17. #define Assert(f) AssertSz((f), "!(" #f ")")
  18. #else
  19. #define DebugSz(x)
  20. #define AssertSzFlg(f, sz, dwFlg) (f)
  21. #define AssertSz(f, sz) (f)
  22. #define Assert(f) (f)
  23. #endif
  24. #endif //_PHBKDEBUG