From 421300c27123ca647772dc6d9bd0cabf7f5f9c99 Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Wed, 23 Jul 2025 19:39:13 +0200 Subject: refactor: src & pragma once --- include/types.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 include/types.h (limited to 'include/types.h') diff --git a/include/types.h b/include/types.h new file mode 100644 index 0000000..bacedf8 --- /dev/null +++ b/include/types.h @@ -0,0 +1,14 @@ +#include +#include +#include + +typedef ptrdiff_t size; +typedef char byte; +typedef uintptr_t uptr; +typedef int32_t i32; +typedef uint64_t u64; +typedef float f32; + +#define sizeof(x) (size)sizeof(x) +#define countof(a) (sizeof(a) / sizeof(*(a))) +#define lengthof(s) (countof(s) - 1) -- cgit v1.3