diff options
Diffstat (limited to 'src/util.h')
| -rw-r--r-- | src/util.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h new file mode 100644 index 0000000..5fd680e --- /dev/null +++ b/src/util.h | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #ifndef _UTIL_H_ | ||
| 2 | #define _UTIL_H_ | ||
| 3 | #include <stdlib.h> | ||
| 4 | |||
| 5 | #define ERROR(...) \ | ||
| 6 | do { \ | ||
| 7 | fprintf(stderr, __VA_ARGS__); \ | ||
| 8 | exit(1); \ | ||
| 9 | } while (0) | ||
| 10 | |||
| 11 | #define LOG(...) \ | ||
| 12 | fprintf(stderr, __VA_ARGS__) | ||
| 13 | |||
| 14 | void* xmalloc(size_t size); | ||
| 15 | |||
| 16 | #endif // _UTIL_H_ | ||
