You've already forked hackerlibultra
mirror of
https://github.com/HackerN64/hackerlibultra.git
synced 2026-01-21 10:37:53 -08:00
* add assertf; reactivate assertBreak * newline after user crafted fmt string * assertf implemented; EX cond fixed * format * make ISV the only initialize for now * force initialize to 'autodetect' * fix assertf with only format str * format --------- Co-authored-by: someone2639 <someone2639@gmail.com>
15 lines
492 B
C
15 lines
492 B
C
#ifndef __ASSERT_H__
|
|
#define __ASSERT_H__
|
|
|
|
#ifdef NDEBUG
|
|
#undef assert
|
|
#define assert(EX) ((void)0)
|
|
#else
|
|
extern void __assert(const char*, const char*, int);
|
|
extern void __assertf(const char* exp, const char* filename, int line, const char* fmt, ...);
|
|
#define assert(EX) ((EX) ? ((void)0) : __assert(#EX, __FILE__, __LINE__))
|
|
#define assertf(EX, fmt, ...) ((EX) ? ((void)0) : __assertf(#EX, __FILE__, __LINE__, fmt, ##__VA_ARGS__))
|
|
#endif /* NDEBUG */
|
|
|
|
#endif /* !__ASSERT_H__ */
|