From 095193a9905caff27509a299d895d399d42c06aa Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 21 Dec 2025 14:08:57 +0100 Subject: Fix truncation issue in libcmap_sprintf_range, and add LIBCMAP_ULTIMATE_CODEPOINT and LIBCMAP_UNIVERSE_RANGE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- common.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 common.h (limited to 'common.h') diff --git a/common.h b/common.h new file mode 100644 index 0000000..c5fc285 --- /dev/null +++ b/common.h @@ -0,0 +1,15 @@ +/* See LICENSE file for copyright and license details. */ +#include "libcmap.h" +#include +#include + + +#define SINGLETON_RANGE_FMT "U+%04lX" +#define SINGLETON_RANGE_ARGS(RANGE)\ + (unsigned long int)((RANGE)->first) + +#define RANGE_FMT "U+%04lX%sU+%04lX" +#define RANGE_ARGS(RANGE, ENDASH)\ + (unsigned long int)((RANGE)->first),\ + ((ENDASH) ? (ENDASH) : "–"),\ + (unsigned long int)((RANGE)->last) -- cgit v1.3.1