diff options
author | 2019-01-17 08:13:19 -0500 | |
---|---|---|
committer | 2019-01-17 08:13:19 -0500 | |
commit | 5a0c4234b8f0ef5ad3d17430e876e29242b934e2 (patch) | |
tree | 0d9dd8ed027d59853870bb205997243f73a626c7 /include/unicode.h | |
parent | Merge pull request #3448 from emersion/swaybg-xdg-output (diff) | |
parent | Remove unicode.c (diff) | |
download | sway-5a0c4234b8f0ef5ad3d17430e876e29242b934e2.tar.gz sway-5a0c4234b8f0ef5ad3d17430e876e29242b934e2.tar.zst sway-5a0c4234b8f0ef5ad3d17430e876e29242b934e2.zip |
Merge pull request #3447 from emersion/remove-swaylock-includes
Remove swaylock headers and unicode.c
Diffstat (limited to 'include/unicode.h')
-rw-r--r-- | include/unicode.h | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/include/unicode.h b/include/unicode.h deleted file mode 100644 index e2ee9588..00000000 --- a/include/unicode.h +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | #ifndef _SWAY_UNICODE_H | ||
2 | #define _SWAY_UNICODE_H | ||
3 | #include <stddef.h> | ||
4 | #include <stdint.h> | ||
5 | |||
6 | // Technically UTF-8 supports up to 6 byte codepoints, but Unicode itself | ||
7 | // doesn't really bother with more than 4. | ||
8 | #define UTF8_MAX_SIZE 4 | ||
9 | |||
10 | #define UTF8_INVALID 0x80 | ||
11 | |||
12 | /** | ||
13 | * Grabs the next UTF-8 character and advances the string pointer | ||
14 | */ | ||
15 | uint32_t utf8_decode(const char **str); | ||
16 | |||
17 | /** | ||
18 | * Encodes a character as UTF-8 and returns the length of that character. | ||
19 | */ | ||
20 | size_t utf8_encode(char *str, uint32_t ch); | ||
21 | |||
22 | /** | ||
23 | * Returns the size of the next UTF-8 character | ||
24 | */ | ||
25 | int utf8_size(const char *str); | ||
26 | |||
27 | /** | ||
28 | * Returns the size of a UTF-8 character | ||
29 | */ | ||
30 | size_t utf8_chsize(uint32_t ch); | ||
31 | |||
32 | #endif | ||
33 | |||