X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2Ftoolkit%2Fbamtools.cpp;h=4875a9a10bdb3ba1dbfdc9ac50d1f5ccfc0ebe07;hb=8c80d760637f8df39262683cd2570f0589423d36;hp=2f91e2def6c4e3a11b97818476517711259d853b;hpb=577b6032aa3d85616047c8aba6061dd8dad20cfc;p=bamtools.git diff --git a/src/toolkit/bamtools.cpp b/src/toolkit/bamtools.cpp index 2f91e2d..4875a9a 100644 --- a/src/toolkit/bamtools.cpp +++ b/src/toolkit/bamtools.cpp @@ -3,12 +3,11 @@ // Marth Lab, Department of Biology, Boston College // All rights reserved. // --------------------------------------------------------------------------- -// Last modified: 13 December 2010 +// Last modified: 21 March 2011 (DB) // --------------------------------------------------------------------------- // Integrates a number of BamTools functionalities into a single executable. // *************************************************************************** -// includes #include "bamtools_convert.h" #include "bamtools_count.h" #include "bamtools_coverage.h" @@ -22,12 +21,11 @@ #include "bamtools_split.h" #include "bamtools_stats.h" #include "bamtools_version.h" - #include +#include #include #include #include - using namespace BamTools; using namespace std; @@ -121,7 +119,7 @@ int Help(int argc, char* argv[]) { cerr << endl; cerr << "See 'bamtools help COMMAND' for more information on a specific command." << endl; cerr << endl; - return 0; + return EXIT_SUCCESS; } // print version info @@ -136,9 +134,9 @@ int Version(void) { cout << "bamtools " << versionStream.str() << endl; cout << "Part of BamTools API and toolkit" << endl; cout << "Primary authors: Derek Barnett, Erik Garrison, Michael Stromberg" << endl; - cout << "(c) 2009-2010 Marth Lab, Biology Dept., Boston College" << endl; + cout << "(c) 2009-2011 Marth Lab, Biology Dept., Boston College" << endl; cout << endl; - return 0; + return EXIT_SUCCESS; } // toolkit entry point @@ -153,10 +151,10 @@ int main(int argc, char* argv[]) { // 'bamtools version', 'bamtools --version', or 'bamtools -v' if ( IsVersion(argv[1]) ) return Version(); - // determine desired sub-tool + // determine desired sub-tool, run if found AbstractTool* tool = CreateTool( argv[1] ); - - // if found, run tool... otherwise show help if ( tool ) return tool->Run(argc, argv); - else return Help(argc, argv); + + // no tool matched, show help + return Help(argc, argv); }