summaryrefslogtreecommitdiffstats
path: root/src/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index 2f0c8ca..c45d03e 100644
--- a/src/util.h
+++ b/src/util.h
@@ -9,6 +9,8 @@
#define PANIC(...) panic(__FILE__, __LINE__, "" __VA_ARGS__)
#define ASSERT(x) assert((x), __FILE__, __LINE__, #x)
+#define OOM_CHECK(x) assert((x) != NULL, __FILE__, __LINE__, "Out of Memory!")
+#define ERROR(...) error("" __VA_ARGS__)
#define LINK(p) (&(p)->link)
#define UPCAST(iter, type) LINK_UPCAST(iter, type, link)
@@ -17,6 +19,7 @@ int strnwidth(const char *s, int n);
void panic(const char *file, int line, const char *msg, ...);
void assert(int cond, const char *file, int line, const char *condstr);
+void error(const char *fmtstr, ...);
char *aprintf(const char *fmtstr, ...);
wchar_t *awprintf(const wchar_t *fmtstr, ...);