]> git.donarmstrong.com Git - mothur.git/blobdiff - quitcommand.cpp
changing command name classify.shared to classifyrf.shared
[mothur.git] / quitcommand.cpp
index 05e2758a2778505858283a450dbfb0b270cf77ca..2c302e9e6b4f195c7d4acb1df97fd6110ea02ad5 100644 (file)
 #include "quitcommand.h"
 
 //**********************************************************************************************************************
-
-QuitCommand::QuitCommand(string option){
-               abort = false;
+QuitCommand::QuitCommand(string option) {
+               abort = false; calledHelp = false;   
                
                //allow user to run help
-               if(option == "help") { help(); abort = true; }
+               if(option == "help") { help(); abort = true; calledHelp = true; }
+               else if(option == "citation") { citation(); abort = true; calledHelp = true;}
 
 }
 //**********************************************************************************************************************
-
-void QuitCommand::help(){
-       try {
-                mothurOut("The quit command will terminate mothur and should be in the following format: \n"); 
-                mothurOut("quit() or quit\n\n");
-       }
-       catch(exception& e) {
-               errorOut(e, "QuitCommand", "help");
-               exit(1);
-       }
-}
-
-//**********************************************************************************************************************
-
 QuitCommand::~QuitCommand(){}
-
 //**********************************************************************************************************************
-
 int QuitCommand::execute(){
        if (abort == true) { return 0; }
        return 1;
 }
-
 //**********************************************************************************************************************