home *** CD-ROM | disk | FTP | other *** search
- #ifndef ASSERT_H
- #define ASSERT_H
-
- #ifdef NDEBUG
- #define assert(cond)
- #else
- /* NorthC does not define __FILE__ and __LINE__ */
- static char __AssertFmt[] = "assert failed in '%s' at line %d.\n";
- #define assert(cond) if(!(cond)) \
- { fprintf(stderr, __AssertFmt, __FILE__, __LINE__); abort(); }
- #endif
-
- #endif ASSERT_H
-