summaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2007-05-18 23:48:55 +0200
committerDavid Härdeman <david@hardeman.nu>2007-05-18 23:48:55 +0200
commit3cb9d64b9b2ace1463f274c8554bffbfa4979e0d (patch)
tree79b570d8ed8ba30e619921d079ea8fd9b362f3fd /utils.c
parent3b9fa8b3619f0ef0ddd47efa6ab285682b686af1 (diff)
Split meta entry functions into a separate file
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/utils.c b/utils.c
index f7eb194..91cb1ed 100644
--- a/utils.c
+++ b/utils.c
@@ -3,9 +3,26 @@
#include <ctype.h>
#include <string.h>
#include <stdint.h>
+#include <stdarg.h>
#include "utils.h"
-#include "metastore.h"
+
+int verbosity = 0;
+
+int
+msg(int level, const char *fmt, ...)
+{
+ int ret;
+ va_list ap;
+
+ if (level > verbosity)
+ return 0;
+
+ va_start(ap, fmt);
+ ret = vfprintf(stderr, fmt, ap);
+ va_end(ap);
+ return ret;
+}
void *
xmalloc(size_t size)