From 8dc018bb5366785c3a088a2df077d886dfe61a26 Mon Sep 17 00:00:00 2001 From: henry Date: Thu, 29 May 2008 23:29:28 +0100 Subject: [PATCH] Add flex version selection of the yywrap() function to support the new and more correct version 2.5.34. --- .../mesh/conversion/ansysToFoam/ansysToFoam.L | 6 +- .../fluent3DMeshToFoam/fluent3DMeshToFoam.L | 4 + .../fluentMeshToFoam/fluentMeshToFoam.L | 104 +++++++++--------- .../conversion/gambitToFoam/gambitToFoam.L | 10 +- .../chemkinReader/chemkinLexer.L | 4 + .../triSurface/interfaces/STL/readSTLASCII.L | 9 +- 6 files changed, 81 insertions(+), 56 deletions(-) diff --git a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L index 5150717d82..ea650ad98a 100644 --- a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L +++ b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L @@ -70,7 +70,11 @@ PtrList > slPatchCellFaces; // Dummy yywrap to keep yylex happy at compile time. // It is called by yylex but is not used as the mechanism to change file. // See <> +#if YY_FLEX_SUBMINOR_VERSION < 34 extern "C" int yywrap() +#else +int yyFlexLexer::yywrap() +#endif { return 1; } @@ -393,7 +397,7 @@ int main(int argc, char *argv[]) } // Warning: tet face order has changed between version 1.9.6 and 2.0 - // + // label faceIndex[7][6] = { {-1, -1, -1, -1, -1, -1}, // 0 diff --git a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L index cb9d0a8f64..22bbb4002b 100644 --- a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L +++ b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L @@ -116,7 +116,11 @@ void uniquify(word& name, HashSet& patchNames) // Dummy yywrap to keep yylex happy at compile time. // It is called by yylex but is not used as the mechanism to change file. // See <> +#if YY_FLEX_SUBMINOR_VERSION < 34 extern "C" int yywrap() +#else +int yyFlexLexer::yywrap() +#endif { return 1; } diff --git a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L index f2d041e542..f028ac227a 100644 --- a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L +++ b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L @@ -93,7 +93,7 @@ SLList