From owner-freebsd-ports Fri Feb 4 6:33: 2 2000 Delivered-To: freebsd-ports@freebsd.org Received: from mail.surf1.de (mail.Surf1.de [194.25.165.21]) by builder.freebsd.org (Postfix) with ESMTP id 186C5417F for ; Fri, 4 Feb 2000 06:32:59 -0800 (PST) Received: from cichlids.com (pC19F548D.dip0.t-ipconnect.de [193.159.84.141]) by mail.surf1.de (8.9.3/8.9.3) with ESMTP id PAA07660 for ; Fri, 4 Feb 2000 15:33:28 +0100 Received: from cichlids.cichlids.com (cichlids.cichlids.com [192.168.0.10]) by cichlids.com (Postfix) with ESMTP id 51004AB98 for ; Fri, 4 Feb 2000 15:33:28 +0100 (CET) Received: (from alex@localhost) by cichlids.cichlids.com (8.9.3/8.9.3) id PAA10719 for ports@freebsd.org; Fri, 4 Feb 2000 15:33:58 +0100 (CET) (envelope-from alex) Date: Fri, 4 Feb 2000 15:33:58 +0100 From: Alexander Langer To: ports@freebsd.org Subject: fix devel/re2c under current (bentofied) Message-ID: <20000204153358.A10711@cichlids.cichlids.com> Mail-Followup-To: ports@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i X-PGP-Fingerprint: 44 28 CA 4C 46 5B D3 A8 A8 E3 BA F3 4E 60 7D 7F X-Verwirrung: Dieser Header dient der allgemeinen Verwirrung. Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hmm, gnats-submit still broken, I thought stuff is kept in the mailq? >Submitter-Id: current-users >Originator: Alexander Langer >Organization: This space is intentionally left blank. >Confidential: no >Synopsis: fix devel/re2c (bentofied) >Severity: non-critical >Priority: low >Category: ports >Release: FreeBSD 4.0-CURRENT i386 >Class: change-request >Environment: -current. >Description: fix C++ build under -current. >How-To-Repeat: see bento >Fix: --- patch-ac begins here --- --- 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; --- patch-ac ends here --- --- patch-ad begins here --- --- 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]; } --- patch-ad ends here --- ----- End forwarded message ----- -- I doubt, therefore I might be. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message