From d29388f1c5b9f0a393cc66f4c17f9d79c91ac948 Mon Sep 17 00:00:00 2001 From: Mark Olesen <Mark.Olesen@esi-group.com> Date: Wed, 12 Dec 2018 03:02:49 +0100 Subject: [PATCH] STYLE: use foamVersion::api instead of OPENFOAM define - for referencing the etc locations, or reporting the current API value. --- src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C | 3 ++- src/OpenFOAM/global/argList/argList.C | 6 +----- src/functionObjects/utilities/systemCall/systemCall.C | 3 ++- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C index 0e92a024403..422d0687a62 100644 --- a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C +++ b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C @@ -31,6 +31,7 @@ License #include "OSspecific.H" #include "etcFiles.H" #include "dictionary.H" +#include "foamVersion.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -81,7 +82,7 @@ void Foam::dynamicCode::checkSecurity << " allowSystemOperations 1" << nl << nl << "to the InfoSwitches setting in the system controlDict." << nl << "The system controlDict is any of" << nl << nl - << " ~/.OpenFOAM/" << OPENFOAM << "/controlDict" << nl + << " ~/.OpenFOAM/" << foamVersion::api << "/controlDict" << nl << " ~/.OpenFOAM/controlDict" << nl << " $WM_PROJECT_DIR/etc/controlDict" << nl << endl << exit(FatalIOError); diff --git a/src/OpenFOAM/global/argList/argList.C b/src/OpenFOAM/global/argList/argList.C index e74e2eca524..cfda839e665 100644 --- a/src/OpenFOAM/global/argList/argList.C +++ b/src/OpenFOAM/global/argList/argList.C @@ -1539,11 +1539,7 @@ void Foam::argList::displayDoc(bool source) const CStringList command(stringOps::splitSpace(docBrowser)); Info - << "OpenFOAM" - #if OPENFOAM - << ' ' << OPENFOAM - #endif - << " documentation:" << nl + << "OpenFOAM " << foamVersion::api << " documentation:" << nl << " " << command << nl << endl; Foam::system(command, true); diff --git a/src/functionObjects/utilities/systemCall/systemCall.C b/src/functionObjects/utilities/systemCall/systemCall.C index 26d19cd5587..0b19fda5e36 100644 --- a/src/functionObjects/utilities/systemCall/systemCall.C +++ b/src/functionObjects/utilities/systemCall/systemCall.C @@ -26,6 +26,7 @@ License #include "systemCall.H" #include "Time.H" #include "dynamicCode.H" +#include "foamVersion.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -127,7 +128,7 @@ bool Foam::functionObjects::systemCall::read(const dictionary& dict) << " allowSystemOperations 1" << nl << nl << "to the InfoSwitches setting in the system controlDict." << nl << "The system controlDict is any of" << nl << nl - << " ~/.OpenFOAM/" << OPENFOAM << "/controlDict" << nl + << " ~/.OpenFOAM/" << foamVersion::api << "/controlDict" << nl << " ~/.OpenFOAM/controlDict" << nl << " $WM_PROJECT_DIR/etc/controlDict" << nl << endl << exit(FatalError); -- GitLab