1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#ifndef _UTIL_H_ #define _UTIL_H_ #include <stdlib.h> #define ERROR(...) \ do { \ fprintf(stderr, __VA_ARGS__); \ exit(1); \ } while (0) #define LOG(...) \ fprintf(stderr, __VA_ARGS__) void* xmalloc(size_t size); #endif // _UTIL_H_