summaryrefslogtreecommitdiff
path: root/src/utf8.c
diff options
context:
space:
mode:
authorJérémie Courrèges-Anglas <jca@wxcvbn.org>2017-09-17 22:42:47 +0200
committerJérémie Courrèges-Anglas <jca@wxcvbn.org>2017-09-17 22:42:47 +0200
commitc4d3035a80fe8d2c5b3b9791fce2d26fbb147624 (patch)
treefaee087cb04cd1be0cfa0d25b559938add683e24 /src/utf8.c
parentec10077b9f943212a9c0c634d79ada4f88b0d0c1 (diff)
downloadratpoison-c4d3035a80fe8d2c5b3b9791fce2d26fbb147624.zip
Turn utf8 macros into functions with less ugly names
Diffstat (limited to 'src/utf8.c')
-rw-r--r--src/utf8.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/utf8.c b/src/utf8.c
index 33b62e7..4880a1a 100644
--- a/src/utf8.c
+++ b/src/utf8.c
@@ -33,3 +33,21 @@ utf8_check_locale(void)
#endif
return utf8_locale;
}
+
+int
+isu8char(char c)
+{
+ return utf8_locale && (c) & 0xC0;
+}
+
+int
+isu8start(char c)
+{
+ return utf8_locale && ((c) & 0xC0) == 0xC0;
+}
+
+int
+isu8cont(char c)
+{
+ return utf8_locale && ((c) & 0xC0) == 0x80;
+}