blob: 9ed7cd964694e5897f18d6ca80bd329efebd14aa [file] [log] [blame]
#ifndef UTIL_H
#define UTIL_H
void error_exit(char *fmt, ...);
#define ERROR_EXIT(fmt, x...) \
do { \
error_exit(fmt, ## x); \
} while (0)
#define ERROR_EXIT_ON(check, fmt, x...) \
do { \
if (check) \
error_exit(fmt, ## x); \
} while (0)
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(*(x)))
#endif