dwm-flexipatch/util.h

20 lines
439 B
C
Raw Normal View History

2019-09-04 22:16:39 +00:00
/* See LICENSE file for copyright and license details. */
#ifndef MAX
2019-09-04 22:16:39 +00:00
#define MAX(A, B) ((A) > (B) ? (A) : (B))
#endif
#ifndef MIN
2019-09-04 22:16:39 +00:00
#define MIN(A, B) ((A) < (B) ? (A) : (B))
#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);