From 425ef692da7e74112f88f0b368f3286dba84f846 Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Thu, 18 Jun 2020 19:45:40 -0700 Subject: feat: working parser for rc shell language --- include/u.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/u.h') diff --git a/include/u.h b/include/u.h index 617e41b..3cf3c7b 100644 --- a/include/u.h +++ b/include/u.h @@ -59,5 +59,6 @@ typedef int error; #define arrlen(Array) (sizeof(Array) / sizeof((Array)[0])) #define arrend(Array) ((Array) + arrlen(Array)) -#define MAX(x, y) ((x) >= (y) ? (x) : (y)) -#define MIN(x, y) ((x) < (y) ? (x) : (y)) +#define MAX(x, y) (((x) > (y)) ? (x) : (y)) +#define MIN(x, y) (((x) < (y)) ? (x) : (y)) +#define CLAMP(x, lo, hi) (((x) < (lo)) ? (lo) : (((x) > (hi)) ? (hi) : (x))) -- cgit v1.2.1