assert.h 275 B

123456789101112131415
  1. #ifndef __ASSERT
  2. #define __ASSERT
  3. void assert(int);
  4. #endif /* __ASSERT */
  5. #undef assert
  6. #ifdef NDEBUG
  7. #define assert(ignore) ((void)0)
  8. #else
  9. extern int _assert(char *, char *, unsigned);
  10. #define assert(e) ((void)((e)||_assert(#e, __FILE__, __LINE__)))
  11. #endif /* NDEBUG */