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.

43 lines
894 B

  1. #ifndef _maksassert_h_
  2. #define _maksassert_h_
  3. /*
  4. * Copyright (c) 1996 Microsoft Corporation
  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. #ifdef DBG
  25. void MaksAssert(LPCTSTR exp, LPCTSTR file, int line);
  26. #define ASSERT(exp) (void)( (exp) || (MaksAssert(_T(#exp), _T(__FILE__), __LINE__), 0) )
  27. #define VERIFY(exp) (void)( (exp) || (MaksAssert(_T(#exp), _T(__FILE__), __LINE__), 0) )
  28. #else
  29. #define ASSERT(exp)
  30. #define VERIFY(exp) (exp)
  31. #endif
  32. #endif // _maksassert_h_