X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=quitcommand.cpp;h=2c302e9e6b4f195c7d4acb1df97fd6110ea02ad5;hp=99dc46be30ca9c282d82474e5021bdf4fc7f3c33;hb=b206f634aae1b4ce13978d203247fb64757d5482;hpb=510b1cfc25cd79391d6973ca20c5ec25fb1bb3b2 diff --git a/quitcommand.cpp b/quitcommand.cpp index 99dc46b..2c302e9 100644 --- a/quitcommand.cpp +++ b/quitcommand.cpp @@ -10,38 +10,19 @@ #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; } - - else if (option != "") { mothurOut("There are no valid parameters for the quit command."); mothurOutEndLine(); 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; } - //**********************************************************************************************************************