dwm/util.h

20 lines
439 B
C
Raw Normal View History

2023-05-25 15:25:50 +02:00
/* See LICENSE file for copyright and license details. */
2023-12-11 19:16:33 +01:00
#ifndef MAX
2023-05-25 15:25:50 +02:00
#define MAX(A, B) ((A) > (B) ? (A) : (B))
2023-12-11 19:16:33 +01:00
#endif
#ifndef MIN
2023-05-25 15:25:50 +02:00
#define MIN(A, B) ((A) < (B) ? (A) : (B))
2023-12-11 19:16:33 +01:00
#endif
2023-05-25 15:25:50 +02:00
#define BETWEEN(X, A, B) ((A) <= (X) && (X) <= (B))
2023-12-11 19:16:33 +01:00
#ifdef _DEBUG
#define DEBUG(...) fprintf(stderr, __VA_ARGS__)
#else
#define DEBUG(...)
#endif
2023-05-25 15:25:50 +02:00
void die(const char *fmt, ...);
void *ecalloc(size_t nmemb, size_t size);
2023-12-11 19:16:33 +01:00