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 b9f45f4..248b442 100644
--- a/src/util.h
+++ b/src/util.h
@@ -6,9 +6,12 @@
#define MIN(a, b) ((a) > (b) ? (b) : (a))
#define ARRLEN(x) (sizeof(x)/sizeof((x)[0]))
+#define PANIC(...) panic("" __VA_ARGS__, __FILE__, __LINE__)
#define ASSERT(x) assert((x), __FILE__, __LINE__, #x)
int strnwidth(const char *s, int n);
+
+void panic(const char *msg, const char *file, int line);
void assert(int cond, const char *file, int line, const char *condstr);
char *aprintf(const char *fmtstr, ...);