summaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorJérémie Courrèges-Anglas <jca@wxcvbn.org>2017-09-17 19:32:29 +0200
committerJérémie Courrèges-Anglas <jca@wxcvbn.org>2017-09-17 19:46:06 +0200
commit218e68c7327c94bd90b2c5b708203be84413db18 (patch)
treef531af4e1dae664a09c319da61fed07920ab3c8d /src/util.h
parent9b7cfb7c8d8d337554ad7c5995ce75fac52c7d54 (diff)
downloadratpoison-218e68c7327c94bd90b2c5b708203be84413db18.zip
Move fatal() and x* helpers to their own file
Should help use them from within tests.
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
new file mode 100644
index 0000000..ff8f085
--- /dev/null
+++ b/src/util.h
@@ -0,0 +1,13 @@
+#ifndef UTIL_H
+#define UTIL_H
+
+void fatal (const char *msg);
+void *xmalloc (size_t size);
+void *xrealloc (void *ptr, size_t size);
+char *xstrdup (const char *s);
+char *xvsprintf (char *fmt, va_list ap);
+char *xsprintf (char *fmt, ...);
+char *strtok_ws (char *s);
+int str_comp (char *s1, char *s2, size_t len);
+
+#endif