fail.h 401 B

12345678910111213141516171819202122
  1. /*
  2. * fail.h
  3. * Copyright (C) 1998-2000 A.J. van Os; Released under GPL
  4. *
  5. * Description:
  6. * Support for an alternative form of assert()
  7. */
  8. #if !defined(__fail_h)
  9. #define __fail_h 1
  10. #undef fail
  11. #if defined(NDEBUG)
  12. #define fail(e) ((void)0)
  13. #else
  14. #define fail(e) ((e) ? __fail(#e, __FILE__, __LINE__) : (void)0)
  15. #endif /* NDEBUG */
  16. extern void __fail(char *, char *, int);
  17. #endif /* __fail_h */