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.

39 lines
947 B

  1. /**************************************************************************
  2. Prototype COM animation system
  3. Debug assertion support
  4. 1/20/94 JonBl Created
  5. Copyright (c)1994 Microsoft Corporation. All Rights Reserved.
  6. **************************************************************************/
  7. #ifndef _ASSERT4D_H_
  8. #define _ASSERT4D_H_
  9. #include "util4d.h"
  10. #undef assert
  11. // debug are assertion conditions that will stay in final Release.
  12. // If false assert Opens a fatal error message Box and Stops program
  13. #ifdef _DEBUG
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. void __stdcall _assert4d(LPTSTR, LPTSTR, unsigned);
  18. #ifdef __cplusplus
  19. }
  20. #endif
  21. #define assert(exp) ( (exp) ? (void) 0 : _assert4d(TEXT(#exp), TEXT(__FILE__), __LINE__) )
  22. #define debug(condition) assert(condition)
  23. #else
  24. #define assert(exp) ((void)0)
  25. #define debug(condition) condition
  26. #endif
  27. #endif // _ASSERT4D_H_