From d362e0d6f299eb1626ee316deaca0207b207f67c Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 21 Dec 2025 14:16:03 +0100 Subject: Add LIBCMAP_RANGE_SIZE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libcmap.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libcmap.h b/libcmap.h index 78c0a53..c02857b 100644 --- a/libcmap.h +++ b/libcmap.h @@ -17,6 +17,8 @@ #define LIBCMAP_ULTIMATE_CODEPOINT UINT32_C(0x10FFFF) #define LIBCMAP_UNIVERSE_RANGE {0, LIBCMAP_ULTIMATE_CODEPOINT} +#define LIBCMAP_RANGE_SIZE(RANGE) ((size_t)((RANGE)->last - (RANGE)->first + 1U)) + struct libcmap_range { uint32_t first; -- cgit v1.3.1