Ignore:
Timestamp:
Oct 22, 2007, 7:25:37 PM (14 years ago)
Author:
Peter
Message:

minor bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/OptionHelp.cc

    r984 r985  
    3737    : OptionSwitch(cmd, flag, desc, false), synopsis_("")
    3838  {
    39     usage_ = std::string("Usage: ")+cmd.program_name()+
    40       std::string(" [OPTION]...\n");
    4139  }
    4240
     
    4543                               std::vector<std::string>::iterator last)
    4644  {
    47     std::cout << usage_ << "\n" << synopsis_ << "\n";
     45    if (usage_.empty())
     46      std::cout << "Usage: " << cmd().program_name() << " [OPTION]...\n\n";
     47    else
     48      std::cout << usage_ << "\n";
     49    std::cout << synopsis_ << "\n";
    4850    std::cout << cmd() << "\n";
    4951    std::cout << post_cmd_;
Note: See TracChangeset for help on using the changeset viewer.