mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 01:08:20 +00:00
refactor: replace char_u with char 22 (#21786)
Work on https://github.com/neovim/neovim/issues/459
This commit is contained in:
@@ -2185,7 +2185,7 @@ int pattern_match(const char *pat, const char *text, bool ic)
|
||||
regmatch.regprog = vim_regcomp((char *)pat, RE_MAGIC + RE_STRING);
|
||||
if (regmatch.regprog != NULL) {
|
||||
regmatch.rm_ic = ic;
|
||||
matches = vim_regexec_nl(®match, (char_u *)text, (colnr_T)0);
|
||||
matches = vim_regexec_nl(®match, (char *)text, (colnr_T)0);
|
||||
vim_regfree(regmatch.regprog);
|
||||
}
|
||||
p_cpo = save_cpo;
|
||||
@@ -2543,7 +2543,7 @@ static int eval4(char **arg, typval_T *rettv, int evaluate)
|
||||
if (p[2] == 'n' && p[3] == 'o' && p[4] == 't') {
|
||||
len = 5;
|
||||
}
|
||||
if (!isalnum(p[len]) && p[len] != '_') {
|
||||
if (!isalnum((uint8_t)p[len]) && p[len] != '_') {
|
||||
type = len == 2 ? EXPR_IS : EXPR_ISNOT;
|
||||
}
|
||||
}
|
||||
@@ -3777,7 +3777,7 @@ static int get_string_tv(char **arg, typval_T *rettv, int evaluate)
|
||||
case 'U':
|
||||
if (ascii_isxdigit(p[1])) {
|
||||
int n, nr;
|
||||
int c = toupper(*p);
|
||||
int c = toupper((uint8_t)(*p));
|
||||
|
||||
if (c == 'X') {
|
||||
n = 2;
|
||||
@@ -6302,7 +6302,7 @@ int get_id_len(const char **const arg)
|
||||
// slice "[n:]". Also "xx:" is not a namespace.
|
||||
len = (int)(p - *arg);
|
||||
if (len > 1
|
||||
|| (len == 1 && vim_strchr(namespace_char, **arg) == NULL)) {
|
||||
|| (len == 1 && vim_strchr(namespace_char, (uint8_t)(**arg)) == NULL)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -6430,7 +6430,7 @@ const char *find_name_end(const char *arg, const char **expr_start, const char *
|
||||
// slice "[n:]". Also "xx:" is not a namespace. But {ns}: is.
|
||||
len = (int)(p - arg);
|
||||
if ((len > 1 && p[-1] != '}')
|
||||
|| (len == 1 && vim_strchr(namespace_char, *arg) == NULL)) {
|
||||
|| (len == 1 && vim_strchr(namespace_char, (uint8_t)(*arg)) == NULL)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -8081,7 +8081,7 @@ char *do_string_sub(char *str, char *pat, char *sub, typval_T *expr, const char
|
||||
if (regmatch.regprog != NULL) {
|
||||
char *tail = str;
|
||||
char *end = str + strlen(str);
|
||||
while (vim_regexec_nl(®match, (char_u *)str, (colnr_T)(tail - str))) {
|
||||
while (vim_regexec_nl(®match, str, (colnr_T)(tail - str))) {
|
||||
// Skip empty match except for first match.
|
||||
if (regmatch.startp[0] == regmatch.endp[0]) {
|
||||
if (zero_width == regmatch.startp[0]) {
|
||||
|
Reference in New Issue
Block a user