~ubuntu-branches/debian/sid/nordugrid-arc/sid

« back to all changes in this revision

Viewing changes to src/hed/libs/common/OptionParser.cpp

  • Committer: Package Import Robot
  • Author(s): Mattias Ellert
  • Date: 2012-12-13 16:41:31 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20121213164131-0fumka0jar8mxm07
Tags: 2.0.1-1
* 2.0.1 Release
* Drop patches accepted upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
340
340
        std::cout << IString("Application Options:") << std::endl;
341
341
        for (std::list<OptionBase*>::iterator it = options.begin();
342
342
             it != options.end(); it++) {
343
 
          std::cout << "  -" << (*it)->shortOpt << ", --";
 
343
          std::cout << "  ";
 
344
          if ((*it)->shortOpt) {
 
345
            std::cout << "-" << (*it)->shortOpt << ", ";
 
346
          }
 
347
          std::cout << "--";
344
348
          if ((*it)->argDesc.empty())
345
 
            std::cout << std::setw(20) << std::left << (*it)->longOpt;
 
349
            std::cout << std::setw(20+4*((*it)->shortOpt == 0)) << std::left << (*it)->longOpt;
346
350
          else
347
 
            std::cout << (*it)->longOpt << "=" << std::setw(19-((*it)->longOpt).length()) << std::left << IString((*it)->argDesc);
 
351
            std::cout << (*it)->longOpt << "=" << std::setw(19-((*it)->longOpt).length()+(((*it)->shortOpt == 0))*4) << std::left << IString((*it)->argDesc);
348
352
          std::cout << "  " << IString((*it)->optDesc) << std::endl;
349
353
        }
350
354
        std::cout << std::endl;