Refactor: remove mb_ptr2len_len, mb_ptr2cells and mb_ptr2cells_len

Remove occurences of these macros.
This commit is contained in:
ZviRackover
2018-08-29 21:15:32 +03:00
parent e30ccd56d9
commit 1c03a06487
10 changed files with 22 additions and 25 deletions

View File

@@ -550,7 +550,7 @@ size_t mb_string2cells(const char_u *str)
size_t clen = 0;
for (const char_u *p = str; *p != NUL; p += (*mb_ptr2len)(p)) {
clen += (*mb_ptr2cells)(p);
clen += utf_ptr2cells(p);
}
return clen;
@@ -2124,7 +2124,7 @@ static char_u *iconv_string(const vimconv_T *const vcp, char_u *str,
* conversion from 'encoding' to something else. In other
* situations we don't know what to skip anyway. */
*to++ = '?';
if ((*mb_ptr2cells)((char_u *)from) > 1)
if (utf_ptr2cells((char_u *)from) > 1)
*to++ = '?';
l = utfc_ptr2len_len((const char_u *)from, (int)fromlen);
from += l;