CRT: add debug printing function

This commit is contained in:
Christian Göttsche
2021-12-08 13:01:40 +01:00
parent 2ae1906479
commit 1da78b5818
2 changed files with 18 additions and 0 deletions

7
CRT.h
View File

@ -150,6 +150,13 @@ typedef enum ColorElements_ {
void CRT_fatalError(const char* note) ATTR_NORETURN;
#ifdef NDEBUG
# define CRT_debug(...)
#else
void CRT_debug_impl(const char* file, size_t lineno, const char* func, const char* fmt, ...) ATTR_FORMAT(printf, 4, 5);
# define CRT_debug(...) CRT_debug_impl(__FILE__, __LINE__, __func__, __VA_ARGS__)
#endif
void CRT_handleSIGSEGV(int signal) ATTR_NORETURN;
#define KEY_WHEELUP KEY_F(30)