|
|
|
@ -432,7 +432,7 @@ p_ere_exp(struct parse *p) |
|
|
|
|
count2 = p_count(p); |
|
|
|
|
REQUIRE(count <= count2, REG_BADBR); |
|
|
|
|
} else /* single number with comma */ |
|
|
|
|
count2 = INFINITY; |
|
|
|
|
count2 = REGEX_INFINITY; |
|
|
|
|
} else /* just a single number */ |
|
|
|
|
count2 = count; |
|
|
|
|
repeat(p, pos, count, count2); |
|
|
|
@ -603,7 +603,7 @@ p_simp_re(struct parse *p, |
|
|
|
|
count2 = p_count(p); |
|
|
|
|
REQUIRE(count <= count2, REG_BADBR); |
|
|
|
|
} else /* single number with comma */ |
|
|
|
|
count2 = INFINITY; |
|
|
|
|
count2 = REGEX_INFINITY; |
|
|
|
|
} else /* just a single number */ |
|
|
|
|
count2 = count; |
|
|
|
|
repeat(p, pos, count, count2); |
|
|
|
@ -961,13 +961,13 @@ static void |
|
|
|
|
repeat(struct parse *p, |
|
|
|
|
sopno start, /* operand from here to end of strip */ |
|
|
|
|
int from, /* repeated from this number */ |
|
|
|
|
int to) /* to this number of times (maybe INFINITY) */ |
|
|
|
|
int to) /* to this number of times (maybe REGEX_INFINITY) */ |
|
|
|
|
{ |
|
|
|
|
sopno finish = HERE(); |
|
|
|
|
# define N 2 |
|
|
|
|
# define INF 3 |
|
|
|
|
# define REP(f, t) ((f)*8 + (t)) |
|
|
|
|
# define MAP(n) (((n) <= 1) ? (n) : ((n) == INFINITY) ? INF : N) |
|
|
|
|
# define MAP(n) (((n) <= 1) ? (n) : ((n) == REGEX_INFINITY) ? INF : N) |
|
|
|
|
sopno copy; |
|
|
|
|
|
|
|
|
|
if (p->error != 0) /* head off possible runaway recursion */ |
|
|
|
|