Ignore:
Timestamp:
Jun 2, 2010, 3:56:35 AM (11 years ago)
Author:
Peter Johansson
Message:

refs #307

Splittin the Parameter class into two separate classes and a base
class holding the common parts. The output of '--help' is not sorted
as before otherwise everything should be the same. The sort will
require some ammendment in yat.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/OptionVersion.cc

    r1058 r1060  
    3333#include <apr_version.h>
    3434
    35 #ifdef HAVE_PLPLOT
    36 #include <plplot/plstream.h>
    37 #endif
    38 
    3935#include <cstdlib>
    4036#include <iostream>
     
    5753    yat::utility::ColumnStream cs(std::cout, 1);
    5854    cs.width(0)=79;
    59     cs << PACKAGE_NAME << " " << PACKAGE_VERSION;
     55    cs << prog_name_ << " " << PACKAGE_VERSION;
    6056    bool no_verbose = verbose_ && verbose_->present() && !verbose_->value();
    6157    if (!no_verbose) {
     
    8379      cs << apr_version_string();
    8480      cs << "\n";
    85 #ifdef HAVE_PLPLOT
    86       cs << "using libplplot ";
    87       plstream pls;
    88       char* plplot_version = new char[32];
    89       pls.gver(plplot_version);
    90       cs << plplot_version << "\n";
    91       delete [] plplot_version;
    92 #endif
     81      cs << extra_;
    9382    }
    9483    exit(EXIT_SUCCESS);
    9584  }
    9685
     86
     87  void OptionVersion::extra(const std::string& str)
     88  {
     89    extra_ = str;
     90  }
     91
     92
     93  void OptionVersion::program_name(const std::string& str)
     94  {
     95    prog_name_ = str;
     96  }
     97
    9798}} // of namespace svndigest and theplu
Note: See TracChangeset for help on using the changeset viewer.