diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-01-26 20:56:01 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-01-26 20:56:01 (GMT) |
commit | 8c3b65404122b4ebf39db0dc500da65fca99e1d5 (patch) | |
tree | 277724a1f215e38aae8c3ece7c958ba6fecdda63 /generic/regcomp.c | |
parent | a3b402c305bb7a8126ec53b12db5b9a1e6b9e585 (diff) | |
parent | edce4263d79bad62b9c06d66bab9ac954cafb6df (diff) | |
download | tcl-8c3b65404122b4ebf39db0dc500da65fca99e1d5.zip tcl-8c3b65404122b4ebf39db0dc500da65fca99e1d5.tar.gz tcl-8c3b65404122b4ebf39db0dc500da65fca99e1d5.tar.bz2 |
Fix [df08482b042a16007f256bfbaaacfbe0def01074|df08482b04]: Double defined INFINITY in regguts.h
Diffstat (limited to 'generic/regcomp.c')
-rw-r--r-- | generic/regcomp.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/generic/regcomp.c b/generic/regcomp.c index c93eb24..7ca4346 100644 --- a/generic/regcomp.c +++ b/generic/regcomp.c @@ -996,13 +996,13 @@ parseqatom( switch (v->nexttype) { case '*': m = 0; - n = INFINITY; + n = DUPINF; qprefer = (v->nextvalue) ? LONGER : SHORTER; NEXT(); break; case '+': m = 1; - n = INFINITY; + n = DUPINF; qprefer = (v->nextvalue) ? LONGER : SHORTER; NEXT(); break; @@ -1019,7 +1019,7 @@ parseqatom( if (SEE(DIGIT)) { n = scannum(v); } else { - n = INFINITY; + n = DUPINF; } if (m > n) { ERR(REG_BADBR); @@ -1217,8 +1217,8 @@ parseqatom( */ dupnfa(v->nfa, atom->begin, atom->end, s, atom->begin); - assert(m >= 1 && m != INFINITY && n >= 1); - repeat(v, s, atom->begin, m-1, (n == INFINITY) ? n : n-1); + 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 */ NOERR(); @@ -1323,7 +1323,7 @@ repeat( #define SOME 2 #define INF 3 #define PAIR(x, y) ((x)*4 + (y)) -#define REDUCE(x) ( ((x) == INFINITY) ? INF : (((x) > 1) ? SOME : (x)) ) +#define REDUCE(x) ( ((x) == DUPINF) ? INF : (((x) > 1) ? SOME : (x)) ) const int rm = REDUCE(m); const int rn = REDUCE(n); struct state *s, *s2; @@ -2108,7 +2108,7 @@ stdump( } if (t->min != 1 || t->max != 1) { fprintf(f, " {%d,", t->min); - if (t->max != INFINITY) { + if (t->max != DUPINF) { fprintf(f, "%d", t->max); } fprintf(f, "}"); |