home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0040 - 0049 / ibm0040-0049 / ibm0040.tar / ibm0040 / BCPPOWL3.ZIP / PATINC.ZIP / ASSERT.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-28  |  732 b   |  35 lines

  1. /*  assert.h
  2.  
  3.     assert macro
  4.  
  5.     Copyright (c) Borland International 1987,1988,1990,1991
  6.     All Rights Reserved.
  7. */
  8.  
  9. #if !defined( __DEFS_H )
  10. #include <_defs.h>
  11. #endif
  12.  
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16.  
  17. void _Cdecl _FARFUNC __assertfail( char _FAR *__msg,
  18.                                    char _FAR *__cond,
  19.                                    char _FAR *__file,
  20.                                    int __line);
  21.  
  22. #ifdef  __cplusplus
  23. }
  24. #endif
  25.  
  26. #undef assert
  27.  
  28. #ifdef NDEBUG
  29. #define assert(p)   ((void)0)
  30. #else
  31. #define assert(p)   ((p) ? (void)0 : (void) __assertfail( \
  32.                     "Assertion failed: %s, file %s, line %d\n", \
  33.                     #p, __FILE__, __LINE__ ) )
  34. #endif
  35.