aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-09-10 14:33:43 +0200
committerGitHub <noreply@github.com>2022-09-10 14:33:43 +0200
commit4638fcf4fb688fa548b8ce337ec3b7c1327fbfe9 (patch)
treeb62862e24e506e0010852d23b68c79103637500c /src/nvim/regexp.c
parent40f9f479b746d0f76fbdd4bc0567d593ca7a6070 (diff)
parent684bc749efef0fa31395d349f4495d79ec5f3fd5 (diff)
downloadrneovim-4638fcf4fb688fa548b8ce337ec3b7c1327fbfe9.tar.gz
rneovim-4638fcf4fb688fa548b8ce337ec3b7c1327fbfe9.tar.bz2
rneovim-4638fcf4fb688fa548b8ce337ec3b7c1327fbfe9.zip
Merge pull request #20068 from dundargoc/refactor/char_u/10
refactor: replace char_u with char 10: remove `FNAMECMP`, `FNAMENCMP` and `STRLCAT`
Diffstat (limited to 'src/nvim/regexp.c')
-rw-r--r--src/nvim/regexp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c
index a94f91d103..9a8890a28a 100644
--- a/src/nvim/regexp.c
+++ b/src/nvim/regexp.c
@@ -1621,11 +1621,11 @@ static int fill_submatch_list(int argc FUNC_ATTR_UNUSED, typval_T *argv, int arg
// There are always 10 list items in staticList10_T.
listitem_T *li = tv_list_first(listarg->vval.v_list);
for (int i = 0; i < 10; i++) {
- char *s = (char *)rsm.sm_match->startp[i];
+ char *s = rsm.sm_match->startp[i];
if (s == NULL || rsm.sm_match->endp[i] == NULL) {
s = NULL;
} else {
- s = xstrnsave(s, (size_t)(rsm.sm_match->endp[i] - (char_u *)s));
+ s = xstrnsave(s, (size_t)(rsm.sm_match->endp[i] - s));
}
TV_LIST_ITEM_TV(li)->v_type = VAR_STRING;
TV_LIST_ITEM_TV(li)->vval.v_string = s;
@@ -2006,11 +2006,11 @@ static int vim_regsub_both(char_u *source, typval_T *expr, char_u *dest, int des
}
}
} else {
- s = rex.reg_match->startp[no];
+ s = (char_u *)rex.reg_match->startp[no];
if (rex.reg_match->endp[no] == NULL) {
s = NULL;
} else {
- len = (int)(rex.reg_match->endp[no] - s);
+ len = (int)(rex.reg_match->endp[no] - (char *)s);
}
}
if (s != NULL) {
@@ -2206,11 +2206,11 @@ char *reg_submatch(int no)
}
}
} else {
- s = (char *)rsm.sm_match->startp[no];
+ s = rsm.sm_match->startp[no];
if (s == NULL || rsm.sm_match->endp[no] == NULL) {
retval = NULL;
} else {
- retval = xstrnsave(s, (size_t)(rsm.sm_match->endp[no] - (char_u *)s));
+ retval = xstrnsave(s, (size_t)(rsm.sm_match->endp[no] - s));
}
}