From 7f2104c9a7b1b59f141548bdd806aa51ddbbfaba Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Thu, 5 Jan 2017 20:19:30 +0000 Subject: [PATCH] foamDictionary: Removed unnecessary spaces and blank lines from output Resolves bug-report https://bugs.openfoam.org/view.php?id=2422 --- .../miscellaneous/foamDictionary/foamDictionary.C | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/applications/utilities/miscellaneous/foamDictionary/foamDictionary.C b/applications/utilities/miscellaneous/foamDictionary/foamDictionary.C index 2528355e11..f8e69a5af2 100644 --- a/applications/utilities/miscellaneous/foamDictionary/foamDictionary.C +++ b/applications/utilities/miscellaneous/foamDictionary/foamDictionary.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -396,7 +396,7 @@ int main(int argc, char *argv[]) ); if (entPtr) { - Info<< *entPtr << endl; + Info<< *entPtr; } } else if (args.optionFound("remove")) @@ -467,7 +467,11 @@ int main(int argc, char *argv[]) const tokenList& tokens = entPtr->stream(); forAll(tokens, i) { - Info<< tokens[i] << token::SPACE; + Info<< tokens[i]; + if (i < tokens.size() - 1) + { + Info<< token::SPACE; + } } Info<< endl; } @@ -478,7 +482,7 @@ int main(int argc, char *argv[]) } else { - Info<< *entPtr << endl; + Info<< *entPtr; } } }