aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp_nfa.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <janedmundlazo@hotmail.com>2018-06-11 23:43:14 -0400
committerJan Edmund Lazo <janedmundlazo@hotmail.com>2018-06-12 02:00:50 -0400
commit3c7ea8d619d77d303e9c51118b22c81a3ffbf550 (patch)
treeef78d44a18dca24302546d98a67861940d471e5f /src/nvim/regexp_nfa.c
parentfa2ad305e312c3e61e4943c345a4c34d4a1be18c (diff)
downloadrneovim-3c7ea8d619d77d303e9c51118b22c81a3ffbf550.tar.gz
rneovim-3c7ea8d619d77d303e9c51118b22c81a3ffbf550.tar.bz2
rneovim-3c7ea8d619d77d303e9c51118b22c81a3ffbf550.zip
vim-patch:8.0.0451: some macros are in lower case
Problem: Some macros are in lower case. Solution: Make a few more macros upper case. Avoid lower case macros use an argument twice. https://github.com/vim/vim/commit/91acfffc1e6c0d8c2abfb186a0e79a5bf19c3f3f
Diffstat (limited to 'src/nvim/regexp_nfa.c')
-rw-r--r--src/nvim/regexp_nfa.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c
index c2b1b97ce9..2eb0ca9313 100644
--- a/src/nvim/regexp_nfa.c
+++ b/src/nvim/regexp_nfa.c
@@ -1323,7 +1323,7 @@ static int nfa_regatom(void)
EMSG(_(e_nopresub));
return FAIL;
}
- for (lp = reg_prev_sub; *lp != NUL; mb_cptr_adv(lp)) {
+ for (lp = reg_prev_sub; *lp != NUL; MB_CPTR_ADV(lp)) {
EMIT(PTR2CHAR(lp));
if (lp != reg_prev_sub)
EMIT(NFA_CONCAT);
@@ -1557,7 +1557,7 @@ collection:
} else
EMIT(result);
regparse = endp;
- mb_ptr_adv(regparse);
+ MB_PTR_ADV(regparse);
return OK;
}
/*
@@ -1565,10 +1565,10 @@ collection:
* version that turns [abc] into 'a' OR 'b' OR 'c'
*/
startc = endc = oldstartc = -1;
- negated = FALSE;
- if (*regparse == '^') { /* negated range */
- negated = TRUE;
- mb_ptr_adv(regparse);
+ negated = false;
+ if (*regparse == '^') { // negated range
+ negated = true;
+ MB_PTR_ADV(regparse);
EMIT(NFA_START_NEG_COLL);
} else
EMIT(NFA_START_COLL);
@@ -1576,7 +1576,7 @@ collection:
startc = '-';
EMIT(startc);
EMIT(NFA_CONCAT);
- mb_ptr_adv(regparse);
+ MB_PTR_ADV(regparse);
}
/* Emit the OR branches for each character in the [] */
emit_range = FALSE;
@@ -1666,8 +1666,8 @@ collection:
if (*regparse == '-' && oldstartc != -1) {
emit_range = TRUE;
startc = oldstartc;
- mb_ptr_adv(regparse);
- continue; /* reading the end of the range */
+ MB_PTR_ADV(regparse);
+ continue; // reading the end of the range
}
/* Now handle simple and escaped characters.
@@ -1683,7 +1683,7 @@ collection:
!= NULL)
)
) {
- mb_ptr_adv(regparse);
+ MB_PTR_ADV(regparse);
if (*regparse == 'n')
startc = reg_string ? NL : NFA_NEWL;
@@ -1695,8 +1695,8 @@ collection:
) {
/* TODO(RE) This needs more testing */
startc = coll_get_char();
- got_coll_char = TRUE;
- mb_ptr_back(old_regparse, regparse);
+ got_coll_char = true;
+ MB_PTR_BACK(old_regparse, regparse);
} else {
/* \r,\t,\e,\b */
startc = backslash_trans(*regparse);
@@ -1768,18 +1768,18 @@ collection:
}
}
- mb_ptr_adv(regparse);
- } /* while (p < endp) */
+ MB_PTR_ADV(regparse);
+ } // while (p < endp)
- mb_ptr_back(old_regparse, regparse);
- if (*regparse == '-') { /* if last, '-' is just a char */
+ MB_PTR_BACK(old_regparse, regparse);
+ if (*regparse == '-') { // if last, '-' is just a char
EMIT('-');
EMIT(NFA_CONCAT);
}
/* skip the trailing ] */
regparse = endp;
- mb_ptr_adv(regparse);
+ MB_PTR_ADV(regparse);
/* Mark end of the collection. */
if (negated == TRUE)