home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c034 / 4.ddi / INCLUDE / ASSERT.H$ / ASSERT.bin
Encoding:
Text File  |  1989-10-24  |  594 b   |  35 lines

  1. /***
  2. *assert.h - define the assert macro
  3. *
  4. *    Copyright (c) 1985-1990, Microsoft Corporation.  All rights reserved.
  5. *
  6. *Purpose:
  7. *    Defines the assert(exp) macro.
  8. *    [ANSI/System V]
  9. *
  10. ****/
  11.  
  12. #if defined(_DLL) && !defined(_MT)
  13. #error Cannot define _DLL without _MT
  14. #endif
  15.  
  16. #ifdef _MT
  17. #define _FAR_ _far
  18. #else
  19. #define _FAR_
  20. #endif
  21.  
  22. #undef    assert
  23.  
  24. #ifdef NDEBUG
  25.  
  26. #define assert(exp)    ((void)0)
  27.  
  28. #else
  29.  
  30. void _FAR_ _cdecl _assert(void _FAR_ *, void _FAR_ *, unsigned);
  31. #define assert(exp) \
  32.     ( (exp) ? (void) 0 : _assert(#exp, __FILE__, __LINE__) )
  33.  
  34. #endif /* NDEBUG */
  35.