[refactor] validate_dyn, pledge, N & n options
[splanner.git] / util.h
blob6fea04946812438148662501268637718807749a
1 /* See LICENSE file for copyright and license details. */
3 #define MAX(A, B) ((A) > (B) ? (A) : (B))
4 #define MIN(A, B) ((A) < (B) ? (A) : (B))
5 #define LEN(A) (sizeof(A)/sizeof(A[0]))
6 #define BETWEEN(X, A, B) ((A) <= (X) && (X) <= (B))
7 #define FAIL_IF(EXP, MSG) {if(EXP){fprintf(stderr, "[\033[31mFAILED %d\033[0m] %s\n", __LINE__, MSG);exit(EXIT_FAILURE);}}
9 void *ecalloc(size_t, size_t);
10 void die(const char *fmt, ...);