aboutsummaryrefslogtreecommitdiffstats
path: root/src/util.h
blob: 5fd680e0736f609d805f1671841d44ae1cdb684c (plain) (blame)
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_