summaryrefslogtreecommitdiff
path: root/logs.c
diff options
context:
space:
mode:
Diffstat (limited to 'logs.c')
-rw-r--r--logs.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/logs.c b/logs.c
new file mode 100644
index 0000000..01d93fc
--- /dev/null
+++ b/logs.c
@@ -0,0 +1,18 @@
+#include <stdarg.h>
+#include <stdio.h>
+
+void _log(const char *fmt, ...)
+{
+#ifdef LOGS
+ va_list ap;
+
+ va_start(ap, fmt);
+
+ vfprintf(stderr, fmt, ap);
+ fputc('\n', stderr);
+
+ va_end(ap);
+#else
+ (void) fmt;
+#endif
+}