From e578c50ffbd02f2f7b9116b6b9eb096bb1fcee60 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 18 Oct 2026 05:55:18 +0200 Subject: Misc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- common.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'common.h') diff --git a/common.h b/common.h index f54e8ed..943d4b8 100644 --- a/common.h +++ b/common.h @@ -9,6 +9,7 @@ #include #include #include +#include #if defined(__GNUC__) # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wdeprecated-declarations" @@ -27,15 +28,40 @@ #if defined(__GNUC__) # define PURE __attribute__((__pure__)) +# define CONST __attribute__((__const__)) #else # define PURE +# define CONST #endif #define COMMA , #include "char-table.h" +#include "filtered-combo.h" #include "logical-scroll-pane.h" + +#define MARK_BASE 0x20u /* 0x25CCu DOTTED CIRCLE || XXX make the a setting */ + +enum codepoint_class { + CP_OUT_OF_RANGE, + CP_CONTROL, + CP_SURROGATE, + CP_NONCHARACTER, + CP_RESERVED, /* includes not yet assigned */ + CP_COMBINING_MARK, + CP_REGULAR, +}; + + +/* characters.c */ +CONST int is_noncharacter(uint32_t cp); +CONST int is_surrogate(uint32_t cp); +CONST int is_valid_codepoint(uint32_t cp); +struct libcmap_codepoint_data *get_codepoint_data(uint32_t cp); +PURE enum codepoint_class classify_from_codepoint_data(const struct libcmap_codepoint_data *data); +enum codepoint_class classify_codepoint(uint32_t cp); + /* colour.c */ double srgb_encode_unsigned(double t); double srgb_decode_unsigned(double t); -- cgit v1.3.1