]> git.donarmstrong.com Git - mothur.git/blobdiff - engine.cpp
*** empty log message ***
[mothur.git] / engine.cpp
index 1ca98b021214e624215ec897a549e0f14ed47ca3..68a75005f1521411227b20fe9ed253ec0b902e1c 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"
-#include "commandoptionparser.hpp"
-#include "command.hpp"
-#include "commandfactory.hpp"
-#include "errorchecking.h"
 #include "engine.hpp"
 
 /***********************************************************************/
@@ -75,6 +61,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 +136,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);