refactor: replace char_u with char

Work on https://github.com/neovim/neovim/issues/459
This commit is contained in:
dundargoc
2022-11-26 18:57:46 +01:00
committed by zeertzjq
parent 53adccb6e0
commit 08c2c74806
21 changed files with 135 additions and 136 deletions

View File

@@ -324,7 +324,7 @@ static bool do_incsearch_highlighting(int firstc, int *search_delim, incsearch_s
}
p = skipwhite(p);
delim = (delim_optional && vim_isIDc(*p)) ? ' ' : *p++;
delim = (delim_optional && vim_isIDc((uint8_t)(*p))) ? ' ' : *p++;
*search_delim = delim;
end = skip_regexp_ex(p, delim, magic_isset(), NULL, NULL, &magic);
@@ -1462,7 +1462,7 @@ static int command_line_erase_chars(CommandLineState *s)
if (s->c == K_DEL) {
ccline.cmdpos += mb_off_next((char_u *)ccline.cmdbuff,
(char_u *)ccline.cmdbuff + ccline.cmdpos);
ccline.cmdbuff + ccline.cmdpos);
}
if (ccline.cmdpos > 0) {
@@ -3232,7 +3232,7 @@ static void draw_cmdline(int start, int len)
for (int i = start; i < start + len; i += mb_l) {
char_u *p = (char_u *)ccline.cmdbuff + i;
int u8cc[MAX_MCO];
int u8c = utfc_ptr2char_len(p, u8cc, start + len - i);
int u8c = utfc_ptr2char_len((char *)p, u8cc, start + len - i);
mb_l = utfc_ptr2len_len((char *)p, start + len - i);
if (ARABIC_CHAR(u8c)) {
do_arabicshape = true;
@@ -3268,7 +3268,7 @@ static void draw_cmdline(int start, int len)
for (int i = start; i < start + len; i += mb_l) {
char_u *p = (char_u *)ccline.cmdbuff + i;
int u8cc[MAX_MCO];
int u8c = utfc_ptr2char_len(p, u8cc, start + len - i);
int u8c = utfc_ptr2char_len((char *)p, u8cc, start + len - i);
mb_l = utfc_ptr2len_len((char *)p, start + len - i);
if (ARABIC_CHAR(u8c)) {
int pc;
@@ -3292,7 +3292,7 @@ static void draw_cmdline(int start, int len)
} else {
int pcc[MAX_MCO];
pc = utfc_ptr2char_len(p + mb_l, pcc, start + len - i - mb_l);
pc = utfc_ptr2char_len((char *)p + mb_l, pcc, start + len - i - mb_l);
pc1 = pcc[0];
}
nc = prev_c;
@@ -3956,7 +3956,7 @@ char *vim_strsave_fnameescape(const char *const fname, const int what)
// ":buffer" command.
for (const char *p = what == VSE_BUFFER ? BUFFER_ESC_CHARS : PATH_ESC_CHARS;
*p != NUL; p++) {
if ((*p != '[' && *p != '{' && *p != '!') || !vim_isfilec(*p)) {
if ((*p != '[' && *p != '{' && *p != '!') || !vim_isfilec((uint8_t)(*p))) {
buf[j++] = *p;
}
}