]> git.treefish.org Git - phys/latlib.git/blobdiff - writeout.cpp
...
[phys/latlib.git] / writeout.cpp
index 4fb68e12a64f5b0a795be0ad86c82037d05533ac..eb14309e53c93959e53e4dc4668336af9681c339 100644 (file)
@@ -55,14 +55,13 @@ writeout::~writeout()
                  cerr << "collecting " << nextfile << endl;
 
                  ifstream myfile( (fulldir + "/" + nextfile).c_str() );
-                 while(myfile.good()){
+                 while(true){
                    string line;
                    getline(myfile, line);
-                   of << line << flush;
+                   if( !myfile.good() ) break;
+                   of << line << endl << flush;
                  }
                  myfile.close();
-                 of << endl << flush;
-
                  remove( (fulldir + "/" + nextfile).c_str() );
                  jobsdone++;
                }