mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: adjust manpage layouts
This commit is contained in:
@ -129,7 +129,7 @@ process()
|
|||||||
if grep -F -q "SYNOPSIS" "$tmpFile" 2>/dev/null
|
if grep -F -q "SYNOPSIS" "$tmpFile" 2>/dev/null
|
||||||
then
|
then
|
||||||
cat "$tmpFile" | \
|
cat "$tmpFile" | \
|
||||||
sed -e "${sedFilter:-p}" | "${gzipFilter:-cat}" \
|
sed -e "${sedFilter}" | "${gzipFilter:-cat}" \
|
||||||
>| "$outFile${gzipFilter:+.gz}"
|
>| "$outFile${gzipFilter:+.gz}"
|
||||||
|
|
||||||
echo "$outFile${gzipFilter:+.gz}" 1>&2
|
echo "$outFile${gzipFilter:+.gz}" 1>&2
|
||||||
|
|||||||
@ -40,7 +40,7 @@ static inline void printManFooter()
|
|||||||
<< "Online documentation "
|
<< "Online documentation "
|
||||||
<< "https://www.openfoam.com/documentation/" << nl
|
<< "https://www.openfoam.com/documentation/" << nl
|
||||||
<< ".SH COPYRIGHT" << nl
|
<< ".SH COPYRIGHT" << nl
|
||||||
<< "Copyright 2018 OpenCFD Ltd." << nl;
|
<< "Copyright \\(co 2018 OpenCFD Ltd." << nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -162,12 +162,11 @@ void Foam::argList::printMan() const
|
|||||||
{
|
{
|
||||||
// .TH "<APPLICATION>" 1 "OpenFOAM-<version>" "source" "category"
|
// .TH "<APPLICATION>" 1 "OpenFOAM-<version>" "source" "category"
|
||||||
|
|
||||||
Info
|
Info<< ".TH" << token::SPACE
|
||||||
<< ".TH" << token::SPACE
|
// All uppercase (returns a Foam::string) and thus also quoted
|
||||||
// All uppercase and quoted
|
|
||||||
<< stringOps::upper(executable_) << token::SPACE
|
<< stringOps::upper(executable_) << token::SPACE
|
||||||
<< "\"1\"" << token::SPACE
|
<< 1 << token::SPACE
|
||||||
<< token::DQUOTE << "OpenFOAM-v" << OPENFOAM << token::DQUOTE
|
<< token::DQUOTE << "OpenFOAM-v" << foamVersion::api << token::DQUOTE
|
||||||
<< token::SPACE
|
<< token::SPACE
|
||||||
<< token::DQUOTE << "www.openfoam.com" << token::DQUOTE
|
<< token::DQUOTE << "www.openfoam.com" << token::DQUOTE
|
||||||
<< token::SPACE
|
<< token::SPACE
|
||||||
@ -177,8 +176,7 @@ void Foam::argList::printMan() const
|
|||||||
|
|
||||||
// .SH NAME
|
// .SH NAME
|
||||||
// <application> \- part of OpenFOAM (The Open Source CFD Toolbox).
|
// <application> \- part of OpenFOAM (The Open Source CFD Toolbox).
|
||||||
Info
|
Info<< ".SH \"NAME\"" << nl
|
||||||
<< ".SH \"NAME\"" << nl
|
|
||||||
<< executable_
|
<< executable_
|
||||||
<< " \\- part of \\fBOpenFOAM\\fR (The Open Source CFD Toolbox)."
|
<< " \\- part of \\fBOpenFOAM\\fR (The Open Source CFD Toolbox)."
|
||||||
<< nl;
|
<< nl;
|
||||||
@ -187,8 +185,7 @@ void Foam::argList::printMan() const
|
|||||||
// .SH SYNOPSIS
|
// .SH SYNOPSIS
|
||||||
// .B command [OPTIONS] ...
|
// .B command [OPTIONS] ...
|
||||||
|
|
||||||
Info
|
Info<< ".SH \"SYNOPSIS\"" << nl
|
||||||
<< ".SH \"SYNOPSIS\"" << nl
|
|
||||||
<< "\\fB" << executable_ << "\\fR [\\fIOPTIONS\\fR]";
|
<< "\\fB" << executable_ << "\\fR [\\fIOPTIONS\\fR]";
|
||||||
|
|
||||||
if (validArgs.size())
|
if (validArgs.size())
|
||||||
@ -217,10 +214,9 @@ void Foam::argList::printMan() const
|
|||||||
|
|
||||||
// .SH DESCRIPTION
|
// .SH DESCRIPTION
|
||||||
{
|
{
|
||||||
Info
|
Info<< ".SH \"DESCRIPTION\"" << nl;
|
||||||
<< ".SH \"DESCRIPTION\"" << nl;
|
|
||||||
|
|
||||||
Info<< ".nf" << nl;
|
Info<< ".nf" << nl; // No fill lines
|
||||||
|
|
||||||
if (notes.empty())
|
if (notes.empty())
|
||||||
{
|
{
|
||||||
@ -228,7 +224,6 @@ void Foam::argList::printMan() const
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Info<< nl;
|
|
||||||
for (const std::string& note : notes)
|
for (const std::string& note : notes)
|
||||||
{
|
{
|
||||||
if (note.empty())
|
if (note.empty())
|
||||||
@ -241,13 +236,12 @@ void Foam::argList::printMan() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Info<< ".fi" << nl;
|
Info<< ".fi" << nl; // Fill lines
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// .SH "OPTIONS"
|
// .SH "OPTIONS"
|
||||||
Info
|
Info<< ".SH \"OPTIONS\"" << nl;
|
||||||
<< ".SH \"OPTIONS\"" << nl;
|
|
||||||
|
|
||||||
for (const word& optName : validOptions.sortedToc())
|
for (const word& optName : validOptions.sortedToc())
|
||||||
{
|
{
|
||||||
@ -266,9 +260,8 @@ void Foam::argList::printMan() const
|
|||||||
printManOption("help-full", "Display full help and exit");
|
printManOption("help-full", "Display full help and exit");
|
||||||
|
|
||||||
|
|
||||||
// .SH "ADVANCED OPTIONS"
|
// .SS "ADVANCED OPTIONS"
|
||||||
Info
|
Info<< ".SS \"ADVANCED OPTIONS\"" << nl;
|
||||||
<< ".SH \"ADVANCED OPTIONS\"" << nl;
|
|
||||||
|
|
||||||
for (const word& optName : validOptions.sortedToc())
|
for (const word& optName : validOptions.sortedToc())
|
||||||
{
|
{
|
||||||
@ -402,9 +395,8 @@ void Foam::argList::printManCompat() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// .SH "COMPATIBILITY OPTIONS"
|
// .SS "COMPATIBILITY OPTIONS"
|
||||||
Info
|
Info<< ".SS \"COMPATIBILITY OPTIONS\"" << nl;
|
||||||
<< ".SH \"COMPATIBILITY OPTIONS\"" << nl;
|
|
||||||
|
|
||||||
for (const word& k : argList::validOptionsCompat.sortedToc())
|
for (const word& k : argList::validOptionsCompat.sortedToc())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user