aboutsummaryrefslogtreecommitdiffstats
path: root/src/util.c
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-05-08 05:31:43 -0400
committerJesse Luehrs <doy@tozt.net>2014-05-08 05:31:43 -0400
commit1638a5e8a90f0f0a6d46cdf3ff9f2393c45c248a (patch)
tree880e1fed8f48ccfd5fdb383e0990355e0b755fd0 /src/util.c
parent26e1ede47e62fe80c8b899847e5205cd60f130a9 (diff)
downloadrunes-1638a5e8a90f0f0a6d46cdf3ff9f2393c45c248a.tar.gz
runes-1638a5e8a90f0f0a6d46cdf3ff9f2393c45c248a.zip
abstract out error logging a bit
just spitting things to stderr isn't always going to be good enough, so let's at least provide one place to change that when necessary
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
new file mode 100644
index 0000000..d87fd72
--- /dev/null
+++ b/src/util.c
@@ -0,0 +1,13 @@
+#include <stdarg.h>
+#include <stdio.h>
+
+#include "runes.h"
+
+void runes_warn(const char *fmt, ...)
+{
+ va_list ap;
+ va_start(ap, fmt);
+ /* XXX make this do something else on windows */
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+}