commit 3a9fc50

seiko  ·  2026-06-02 15:20:38 +0000 UTC
parent e8951cc
Implement logging
1 files changed,  +15, -0
+15, -0
 1@@ -0,0 +1,15 @@
 2+#include <stdarg.h>
 3+#include <stdio.h>
 4+
 5+#include "mauswin.h"
 6+
 7+/* log message to output `fd` */
 8+void maus_log(FILE* fd, const char* fmt, ...)
 9+{
10+	va_list ap;
11+	va_start(ap, fmt);
12+	vfprintf(fd, fmt, ap);
13+	fflush(stderr);
14+	va_end(ap);
15+}
16+