summaryrefslogtreecommitdiffstats
path: root/CRT.h
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2021-12-08 13:01:40 +0100
committerChristian Göttsche <cgzones@googlemail.com>2021-12-08 14:48:20 +0100
commit1da78b58187ba29ad618233b4cd38b159412909e (patch)
tree00e8353aad1ebac208347e39fe4981c977b27f73 /CRT.h
parent2ae19064791306b8cd7c741cf3431bde58d77136 (diff)
CRT: add debug printing function
Diffstat (limited to 'CRT.h')
-rw-r--r--CRT.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/CRT.h b/CRT.h
index 0b6302fc..eae4722d 100644
--- a/CRT.h
+++ b/CRT.h
@@ -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)

© 2014-2024 Faster IT GmbH | imprint | privacy policy