diff options
author | Dundar Göc <gocdundar@gmail.com> | 2022-08-26 23:11:25 +0200 |
---|---|---|
committer | dundargoc <gocdundar@gmail.com> | 2022-11-26 15:52:21 +0100 |
commit | bd22585061b66d7f71d4832b4a81e950b3c9d19d (patch) | |
tree | 8c677ace61ab212cef87bc5abbd83c56e50f800d /src/nvim/regexp_nfa.c | |
parent | 29b80f6f2e9391b5d78390f65d09f00f73829310 (diff) | |
download | rneovim-bd22585061b66d7f71d4832b4a81e950b3c9d19d.tar.gz rneovim-bd22585061b66d7f71d4832b4a81e950b3c9d19d.tar.bz2 rneovim-bd22585061b66d7f71d4832b4a81e950b3c9d19d.zip |
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/regexp_nfa.c')
-rw-r--r-- | src/nvim/regexp_nfa.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c index ed3a0f38a4..da6892274a 100644 --- a/src/nvim/regexp_nfa.c +++ b/src/nvim/regexp_nfa.c @@ -361,7 +361,7 @@ static void nfa_regcomp_start(char_u *expr, int re_flags) nstate = 0; istate = 0; // A reasonable estimation for maximum size - nstate_max = (STRLEN(expr) + 1) * 25; + nstate_max = (strlen((char *)expr) + 1) * 25; // Some items blow up in size, such as [A-z]. Add more space for that. // When it is still not enough realloc_post_list() will be used. @@ -5418,7 +5418,7 @@ static int match_zref(int subidx, int *bytelen) return true; } - len = (int)STRLEN(re_extmatch_in->matches[subidx]); + len = (int)strlen((char *)re_extmatch_in->matches[subidx]); if (cstrncmp((char *)re_extmatch_in->matches[subidx], (char *)rex.input, &len) == 0) { *bytelen = len; return true; @@ -5537,7 +5537,7 @@ static int recursive_regmatch(nfa_state_T *state, nfa_pim_T *pim, nfa_regprog_T rex.line = reg_getline(++rex.lnum); rex.input = rex.line; } else { - rex.input = rex.line + STRLEN(rex.line); + rex.input = rex.line + strlen((char *)rex.line); } } if ((int)(rex.input - rex.line) >= state->val) { @@ -6864,7 +6864,7 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start, regsubs_T *subm pos_T *pos = &fm->mark; const colnr_T pos_col = pos->lnum == rex.lnum + rex.reg_firstlnum && pos->col == MAXCOL - ? (colnr_T)STRLEN(reg_getline(pos->lnum - rex.reg_firstlnum)) + ? (colnr_T)strlen((char *)reg_getline(pos->lnum - rex.reg_firstlnum)) : pos->col; result = pos->lnum == rex.lnum + rex.reg_firstlnum |