diff options
| author | ProsperousPotato <114923153+ProsperousPotato@users.noreply.github.com> | 2024-06-17 14:33:57 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-17 14:33:57 +0100 |
| commit | 4168d10179a738a3b19283749f9799004c054a93 (patch) | |
| tree | f08600176dd5fc57303d6e9137b0fce3708b8d19 /util.h | |
Add files via upload
Diffstat (limited to 'util.h')
| -rw-r--r-- | util.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -0,0 +1,9 @@ +/* See LICENSE file for copyright and license details. */ + +#define MAX(A, B) ((A) > (B) ? (A) : (B)) +#define MIN(A, B) ((A) < (B) ? (A) : (B)) +#define BETWEEN(X, A, B) ((A) <= (X) && (X) <= (B)) +#define LENGTH(X) (sizeof (X) / sizeof (X)[0]) + +void die(const char *fmt, ...); +void *ecalloc(size_t nmemb, size_t size); |
