assert.h (447B)
1 #ifndef _LEDIT_ASSERT_H_ 2 #define _LEDIT_ASSERT_H_ 3 4 /* based on the assert found in OpenBSD */ 5 void ledit_assert_impl(const char *file, int line, const char *func, const char *failedexpr); 6 #define ledit_assert(e) ((e) ? (void)0 : ledit_assert_impl(__FILE__, __LINE__, __func__, #e)) 7 /* used by some functions like buffer_get_line */ 8 #define ledit_assert_manual(e, file, line, func) ((e) ? (void)0 : ledit_assert_impl(file, line, func, #e)) 9 10 #endif