diff options
| author | Jude Melton-Houghton <jwmhjwmh@gmail.com> | 2022-11-30 10:43:12 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-30 10:43:12 -0500 |
| commit | 055fc69c1115a2f5b3edc50d42261aacbf2cbc4b (patch) | |
| tree | 570f544f5b789f3509366791333d66d2a8f9b603 /src/util | |
| parent | 3ff8adf59997ac4607ebd4e27d598f1746beb650 (diff) | |
| download | minetest-055fc69c1115a2f5b3edc50d42261aacbf2cbc4b.tar.xz | |
Handle num lock in chat (#12984)
Diffstat (limited to 'src/util')
| -rw-r--r-- | src/util/string.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/util/string.h b/src/util/string.h index 4c7a4068d..2f3c2615b 100644 --- a/src/util/string.h +++ b/src/util/string.h @@ -41,6 +41,15 @@ class Translations; (((unsigned int)(x) >= 0x20) && \ ( (unsigned int)(x) <= 0x7e)) +// Checks whether a value is in a Unicode private use area +#define IS_PRIVATE_USE_CHAR(x) \ + (((wchar_t)(x) >= 0xE000 && \ + (wchar_t)(x) <= 0xF8FF) || \ + ((wchar_t)(x) >= 0xF0000 && \ + (wchar_t)(x) <= 0xFFFFD) || \ + ((wchar_t)(x) >= 0x100000 && \ + (wchar_t)(x) <= 0x10FFFD)) \ + // Checks whether a byte is an inner byte for an utf-8 multibyte sequence #define IS_UTF8_MULTB_INNER(x) \ (((unsigned char)(x) >= 0x80) && \ |
