From owner-freebsd-ports@FreeBSD.ORG Fri Jul 18 20:05:42 2003 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7004337B40E; Fri, 18 Jul 2003 20:05:42 -0700 (PDT) Received: from mailout.informatik.tu-muenchen.de (mailout.informatik.tu-muenchen.de [131.159.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 28CE943F75; Fri, 18 Jul 2003 20:05:41 -0700 (PDT) (envelope-from barner@in.tum.de) Received: by zi025.glhnet.mhn.de (Postfix, from userid 1000) id C4B4B38792; Sat, 19 Jul 2003 05:05:39 +0200 (CEST) Date: Sat, 19 Jul 2003 05:05:39 +0200 From: Simon Barner To: Kris Kennaway Message-ID: <20030719030539.GB467@zi025.glhnet.mhn.de> References: <20030718025200.GA36893@rot13.obsecurity.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="eNMatiwYGLtwo1cJ" Content-Disposition: inline In-Reply-To: <20030718025200.GA36893@rot13.obsecurity.org> User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new at informatik.tu-muenchen.de cc: ports@FreeBSD.org cc: current@FreeBSD.org Subject: Re: Fixing gcc 3.3 compile failures -- fix for math/freefem X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jul 2003 03:05:43 -0000 --eNMatiwYGLtwo1cJ Content-Type: multipart/mixed; boundary="6Vw0j8UKbyX0bfpA" Content-Disposition: inline --6Vw0j8UKbyX0bfpA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline --6Vw0j8UKbyX0bfpA Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="patch-freefem::fem::femDisk.cpp" Content-Transfer-Encoding: quoted-printable --- freefem/fem/femDisk.cpp.orig Sat Jul 19 04:09:32 2003 +++ freefem/fem/femDisk.cpp Sat Jul 19 04:13:43 2003 @@ -95,7 +95,7 @@ char *result =3D 0; int dummy; =20 - ifstream fin( path ); + std::ifstream fin( path ); =20 if ( fin.fail() ) { @@ -198,7 +198,7 @@ int i; char *result =3D NULL; =20 - ofstream fout( path ); + std::ofstream fout( path ); =20 if ( fout.fail() ) { @@ -210,11 +210,11 @@ */ if ((result =3D strstr (path,".amdba")) !=3D NULL) /* amdba format */ { - fout << t->getNumberOfPoints() << " " << t->getNumberOfCells() << endl; + fout << t->getNumberOfPoints() << " " << t->getNumberOfCells() << std::en= dl; =20 for (i =3D 0; i < t->getNumberOfPoints(); i++) { - fout << i+1 << " " << t->rp[i][0] << " " << t->rp[i][1] << " " << t->= ng[i] << endl; + fout << i+1 << " " << t->rp[i][0] << " " << t->rp[i][1] << " " << t->= ng[i] << std::endl; } =20 =20 @@ -224,13 +224,13 @@ << " " << t->tr[i][0]+1 << " " << t->tr[i][1]+1 << " " << t->tr[i][2]+1 - << " " << t->ngt[i] << endl; + << " " << t->ngt[i] << std::endl; } } else if ((result =3D strstr (path,".am_fmt")) !=3D NULL)/* am_fmt form= at */ { #if 0 - fout << t->getNumberOfPoints() << " " << t->getNumberOfCells() < endl; + fout << t->getNumberOfPoints() << " " << t->getNumberOfCells() < std::end= l; =20 dummy =3D 0; for (i =3D 0; i < t->getNumberOfCells(); i++) @@ -238,39 +238,39 @@ fout << t->tr[i][0]+1 << " " << t->tr[i][1]+1 << " " << t->tr[i][2]+1 - << endl; + << std::endl; END_OF_LINE(data, dummy, 1); } if (dummy) fprintf(data,"\n"); dummy =3D 0; for (i =3D 0; i < t->getNumberOfPoints(); i++) { - fout << t->rp[i][0] << " " << t->rp[i][1] << endl; + fout << t->rp[i][0] << " " << t->rp[i][1] << std::endl; END_OF_LINE (data, dummy, 1); } if (dummy) fprintf(data,"\n"); dummy =3D 0; for (i =3D 0; i < t->getNumberOfCells(); i++) { - fout << t->ngt[i] << endl; + fout << t->ngt[i] << std::endl; END_OF_LINE (data, dummy, 9); } if (dummy) fprintf(data,"\n"); dummy =3D 0; for (i =3D 0; i < t->getNumberOfPoints(); i++) { - fout << t->ng[i] << endl; + fout << t->ng[i] << std::endl; END_OF_LINE (data, dummy, 9); } #endif } else { - fout << t->getNumberOfPoints() << " " << t->getNumberOfCells() << endl; + fout << t->getNumberOfPoints() << " " << t->getNumberOfCells() << std::en= dl; =20 for (i =3D 0; i < t->getNumberOfPoints(); i++) { - fout << t->rp[i][0] << " " << t->rp[i][1] << " " << t->ng[i] << endl; + fout << t->rp[i][0] << " " << t->rp[i][1] << " " << t->ng[i] << std::= endl; } =20 =20 @@ -279,7 +279,7 @@ fout << t->tr[i][0]+1 << " " << t->tr[i][1]+1 << " " << t->tr[i][2]+1 - << " " << t->ngt[i] << endl; + << " " << t->ngt[i] << std::endl; } } return 0; @@ -317,9 +317,9 @@ saveparam (fcts * param, femMesh * t, char *path, int N) { int k, ns =3D t->getNumberOfPoints(); - ofstream file (path); + std::ofstream file (path); file.precision (8); - file << ns << " " << N << endl; + file << ns << " " << N << std::endl; for (k =3D 0; k < ns; k++) { if (N =3D=3D 1) @@ -373,7 +373,7 @@ file << (param)->nuyy2[k] << " "; file << " "; } - file << endl; + file << std::endl; } file.close (); return 0; @@ -383,9 +383,9 @@ int=20 saveconst (creal f, char *path) { - ofstream file (path, ios::out | ios::app); - // file.seekoff(0,ios::end,0); - file << f << endl; + std::ofstream file (path, std::ios::out | std::ios::app); + // file.seekoff(0,std::ios::end,0); + file << f << std::endl; file.close (); return 0; } --6Vw0j8UKbyX0bfpA Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="patch-freefem::fem::femGibbs.cpp" Content-Transfer-Encoding: quoted-printable --- freefem/fem/femGibbs.cpp.orig Sat Jul 19 04:10:36 2003 +++ freefem/fem/femGibbs.cpp Sat Jul 19 04:19:02 2003 @@ -38,6 +38,7 @@ #include #include #include +#include =20 // // Freefem includes @@ -1173,9 +1174,9 @@ { f =3D new femPoint[ns]; for (i =3D 0; i < ns; ++i) - f[i] =3D rp[i]; + memcpy (f[i], rp[i], sizeof (femPoint)); for (i =3D 0; i < ns; ++i) - rp[r[i] - 1] =3D f[i]; + memcpy (rp[r[i] - 1], f[i], sizeof (femPoint)); =20 for (j =3D 0; j < nt; ++j) for (i =3D 0; i < 3; i++) --6Vw0j8UKbyX0bfpA Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="patch-freefem::fem::femGraphicX11.cpp" Content-Transfer-Encoding: quoted-printable --- freefem/fem/femGraphicX11.cpp.orig Sat Jul 19 04:10:02 2003 +++ freefem/fem/femGraphicX11.cpp Sat Jul 19 04:12:31 2003 @@ -118,7 +118,7 @@ void out_of_memory () { - cerr << "FreeFEM error: operator new failed; not enough memory" << endl; + std::cerr << "FreeFEM error: operator new failed; not enough memory" << = std::endl; exit (-1); } =20 --6Vw0j8UKbyX0bfpA Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="patch-freefem::fem::femMisc.cpp" Content-Transfer-Encoding: quoted-printable --- freefem/fem/femMisc.cpp.orig Sat Jul 19 04:09:41 2003 +++ freefem/fem/femMisc.cpp Sat Jul 19 04:12:31 2003 @@ -70,24 +70,24 @@ return a; } =20 -ostream & operator << (ostream & os, const Complex & a) +std::ostream & operator << (std::ostream & os, const Complex & a) { os << a.re << " " << a.im << " "; return os; } -istream & operator >> (istream & os, Complex & a) +std::istream & operator >> (std::istream & os, Complex & a) { os >> a.re >> a.im; return os; } =20 -ostream & operator << (ostream & os, cvect & a) +std::ostream & operator << (std::ostream & os, cvect & a) { for (int i =3D 0; i < N; i++) os << a[i] << " "; return os; } -ostream & operator << (ostream & os, cmat & a) +std::ostream & operator << (std::ostream & os, cmat & a) { for (int i =3D 0; i < N; i++) for (int j =3D 0; j < N; j++) --6Vw0j8UKbyX0bfpA Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="patch-freefem::fem::femParser.cpp" Content-Transfer-Encoding: quoted-printable --- freefem/fem/femParser.cpp.orig Sat Jul 19 04:09:53 2003 +++ freefem/fem/femParser.cpp Sat Jul 19 04:35:15 2003 @@ -1168,9 +1168,9 @@ if (cursym =3D=3D oldvar) { thecst =3D 1.F; - ofstream file (thechaine); + std::ofstream file (thechaine); =20 - file << ' ' << endl; + file << ' ' << std::endl; file.close (); } // clean the file else @@ -2539,7 +2539,7 @@ =20 =20 #if defined(DEBUG) - cerr << "adaptation process called" << endl; + std::cerr << "adaptation process called" << std::endl; #endif =20 nsol =3D 4; @@ -2553,7 +2553,7 @@ nsol =3D 3; =20 #if defined(DEBUG) - cerr << " nsol =3D " << nsol << endl; + std::cerr << " nsol =3D " << nsol << std::endl; #endif /* DEBUG */ =20 /* @@ -2614,10 +2614,10 @@ #endif /* not NOXGFEM */ =20 #ifdef DEBUG - cout<m,adapt_param.aniso,adapt_param.err0= ,adapt_param.lmax,adapt_param.lmin,adapt_param.nsol,adapt_param.refwall,ada= pt_param.hwall,malla->factr(),adapt_param.nbt_max); @@ -2723,15 +2723,15 @@ } #ifdef DEBUG the_clock(tiempo); - cout<<"--------------------------------------------------------"<factr() << endl; + std::cerr << "adapt angulo:" << adapt_param.angulo << std::endl + << "factor: " << malla->factr() << std::endl; #endif /* DEBUG */ =20 //cad=3Dbuild(t_cad,adapt_param.angulo,malla->factr()); delete t_cad; @@ -2759,24 +2759,24 @@ } =20 #ifdef DEBUG - cout<<"=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D"<np, t_fin->nt ); @@ -2796,7 +2796,7 @@ __mesh.removeBdyT(); =20 #if defined(DEBUG) - cerr << "Done" << endl; + std::cerr << "Done" << std::endl; #endif /* DEBUG */ =20 /* @@ -2808,7 +2808,7 @@ * Update the table of functions */ #if defined(DEBUG) - cerr << "Updating the table of functions:" << __mesh.getNumberOfPoints()= << endl; + std::cerr << "Updating the table of functions:" << __mesh.getNumberOfPoi= nts() << std::endl; #endif /* DEBUG */ if (nfunc > 0) { @@ -2828,7 +2828,7 @@ delete [] interp_func; } #if defined(DEBUG) - cerr << "Done update function table" << endl; + std::cerr << "Done update function table" << std::endl; #endif /* DEBUG */ =20 delete t_fin; @@ -2838,7 +2838,7 @@ delete cad; =20 #if defined(DEBUG) - cerr << "Done adaptation" << endl; + std::cerr << "Done adaptation" << std::endl; #endif /* DEBUG */ =20 #endif /* ADAPT */ @@ -3412,18 +3412,18 @@ void=20 femParser::showident (ident * i) { - cerr << i->name << "\n"; + std::cerr << i->name << "\n"; } =20 void=20 femParser::showtreeaux (int level, noeudPtr t) { // blanks (level); - cerr << mesg[t->symb] << " " << (int)t->symb << "\n"; + std::cerr << mesg[t->symb] << " " << (int)t->symb << "\n"; if (realpart (t->value)) { // blanks (level + 1); - cerr << realpart (t->value) << "\n"; + std::cerr << realpart (t->value) << "\n"; } if (t->name) { --6Vw0j8UKbyX0bfpA-- --eNMatiwYGLtwo1cJ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQE/GLWDCkn+/eutqCoRAgptAJ99PVZW0aUnekkQOMBuADlPgzP04wCg+23F XNEtemse2HHuBKtrEJL327w= =q3Pn -----END PGP SIGNATURE----- --eNMatiwYGLtwo1cJ--