diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-10-02 16:28:09 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-10-02 16:28:09 (GMT) |
commit | b7c4b811ec358b518d9a5ceaf204a84a5e5b59a8 (patch) | |
tree | e0bc5a6114da04b2bb9a713ea069b83d14620b23 /generic/regcomp.c | |
parent | cb6ae544245fea42d68f1f1c0c3ab5fd92babcaf (diff) | |
download | tcl-b7c4b811ec358b518d9a5ceaf204a84a5e5b59a8.zip tcl-b7c4b811ec358b518d9a5ceaf204a84a5e5b59a8.tar.gz tcl-b7c4b811ec358b518d9a5ceaf204a84a5e5b59a8.tar.bz2 |
Fix -Wshadow warnings, when compiling with a C++ compiler
Diffstat (limited to 'generic/regcomp.c')
-rw-r--r-- | generic/regcomp.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/generic/regcomp.c b/generic/regcomp.c index 99dfef1..3be5172 100644 --- a/generic/regcomp.c +++ b/generic/regcomp.c @@ -56,7 +56,7 @@ static const chr *scanplain(struct vars *); static void onechr(struct vars *, pchr, struct state *, struct state *); static void dovec(struct vars *, struct cvec *, struct state *, struct state *); static void wordchrs(struct vars *); -static struct subre *subre(struct vars *, int, int, struct state *, struct state *); +static struct subre *sub_re(struct vars *, int, int, struct state *, struct state *); static void freesubre(struct vars *, struct subre *); static void freesrnode(struct vars *, struct subre *); static int numst(struct subre *, int); @@ -663,7 +663,7 @@ parse( assert(stopper == ')' || stopper == EOS); - branches = subre(v, '|', LONGER, init, final); + branches = sub_re(v, '|', LONGER, init, final); NOERRN(); branch = branches; firstbranch = 1; @@ -673,7 +673,7 @@ parse( * Need a place to hang the branch. */ - branch->right = subre(v, '|', LONGER, init, final); + branch->right = sub_re(v, '|', LONGER, init, final); NOERRN(); branch = branch->right; } @@ -744,7 +744,7 @@ parsebranch( lp = left; seencontent = 0; - t = subre(v, '=', 0, left, right); /* op '=' is tentative */ + t = sub_re(v, '=', 0, left, right); /* op '=' is tentative */ NOERRN(); while (!SEE('|') && !SEE(stopper) && !SEE(EOS)) { if (seencontent) { /* implicit concat operator */ @@ -977,7 +977,7 @@ parseqatom( NOERR(); if (cap) { v->subs[subno] = atom; - t = subre(v, '(', atom->flags|CAP, lp, rp); + t = sub_re(v, '(', atom->flags|CAP, lp, rp); NOERR(); t->subno = subno; t->left = atom; @@ -995,7 +995,7 @@ parseqatom( INSIST(v->subs[v->nextvalue] != NULL, REG_ESUBREG); NOERR(); assert(v->nextvalue > 0); - atom = subre(v, 'b', BACKR, lp, rp); + atom = sub_re(v, 'b', BACKR, lp, rp); NOERR(); subno = v->nextvalue; atom->subno = subno; @@ -1110,7 +1110,7 @@ parseqatom( */ if (atom == NULL) { - atom = subre(v, '=', 0, lp, rp); + atom = sub_re(v, '=', 0, lp, rp); NOERR(); } @@ -1147,7 +1147,7 @@ parseqatom( * Break remaining subRE into x{...} and what follows. */ - t = subre(v, '.', COMBINE(qprefer, atom->flags), lp, rp); + t = sub_re(v, '.', COMBINE(qprefer, atom->flags), lp, rp); NOERR(); t->left = atom; atomp = &t->left; @@ -1161,7 +1161,7 @@ parseqatom( */ assert(top->op == '=' && top->left == NULL && top->right == NULL); - top->left = subre(v, '=', top->flags, top->begin, lp); + top->left = sub_re(v, '=', top->flags, top->begin, lp); NOERR(); top->op = '.'; top->right = t; @@ -1230,9 +1230,9 @@ parseqatom( assert(m >= 1 && m != DUPINF && n >= 1); repeat(v, s, atom->begin, m-1, (n == DUPINF) ? n : n-1); f = COMBINE(qprefer, atom->flags); - t = subre(v, '.', f, s, atom->end); /* prefix and atom */ + t = sub_re(v, '.', f, s, atom->end); /* prefix and atom */ NOERR(); - t->left = subre(v, '=', PREF(f), s, atom->begin); + t->left = sub_re(v, '=', PREF(f), s, atom->begin); NOERR(); t->right = atom; *atomp = t; @@ -1247,7 +1247,7 @@ parseqatom( dupnfa(v->nfa, atom->begin, atom->end, s, s2); repeat(v, s, s2, m, n); f = COMBINE(qprefer, atom->flags); - t = subre(v, '*', f, s, s2); + t = sub_re(v, '*', f, s, s2); NOERR(); t->min = (short) m; t->max = (short) n; @@ -1265,7 +1265,7 @@ parseqatom( t->right = parsebranch(v, stopper, type, s2, rp, 1); } else { EMPTYARC(s2, rp); - t->right = subre(v, '=', 0, s2, rp); + t->right = sub_re(v, '=', 0, s2, rp); } NOERR(); assert(SEE('|') || SEE(stopper) || SEE(EOS)); @@ -1717,12 +1717,12 @@ wordchrs( } /* - - subre - allocate a subre - ^ static struct subre *subre(struct vars *, int, int, struct state *, + - sub_re - allocate a subre + ^ static struct subre *sub_re(struct vars *, int, int, struct state *, ^ struct state *); */ static struct subre * -subre( +sub_re( struct vars *v, int op, int flags, |