]> git.donarmstrong.com Git - mothur.git/blobdiff - distancecommand.cpp
This is v.1.4.0
[mothur.git] / distancecommand.cpp
index 0c9d011503370886d2f802d2903c72f985cbc40e..67ad7beb77b69d72f11914579246eb35dfa707e4 100644 (file)
@@ -309,18 +309,12 @@ void DistanceCommand::appendFiles(string temp, string filename) {
        
                //open output file in append mode
                openOutputFileAppend(filename, output);
-               
-               //open temp file for reading
                openInputFile(temp, input);
                
-               string line;
-               //read input file and write to output file
-               while(input.eof() != true) {
-                       getline(input, line); //getline removes the newline char
-                       if (line != "") {
-                               output << line << endl;   // Appending back newline char 
-                       }
-               }       
+               while(char c = input.get()){
+                       if(input.eof())         {       break;                  }
+                       else                            {       output << c;    }
+               }
                
                input.close();
                output.close();
@@ -334,4 +328,4 @@ void DistanceCommand::appendFiles(string temp, string filename) {
                exit(1);
        }       
 }
-/**************************************************************************************************/
\ No newline at end of file
+/**************************************************************************************************/