]> git.donarmstrong.com Git - mothur.git/blobdiff - engine.cpp
fixed memory leak of groupmap in reads
[mothur.git] / engine.cpp
index 1ca98b021214e624215ec897a549e0f14ed47ca3..5e56479f2851f89e324f8c62dc54250324da7d66 100644 (file)
  */
 using namespace std;
 
-#include <string>
-#include <iostream>
-#include <iomanip>
-#include <fstream>
-#include <vector>
-#include <set>
-#include <exception>
 
 #include "utilities.hpp"
 #include "globaldata.hpp"
@@ -75,6 +68,8 @@ bool InteractEngine::getInput(){
 
                        cout << endl << "mothur > ";
                        getline(cin, input);
+                       if (cin.eof()) { input = "quit()"; }
+                       
                        errorFree = errorCheckor->checkInput(input);
                        if (errorFree == true) {
                                CommandOptionParser parser(input);
@@ -148,7 +143,9 @@ bool BatchEngine::getInput(){
                while(quitCommandCalled == 0){
                
                        getline(inputBatchFile, input);
-                       cout << endl << "dotur > " << input << endl;
+                       if (inputBatchFile.eof()) { input = "quit()"; }
+                       
+                       cout << endl << "mothur > " << input << endl;
                        errorFree = errorCheckor->checkInput(input);
                        if (errorFree == true) {
                                CommandOptionParser parser(input);