Files
hackerlibultra/include/assert.h
someone2639 dba3265aac Reactivate Assert Functionality, make ISV the only canon debug hardware (#12)
* 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>
2025-08-23 17:41:37 -04:00

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__ */