home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c221 / 5.ddi / MWHC.005 / M0 < prev    next >
Encoding:
Text File  |  1992-01-07  |  431 b   |  20 lines

  1. /*
  2.  *   assert.h -- ANSI 
  3.  *
  4.  *   Diagnostic facilities.
  5.  *
  6.  *           Copyright (c) 1990, MetaWare Incorporated
  7.  */
  8.  
  9. #ifdef NDEBUG
  10. /* if NDEBUG defined then assert does nothing */
  11. #define assert(ignore) ((void)0)
  12.  
  13. #else
  14. #include <stdio.h>
  15. #define assert(expression) \
  16.    (!(expression) ? \
  17.       fprintf(stderr,"assertion failed in file %s at line %d.\n",\
  18.               __FILE__, __LINE__), abort(), 0 : 0)
  19. #endif
  20.