code to display only once the message about the help parameter + some indent fix + some more comments
This commit is contained in:
parent
1d1046d19f
commit
9f4c073678
3 changed files with 61 additions and 44 deletions
|
|
@ -55,16 +55,16 @@ void make_help(eoParser & _parser)
|
|||
// Only help parameter will not be in status file - but who cares???
|
||||
if (statusParam.value() != "")
|
||||
{
|
||||
ofstream os(statusParam.value().c_str());
|
||||
os << _parser; // and you can use that file as parameter file
|
||||
ofstream os(statusParam.value().c_str());
|
||||
os << _parser; // and you can use that file as parameter file
|
||||
}
|
||||
// do the following AFTER ALL PARAMETERS HAVE BEEN PROCESSED
|
||||
// i.e. in case you need parameters somewhere else, postpone these
|
||||
if (_parser.userNeedsHelp())
|
||||
{
|
||||
_parser.printHelp(cout);
|
||||
cout << "You can use an edited copy of file " << statusParam.value()
|
||||
<< " as parameter file" << endl;
|
||||
cout << "You can use an edited copy of file " << statusParam.value()
|
||||
<< " as parameter file" << endl;
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue