aboutsummaryrefslogtreecommitdiff
path: root/vendor/librune/lib/mbstring/u8chkr.c
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-02-13 13:02:28 +0100
committerThomas Voss <mail@thomasvoss.com> 2024-02-13 13:11:47 +0100
commit79e6af86ca526d5fb56af6f6ca3da713e3a5e9f9 (patch)
tree752f1c26d1f122dcf58374ac78db109c9578be45 /vendor/librune/lib/mbstring/u8chkr.c
Genesis commit
Diffstat (limited to 'vendor/librune/lib/mbstring/u8chkr.c')
-rw-r--r--vendor/librune/lib/mbstring/u8chkr.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/vendor/librune/lib/mbstring/u8chkr.c b/vendor/librune/lib/mbstring/u8chkr.c
new file mode 100644
index 0000000..2457dda
--- /dev/null
+++ b/vendor/librune/lib/mbstring/u8chkr.c
@@ -0,0 +1,9 @@
+#include "mbstring.h"
+#include "rune.h"
+
+bool
+u8chkr(rune ch)
+{
+ return !((ch >= 0xD800 && ch <= 0xDFFF) || ch == 0xFFFE || ch == 0xFFFF
+ || ch > RUNE_MAX);
+}