2019-09-04 22:16:39 +00:00
|
|
|
/* See LICENSE file for copyright and license details. */
|
|
|
|
|
2020-06-11 17:42:00 +00:00
|
|
|
#ifndef MAX
|
2019-09-04 22:16:39 +00:00
|
|
|
#define MAX(A, B) ((A) > (B) ? (A) : (B))
|
2020-06-11 17:42:00 +00:00
|
|
|
#endif
|
|
|
|
#ifndef MIN
|
2019-09-04 22:16:39 +00:00
|
|
|
#define MIN(A, B) ((A) < (B) ? (A) : (B))
|
2020-06-11 17:42:00 +00:00
|
|
|
#endif
|
2019-09-04 22:16:39 +00:00
|
|
|
#define BETWEEN(X, A, B) ((A) <= (X) && (X) <= (B))
|
|
|
|
|
2020-09-07 15:48:58 +00:00
|
|
|
#ifdef _DEBUG
|
|
|
|
#define DEBUG(...) fprintf(stderr, __VA_ARGS__)
|
|
|
|
#else
|
|
|
|
#define DEBUG(...)
|
|
|
|
#endif
|
|
|
|
|
2019-09-04 22:16:39 +00:00
|
|
|
void die(const char *fmt, ...);
|
|
|
|
void *ecalloc(size_t nmemb, size_t size);
|
2021-06-14 05:16:17 +00:00
|
|
|
|