diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-11-26 18:58:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-26 18:58:45 +0100 |
commit | 019c8805e514428c0b999583f5aec8c9f4eb96d0 (patch) | |
tree | 1a105862628c997b46725b4f3f485bd074332cce /src/nvim/regexp_bt.c | |
parent | 319fbffc94896dd9cf0a77891d69b7fcada1fad4 (diff) | |
parent | bd22585061b66d7f71d4832b4a81e950b3c9d19d (diff) | |
download | rneovim-019c8805e514428c0b999583f5aec8c9f4eb96d0.tar.gz rneovim-019c8805e514428c0b999583f5aec8c9f4eb96d0.tar.bz2 rneovim-019c8805e514428c0b999583f5aec8c9f4eb96d0.zip |
Merge pull request #20196 from dundargoc/refactor/char_u/14
refactor: replace char_u with char 14: remove `STRLEN` part final
Diffstat (limited to 'src/nvim/regexp_bt.c')
-rw-r--r-- | src/nvim/regexp_bt.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nvim/regexp_bt.c b/src/nvim/regexp_bt.c index 9411d17f57..19b89bef74 100644 --- a/src/nvim/regexp_bt.c +++ b/src/nvim/regexp_bt.c @@ -2928,9 +2928,9 @@ static regprog_T *bt_regcomp(char_u *expr, int re_flags) longest = NULL; len = 0; for (; scan != NULL; scan = regnext(scan)) { - if (OP(scan) == EXACTLY && STRLEN(OPERAND(scan)) >= (size_t)len) { + if (OP(scan) == EXACTLY && strlen((char *)OPERAND(scan)) >= (size_t)len) { longest = OPERAND(scan); - len = (int)STRLEN(OPERAND(scan)); + len = (int)strlen((char *)OPERAND(scan)); } } r->regmust = longest; @@ -3658,7 +3658,7 @@ static bool regmatch(char_u *scan, proftime_T *tm, int *timed_out) 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; if (pos->lnum == rex.lnum + rex.reg_firstlnum @@ -3976,7 +3976,7 @@ static bool regmatch(char_u *scan, proftime_T *tm, int *timed_out) len = 1; // matched a single byte above } else { // Need to match first byte again for multi-byte. - len = (int)STRLEN(opnd); + len = (int)strlen((char *)opnd); if (cstrncmp((char *)opnd, (char *)rex.input, &len) != 0) { status = RA_NOMATCH; } @@ -4257,7 +4257,7 @@ static bool regmatch(char_u *scan, proftime_T *tm, int *timed_out) no = op - ZREF; if (re_extmatch_in != NULL && re_extmatch_in->matches[no] != NULL) { - int len = (int)STRLEN(re_extmatch_in->matches[no]); + int len = (int)strlen((char *)re_extmatch_in->matches[no]); if (cstrncmp((char *)re_extmatch_in->matches[no], (char *)rex.input, &len) != 0) { status = RA_NOMATCH; } else { @@ -4683,7 +4683,7 @@ static bool regmatch(char_u *scan, proftime_T *tm, int *timed_out) if (limit > 0 && ((rp->rs_un.regsave.rs_u.pos.lnum < behind_pos.rs_u.pos.lnum - ? (colnr_T)STRLEN(rex.line) + ? (colnr_T)strlen((char *)rex.line) : behind_pos.rs_u.pos.col) - rp->rs_un.regsave.rs_u.pos.col >= limit)) { no = FAIL; @@ -4696,7 +4696,7 @@ static bool regmatch(char_u *scan, proftime_T *tm, int *timed_out) } else { reg_restore(&rp->rs_un.regsave, &backpos); rp->rs_un.regsave.rs_u.pos.col = - (colnr_T)STRLEN(rex.line); + (colnr_T)strlen((char *)rex.line); } } else { const char_u *const line = @@ -4787,7 +4787,7 @@ static bool regmatch(char_u *scan, proftime_T *tm, int *timed_out) if (rex.line == NULL) { break; } - rex.input = rex.line + STRLEN(rex.line); + rex.input = rex.line + strlen((char *)rex.line); fast_breakcheck(); } else { MB_PTR_BACK(rex.line, rex.input); |