diff options
author | David Bürgin <676c7473@gmail.com> | 2015-05-09 21:11:37 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-05-13 03:10:25 -0400 |
commit | 5e1d52a70804b53c715d879d6b87bcf580c94b6d (patch) | |
tree | 24c52ade3db5542325c1dd173dc8c7f07c139fd2 | |
parent | de6b3fbb1590bff0bb49e57579980d62bb514103 (diff) | |
download | rneovim-5e1d52a70804b53c715d879d6b87bcf580c94b6d.tar.gz rneovim-5e1d52a70804b53c715d879d6b87bcf580c94b6d.tar.bz2 rneovim-5e1d52a70804b53c715d879d6b87bcf580c94b6d.zip |
Passing by: regexp_nfa.c: Convert add_here variable to bool
-rw-r--r-- | src/nvim/regexp_nfa.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c index 21feb87ae1..9cf35c53bb 100644 --- a/src/nvim/regexp_nfa.c +++ b/src/nvim/regexp_nfa.c @@ -4809,7 +4809,7 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start, regsubs_T *subm nfa_list_T *nextlist; int *listids = NULL; nfa_state_T *add_state; - int add_here; + bool add_here; int add_count; int add_off = 0; int toplevel = start->c == NFA_MOPEN; @@ -4970,7 +4970,7 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start, regsubs_T *subm * The most important is NFA_MATCH. */ add_state = NULL; - add_here = FALSE; + add_here = false; add_count = 0; switch (t->state->c) { case NFA_MATCH: @@ -5110,7 +5110,7 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start, regsubs_T *subm /* t->state->out1 is the corresponding * END_INVISIBLE node; Add its out to the current * list (zero-width match). */ - add_here = TRUE; + add_here = true; add_state = t->state->out1->out; } m->norm.in_use = in_use; @@ -5219,7 +5219,7 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start, regsubs_T *subm /* empty match, output of corresponding * NFA_END_PATTERN/NFA_SKIP to be used at current * position */ - add_here = TRUE; + add_here = true; add_state = t->state->out1->out->out; } else if (bytelen <= clen) { /* match current character, output of corresponding @@ -5239,14 +5239,14 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start, regsubs_T *subm case NFA_BOL: if (reginput == regline) { - add_here = TRUE; + add_here = true; add_state = t->state->out; } break; case NFA_EOL: if (curc == NUL) { - add_here = TRUE; + add_here = true; add_state = t->state->out; } break; @@ -5270,7 +5270,7 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start, regsubs_T *subm && vim_iswordc_buf(reginput[-1], reg_buf))) result = FALSE; if (result) { - add_here = TRUE; + add_here = true; add_state = t->state->out; } break; @@ -5293,7 +5293,7 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start, regsubs_T *subm && vim_iswordc_buf(curc, reg_buf))) result = FALSE; if (result) { - add_here = TRUE; + add_here = true; add_state = t->state->out; } break; @@ -5301,14 +5301,14 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start, regsubs_T *subm case NFA_BOF: if (reglnum == 0 && reginput == regline && (!REG_MULTI || reg_firstlnum == 1)) { - add_here = TRUE; + add_here = true; add_state = t->state->out; } break; case NFA_EOF: if (reglnum == reg_maxline && curc == NUL) { - add_here = TRUE; + add_here = true; add_state = t->state->out; } break; @@ -5473,7 +5473,7 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start, regsubs_T *subm if (enc_utf8 && utf_iscomposing(curc)) { add_off = clen; } else { - add_here = TRUE; + add_here = true; add_off = 0; } add_state = t->state->out; @@ -5670,7 +5670,7 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start, regsubs_T *subm if (bytelen == 0) { /* empty match always works, output of NFA_SKIP to be * used next */ - add_here = TRUE; + add_here = true; add_state = t->state->out->out; } else if (bytelen <= clen) { /* match current character, jump ahead to out of @@ -5713,7 +5713,7 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start, regsubs_T *subm t->state->c - NFA_LNUM, (uintmax_t)(reglnum + reg_firstlnum))); if (result) { - add_here = TRUE; + add_here = true; add_state = t->state->out; } break; @@ -5728,7 +5728,7 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start, regsubs_T *subm t->state->c - NFA_COL, (uintmax_t)(reginput - regline + 1)); if (result) { - add_here = TRUE; + add_here = true; add_state = t->state->out; } break; @@ -5754,7 +5754,7 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start, regsubs_T *subm op, lts + 1); if (result) { - add_here = TRUE; + add_here = true; add_state = t->state->out; } } @@ -5779,7 +5779,7 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start, regsubs_T *subm ? t->state->c == NFA_MARK_GT : t->state->c == NFA_MARK_LT))); if (result) { - add_here = TRUE; + add_here = true; add_state = t->state->out; } break; @@ -5791,7 +5791,7 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start, regsubs_T *subm && ((colnr_T)(reginput - regline) == reg_win->w_cursor.col)); if (result) { - add_here = TRUE; + add_here = true; add_state = t->state->out; } break; @@ -5799,7 +5799,7 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start, regsubs_T *subm case NFA_VISUAL: result = reg_match_visual(); if (result) { - add_here = TRUE; + add_here = true; add_state = t->state->out; } break; |