mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
argList.C - don't emit banner with -help, -doc usage etc.
This makes it easier to find the usage on the screen. Provide hint about -help if the docs cannot be found.
This commit is contained in:
@ -168,7 +168,6 @@ Foam::argList::argList
|
|||||||
{
|
{
|
||||||
// Check if this run is a parallel run by searching for any parallel option
|
// Check if this run is a parallel run by searching for any parallel option
|
||||||
// If found call runPar (might filter argv)
|
// If found call runPar (might filter argv)
|
||||||
|
|
||||||
for (int argi=0; argi<argc; argi++)
|
for (int argi=0; argi<argc; argi++)
|
||||||
{
|
{
|
||||||
if (argv[argi][0] == '-')
|
if (argv[argi][0] == '-')
|
||||||
@ -183,12 +182,6 @@ Foam::argList::argList
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Print the banner once only for parallel runs
|
|
||||||
if (Pstream::master())
|
|
||||||
{
|
|
||||||
IOobject::writeBanner(Info, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
// convert argv -> args_ and capture ( ... ) lists
|
// convert argv -> args_ and capture ( ... ) lists
|
||||||
// for normal arguments and for options
|
// for normal arguments and for options
|
||||||
regroupArgv(argc, argv);
|
regroupArgv(argc, argv);
|
||||||
@ -291,8 +284,10 @@ Foam::argList::argList
|
|||||||
string dateString = clock::date();
|
string dateString = clock::date();
|
||||||
string timeString = clock::clockTime();
|
string timeString = clock::clockTime();
|
||||||
|
|
||||||
|
// Print the banner once only for parallel runs
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
|
IOobject::writeBanner(Info, true);
|
||||||
Info<< "Exec : " << argListString.c_str() << nl
|
Info<< "Exec : " << argListString.c_str() << nl
|
||||||
<< "Date : " << dateString.c_str() << nl
|
<< "Date : " << dateString.c_str() << nl
|
||||||
<< "Time : " << timeString.c_str() << nl
|
<< "Time : " << timeString.c_str() << nl
|
||||||
@ -609,9 +604,9 @@ void Foam::argList::printUsage() const
|
|||||||
Info<< ']';
|
Info<< ']';
|
||||||
}
|
}
|
||||||
|
|
||||||
// place help/doc options of the way at the end,
|
// place help/doc/srcDoc options of the way at the end,
|
||||||
// but with an extra space to separate it a little
|
// but with an extra space to separate it a little
|
||||||
Info<< " [-help] [-doc] [-srcDoc]" << endl;
|
Info<< " [-help] [-doc] [-srcDoc]\n" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -663,7 +658,9 @@ void Foam::argList::displayDoc(bool source) const
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Info<< "No documentation found" << endl;
|
Info<< nl
|
||||||
|
<< "No documentation found for " << executable_
|
||||||
|
<< ", but you can use -help to display the usage\n" << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user