From 576bd27e11ec70bdbd1b9a644d2e227b57586337 Mon Sep 17 00:00:00 2001 From: iamcheeseman Date: Sun, 10 May 2026 00:28:14 -0400 Subject: i ain't splitting alla this up --- teensy/teensy_log.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 teensy/teensy_log.c (limited to 'teensy/teensy_log.c') diff --git a/teensy/teensy_log.c b/teensy/teensy_log.c new file mode 100644 index 0000000..26672a4 --- /dev/null +++ b/teensy/teensy_log.c @@ -0,0 +1,33 @@ +#include "teensy_log.h" + +#include + +#include "teensy_common.h" + +void ty_log_msg( + FILE *file, + const char *src_name, + int src_line, + const char *type, + const char *fmt, + ... +) +{ + fprintf(file, "[%s] (%s:%d) ", type, src_name, src_line); + + va_list args; + va_start(args, fmt); + vfprintf(file, fmt, args); + va_end(args); + + putc('\n', file); +} + +void _ty_log_plain(FILE *file, const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vfprintf(file, fmt, args); + va_end(args); + putc('\n', file); +} -- cgit v1.3-2-g0d8e