aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/message.c
diff options
context:
space:
mode:
authorZviRackover <zvirack@gmail.com>2018-06-29 22:31:20 +0300
committerZviRackover <zvirack@gmail.com>2018-08-06 20:48:07 +0300
commit10b6afd652a896144d87fb0db4389001293e7973 (patch)
treed77eedbc08dd9d8038c31bdcdfbcacc974157e61 /src/nvim/message.c
parent1593ee7cf21f77168531c959fa9e73933b502d2e (diff)
downloadrneovim-10b6afd652a896144d87fb0db4389001293e7973.tar.gz
rneovim-10b6afd652a896144d87fb0db4389001293e7973.tar.bz2
rneovim-10b6afd652a896144d87fb0db4389001293e7973.zip
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.
Diffstat (limited to 'src/nvim/message.c')
-rw-r--r--src/nvim/message.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c
index 46fc9115b4..d285086cc5 100644
--- a/src/nvim/message.c
+++ b/src/nvim/message.c
@@ -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);