aboutsummaryrefslogtreecommitdiff
path: root/cassert
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2024-06-15 11:42:06 -0700
committer3gg <3gg@shellblade.net>2024-06-15 11:42:06 -0700
commitf5127be2865c90b26de896c1adbc5a19ea3a0bd6 (patch)
treeeebb9843e6c7ad2e6f9d899e06746639b2fa6e6c /cassert
parent111e2f413374b77b04be9ff991aa74c995e96ff0 (diff)
Use __VA_OPT__
Diffstat (limited to 'cassert')
-rw-r--r--cassert/include/cassert.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/cassert/include/cassert.h b/cassert/include/cassert.h
index 8cd1391..acfcb0f 100644
--- a/cassert/include/cassert.h
+++ b/cassert/include/cassert.h
@@ -7,18 +7,18 @@
7#ifndef LOGE 7#ifndef LOGE
8#include <stdio.h> 8#include <stdio.h>
9// __VA_OPT__ is not available until C2X. 9// __VA_OPT__ is not available until C2X.
10/*#define LOGE(format, ...) \ 10#define LOGE(format, ...) \
11// { \ 11 { \
12// fprintf( \ 12 fprintf( \
13// stderr, "[ASSERT] %s:%d " format "\n", __FILE__, \ 13 stderr, "[ASSERT] %s:%d " format "\n", __FILE__, \
14// __LINE__ __VA_OPT__(, ) __VA_ARGS__); \ 14 __LINE__ __VA_OPT__(, ) __VA_ARGS__); \
15// }*/ 15 }
16#define LOGE(...) \ 16/*#define LOGE(...) \
17 { \ 17 { \
18 fprintf(stderr, "[ASSERT] %s:%d ", __FILE__, __LINE__); \ 18 fprintf(stderr, "[ASSERT] %s:%d ", __FILE__, __LINE__); \
19 fprintf(stderr, __VA_ARGS__); \ 19 fprintf(stderr, __VA_ARGS__); \
20 fprintf(stderr, "\n"); \ 20 fprintf(stderr, "\n"); \
21 } 21 }*/
22#endif // LOGE 22#endif // LOGE
23 23
24#define TRAP() raise(SIGTRAP) 24#define TRAP() raise(SIGTRAP)