summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/regcomp.c14
-rw-r--r--generic/regexec.c4
-rw-r--r--generic/regguts.h2
3 files changed, 10 insertions, 10 deletions
diff --git a/generic/regcomp.c b/generic/regcomp.c
index 8880318..77f2f20 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, "}");
diff --git a/generic/regexec.c b/generic/regexec.c
index 205fcc2..f3be137 100644
--- a/generic/regexec.c
+++ b/generic/regexec.c
@@ -1117,7 +1117,7 @@ cbrdissect(
*/
i = 0;
- for (p = begin; p <= stop && (i < max || max == INFINITY); p += len) {
+ for (p = begin; p <= stop && (i < max || max == DUPINF); p += len) {
if ((*v->g->compare)(paren, p, len) != 0) {
break;
}
@@ -1132,7 +1132,7 @@ cbrdissect(
if (p != end) { /* didn't consume all of it */
return REG_NOMATCH;
}
- if (min <= i && (i <= max || max == INFINITY)) {
+ if (min <= i && (i <= max || max == DUPINF)) {
return REG_OKAY;
}
return REG_NOMATCH; /* out of range */
diff --git a/generic/regguts.h b/generic/regguts.h
index 42654eb..ac625d5 100644
--- a/generic/regguts.h
+++ b/generic/regguts.h
@@ -116,7 +116,7 @@
#define xxx 1
#define DUPMAX _POSIX2_RE_DUP_MAX
-#define INFINITY (DUPMAX+1)
+#define DUPINF (DUPMAX+1)
#define REMAGIC 0xfed7 /* magic number for main struct */