summaryrefslogtreecommitdiff
path: root/src/keysym-utf.c
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2012-07-17 10:20:15 +0100
committerDaniel Stone <daniel@fooishbar.org>2012-07-17 10:20:15 +0100
commit9308a460395679aa3cb403211146e4ff9b920992 (patch)
treea060f3f7882c8edf35312c2210d9837ac3a4c306 /src/keysym-utf.c
parentc6c937abc2e7e9aa9dc952dea392329b88ab1011 (diff)
downloadxorg-lib-libxkbcommon-9308a460395679aa3cb403211146e4ff9b920992.tar.gz
Run source tree through uncrustify
.uncrustify.cfg committed for future reference also, but had to manually fix up a few things: it really likes justifying struct initialisers. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'src/keysym-utf.c')
-rw-r--r--src/keysym-utf.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/keysym-utf.c b/src/keysym-utf.c
index cb8f304..99cbfcd 100644
--- a/src/keysym-utf.c
+++ b/src/keysym-utf.c
@@ -877,8 +877,6 @@ xkb_keysym_to_utf32(xkb_keysym_t keysym)
return 0;
}
-
-
/*
* Copyright © 2012 Intel Corporation
*
@@ -914,19 +912,24 @@ utf32_to_utf8(uint32_t unichar, char *buffer)
buffer[0] = unichar;
buffer[1] = '\0';
return 2;
- } else if (unichar <= 0x07FF) {
+ }
+ else if (unichar <= 0x07FF) {
length = 2;
head = 0xc0;
- } else if (unichar <= 0xffff) {
+ }
+ else if (unichar <= 0xffff) {
length = 3;
head = 0xe0;
- } else if (unichar <= 0x1fffff) {
+ }
+ else if (unichar <= 0x1fffff) {
length = 4;
head = 0xf0;
- } else if (unichar <= 0x3ffffff) {
+ }
+ else if (unichar <= 0x3ffffff) {
length = 5;
head = 0xf8;
- } else {
+ }
+ else {
length = 6;
head = 0xfc;
}