From 0be32393e54bed6bbf5890edba72b8808d276289 Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Mon, 21 Jul 2025 17:06:53 +0200 Subject: format --- types.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'types.h') diff --git a/types.h b/types.h index 584da21..1c84c74 100644 --- a/types.h +++ b/types.h @@ -4,3 +4,7 @@ typedef ptrdiff_t size; typedef char byte; typedef uintptr_t uptr; + +#define sizeof(x) (size)sizeof(x) +#define countof(a) (sizeof(a) / sizeof(*(a))) +#define lengthof(s) (countof(s) - 1) -- cgit v1.3