diff options
author | imura <imura@FreeBSD.org> | 2000-02-12 19:17:21 +0000 |
---|---|---|
committer | imura <imura@FreeBSD.org> | 2000-02-12 19:17:21 +0000 |
commit | 318bc214b1835902ce8aa368c827056c14d9b2dc (patch) | |
tree | 43165bf8162c0cb80f0bb470b8fcefaa97741a7a /devel/re2c | |
parent | 40c1ad8fa8bb7785d6aafcd07873285409e2db55 (diff) | |
download | FreeBSD-ports-318bc214b1835902ce8aa368c827056c14d9b2dc.zip FreeBSD-ports-318bc214b1835902ce8aa368c827056c14d9b2dc.tar.gz |
Fix new compiler error in -current.
Submitted by: Alexander Langer <alex@big.endian.de>
All no response from: maintainer
Diffstat (limited to 'devel/re2c')
-rw-r--r-- | devel/re2c/files/patch-ac | 72 | ||||
-rw-r--r-- | devel/re2c/files/patch-ad | 13 |
2 files changed, 85 insertions, 0 deletions
diff --git a/devel/re2c/files/patch-ac b/devel/re2c/files/patch-ac new file mode 100644 index 0000000..0d10687 --- /dev/null +++ b/devel/re2c/files/patch-ac @@ -0,0 +1,72 @@ +--- dfa.cc.old Fri Feb 4 15:18:55 2000 ++++ dfa.cc Fri Feb 4 15:22:57 2000 +@@ -109,6 +109,7 @@ + uint nc = ub - lb; + GoTo *goTo = new GoTo[nc]; + Span *span = new Span[nc]; ++ uint j; + memset((char*) goTo, 0, nc*sizeof(GoTo)); + tail = &head; + head = NULL; +@@ -123,7 +124,7 @@ + uint nGoTos = 0; + + s->rule = NULL; +- for(iP = s->kernel; i = *iP; ++iP){ ++ for(iP = s->kernel; (i = *iP) != NULL; ++iP){ + if(i->i.tag == CHAR){ + for(Ins *j = i + 1; j < (Ins*) i->i.link; ++j){ + if(!(j->c.link = goTo[j->c.value - lb].to)) +@@ -136,7 +137,7 @@ + } + } + +- for(uint j = 0; j < nGoTos; ++j){ ++ for(j = 0; j < nGoTos; ++j){ + GoTo *go = &goTo[goTo[j].ch - lb]; + i = (Ins*) go->to; + for(cP = work; i; i = (Ins*) i->c.link) +@@ -169,7 +170,7 @@ + + DFA::~DFA(){ + State *s; +- while(s = head){ ++ while((s = head) != NULL){ + head = s->next; + delete s; + } +@@ -185,11 +186,12 @@ + + State *DFA::findState(Ins **kernel, uint kCount){ + Ins **cP, **iP, *i; ++ State *s; + + kernel[kCount] = NULL; + + cP = kernel; +- for(iP = kernel; i = *iP; ++iP){ ++ for(iP = kernel; (i = *iP) != NULL; ++iP){ + if(i->i.tag == CHAR || i->i.tag == TERM){ + *cP++ = i; + } else { +@@ -199,9 +201,9 @@ + kCount = cP - kernel; + kernel[kCount] = NULL; + +- for(State *s = head; s; s = s->next){ ++ for(s = head; s; s = s->next){ + if(s->kCount == kCount){ +- for(iP = s->kernel; i = *iP; ++iP) ++ for(iP = s->kernel; (i = *iP) != NULL; ++iP) + if(!isMarked(i)) + goto nextState; + goto unmarkAll; +@@ -218,7 +220,7 @@ + toDo = s; + + unmarkAll: +- for(iP = kernel; i = *iP; ++iP) ++ for(iP = kernel; (i = *iP) != NULL; ++iP) + unmark(i); + + return s; diff --git a/devel/re2c/files/patch-ad b/devel/re2c/files/patch-ad new file mode 100644 index 0000000..38d2b12 --- /dev/null +++ b/devel/re2c/files/patch-ad @@ -0,0 +1,13 @@ +--- actions.cc.old Fri Feb 4 15:23:32 2000 ++++ actions.cc Fri Feb 4 15:24:14 2000 +@@ -460,8 +460,9 @@ + + void genCode(ostream& o, RegExp *re){ + CharSet cs; ++ uint j; + memset(&cs, 0, sizeof(cs)); +- for(uint j = 0; j < nChars; ++j){ ++ for(j = 0; j < nChars; ++j){ + cs.rep[j] = &cs.ptn[0]; + cs.ptn[j].nxt = &cs.ptn[j+1]; + } |