mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 01:08:20 +00:00
Remove all occurences of the mb_ptr2char macro
First step towards implemening issue #7401. The same can be done for all deprecated mb_ functions in follow-up patches.
This commit is contained in:
@@ -1219,7 +1219,7 @@ int msg_outtrans_len_attr(char_u *msgstr, int len, int attr)
|
||||
// Don't include composing chars after the end.
|
||||
mb_l = utfc_ptr2len_len((char_u *)str, len + 1);
|
||||
if (mb_l > 1) {
|
||||
c = (*mb_ptr2char)((char_u *)str);
|
||||
c = utf_ptr2char((char_u *)str);
|
||||
if (vim_isprintc(c)) {
|
||||
// Printable multi-byte char: count the cells.
|
||||
retval += (*mb_ptr2cells)((char_u *)str);
|
||||
@@ -1480,7 +1480,7 @@ void msg_prt_line(char_u *s, int list)
|
||||
col += (*mb_ptr2cells)(s);
|
||||
char buf[MB_MAXBYTES + 1];
|
||||
if (lcs_nbsp != NUL && list
|
||||
&& (mb_ptr2char(s) == 160 || mb_ptr2char(s) == 0x202f)) {
|
||||
&& (utf_ptr2char(s) == 160 || utf_ptr2char(s) == 0x202f)) {
|
||||
mb_char2bytes(lcs_nbsp, (char_u *)buf);
|
||||
buf[(*mb_ptr2len)((char_u *)buf)] = NUL;
|
||||
} else {
|
||||
@@ -2868,7 +2868,7 @@ do_dialog (
|
||||
retval = 1;
|
||||
for (i = 0; hotkeys[i]; ++i) {
|
||||
if (has_mbyte) {
|
||||
if ((*mb_ptr2char)(hotkeys + i) == c)
|
||||
if (utf_ptr2char(hotkeys + i) == c)
|
||||
break;
|
||||
i += (*mb_ptr2len)(hotkeys + i) - 1;
|
||||
} else if (hotkeys[i] == c)
|
||||
@@ -2910,7 +2910,7 @@ copy_char (
|
||||
|
||||
if (has_mbyte) {
|
||||
if (lowercase) {
|
||||
c = mb_tolower((*mb_ptr2char)(from));
|
||||
c = mb_tolower(utf_ptr2char(from));
|
||||
return (*mb_char2bytes)(c, to);
|
||||
} else {
|
||||
len = (*mb_ptr2len)(from);
|
||||
|
Reference in New Issue
Block a user