aboutsummaryrefslogtreecommitdiff
path: root/teensy/teensy_log.h
diff options
context:
space:
mode:
authoriamcheeseman <[email protected]>2026-05-24 16:57:33 -0400
committeriamcheeseman <[email protected]>2026-05-24 16:57:33 -0400
commit39a02a3bf2fe923d595e4f8df693a524c47291d5 (patch)
treee622bb68e3c40a38dfc48bd5bff5cba46e368292 /teensy/teensy_log.h
parent8a4b5ca6740fc5e4f7b219fb900db9ab8835cce4 (diff)
Make project C99 compliant (remove glad)
Diffstat (limited to 'teensy/teensy_log.h')
-rw-r--r--teensy/teensy_log.h27
1 files changed, 11 insertions, 16 deletions
diff --git a/teensy/teensy_log.h b/teensy/teensy_log.h
index 9c54d62..d1dc198 100644
--- a/teensy/teensy_log.h
+++ b/teensy/teensy_log.h
@@ -6,28 +6,23 @@
// Don't include common.h, because this should be included there
-#define ty_log_info(fmt, ...) \
- ty_log_msg(stdout, __FILE__, __LINE__, "info", fmt, ## __VA_ARGS__)
-#define ty_log_warn(fmt, ...) \
- ty_log_msg(stderr, __FILE__, __LINE__, "warn", fmt, ## __VA_ARGS__)
-#define ty_log_err(fmt, ...) \
- ty_log_msg(stderr, __FILE__, __LINE__, "error", fmt, ## __VA_ARGS__)
-#define ty_log_fatal(ec, fmt, ...) \
- (ty_log_msg(stderr, __FILE__, __LINE__, "fatal", fmt, ## __VA_ARGS__), \
+#define ty_log_info(...) \
+ ty_log_msg(stdout, __FILE__, __LINE__, "info", __VA_ARGS__)
+#define ty_log_warn(...) \
+ ty_log_msg(stderr, __FILE__, __LINE__, "warn", __VA_ARGS__)
+#define ty_log_err(...) \
+ ty_log_msg(stderr, __FILE__, __LINE__, "error", __VA_ARGS__)
+#define ty_log_fatal(ec, ...) \
+ (ty_log_msg(stderr, __FILE__, __LINE__, "fatal", __VA_ARGS__), \
exit(ec))
#if defined(TEENSY_DEBUG) || !defined(NDEBUG)
-#define ty_log_debug(fmt, ...) \
- ty_log_msg(stderr, __FILE__, __LINE__, "debug", fmt, ## __VA_ARGS__)
+#define ty_log_debug(...) \
+ ty_log_msg(stderr, __FILE__, __LINE__, "debug", __VA_ARGS__)
#else
-#define ty_log_debug(fmt, ...)
+#define ty_log_debug(...)
#endif // TEENSY_DEBUG
-#define ty_olog(fmt, ...) \
- _log_plain(stdout, fmt, ## __VA_ARGS__)
-#define ty_elog(fmt, ...) \
- _log_plain(stderr, fmt, ## __VA_ARGS__)
-
// To be passed as the exit code to log_fatal()
// General errors