mirror of
https://github.com/neovim/neovim.git
synced 2025-10-02 07:58:35 +00:00
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
This commit is contained in:
@@ -266,7 +266,7 @@ static void au_show_for_event(int group, event_T event, char *pat)
|
||||
// normalize pat into standard "<buffer>#N" form
|
||||
aupat_normalize_buflocal_pat(buflocal_pat, pat, patlen, aupat_get_buflocal_nr(pat, patlen));
|
||||
pat = (char *)buflocal_pat;
|
||||
patlen = (int)STRLEN(buflocal_pat);
|
||||
patlen = (int)strlen(buflocal_pat);
|
||||
}
|
||||
|
||||
assert(*pat != NUL);
|
||||
@@ -725,7 +725,7 @@ int check_ei(void)
|
||||
char *au_event_disable(char *what)
|
||||
{
|
||||
char *save_ei = xstrdup(p_ei);
|
||||
char *new_ei = xstrnsave(p_ei, STRLEN(p_ei) + STRLEN(what));
|
||||
char *new_ei = xstrnsave(p_ei, strlen(p_ei) + strlen(what));
|
||||
if (*what == ',' && *p_ei == NUL) {
|
||||
STRCPY(new_ei, what + 1);
|
||||
} else {
|
||||
@@ -957,7 +957,7 @@ int do_autocmd_event(event_T event, char *pat, bool once, int nested, char *cmd,
|
||||
aupat_normalize_buflocal_pat(buflocal_pat, pat, patlen, buflocal_nr);
|
||||
|
||||
pat = buflocal_pat;
|
||||
patlen = (int)STRLEN(buflocal_pat);
|
||||
patlen = (int)strlen(buflocal_pat);
|
||||
}
|
||||
|
||||
if (delete) {
|
||||
@@ -1018,7 +1018,7 @@ int autocmd_register(int64_t id, event_T event, char *pat, int patlen, int group
|
||||
int findgroup;
|
||||
char buflocal_pat[BUFLOCAL_PAT_LEN]; // for "<buffer=X>"
|
||||
|
||||
if (patlen > (int)STRLEN(pat)) {
|
||||
if (patlen > (int)strlen(pat)) {
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
@@ -1039,7 +1039,7 @@ int autocmd_register(int64_t id, event_T event, char *pat, int patlen, int group
|
||||
aupat_normalize_buflocal_pat(buflocal_pat, pat, patlen, buflocal_nr);
|
||||
|
||||
pat = buflocal_pat;
|
||||
patlen = (int)STRLEN(buflocal_pat);
|
||||
patlen = (int)strlen(buflocal_pat);
|
||||
}
|
||||
|
||||
// always goes at or after the last one, so start at the end.
|
||||
@@ -1193,7 +1193,7 @@ size_t aucmd_pattern_length(char *pat)
|
||||
return (size_t)(endpat - pat);
|
||||
}
|
||||
|
||||
return STRLEN(pat);
|
||||
return strlen(pat);
|
||||
}
|
||||
|
||||
char *aucmd_next_pattern(char *pat, size_t patlen)
|
||||
@@ -2012,7 +2012,7 @@ void auto_next_pat(AutoPatCmd *apc, int stop_at_last)
|
||||
s = _("%s Autocommands for \"%s\"");
|
||||
|
||||
const size_t sourcing_name_len
|
||||
= (STRLEN(s) + strlen(name) + (size_t)ap->patlen + 1);
|
||||
= (strlen(s) + strlen(name) + (size_t)ap->patlen + 1);
|
||||
|
||||
char *const namep = xmalloc(sourcing_name_len);
|
||||
snprintf(namep, sourcing_name_len, s, name, ap->pat);
|
||||
|
Reference in New Issue
Block a user