ENH: allow retention of 'FoamFile' when reading dictionaries

- used in expandDictionary
This commit is contained in:
Mark Olesen
2010-05-17 12:56:30 +02:00
parent 47f692db8c
commit d572f40c63
3 changed files with 107 additions and 70 deletions

View File

@ -42,6 +42,12 @@ using namespace Foam;
int main(int argc, char *argv[])
{
argList::addNote
(
"Read the specified dictionary file, expand the macros etc. and write\n"
"the resulting dictionary to standard output."
);
argList::noBanner();
argList::noParallel();
argList::validArgs.append("inputDict");
@ -49,9 +55,10 @@ int main(int argc, char *argv[])
const string dictName = args[1];
Info<<"//\n// expansion of dictionary " << dictName << "\n//\n";
IOobject::writeBanner(Info)
<<"//\n// " << dictName << "\n//\n";
dictionary(IFstream(dictName)()).write(Info, false);
dictionary(IFstream(dictName)(), true).write(Info, false);
IOobject::writeDivider(Info);