home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / mslang / vm / h / vmassert.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-13  |  610 b   |  36 lines

  1. /***
  2. *vmassert.h - define the assert macro
  3. *
  4. *    Copyright (c) 1985-1992, 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.  
  23. #ifdef    VMDEBUG
  24.  
  25. void _pascal _far __VmAssert(char _near *, char _near *, unsigned);
  26.  
  27. #define Assert(exp) \
  28.     ( (exp) ? (void) 0 : __VmAssert(#exp, __FILE__, __LINE__) )
  29.  
  30. #else    /* !VMDEBUG */
  31.  
  32. #define Assert(exp) ((void)0)
  33.  
  34. #endif    /* !VMDEBUG */
  35.  
  36.