home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 300-399 / ff384.lzh / NorthC / NorthC1.LZH / include / assert.h < prev    next >
C/C++ Source or Header  |  1990-08-30  |  317b  |  14 lines

  1. #ifndef ASSERT_H
  2. #define    ASSERT_H
  3.  
  4. #ifdef NDEBUG
  5. #define    assert(cond)
  6. #else
  7. /* NorthC does not define __FILE__ and __LINE__ */
  8. static char __AssertFmt[] = "assert failed in '%s' at line %d.\n";
  9. #define    assert(cond)    if(!(cond)) \
  10.  { fprintf(stderr, __AssertFmt, __FILE__, __LINE__); abort(); }
  11. #endif
  12.  
  13. #endif ASSERT_H
  14.