diff options
author | ZviRackover <zvirack@gmail.com> | 2018-09-02 00:58:30 +0300 |
---|---|---|
committer | ZviRackover <zvirack@gmail.com> | 2018-09-09 10:45:50 +0300 |
commit | cbdbc4f63d68a6b17b9eea5c67130e37d3d0f278 (patch) | |
tree | 5d82993e830a807647ec81aad1d5a391e4490cb0 /src/nvim/spellfile.c | |
parent | 50eadfe2e991a0bb5fe0f98377d91702f0a20492 (diff) | |
download | rneovim-cbdbc4f63d68a6b17b9eea5c67130e37d3d0f278.tar.gz rneovim-cbdbc4f63d68a6b17b9eea5c67130e37d3d0f278.tar.bz2 rneovim-cbdbc4f63d68a6b17b9eea5c67130e37d3d0f278.zip |
Refactor: Remove occurences of mb_char2bytes
Diffstat (limited to 'src/nvim/spellfile.c')
-rw-r--r-- | src/nvim/spellfile.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/spellfile.c b/src/nvim/spellfile.c index 21a86c6946..d8538207af 100644 --- a/src/nvim/spellfile.c +++ b/src/nvim/spellfile.c @@ -1460,7 +1460,7 @@ static int read_compound(FILE *fd, slang_T *slang, int len) if (c == '?' || c == '+' || c == '~') *pp++ = '\\'; // "a?" becomes "a\?", "a+" becomes "a\+" if (enc_utf8) - pp += mb_char2bytes(c, pp); + pp += utf_char2bytes(c, pp); else *pp++ = c; } @@ -4246,7 +4246,7 @@ static int write_vim_spell(spellinfo_T *spin, char_u *fname) size_t l = 0; for (size_t i = 128; i < 256; ++i) { if (has_mbyte) - l += (size_t)mb_char2bytes(spelltab.st_fold[i], folchars + l); + l += (size_t)utf_char2bytes(spelltab.st_fold[i], folchars + l); else folchars[l++] = spelltab.st_fold[i]; } @@ -5710,9 +5710,9 @@ static void set_map_str(slang_T *lp, char_u *map) hashitem_T *hi; b = xmalloc(cl + headcl + 2); - mb_char2bytes(c, b); + utf_char2bytes(c, b); b[cl] = NUL; - mb_char2bytes(headc, b + cl + 1); + utf_char2bytes(headc, b + cl + 1); b[cl + 1 + headcl] = NUL; hash = hash_hash(b); hi = hash_lookup(&lp->sl_map_hash, (const char *)b, STRLEN(b), hash); |