refactor: replace char_u with char

Work on https://github.com/neovim/neovim/issues/459
This commit is contained in:
Dundar Göc
2022-08-26 23:11:25 +02:00
committed by dundargoc
parent 0903702634
commit fb1edb2f57
57 changed files with 511 additions and 508 deletions

View File

@@ -470,7 +470,7 @@ static int fmt_check_par(linenr_T lnum, int *leader_len, char_u **leader_flags,
char_u *flags = NULL; // init for GCC
char_u *ptr;
ptr = ml_get(lnum);
ptr = (char_u *)ml_get(lnum);
if (do_comments) {
*leader_len = get_leader_len((char *)ptr, (char **)leader_flags, false, true);
} else {
@@ -493,7 +493,7 @@ static int fmt_check_par(linenr_T lnum, int *leader_len, char_u **leader_flags,
/// @return true if line "lnum" ends in a white character.
static bool ends_in_white(linenr_T lnum)
{
char_u *s = ml_get(lnum);
char_u *s = (char_u *)ml_get(lnum);
size_t l;
if (*s == NUL) {
@@ -552,9 +552,9 @@ static bool same_leader(linenr_T lnum, int leader1_len, char_u *leader1_flags, i
// Get current line and next line, compare the leaders.
// The first line has to be saved, only one line can be locked at a time.
line1 = vim_strsave(ml_get(lnum));
line1 = vim_strsave((char_u *)ml_get(lnum));
for (idx1 = 0; ascii_iswhite(line1[idx1]); idx1++) {}
line2 = ml_get(lnum + 1);
line2 = (char_u *)ml_get(lnum + 1);
for (idx2 = 0; idx2 < leader2_len; idx2++) {
if (!ascii_iswhite(line2[idx2])) {
if (line1[idx1++] != line2[idx2]) {
@@ -586,7 +586,7 @@ static bool paragraph_start(linenr_T lnum)
if (lnum <= 1) {
return true; // start of the file
}
p = ml_get(lnum - 1);
p = (char_u *)ml_get(lnum - 1);
if (*p == NUL) {
return true; // after empty line
}