home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / x / x_files / !X-Files / h / debug < prev    next >
Encoding:
Text File  |  1996-03-23  |  737 b   |  21 lines

  1. /* debug.h
  2.  */
  3.  
  4. #ifndef __debug_h
  5. #define __debug_h
  6.  
  7. void TRACE(const char *fmt, ...);
  8. extern void ABORT(void);
  9.  
  10. #define ASSERT(condition) \
  11.    do                                                                           \
  12.    {                                                                            \
  13.       if (!(condition))                                                         \
  14.       {                                                                         \
  15.          TRACE("%s, line %d: Assertion failed\n", __FILE__, __LINE__);          \
  16.          ABORT();                                                               \
  17.       }                                                                         \
  18.    } while(0)
  19.  
  20. #endif
  21.