/* debug.h */

#ifndef __debug_h
#define __debug_h

void TRACE(const char *fmt,...);
extern void ABORT(void);

#define ASSERT(condition) \
   do                                                                           \
   {                                                                            \
      if (!(condition))                                                         \
      {                                                                         \
         TRACE("%s, line %d: Assertion failed\n", __FILE__, __LINE__);          \
         ABORT();                                                               \
      }                                                                         \
   } while(0)

#endif
