0
0
mirror of https://github.com/vim/vim.git synced 2025-08-24 19:45:50 -04:00

updated for version 7.3.1095

Problem:    Compiler warnings for shadowed variables. (Christian Brabandt)
Solution:   Rename new_state() to alloc_state().  Remove unnecessary
            declaration.
This commit is contained in:
Bram Moolenaar 2013-06-02 16:40:55 +02:00
parent 307aa16a69
commit 525666f282
2 changed files with 21 additions and 21 deletions

View File

@ -247,7 +247,7 @@ static int *post_ptr;
static int nstate; /* Number of states in the NFA. Also used when static int nstate; /* Number of states in the NFA. Also used when
* executing. */ * executing. */
static int istate; /* Index in the state vector, used in new_state() */ static int istate; /* Index in the state vector, used in alloc_state() */
/* If not NULL match must end at this position */ /* If not NULL match must end at this position */
static save_se_T *nfa_endp = NULL; static save_se_T *nfa_endp = NULL;
@ -268,7 +268,7 @@ static void nfa_print_state2 __ARGS((FILE *debugf, nfa_state_T *state, garray_T
static void nfa_dump __ARGS((nfa_regprog_T *prog)); static void nfa_dump __ARGS((nfa_regprog_T *prog));
#endif #endif
static int *re2post __ARGS((void)); static int *re2post __ARGS((void));
static nfa_state_T *new_state __ARGS((int c, nfa_state_T *out, nfa_state_T *out1)); static nfa_state_T *alloc_state __ARGS((int c, nfa_state_T *out, nfa_state_T *out1));
static nfa_state_T *post2nfa __ARGS((int *postfix, int *end, int nfa_calc_size)); static nfa_state_T *post2nfa __ARGS((int *postfix, int *end, int nfa_calc_size));
static int check_char_class __ARGS((int class, int c)); static int check_char_class __ARGS((int class, int c));
static void st_error __ARGS((int *postfix, int *end, int *p)); static void st_error __ARGS((int *postfix, int *end, int *p));
@ -2134,7 +2134,7 @@ static nfa_state_T *state_ptr; /* points to nfa_prog->state */
* Allocate and initialize nfa_state_T. * Allocate and initialize nfa_state_T.
*/ */
static nfa_state_T * static nfa_state_T *
new_state(c, out, out1) alloc_state(c, out, out1)
int c; int c;
nfa_state_T *out; nfa_state_T *out;
nfa_state_T *out1; nfa_state_T *out1;
@ -2431,7 +2431,7 @@ post2nfa(postfix, end, nfa_calc_size)
} }
e2 = POP(); e2 = POP();
e1 = POP(); e1 = POP();
s = new_state(NFA_SPLIT, e1.start, e2.start); s = alloc_state(NFA_SPLIT, e1.start, e2.start);
if (s == NULL) if (s == NULL)
goto theend; goto theend;
PUSH(frag(s, append(e1.out, e2.out))); PUSH(frag(s, append(e1.out, e2.out)));
@ -2445,7 +2445,7 @@ post2nfa(postfix, end, nfa_calc_size)
break; break;
} }
e = POP(); e = POP();
s = new_state(NFA_SPLIT, e.start, NULL); s = alloc_state(NFA_SPLIT, e.start, NULL);
if (s == NULL) if (s == NULL)
goto theend; goto theend;
patch(e.out, s); patch(e.out, s);
@ -2460,7 +2460,7 @@ post2nfa(postfix, end, nfa_calc_size)
break; break;
} }
e = POP(); e = POP();
s = new_state(NFA_SPLIT, NULL, e.start); s = alloc_state(NFA_SPLIT, NULL, e.start);
if (s == NULL) if (s == NULL)
goto theend; goto theend;
patch(e.out, s); patch(e.out, s);
@ -2475,7 +2475,7 @@ post2nfa(postfix, end, nfa_calc_size)
break; break;
} }
e = POP(); e = POP();
s = new_state(NFA_SPLIT, e.start, NULL); s = alloc_state(NFA_SPLIT, e.start, NULL);
if (s == NULL) if (s == NULL)
goto theend; goto theend;
PUSH(frag(s, append(e.out, list1(&s->out1)))); PUSH(frag(s, append(e.out, list1(&s->out1))));
@ -2489,7 +2489,7 @@ post2nfa(postfix, end, nfa_calc_size)
break; break;
} }
e = POP(); e = POP();
s = new_state(NFA_SPLIT, NULL, e.start); s = alloc_state(NFA_SPLIT, NULL, e.start);
if (s == NULL) if (s == NULL)
goto theend; goto theend;
PUSH(frag(s, append(e.out, list1(&s->out)))); PUSH(frag(s, append(e.out, list1(&s->out))));
@ -2503,7 +2503,7 @@ post2nfa(postfix, end, nfa_calc_size)
nstate++; nstate++;
break; break;
} }
s = new_state(NFA_SKIP_CHAR, NULL, NULL); s = alloc_state(NFA_SKIP_CHAR, NULL, NULL);
if (s == NULL) if (s == NULL)
goto theend; goto theend;
PUSH(frag(s, list1(&s->out))); PUSH(frag(s, list1(&s->out)));
@ -2526,12 +2526,12 @@ post2nfa(postfix, end, nfa_calc_size)
break; break;
} }
e = POP(); e = POP();
s1 = new_state(NFA_END_INVISIBLE, NULL, NULL); s1 = alloc_state(NFA_END_INVISIBLE, NULL, NULL);
if (s1 == NULL) if (s1 == NULL)
goto theend; goto theend;
patch(e.out, s1); patch(e.out, s1);
s = new_state(NFA_START_INVISIBLE, e.start, s1); s = alloc_state(NFA_START_INVISIBLE, e.start, s1);
if (s == NULL) if (s == NULL)
goto theend; goto theend;
if (*p == NFA_PREV_ATOM_NO_WIDTH_NEG if (*p == NFA_PREV_ATOM_NO_WIDTH_NEG
@ -2622,10 +2622,10 @@ post2nfa(postfix, end, nfa_calc_size)
* empty groups of parenthesis, and empty mbyte chars */ * empty groups of parenthesis, and empty mbyte chars */
if (stackp == stack) if (stackp == stack)
{ {
s = new_state(mopen, NULL, NULL); s = alloc_state(mopen, NULL, NULL);
if (s == NULL) if (s == NULL)
goto theend; goto theend;
s1 = new_state(mclose, NULL, NULL); s1 = alloc_state(mclose, NULL, NULL);
if (s1 == NULL) if (s1 == NULL)
goto theend; goto theend;
patch(list1(&s->out), s1); patch(list1(&s->out), s1);
@ -2636,11 +2636,11 @@ post2nfa(postfix, end, nfa_calc_size)
/* At least one node was emitted before NFA_MOPEN, so /* At least one node was emitted before NFA_MOPEN, so
* at least one node will be between NFA_MOPEN and NFA_MCLOSE */ * at least one node will be between NFA_MOPEN and NFA_MCLOSE */
e = POP(); e = POP();
s = new_state(mopen, e.start, NULL); /* `(' */ s = alloc_state(mopen, e.start, NULL); /* `(' */
if (s == NULL) if (s == NULL)
goto theend; goto theend;
s1 = new_state(mclose, NULL, NULL); /* `)' */ s1 = alloc_state(mclose, NULL, NULL); /* `)' */
if (s1 == NULL) if (s1 == NULL)
goto theend; goto theend;
patch(e.out, s1); patch(e.out, s1);
@ -2679,10 +2679,10 @@ post2nfa(postfix, end, nfa_calc_size)
nstate += 2; nstate += 2;
break; break;
} }
s = new_state(*p, NULL, NULL); s = alloc_state(*p, NULL, NULL);
if (s == NULL) if (s == NULL)
goto theend; goto theend;
s1 = new_state(NFA_SKIP, NULL, NULL); s1 = alloc_state(NFA_SKIP, NULL, NULL);
if (s1 == NULL) if (s1 == NULL)
goto theend; goto theend;
patch(list1(&s->out), s1); patch(list1(&s->out), s1);
@ -2704,7 +2704,7 @@ post2nfa(postfix, end, nfa_calc_size)
break; break;
} }
e1 = POP(); e1 = POP();
s = new_state(*p, NULL, NULL); s = alloc_state(*p, NULL, NULL);
if (s == NULL) if (s == NULL)
goto theend; goto theend;
s->val = e1.start->c; s->val = e1.start->c;
@ -2720,7 +2720,7 @@ post2nfa(postfix, end, nfa_calc_size)
nstate++; nstate++;
break; break;
} }
s = new_state(*p, NULL, NULL); s = alloc_state(*p, NULL, NULL);
if (s == NULL) if (s == NULL)
goto theend; goto theend;
PUSH(frag(s, list1(&s->out))); PUSH(frag(s, list1(&s->out)));
@ -4742,8 +4742,6 @@ nfa_regtry(prog, col)
if (prog->reghasz == REX_SET) if (prog->reghasz == REX_SET)
{ {
int i;
cleanup_zsubexpr(); cleanup_zsubexpr();
re_extmatch_out = make_extmatch(); re_extmatch_out = make_extmatch();
for (i = 0; i < subs.synt.in_use; i++) for (i = 0; i < subs.synt.in_use; i++)

View File

@ -728,6 +728,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1095,
/**/ /**/
1094, 1094,
/**/ /**/