diff options
| author | Mattias Andrée <m@maandree.se> | 2026-10-18 05:55:18 +0200 |
|---|---|---|
| committer | Mattias Andrée <m@maandree.se> | 2026-10-18 05:55:18 +0200 |
| commit | e578c50ffbd02f2f7b9116b6b9eb096bb1fcee60 (patch) | |
| tree | a70534fc3c758dd23c494a086e2af46a7d0e602d /common.h | |
| parent | Misc (diff) | |
| download | gcmap-e578c50ffbd02f2f7b9116b6b9eb096bb1fcee60.tar.gz gcmap-e578c50ffbd02f2f7b9116b6b9eb096bb1fcee60.tar.bz2 gcmap-e578c50ffbd02f2f7b9116b6b9eb096bb1fcee60.tar.xz | |
Misc
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
| -rw-r--r-- | common.h | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -9,6 +9,7 @@ #include <libsimple.h> #include <libsimple-arg.h> #include <libcmap.h> +#include <grapheme.h> #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); |
