Commit: 45aa883cccfcc0ab48a1702716ffb2da1c17b5e6
Parent: 5009b1964583f469799b9dfbff30b42221f74e64
Author: Randy Palamar
Date: Tue, 13 Jan 2026 09:58:52 -0700
util.h: add missing macros
note to self: actually compile on master before pushing to master
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/util.h b/util.h
@@ -101,6 +101,9 @@
#define SIGN(x) ((x) < 0? -1 : 1)
#define swap(a, b) do {typeof(a) __tmp = (a); (a) = (b); (b) = __tmp;} while(0)
+#define Min(a, b) ((a) < (b) ? (a) : (b))
+#define Max(a, b) ((a) > (b) ? (a) : (b))
+
#define ISDIGIT(c) (BETWEEN((c), '0', '9'))
#define ISUPPER(c) (((c) & 0x20u) == 0)
#define TOLOWER(c) (((c) | 0x20u))