summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/unicode-extra.c11
-rw-r--r--src/unicode-extra.h4
2 files changed, 8 insertions, 7 deletions
diff --git a/src/unicode-extra.c b/src/unicode-extra.c
index 3a59378..b226e30 100644
--- a/src/unicode-extra.c
+++ b/src/unicode-extra.c
@@ -1,4 +1,5 @@
#include <glib.h>
+#include <stdint.h>
#include "vt100.h"
@@ -23,8 +24,8 @@
* http://www.unicode.org/Public/emoji/2.0//emoji-data.txt.
*/
struct vt100_char_range {
- gunichar start;
- gunichar end;
+ uint32_t start;
+ uint32_t end;
};
static struct vt100_char_range vt100_wide_emoji[] = {
@@ -64,14 +65,14 @@ static struct vt100_char_range vt100_wide_emoji[] = {
{ 0x1F9C0, 0x1F9C0 },
};
-static int vt100_is_wide_emoji(gunichar codepoint);
+static int vt100_is_wide_emoji(uint32_t codepoint);
-int vt100_is_wide_char(gunichar codepoint)
+int vt100_is_wide_char(uint32_t codepoint)
{
return g_unichar_iswide(codepoint) || vt100_is_wide_emoji(codepoint);
}
-static int vt100_is_wide_emoji(gunichar codepoint)
+static int vt100_is_wide_emoji(uint32_t codepoint)
{
static size_t ranges = sizeof(vt100_wide_emoji) / sizeof(struct vt100_char_range);
ssize_t low = 0, high = ranges - 1;
diff --git a/src/unicode-extra.h b/src/unicode-extra.h
index eaa3dce..3f749e8 100644
--- a/src/unicode-extra.h
+++ b/src/unicode-extra.h
@@ -1,8 +1,8 @@
#ifndef _VT100_UNICODE_EXTRA_H
#define _VT100_UNICODE_EXTRA_H
-#include <glib.h>
+#include <stdint.h>
-int vt100_is_wide_char(gunichar codepoint);
+int vt100_is_wide_char(uint32_t codepoint);
#endif