diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-01-17 14:17:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-17 21:17:40 +0800 |
commit | 0344bfad0fc87d2e256ea2b80de7abd069ba1dd2 (patch) | |
tree | e42d0318ed1e684bbb468661d8a1fbfe82e819ee /src/nvim/mbyte.c | |
parent | 99186508d9a1b7536441112f9bbe48690592b5d7 (diff) | |
download | rneovim-0344bfad0fc87d2e256ea2b80de7abd069ba1dd2.tar.gz rneovim-0344bfad0fc87d2e256ea2b80de7abd069ba1dd2.tar.bz2 rneovim-0344bfad0fc87d2e256ea2b80de7abd069ba1dd2.zip |
refactor: replace char_u with char 22 (#21786)
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/mbyte.c')
-rw-r--r-- | src/nvim/mbyte.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c index 93ac0fccfa..b5274b9695 100644 --- a/src/nvim/mbyte.c +++ b/src/nvim/mbyte.c @@ -699,23 +699,23 @@ static int utf_safe_read_char_adv(const char_u **s, size_t *n) // Get character at **pp and advance *pp to the next character. // Note: composing characters are skipped! -int mb_ptr2char_adv(const char_u **const pp) +int mb_ptr2char_adv(const char **const pp) { int c; - c = utf_ptr2char((char *)(*pp)); - *pp += utfc_ptr2len((char *)(*pp)); + c = utf_ptr2char(*pp); + *pp += utfc_ptr2len(*pp); return c; } // Get character at **pp and advance *pp to the next character. // Note: composing characters are returned as separate characters. -int mb_cptr2char_adv(const char_u **pp) +int mb_cptr2char_adv(const char **pp) { int c; - c = utf_ptr2char((char *)(*pp)); - *pp += utf_ptr2len((char *)(*pp)); + c = utf_ptr2char(*pp); + *pp += utf_ptr2len(*pp); return c; } @@ -2232,7 +2232,7 @@ char_u *enc_locale(void) const char *p = vim_strchr(s, '.'); if (p != NULL) { if (p > s + 2 && !STRNICMP(p + 1, "EUC", 3) - && !isalnum((int)p[4]) && p[4] != '-' && p[-3] == '_') { + && !isalnum((uint8_t)p[4]) && p[4] != '-' && p[-3] == '_') { // Copy "XY.EUC" to "euc-XY" to buf[10]. memmove(buf, "euc-", 4); buf[4] = (char)(ASCII_ISALNUM(p[-2]) ? TOLOWER_ASC(p[-2]) : 0); |