summaryrefslogtreecommitdiffhomepage
path: root/src/utf8code.c
diff options
context:
space:
mode:
authorTyge Lovset <[email protected]>2023-02-01 08:38:45 +0100
committerTyge Lovset <[email protected]>2023-02-01 08:38:45 +0100
commit6ce6ef3307e52db5813d3c8d6a2cba52df06daf8 (patch)
tree25af4be9fcd5e72778715b83ff312e157ca63b59 /src/utf8code.c
parentb677a0c3950b8294ba6458e682a885351273ac08 (diff)
downloadSTC-modified-6ce6ef3307e52db5813d3c8d6a2cba52df06daf8.tar.gz
STC-modified-6ce6ef3307e52db5813d3c8d6a2cba52df06daf8.zip
Massive update from unsigned sizes and indices to signed.
Diffstat (limited to 'src/utf8code.c')
-rw-r--r--src/utf8code.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utf8code.c b/src/utf8code.c
index 351ddab5..a892f5fd 100644
--- a/src/utf8code.c
+++ b/src/utf8code.c
@@ -20,7 +20,7 @@ const uint8_t utf8_dtab[] = {
12,36,12,12,12,12,12,12,12,12,12,12,
};
-unsigned utf8_encode(char *out, uint32_t c)
+int utf8_encode(char *out, uint32_t c)
{
if (c < 0x80U) {
out[0] = (char) c;
@@ -143,7 +143,7 @@ bool utf8_isalpha(uint32_t c) {
static int16_t groups[] = {U8G_Latin, U8G_Nl, U8G_Greek, U8G_Cyrillic,
U8G_Han, U8G_Devanagari, U8G_Arabic};
if (c < 128) return isalpha((int)c) != 0;
- for (unsigned j=0; j < c_ARRAYLEN(groups); ++j)
+ for (int j=0; j < c_ARRAYLEN(groups); ++j)
if (utf8_isgroup(groups[j], c))
return true;
return false;