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:
ZviRackover
2018-06-29 22:31:20 +03:00
parent 1593ee7cf2
commit 10b6afd652
24 changed files with 89 additions and 90 deletions

View File

@@ -3620,9 +3620,9 @@ int do_join(size_t count,
curr = skipwhite(curr);
if (*curr != ')' && currsize != 0 && endcurr1 != TAB
&& (!has_format_option(FO_MBYTE_JOIN)
|| (mb_ptr2char(curr) < 0x100 && endcurr1 < 0x100))
|| (utf_ptr2char(curr) < 0x100 && endcurr1 < 0x100))
&& (!has_format_option(FO_MBYTE_JOIN2)
|| mb_ptr2char(curr) < 0x100 || endcurr1 < 0x100)
|| utf_ptr2char(curr) < 0x100 || endcurr1 < 0x100)
) {
/* don't add a space if the line is ending in a space */
if (endcurr1 == ' ')
@@ -3642,10 +3642,10 @@ int do_join(size_t count,
if (has_mbyte) {
cend = curr + currsize;
MB_PTR_BACK(curr, cend);
endcurr1 = (*mb_ptr2char)(cend);
endcurr1 = utf_ptr2char(cend);
if (cend > curr) {
MB_PTR_BACK(curr, cend);
endcurr2 = (*mb_ptr2char)(cend);
endcurr2 = utf_ptr2char(cend);
}
} else {
endcurr1 = *(curr + currsize - 1);