]> git.donarmstrong.com Git - mothur.git/blobdiff - engine.cpp
changed normalize.shared and sub.sample commands to fix bug in normalize.shared and...
[mothur.git] / engine.cpp
index d595be332eed785c27037710396d1a7dd46c845e..af88e4f143924e5938740b52d4e76dbcd641f910 100644 (file)
@@ -185,6 +185,9 @@ bool InteractEngine::getInput(){
                                        mout->Treenames.clear();
                                        mout->names.clear();
                                        mout->saveNextLabel = "";
+                                       mout->printedHeaders = false;
+                                       mout->currentBinLabels.clear();
+                                       mout->binLabelsInFile.clear();
                                                        
                                        Command* command = cFactory->getCommand(commandName, options);
                                        quitCommandCalled = command->execute();
@@ -221,7 +224,7 @@ string Engine::getCommand()  {
                                
                                if(nextCommand != NULL) {  add_history(nextCommand);  } 
                                else{ //^D causes null string and we want it to quit mothur
-                                       strcpy(nextCommand, "quit"); 
+                                       nextCommand = strdup("quit");
                                        mout->mothurOut(nextCommand);
                                }       
                                
@@ -366,6 +369,10 @@ bool BatchEngine::getInput(){
                                        mout->Treenames.clear();
                                        mout->names.clear();
                                        mout->saveNextLabel = "";
+                                       mout->printedHeaders = false;
+                                       mout->currentBinLabels.clear();
+                                       mout->binLabelsInFile.clear();
+
                                                        
                                        Command* command = cFactory->getCommand(commandName, options);
                                        quitCommandCalled = command->execute();
@@ -529,6 +536,10 @@ bool ScriptEngine::getInput(){
                                        mout->Treenames.clear();
                                        mout->names.clear();
                                        mout->saveNextLabel = "";
+                                       mout->printedHeaders = false;
+                                       mout->currentBinLabels.clear();
+                                       mout->binLabelsInFile.clear();
+
                                                        
                                        Command* command = cFactory->getCommand(commandName, options);
                                        quitCommandCalled = command->execute();