home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / newlibs / cclib.lzh / assert.h < prev    next >
C/C++ Source or Header  |  1989-09-25  |  309b  |  20 lines

  1. #ifndef ASSERT_H
  2. #define ASSERT_H 1
  3.  
  4. #ifndef NDEBUG
  5. #ifndef STDIO_H
  6. #include "stdio.h"
  7. #endif
  8. #ifndef STDLIB_H
  9. #include "stdlib.h"
  10. #endif
  11. #define assert(x)\
  12.  if (!(x)) {fprintf(stderr,"Assertion failed: x,\
  13.  file %s, line %d\n",__FILE__,__LINE__); exit(EXIT_FAILURE);}
  14. #else
  15. #define assert(x)
  16. #endif
  17.  
  18. #endif
  19.  
  20.