home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / oper_sys / emerald / emrldsys.lha / Kernel / h / assert.h next >
Encoding:
C/C++ Source or Header  |  1990-08-17  |  593 b   |  25 lines

  1. /*    assert.h    4.1    83/05/03    */
  2.  
  3. #ifndef assert_h
  4. #define assert_h
  5. #ifndef FILE
  6. #include <stdio.h>
  7. #endif
  8.  
  9. # ifdef lint
  10. #  define assert(ex) {int xlintx; xlintx = (ex); xlintx = xlintx;}
  11. #  define _assert(ex) {int xlintx; xlintx = (ex); xlintx = xlintx;}
  12. # else
  13. #  ifndef NDEBUG
  14. extern char EMassertMessage[];
  15. #   define _assert(ex) {if (!(ex)){printf(\
  16.      EMassertMessage, "ex", __FILE__, __LINE__); abort();}}
  17. #   define assert(ex) {if (!(ex)){printf(\
  18.      EMassertMessage, "ex", __FILE__, __LINE__);abort();}}
  19. #  else
  20. #   define _assert(ex) ;
  21. #   define assert(ex) ;
  22. #  endif
  23. # endif
  24. #endif
  25.