dwm/util.h

20 lines
439 B
C
Raw Normal View History

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