utf8.[ch]: use char32_t and char16_t instead of int, int32_t, int16_t

rework C11 utf8.[ch] to use char32_t instead of uint32_t when referring
to unicode chars, to make things more expressive.
This commit is contained in:
Shawn Landden
2015-10-31 21:00:57 -07:00
parent 534e8f89d6
commit 025b4c4105
7 changed files with 37 additions and 36 deletions
+2 -2
View File
@@ -413,7 +413,7 @@ char *ellipsize_mem(const char *s, size_t old_length, size_t new_length, unsigne
k = 0;
for (i = s; k < x && i < s + old_length; i = utf8_next_char(i)) {
int c;
char32_t c;
c = utf8_encoded_to_unichar(i);
if (c < 0)
@@ -425,7 +425,7 @@ char *ellipsize_mem(const char *s, size_t old_length, size_t new_length, unsigne
x ++;
for (j = s + old_length; k < new_length && j > i; ) {
int c;
char32_t c;
j = utf8_prev_char(j);
c = utf8_encoded_to_unichar(j);