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 6e8ed5abaa
commit 40f3f75867
33 changed files with 513 additions and 512 deletions

View File

@@ -1463,12 +1463,12 @@ static void ins_compl_files(int count, char **files, int thesaurus, int flags, r
// Read dictionary file line by line.
// Check each line for a match.
while (!got_int && !compl_interrupted && !vim_fgets(buf, LSIZE, fp)) {
while (!got_int && !compl_interrupted && !vim_fgets((char *)buf, LSIZE, fp)) {
ptr = buf;
while (vim_regexec(regmatch, (char *)buf, (colnr_T)(ptr - buf))) {
ptr = (char_u *)regmatch->startp[0];
if (ctrl_x_mode_line_or_eval()) {
ptr = find_line_end(ptr);
ptr = (char_u *)find_line_end((char *)ptr);
} else {
ptr = find_word_end(ptr);
}
@@ -1529,12 +1529,13 @@ char_u *find_word_end(char_u *ptr)
}
/// Find the end of the line, omitting CR and NL at the end.
/// Returns a pointer to just after the line.
static char_u *find_line_end(char_u *ptr)
///
/// @return a pointer to just after the line.
static char *find_line_end(char *ptr)
{
char_u *s;
char *s;
s = ptr + STRLEN(ptr);
s = ptr + strlen(ptr);
while (s > ptr && (s[-1] == CAR || s[-1] == NL)) {
s--;
}