debug.h 826 B

12345678910111213141516171819202122232425262728
  1. // debug.h :
  2. //
  3. #if !defined(AGD_DEBUG_H__39391BF3_0394_4846_BFCB_028512359FF5__INCLUDED_)
  4. #define AGD_DEBUG_H__39391BF3_0394_4846_BFCB_028512359FF5__INCLUDED_
  5. #include <assert.h>
  6. #include <stdio.h>
  7. /////////////////////////////////////////////////////////////////////////////
  8. // debug.h - Declarations:
  9. #ifdef _DEBUG
  10. #define TRACE(...) printf(__VA_ARGS__), fflush(stdout)
  11. #define ETRACE(...) fprintf(stderr, __VA_ARGS__), fflush(stderr)
  12. #define ASSERT assert
  13. #else // _DEBUG
  14. #define TRACE(...) (void)0
  15. #define ETRACE(...) (void)0
  16. #define ASSERT(e) (void)0
  17. #endif // _DEBUG
  18. #ifndef UNUSED
  19. #define UNUSED(p) (void)p
  20. #endif // UNUSED
  21. /////////////////////////////////////////////////////////////////////////////
  22. #endif // !defined(AGD_DEBUG_H__39391BF3_0394_4846_BFCB_028512359FF5__INCLUDED_)