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.

48 lines
951 B

  1. //Copyright (c) 1998 - 1999 Microsoft Corporation
  2. #ifndef _maksassert_h_
  3. #define _maksassert_h_
  4. /*
  5. *
  6. * Module Name:
  7. *
  8. * maksassert.h
  9. *
  10. * Abstract:
  11. *
  12. * Defines assert, verify macros.
  13. * remove maksassert.h and maksassert.cpp from project when we get a good assert.
  14. * // maks_todo : remove this code when we get proper ASSERT headers.
  15. *
  16. * Author:
  17. *
  18. * Makarand Patwardhan - March 6, 1998
  19. *
  20. * Comments
  21. * This file is here only because I could not find the right friendly assert includes.
  22. * maks_todo : should be removed later.
  23. */
  24. //#define _UNICODE
  25. #ifdef DBG
  26. void MaksAssert(LPCTSTR exp, LPCTSTR file, int line);
  27. #undef ASSERT
  28. #undef VERIFY
  29. //;
  30. #define ASSERT(exp) (void)( (exp) || (MaksAssert(_T(#exp), _T(__FILE__), __LINE__), 0) )
  31. #define VERIFY(exp) (void)( (exp) || (MaksAssert(_T(#exp), _T(__FILE__), __LINE__), 0) )
  32. #else
  33. #define ASSERT(exp)
  34. #define VERIFY(exp) (exp)
  35. #endif
  36. #endif // _maksassert_h_