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 29b80f6f2e
commit bd22585061
53 changed files with 603 additions and 611 deletions

View File

@@ -742,7 +742,7 @@ void ex_breaklist(exarg_T *eap)
/// @param after after this line number
linenr_T dbg_find_breakpoint(bool file, char *fname, linenr_T after)
{
return debuggy_find(file, (char_u *)fname, after, &dbg_breakp, NULL);
return debuggy_find(file, fname, after, &dbg_breakp, NULL);
}
/// @param file true for a file, false for a function
@@ -752,7 +752,7 @@ linenr_T dbg_find_breakpoint(bool file, char *fname, linenr_T after)
/// @returns true if profiling is on for a function or sourced file.
bool has_profiling(bool file, char *fname, bool *fp)
{
return debuggy_find(file, (char_u *)fname, (linenr_T)0, &prof_ga, fp)
return debuggy_find(file, fname, (linenr_T)0, &prof_ga, fp)
!= (linenr_T)0;
}
@@ -763,11 +763,11 @@ bool has_profiling(bool file, char *fname, bool *fp)
/// @param after after this line number
/// @param gap either &dbg_breakp or &prof_ga
/// @param fp if not NULL: return forceit
static linenr_T debuggy_find(bool file, char_u *fname, linenr_T after, garray_T *gap, bool *fp)
static linenr_T debuggy_find(bool file, char *fname, linenr_T after, garray_T *gap, bool *fp)
{
struct debuggy *bp;
linenr_T lnum = 0;
char_u *name = fname;
char *name = fname;
int prev_got_int;
// Return quickly when there are no breakpoints.
@@ -776,8 +776,8 @@ static linenr_T debuggy_find(bool file, char_u *fname, linenr_T after, garray_T
}
// Replace K_SNR in function name with "<SNR>".
if (!file && fname[0] == K_SPECIAL) {
name = xmalloc(STRLEN(fname) + 3);
if (!file && (uint8_t)fname[0] == K_SPECIAL) {
name = xmalloc(strlen(fname) + 3);
STRCPY(name, "<SNR>");
STRCPY(name + 5, fname + 3);
}
@@ -795,7 +795,7 @@ static linenr_T debuggy_find(bool file, char_u *fname, linenr_T after, garray_T
// while matching should abort it.
prev_got_int = got_int;
got_int = false;
if (vim_regexec_prog(&bp->dbg_prog, false, name, (colnr_T)0)) {
if (vim_regexec_prog(&bp->dbg_prog, false, (char_u *)name, (colnr_T)0)) {
lnum = bp->dbg_lnum;
if (fp != NULL) {
*fp = bp->dbg_forceit;