--- freefem/fem/femDisk.cpp.origSat Jul 19 04:09:32 2003
+++ freefem/fem/femDisk.cpp Sat Jul 19 04:13:43 2003
@@ -95,7 +95,7 @@
char *result = 0;
int dummy;
-ifstream fin( path );
+std::ifstream fin( path );
if ( fin.fail() )
{
@@ -198,7 +198,7 @@
int i;
char *result = NULL;
-ofstream fout( path );
+std::ofstream fout( path );
if ( fout.fail() )
{
@@ -210,11 +210,11 @@
*/
if ((result = strstr (path,.amdba)) != NULL) /* amdba format */
{
- fout t-getNumberOfPoints() t-getNumberOfCells() endl;
+ fout t-getNumberOfPoints() t-getNumberOfCells() std::endl;
for (i = 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;
}
@@ -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 = strstr (path,.am_fmt)) != NULL)/* am_fmt format */
{
#if 0
- fout t-getNumberOfPoints() t-getNumberOfCells() endl;
+ fout t-getNumberOfPoints() t-getNumberOfCells() std::endl;
dummy = 0;
for (i = 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 = 0;
for (i = 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 = 0;
for (i = 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 = 0;
for (i = 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::endl;
for (i = 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;
}
@@ -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 = t-getNumberOfPoints();
-ofstream file (path);
+std::ofstream file (path);
file.precision (8);
-file nsN endl;
+file nsN std::endl;
for (k = 0; k ns; k++)
{
if (N == 1)
@@ -373,7 +373,7 @@
file (param)-nuyy2[k] ;
file ;
}
- file endl;
+ file std::endl;
}
file.close ();
return 0;
@@ -383,9 +383,9 @@
int
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;
}
--- freefem/fem/femGibbs.cpp.orig Sat Jul 19 04:10:36 2003
+++ freefem/fem/femGibbs.cppSat Jul 19 04:19:02 2003
@@ -38,6 +38,7 @@
#include math.h
#include stdio.h
#include stdlib.h
+#include string.h
//
// Freefem includes
@@ -1173,9 +1174,9 @@
{
f = new femPoint[ns];
for (i = 0; i ns; ++i)
-f[i] = rp[i];
+memcpy (f[i], rp[i], sizeof (femPoint));
for (i = 0; i ns; ++i)
-rp[r[i] - 1] = f[i];
+memcpy (rp[r[i] - 1], f[i], sizeof (femPoint));
for (j = 0; j nt; ++j)
for (i = 0; i 3; i++)
--- 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);
}
--- freefem/fem/femMisc.cpp.origSat Jul 19 04:09:41 2003
+++ freefem/fem/femMisc.cpp Sat Jul 19