diff options
Diffstat (limited to 'src/util.h')
| -rw-r--r-- | src/util.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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, ...); |
