diff --git a/Box/Box.cpp b/Box/Box.cpp
index 91b3bb8e645822e9ea9422656f6de06974740589..dee8f9518e6e7526ee521ff1974a57dc4e46f202 100644
--- a/Box/Box.cpp
+++ b/Box/Box.cpp
@@ -1,4 +1,4 @@
-// $Id: Box.cpp,v 1.40 2008-01-19 22:05:59 geuzaine Exp $
+// $Id: Box.cpp,v 1.41 2008-01-20 10:10:40 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -100,7 +100,7 @@ int GMSHBOX(int argc, char *argv[])
   check_gsl();
 
   OpenProject(CTX.filename);
-  if(yyerrorstate)
+  if(gmsh_yyerrorstate)
     ParUtil::Instance()->Abort();
   else {
     for(int i = 1; i < List_Nbr(CTX.files); i++)
diff --git a/Common/Makefile b/Common/Makefile
index 9d64847843a66892333e1d03c90881866ead144d..325f14ab517db1076c67ed8fb56019641dd7a60a 100644
--- a/Common/Makefile
+++ b/Common/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.150 2008-01-19 23:04:11 geuzaine Exp $
+# $Id: Makefile,v 1.151 2008-01-20 10:10:40 geuzaine Exp $
 #
 # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 #
@@ -86,28 +86,26 @@ CommandLine.o: CommandLine.cpp GmshUI.h GmshDefines.h GmshVersion.h \
   ../Parser/OpenFile.h ../Parser/CreateFile.h ../Parser/Parser.h \
   ../DataStr/Tree.h ../DataStr/avl.h ../Geo/GModel.h ../Geo/GVertex.h \
   ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Geo/MVertex.h ../Geo/SPoint3.h \
-  ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \
-  ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h \
-  ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h \
-  ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \
-  OS.h
-OS.o: OS.cpp Message.h
-Visibility.o: Visibility.cpp Visibility.h GmshDefines.h ../Geo/GVertex.h \
-  ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/MVertex.h \
-  ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
+  ../Geo/SBoundingBox3d.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
   ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
   ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
   ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \
   ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
-  ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEdge.h ../Geo/GFace.h \
-  ../Geo/GRegion.h ../Geo/SBoundingBox3d.h ../Geo/MElement.h \
-  ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/MEdge.h \
-  ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \
-  ../Geo/SVector3.h ../Parser/Parser.h ../DataStr/List.h \
-  ../DataStr/Tree.h ../DataStr/avl.h
+  ../Geo/SBoundingBox3d.h OS.h
+OS.o: OS.cpp Message.h
+Visibility.o: Visibility.cpp Visibility.h GmshDefines.h ../Geo/GVertex.h \
+  ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
+  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/GModel.h ../Geo/GVertex.h \
+  ../Geo/GEdge.h ../Geo/GFace.h ../Geo/GRegion.h ../Geo/SBoundingBox3d.h \
+  ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \
+  ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
+  ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h ../Parser/Parser.h \
+  ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h
 Trackball.o: Trackball.cpp Trackball.h
 VertexArray.o: VertexArray.cpp VertexArray.h ../Geo/SVector3.h \
   ../Geo/SPoint3.h Context.h ../DataStr/List.h ../Numeric/Numeric.h
diff --git a/DataStr/List.cpp b/DataStr/List.cpp
index 3517fcab72d5f11df1cbc3b5f0868e0991a76a6c..d92025ca757a63be661eb5cc113ec2c1659ff8fd 100644
--- a/DataStr/List.cpp
+++ b/DataStr/List.cpp
@@ -1,4 +1,4 @@
-// $Id: List.cpp,v 1.41 2007-09-08 21:26:03 geuzaine Exp $
+// $Id: List.cpp,v 1.42 2008-01-20 10:10:40 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -273,8 +273,8 @@ int List_Query(List_T * liste, void *data,
   return (1);
 }
 
-void *lolofind(void *data, void *array, int n, int size,
-               int (*fcmp) (const void *a, const void *b))
+static void *lolofind(void *data, void *array, int n, int size,
+		      int (*fcmp) (const void *a, const void *b))
 {
   char *ptr;
   int i;
diff --git a/Fltk/Main.cpp b/Fltk/Main.cpp
index ef708d4271a41794659f207a4f26587c9161f7b6..d54bb1ad9a3e77df0fcd7a915cc5dc5c159dd944 100644
--- a/Fltk/Main.cpp
+++ b/Fltk/Main.cpp
@@ -1,4 +1,4 @@
-// $Id: Main.cpp,v 1.114 2008-01-19 22:06:01 geuzaine Exp $
+// $Id: Main.cpp,v 1.115 2008-01-20 10:10:40 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -108,7 +108,7 @@ int main(int argc, char *argv[])
     check_gsl();
     Msg(INFO, "'%s' started on %s", cmdline, currtime);
     OpenProject(CTX.filename);
-    if(yyerrorstate)
+    if(gmsh_yyerrorstate)
       exit(1);
     else {
       for(int i = 1; i < List_Nbr(CTX.files); i++)
diff --git a/Fltk/Makefile b/Fltk/Makefile
index 7eb7d3f07006dfef6c38ac8afe7a39d96bb8f403..755153af2750a4a88c6f6febe15ce950b7fb91d1 100644
--- a/Fltk/Makefile
+++ b/Fltk/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.159 2008-01-19 23:04:12 geuzaine Exp $
+# $Id: Makefile,v 1.160 2008-01-20 10:10:40 geuzaine Exp $
 #
 # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 #
@@ -79,17 +79,17 @@ Main.o: Main.cpp GUI.h Opengl_Window.h Colorbar_Window.h \
   ../Post/ColorTable.h ../Post/PViewDataList.h ../Post/PViewData.h \
   ../Post/AdaptiveViews.h ../Common/GmshMatrix.h ../Geo/GModel.h \
   ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Geo/MVertex.h ../Geo/SPoint3.h \
-  ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \
-  ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h \
-  ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h \
-  ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \
-  ../Mesh/Field.h ../Geo/Geo.h ../Common/GmshDefines.h \
-  ../Geo/gmshSurface.h ../Geo/Pair.h ../Geo/Range.h ../Geo/SPoint2.h \
-  ../Geo/SPoint3.h ../Geo/SVector3.h ../Geo/SBoundingBox3d.h \
-  ../Geo/SPoint2.h ../Geo/ExtrudeParams.h ../Post/OctreePost.h \
-  ../Common/Octree.h ../Common/OctreeInternals.h ../Mesh/BackgroundMesh.h
+  ../Geo/SBoundingBox3d.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
+  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
+  ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
+  ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \
+  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
+  ../Geo/SBoundingBox3d.h ../Mesh/Field.h ../Geo/Geo.h \
+  ../Common/GmshDefines.h ../Geo/gmshSurface.h ../Geo/Pair.h \
+  ../Geo/Range.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/SVector3.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint2.h ../Geo/ExtrudeParams.h \
+  ../Post/OctreePost.h ../Common/Octree.h ../Common/OctreeInternals.h \
+  ../Mesh/BackgroundMesh.h
 Message.o: Message.cpp ../Common/Message.h ../Common/GmshUI.h \
   ../Common/Context.h ../DataStr/List.h ../Common/Options.h \
   ../Post/ColorTable.h GUI.h Opengl_Window.h Colorbar_Window.h \
@@ -113,14 +113,14 @@ GUI_Extras.o: GUI_Extras.cpp ../Common/GmshUI.h ../Common/GmshDefines.h \
   Shortcut_Window.h File_Picker.h
 GUI_Projection.o: GUI_Projection.cpp ../Geo/GModelIO_F.h ../Geo/GModel.h \
   ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/MVertex.h \
-  ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
-  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
-  ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
-  ../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Common/GmshDefines.h \
-  ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
+  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \
+  ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \
+  ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
   ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h ../Graphics/Draw.h \
   ../Common/Options.h ../Post/ColorTable.h ../Common/Context.h \
   ../DataStr/List.h ../Parser/OpenFile.h ../Graphics/SelectBuffer.h \
@@ -129,24 +129,24 @@ GUI_Projection.o: GUI_Projection.cpp ../Geo/GModelIO_F.h ../Geo/GModel.h \
   Popup_Button.h SpherePosition_Widget.h Shortcut_Window.h GUI_Extras.h \
   ../Geo/FFace.h ../Geo/GFace.h ../Geo/GModel.h ../Geo/Range.h \
   ../Geo/FEdge.h ../Geo/GEdge.h ../Geo/GModel.h ../Geo/FVertex.h \
-  ../Geo/GModel.h ../Geo/GVertex.h ../Geo/Range.h ../Common/Message.h
+  ../Geo/GModel.h ../Geo/GVertex.h ../Geo/MVertex.h ../Geo/Range.h \
+  ../Common/Message.h
 GUI_Classifier.o: GUI_Classifier.cpp GUI_Classifier.h ../Common/GmshUI.h \
   ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \
   ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
-  ../Geo/MVertex.h ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h \
-  ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h \
-  ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h \
-  ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \
-  ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h \
-  ../Geo/GEntity.h ../Geo/SBoundingBox3d.h ../Geo/MElement.h \
-  ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/MEdge.h \
-  ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \
-  ../Geo/SVector3.h GUI.h Opengl_Window.h Colorbar_Window.h \
-  ../Post/ColorTable.h Popup_Button.h SpherePosition_Widget.h \
-  Shortcut_Window.h ../Graphics/Draw.h ../Common/Options.h \
-  ../Common/Context.h ../DataStr/List.h ../Graphics/SelectBuffer.h \
-  GUI_Projection.h ../Geo/FProjectionFace.h ../Geo/GModel.h \
-  ../Geo/Range.h GUI_Extras.h ../Common/Message.h \
+  ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \
+  ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h \
+  ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h \
+  ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h \
+  ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \
+  ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \
+  ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
+  ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h GUI.h Opengl_Window.h \
+  Colorbar_Window.h ../Post/ColorTable.h Popup_Button.h \
+  SpherePosition_Widget.h Shortcut_Window.h ../Graphics/Draw.h \
+  ../Common/Options.h ../Common/Context.h ../DataStr/List.h \
+  ../Graphics/SelectBuffer.h GUI_Projection.h ../Geo/FProjectionFace.h \
+  ../Geo/GModel.h ../Geo/Range.h GUI_Extras.h ../Common/Message.h \
   ../Mesh/meshGFaceDelaunayInsertion.h ../Mesh/meshGFaceOptimize.h \
   ../Mesh/meshGFaceDelaunayInsertion.h ../Geo/gmshEdge.h ../Geo/Geo.h \
   ../Geo/gmshSurface.h ../Geo/Pair.h ../Geo/Range.h ../Geo/SPoint2.h \
@@ -154,20 +154,20 @@ GUI_Classifier.o: GUI_Classifier.cpp GUI_Classifier.h ../Common/GmshUI.h \
   ../Numeric/Numeric.h ../DataStr/Tree.h ../DataStr/avl.h \
   ../Geo/SPoint2.h ../Geo/ExtrudeParams.h ../Common/SmoothData.h \
   ../Geo/GEdge.h ../Geo/gmshVertex.h ../Geo/Geo.h ../Geo/GVertex.h \
-  ../Geo/Range.h ../Geo/gmshFace.h ../Geo/Geo.h ../Geo/GFace.h \
-  ../Geo/gmshVertex.h ../Geo/Range.h
+  ../Geo/MVertex.h ../Geo/Range.h ../Geo/gmshFace.h ../Geo/Geo.h \
+  ../Geo/GFace.h ../Geo/gmshVertex.h ../Geo/Range.h
 Callbacks.o: Callbacks.cpp ../Common/GmshUI.h ../Common/Message.h \
   ../DataStr/Malloc.h ../DataStr/Tools.h ../DataStr/List.h \
   ../DataStr/Tree.h ../DataStr/avl.h ../Geo/GModel.h ../Geo/GVertex.h \
   ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/MVertex.h \
-  ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
-  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
-  ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
-  ../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Common/GmshDefines.h \
-  ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
+  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \
+  ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \
+  ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
   ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
   ../Geo/GeoStringInterface.h ../Geo/findLinks.h ../Mesh/Generator.h \
   ../Mesh/HighOrder.h ../Graphics/Draw.h ../Graphics/SelectBuffer.h \
@@ -189,30 +189,28 @@ Opengl.o: Opengl.cpp ../Common/GmshUI.h ../Common/GmshDefines.h \
   ../Numeric/Numeric.h ../Common/Context.h ../DataStr/List.h \
   ../Graphics/Draw.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
   ../Graphics/SelectBuffer.h ../Geo/GVertex.h ../Geo/GEntity.h \
-  ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \
-  ../Geo/MVertex.h ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h \
-  ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h \
-  ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h \
-  ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \
-  ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h \
-  ../Geo/GEntity.h GUI.h Opengl_Window.h Colorbar_Window.h \
-  ../Post/ColorTable.h Popup_Button.h SpherePosition_Widget.h \
-  ../Graphics/gl2ps.h
+  ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
+  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h GUI.h Opengl_Window.h \
+  Colorbar_Window.h ../Post/ColorTable.h Popup_Button.h \
+  SpherePosition_Widget.h ../Graphics/gl2ps.h
 Opengl_Window.o: Opengl_Window.cpp ../Common/GmshUI.h \
   ../Common/GmshDefines.h ../Common/Message.h ../Numeric/Numeric.h \
   ../Common/Context.h ../DataStr/List.h ../Graphics/Draw.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Graphics/SelectBuffer.h \
   ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Geo/MVertex.h ../Geo/SPoint3.h \
-  ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \
-  ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h \
-  ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h \
-  ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h GUI.h Opengl_Window.h \
-  Colorbar_Window.h ../Post/ColorTable.h Popup_Button.h \
+  ../Geo/SBoundingBox3d.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
+  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
+  ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
+  ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \
+  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h GUI.h \
+  Opengl_Window.h Colorbar_Window.h ../Post/ColorTable.h Popup_Button.h \
   SpherePosition_Widget.h ../Geo/MElement.h ../Geo/MVertex.h \
-  ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h \
-  ../Geo/MVertex.h ../Geo/SVector3.h
+  ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
+  ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h
 Colorbar_Window.o: Colorbar_Window.cpp ../Common/GmshUI.h GUI.h \
   Opengl_Window.h Colorbar_Window.h ../Post/ColorTable.h Popup_Button.h \
   SpherePosition_Widget.h ../Common/Context.h ../DataStr/List.h
diff --git a/Geo/FVertex.h b/Geo/FVertex.h
index 8b22980e9be9b9822bdd3302eaa5fc3fbe0a3ffa..b83cfc6eb016a175e486a523be9cb4f8f1631e1f 100644
--- a/Geo/FVertex.h
+++ b/Geo/FVertex.h
@@ -3,6 +3,7 @@
 
 #include "GModel.h"
 #include "GVertex.h"
+#include "MVertex.h"
 
 #if defined(HAVE_FOURIER_MODEL)
 
diff --git a/Geo/GEdge.cpp b/Geo/GEdge.cpp
index 46ef780cc5726db7618d465c99a4feae2811e7a6..acb7599c062ae190c18f68d5eebd0dac61289cba 100644
--- a/Geo/GEdge.cpp
+++ b/Geo/GEdge.cpp
@@ -1,4 +1,4 @@
-// $Id: GEdge.cpp,v 1.32 2008-01-19 22:06:01 geuzaine Exp $
+// $Id: GEdge.cpp,v 1.33 2008-01-20 10:10:41 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -159,7 +159,3 @@ double GEdge::curvature(double par) const
   return norm(d);
 }
 
-bool GEdge::is_mesh_degenerated() const 
-{
-  return (v0 == v1 && mesh_vertices.size() < 2);
-}
diff --git a/Geo/GEdge.h b/Geo/GEdge.h
index d9f1429354f6c2da49fb5b435817fe028d2b5573..6796cbc206f7a74dcc055fa0a97e4844957d32bf 100644
--- a/Geo/GEdge.h
+++ b/Geo/GEdge.h
@@ -45,15 +45,13 @@ class GEdge : public GEntity {
 
   void addFace(GFace *f);
   void delFace(GFace *f);
-  /* start==end and no more than 2 segments */
-  bool is_mesh_degenerated() const;
 
   virtual int dim() const {return 1;}
   virtual bool periodic(int dim=0) const = 0;
   virtual bool continuous(int dim=0) const = 0;
   virtual void setVisibility(char val, bool recursive=false);
 
-  /** True if the edge is a seam for the given face. */
+  // True if the edge is a seam for the given face.
   virtual int isSeam(GFace *face) const {return 0;}
 
   // The bounding box
@@ -92,27 +90,30 @@ class GEdge : public GEntity {
   void deleteMeshPartitions();
 
   // Returns the minimum number of segments used for meshing the edge
-  virtual int minimumMeshSegments() const {return 1;}
+  virtual int minimumMeshSegments() const { return 1; }
 
   // Returns the minimum number of segments used for drawing the edge
-  virtual int minimumDrawSegments() const {return 1;}
+  virtual int minimumDrawSegments() const { return 1; }
 
   // Returns a type-specific additional information string
   virtual std::string getAdditionalInfoString();
 
   // tells if the edge is a 3D edge (in opposition with a trimmed curve on a surface)
-  virtual bool is3D() const {return true;}
+  virtual bool is3D() const { return true; }
 
   // the length of the model edge
-  inline double length() const {return _length;}
-  inline void setLength(const double l) {_length = l;}
+  inline double length() const { return _length; }
+  inline void setLength(const double l) { _length = l; }
 
   // one can impose the mesh size at an edge
-  virtual double prescribedMeshSizeAtVertex() const {return meshAttributes.meshSize;}
+  virtual double prescribedMeshSizeAtVertex() const { return meshAttributes.meshSize; }
 
   // Resets the mesh attributes to default values
   virtual void resetMeshAttributes();
 
+  // True if start == end and no more than 2 segments
+  bool isMeshDegenerated() const{ return (v0 == v1 && mesh_vertices.size() < 2); }
+
   struct {
     char   Method;
     double coeffTransfinite;
diff --git a/Geo/GFace.h b/Geo/GFace.h
index 6b4a99fdafe49652210d2ce80aab81ef17057b35..81634ce16231c21d010587c927bf814c85800267 100644
--- a/Geo/GFace.h
+++ b/Geo/GFace.h
@@ -47,7 +47,7 @@ struct graphics_point
 
 struct surface_params
 {
-  double radius, radius2, height,cx,cy,cz;
+  double radius, radius2, height, cx, cy, cz;
 };
 
 class GRegion;
@@ -61,19 +61,18 @@ class GFace : public GEntity
   std::vector<std::vector<graphics_point> > _graphicsRep;
 
  protected: 
-  // edge loops, will replace what follows
-  // list of al the edges of the face
+  // edge loops, will replace what follows list of al the edges of the
+  // face
   std::list<GEdge *> l_edges;
   std::list<int> l_dirs;
   GRegion *r1, *r2;
   mean_plane meanPlane;
   std::list<GEdge *> embedded_edges;
   std::list<GVertex *> embedded_vertices;
-  // given a list of GEdges, the function builds a 
-  // list of wires, i.e. closed edge loops.
-  // the first wire is the one that is the
-  // outer contour of the face. 
-  void resolveWires ();
+  // given a list of GEdges, the function builds a list of wires,
+  // i.e. closed edge loops.  the first wire is the one that is the
+  // outer contour of the face.
+  void resolveWires();
 
  public:
   GFace(GModel *model, int tag);
@@ -82,14 +81,14 @@ class GFace : public GEntity
   std::list<GEdgeLoop> edgeLoops;
 
   void addRegion(GRegion *r){ r1 ? r2 = r : r1 = r; }
-  void delRegion(GRegion *r){ if(r1 == r) r1 = r2; r2=0; }
+  void delRegion(GRegion *r){ if(r1 == r) r1 = r2; r2 = 0; }
 
   // edge orientations.
   virtual std::list<int> orientations() const { return l_dirs; }
   // Edges that bound this entity or that this entity bounds.
   virtual std::list<GEdge*> edges() const { return l_edges; }
   // Edges that are embedded in this face.
-  virtual std::list<GEdge*> emb_edges() const { return embedded_edges; }
+  virtual std::list<GEdge*> embeddedEdges() const { return embedded_edges; }
   // Vertices that bound this entity or that this entity bounds.
   virtual std::list<GVertex*> vertices() const;
 
@@ -120,7 +119,7 @@ class GFace : public GEntity
   // this is a special feature for stereographic mappings of the sphere
   // that is used in 2D mesh generation !
 
-  virtual double getMetricEigenvalue ( const SPoint2 &) {throw;}
+  virtual double getMetricEigenvalue(const SPoint2 &){ throw; }
 
   // Return the parmater location on the face given a point in space
   // that is on the face.
@@ -189,13 +188,13 @@ class GFace : public GEntity
     // edge loops
   } meshAttributes ;
 
-  typedef enum {PENDING,DONE,FAILED} meshGenerationStatus  ;
+  typedef enum {PENDING,DONE,FAILED} meshGenerationStatus;
   struct {
     meshGenerationStatus status;
     double worst_element_shape, best_element_shape, average_element_shape;
     double smallest_edge_length, longest_edge_length, efficiency_index;
     int nbEdge, nbTriangle;
-    int nbGoodQuality,nbGoodLength;
+    int nbGoodQuality, nbGoodLength;
   } meshStatistics;
 
   // a crude graphical representation using a "cross" defined by pairs
diff --git a/Geo/GModelIO_Mesh.cpp b/Geo/GModelIO_Mesh.cpp
index e764442ede5eaf5e2f03214cdcfc5019c2615dc4..691813dfeec91ee740e7c658f63591ea581b416d 100644
--- a/Geo/GModelIO_Mesh.cpp
+++ b/Geo/GModelIO_Mesh.cpp
@@ -1,4 +1,4 @@
-// $Id: GModelIO_Mesh.cpp,v 1.25 2008-01-18 20:13:12 geuzaine Exp $
+// $Id: GModelIO_Mesh.cpp,v 1.26 2008-01-20 10:10:41 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -473,10 +473,10 @@ int GModel::readMSH(const std::string &name)
 	return false;
       }
 
-      if(fscanf(fp, "%d %lf %d", &timeStep, &time, &numData, &numComponents) != 4) return 0;
+      if(fscanf(fp, "%d %lf %d %d", &timeStep, &time, &numData, &numComponents) != 4)
+	return 0;
       Msg(INFO, "%d node data", numData);
 
-
       /*
       //std::map<int, int> nodeNumber, nodeIndex      
       PViewDataGModel *p = getPViewDataGModel(name)
@@ -490,8 +490,6 @@ int GModel::readMSH(const std::string &name)
       data.scalar.indices.append();
       data.scalar.values.append();
       */
-
-
     }
 
     do {
diff --git a/Geo/GVertex.cpp b/Geo/GVertex.cpp
index 6ce753e97114044141fa2eb8f2ad56ba9f8e4fb6..a2480a6b37af3a27c99efc8cc408a47b8bdb4c38 100644
--- a/Geo/GVertex.cpp
+++ b/Geo/GVertex.cpp
@@ -1,4 +1,4 @@
-// $Id: GVertex.cpp,v 1.14 2007-12-03 15:17:40 remacle Exp $
+// $Id: GVertex.cpp,v 1.15 2008-01-20 10:10:41 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -23,6 +23,7 @@
 #include <cstring>
 #include "GVertex.h"
 #include "GFace.h"
+#include "MVertex.h"
 #include "Message.h"
 
 GVertex::GVertex(GModel *m, int tag, double ms) : GEntity (m, tag), meshSize (ms) 
diff --git a/Geo/GVertex.h b/Geo/GVertex.h
index df66e2ab6b1facdab086429f4f480be3d6e697a2..695024d618c78e87d654b964e383a72ed2dff404 100644
--- a/Geo/GVertex.h
+++ b/Geo/GVertex.h
@@ -21,7 +21,6 @@
 // Please report all bugs and problems to <gmsh@geuz.org>.
 
 #include "GEntity.h"
-#include "MVertex.h"
 #include "GPoint.h"
 #include "SPoint2.h"
 
@@ -41,14 +40,14 @@ class GVertex : public GEntity
   virtual void setPosition(GPoint &p);
   void addEdge(GEdge *e);
   void delEdge(GEdge *e);
-  virtual int dim() const {return 0;}
-  virtual GeomType geomType() const {return Point;}
-  inline double prescribedMeshSizeAtVertex() const {return meshSize;}
-  virtual void setPrescribedMeshSizeAtVertex(double l) {meshSize = l;}
+  virtual int dim() const { return 0; }
+  virtual GeomType geomType() const { return Point; }
+  inline double prescribedMeshSizeAtVertex() const { return meshSize; }
+  virtual void setPrescribedMeshSizeAtVertex(double l) { meshSize = l; }
   virtual SBoundingBox3d bounds(){ return SBoundingBox3d(SPoint3(x(), y(), z())); }
-  virtual SPoint2 reparamOnFace ( GFace *gf , int) const;
+  virtual SPoint2 reparamOnFace(GFace *gf, int) const;
   virtual std::string getAdditionalInfoString();
-  virtual std::list<GEdge*> edges() const{return l_edges;}
+  virtual std::list<GEdge*> edges() const{ return l_edges; }
 };
 
 #endif
diff --git a/Geo/GeoStringInterface.cpp b/Geo/GeoStringInterface.cpp
index 2caa8dbdcf2fef1fcea5e9e9edd617426de3ae68..3435a4ccd21331df7dd1ca2419551cc0562703ab 100644
--- a/Geo/GeoStringInterface.cpp
+++ b/Geo/GeoStringInterface.cpp
@@ -1,4 +1,4 @@
-// $Id: GeoStringInterface.cpp,v 1.13 2008-01-19 22:06:02 geuzaine Exp $
+// $Id: GeoStringInterface.cpp,v 1.14 2008-01-20 10:10:41 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -48,23 +48,23 @@ int snprintf(char *str, size_t size, const char* fmt, ...){
 double evaluate_scalarfunction(char *var, double val, char *funct)
 {
   FILE *tempf;
-  tempf = yyin;
+  tempf = gmsh_yyin;
 
-  if(!(yyin = fopen(CTX.tmp_filename_fullpath, "w"))) {
+  if(!(gmsh_yyin = fopen(CTX.tmp_filename_fullpath, "w"))) {
     Msg(GERROR, "Unable to open temporary file '%s'", CTX.tmp_filename_fullpath);
     return 0.;
   }
 
   // pose "variable = function" and evaluate function
-  fprintf(yyin, "%s = %.16g ;\n", var, val);
-  fprintf(yyin, "ValeurTemporaire__ = %s ;\n", funct);
-  fclose(yyin);
-  yyin = fopen(CTX.tmp_filename_fullpath, "r");
-  while(!feof(yyin)) {
-    yyparse();
+  fprintf(gmsh_yyin, "%s = %.16g ;\n", var, val);
+  fprintf(gmsh_yyin, "ValeurTemporaire__ = %s ;\n", funct);
+  fclose(gmsh_yyin);
+  gmsh_yyin = fopen(CTX.tmp_filename_fullpath, "r");
+  while(!feof(gmsh_yyin)) {
+    gmsh_yyparse();
   }
-  fclose(yyin);
-  yyin = tempf;
+  fclose(gmsh_yyin);
+  gmsh_yyin = tempf;
 
   // retreive value
   Symbol TheSymbol, *TheSymbol_P;
@@ -80,19 +80,19 @@ double evaluate_scalarfunction(char *var, double val, char *funct)
 
 void add_infile(char *text, char *fich, bool deleted_something)
 {
-  if(!(yyin = fopen(CTX.tmp_filename_fullpath, "w"))) {
+  if(!(gmsh_yyin = fopen(CTX.tmp_filename_fullpath, "w"))) {
     Msg(GERROR, "Unable to open temporary file '%s'", CTX.tmp_filename_fullpath);
     return;
   }
 
-  fprintf(yyin, "%s\n", text);
+  fprintf(gmsh_yyin, "%s\n", text);
   Msg(STATUS2, "%s", text);
-  fclose(yyin);
-  yyin = fopen(CTX.tmp_filename_fullpath, "r");
-  while(!feof(yyin)) {
-    yyparse();
+  fclose(gmsh_yyin);
+  gmsh_yyin = fopen(CTX.tmp_filename_fullpath, "r");
+  while(!feof(gmsh_yyin)) {
+    gmsh_yyparse();
   }
-  fclose(yyin);
+  fclose(gmsh_yyin);
 
   if(deleted_something){
     // we need to start from scratch since the command just parsed
diff --git a/Geo/Makefile b/Geo/Makefile
index 3172e2e9782fd5d78bd8f81db7dd97f75b052ba7..45f37818eefa7434f213a0f7dd63c805163d0eec 100644
--- a/Geo/Makefile
+++ b/Geo/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.173 2008-01-19 23:04:12 geuzaine Exp $
+# $Id: Makefile,v 1.174 2008-01-20 10:10:41 geuzaine Exp $
 #
 # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 #
@@ -76,126 +76,122 @@ GEntity.o: GEntity.cpp GEntity.h Range.h SPoint3.h SBoundingBox3d.h \
   ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \
   ../Common/Context.h ../DataStr/List.h
 GVertex.o: GVertex.cpp GVertex.h GEntity.h Range.h SPoint3.h \
-  SBoundingBox3d.h MVertex.h GPoint.h SPoint2.h GFace.h GEdgeLoop.h \
-  GEdge.h SVector3.h Pair.h ../Common/Message.h
+  SBoundingBox3d.h GPoint.h SPoint2.h GFace.h GEdgeLoop.h GEdge.h \
+  SVector3.h Pair.h MVertex.h ../Common/Message.h
 GEdge.o: GEdge.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
-  SBoundingBox3d.h MVertex.h GPoint.h SPoint2.h GEdge.h SVector3.h \
-  GFace.h GEdgeLoop.h Pair.h GRegion.h MElement.h ../Common/GmshDefines.h \
-  MEdge.h MFace.h
+  SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \
+  GEdgeLoop.h Pair.h GRegion.h MElement.h ../Common/GmshDefines.h \
+  MVertex.h MEdge.h MFace.h
 GEdgeLoop.o: GEdgeLoop.cpp GEdgeLoop.h GEdge.h GEntity.h Range.h \
-  SPoint3.h SBoundingBox3d.h GVertex.h MVertex.h GPoint.h SPoint2.h \
-  SVector3.h ../Common/Message.h
+  SPoint3.h SBoundingBox3d.h GVertex.h GPoint.h SPoint2.h SVector3.h \
+  ../Common/Message.h
 GFace.o: GFace.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
-  SBoundingBox3d.h MVertex.h GPoint.h SPoint2.h GEdge.h SVector3.h \
-  GFace.h GEdgeLoop.h Pair.h GRegion.h MElement.h ../Common/GmshDefines.h \
-  MEdge.h MFace.h ../Common/Message.h ../Numeric/Numeric.h \
+  SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \
+  GEdgeLoop.h Pair.h GRegion.h MElement.h ../Common/GmshDefines.h \
+  MVertex.h MEdge.h MFace.h ../Common/Message.h ../Numeric/Numeric.h \
   ../Common/Context.h ../DataStr/List.h
 GRegion.o: GRegion.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
-  SBoundingBox3d.h MVertex.h GPoint.h SPoint2.h GEdge.h SVector3.h \
-  GFace.h GEdgeLoop.h Pair.h GRegion.h MElement.h ../Common/GmshDefines.h \
-  MEdge.h MFace.h
+  SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \
+  GEdgeLoop.h Pair.h GRegion.h MElement.h ../Common/GmshDefines.h \
+  MVertex.h MEdge.h MFace.h
 gmshVertex.o: gmshVertex.cpp GFace.h GEntity.h Range.h SPoint3.h \
-  SBoundingBox3d.h GPoint.h GEdgeLoop.h GEdge.h GVertex.h MVertex.h \
-  SPoint2.h SVector3.h Pair.h gmshVertex.h Geo.h ../Common/GmshDefines.h \
+  SBoundingBox3d.h GPoint.h GEdgeLoop.h GEdge.h GVertex.h SPoint2.h \
+  SVector3.h Pair.h gmshVertex.h Geo.h ../Common/GmshDefines.h \
   gmshSurface.h ../Numeric/Numeric.h ../DataStr/List.h ../DataStr/Tree.h \
-  ../DataStr/avl.h ExtrudeParams.h ../Common/SmoothData.h \
+  ../DataStr/avl.h ExtrudeParams.h ../Common/SmoothData.h MVertex.h \
   GeoInterpolation.h ../Common/Message.h ../Common/Context.h
 gmshEdge.o: gmshEdge.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
-  SBoundingBox3d.h MVertex.h GPoint.h SPoint2.h GEdge.h SVector3.h \
-  GFace.h GEdgeLoop.h Pair.h GRegion.h gmshEdge.h Geo.h \
-  ../Common/GmshDefines.h gmshSurface.h ../Numeric/Numeric.h \
-  ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ExtrudeParams.h \
-  ../Common/SmoothData.h gmshVertex.h GeoInterpolation.h \
-  ../Common/Message.h ../Common/Context.h
+  SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \
+  GEdgeLoop.h Pair.h GRegion.h gmshEdge.h Geo.h ../Common/GmshDefines.h \
+  gmshSurface.h ../Numeric/Numeric.h ../DataStr/List.h ../DataStr/Tree.h \
+  ../DataStr/avl.h ExtrudeParams.h ../Common/SmoothData.h gmshVertex.h \
+  MVertex.h GeoInterpolation.h ../Common/Message.h ../Common/Context.h
 gmshFace.o: gmshFace.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
-  SBoundingBox3d.h MVertex.h GPoint.h SPoint2.h GEdge.h SVector3.h \
-  GFace.h GEdgeLoop.h Pair.h GRegion.h gmshVertex.h Geo.h \
-  ../Common/GmshDefines.h gmshSurface.h ../Numeric/Numeric.h \
-  ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ExtrudeParams.h \
-  ../Common/SmoothData.h gmshEdge.h gmshFace.h GeoInterpolation.h \
-  ../Common/Message.h
+  SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \
+  GEdgeLoop.h Pair.h GRegion.h gmshVertex.h Geo.h ../Common/GmshDefines.h \
+  gmshSurface.h ../Numeric/Numeric.h ../DataStr/List.h ../DataStr/Tree.h \
+  ../DataStr/avl.h ExtrudeParams.h ../Common/SmoothData.h MVertex.h \
+  gmshEdge.h gmshFace.h GeoInterpolation.h ../Common/Message.h
 gmshRegion.o: gmshRegion.cpp GModel.h GVertex.h GEntity.h Range.h \
-  SPoint3.h SBoundingBox3d.h MVertex.h GPoint.h SPoint2.h GEdge.h \
-  SVector3.h GFace.h GEdgeLoop.h Pair.h GRegion.h gmshFace.h Geo.h \
+  SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h \
+  GFace.h GEdgeLoop.h Pair.h GRegion.h gmshFace.h Geo.h \
   ../Common/GmshDefines.h gmshSurface.h ../Numeric/Numeric.h \
   ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ExtrudeParams.h \
-  ../Common/SmoothData.h gmshVertex.h gmshRegion.h ../Common/Message.h
+  ../Common/SmoothData.h gmshVertex.h MVertex.h gmshRegion.h \
+  ../Common/Message.h
 gmshSurface.o: gmshSurface.cpp gmshSurface.h Pair.h Range.h SPoint2.h \
   SPoint3.h SVector3.h SBoundingBox3d.h ../Numeric/Numeric.h \
   ../Common/Message.h
 OCCVertex.o: OCCVertex.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
-  SBoundingBox3d.h MVertex.h GPoint.h SPoint2.h GEdge.h SVector3.h \
-  GFace.h GEdgeLoop.h Pair.h GRegion.h OCCVertex.h OCCIncludes.h \
-  ../Common/Context.h ../DataStr/List.h OCCEdge.h OCCFace.h
+  SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \
+  GEdgeLoop.h Pair.h GRegion.h OCCVertex.h OCCIncludes.h MVertex.h \
+  OCCEdge.h OCCFace.h
 OCCEdge.o: OCCEdge.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
-  SBoundingBox3d.h MVertex.h GPoint.h SPoint2.h GEdge.h SVector3.h \
-  GFace.h GEdgeLoop.h Pair.h GRegion.h ../Common/Message.h OCCEdge.h \
-  OCCVertex.h OCCIncludes.h ../Common/Context.h ../DataStr/List.h \
-  OCCFace.h
+  SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \
+  GEdgeLoop.h Pair.h GRegion.h ../Common/Message.h OCCEdge.h OCCVertex.h \
+  OCCIncludes.h MVertex.h OCCFace.h ../Common/Context.h ../DataStr/List.h
 OCCFace.o: OCCFace.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
-  SBoundingBox3d.h MVertex.h GPoint.h SPoint2.h GEdge.h SVector3.h \
-  GFace.h GEdgeLoop.h Pair.h GRegion.h OCCVertex.h OCCIncludes.h \
-  ../Common/Context.h ../DataStr/List.h OCCEdge.h OCCFace.h \
-  ../Common/Message.h ../Numeric/Numeric.h
+  SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \
+  GEdgeLoop.h Pair.h GRegion.h OCCVertex.h OCCIncludes.h MVertex.h \
+  OCCEdge.h OCCFace.h ../Common/Message.h ../Numeric/Numeric.h
 OCCRegion.o: OCCRegion.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
-  SBoundingBox3d.h MVertex.h GPoint.h SPoint2.h GEdge.h SVector3.h \
-  GFace.h GEdgeLoop.h Pair.h GRegion.h OCCVertex.h OCCIncludes.h \
-  ../Common/Context.h ../DataStr/List.h OCCEdge.h OCCFace.h OCCRegion.h \
-  ../Common/Message.h
+  SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \
+  GEdgeLoop.h Pair.h GRegion.h OCCVertex.h OCCIncludes.h MVertex.h \
+  OCCEdge.h OCCFace.h OCCRegion.h ../Common/Message.h
 FEdge.o: FEdge.cpp FEdge.h GEdge.h GEntity.h Range.h SPoint3.h \
-  SBoundingBox3d.h GVertex.h MVertex.h GPoint.h SPoint2.h SVector3.h \
-  GModel.h GFace.h GEdgeLoop.h Pair.h GRegion.h FVertex.h \
+  SBoundingBox3d.h GVertex.h GPoint.h SPoint2.h SVector3.h GModel.h \
+  GFace.h GEdgeLoop.h Pair.h GRegion.h FVertex.h MVertex.h \
   ../Common/Message.h ../Common/Context.h ../DataStr/List.h
 FFace.o: FFace.cpp FVertex.h GModel.h GVertex.h GEntity.h Range.h \
-  SPoint3.h SBoundingBox3d.h MVertex.h GPoint.h SPoint2.h GEdge.h \
-  SVector3.h GFace.h GEdgeLoop.h Pair.h GRegion.h FFace.h FEdge.h \
+  SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h \
+  GFace.h GEdgeLoop.h Pair.h GRegion.h MVertex.h FFace.h FEdge.h \
   ../Common/Message.h
 FProjectionFace.o: FProjectionFace.cpp FProjectionFace.h GModel.h \
-  GVertex.h GEntity.h Range.h SPoint3.h SBoundingBox3d.h MVertex.h \
-  GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h GEdgeLoop.h Pair.h \
-  GRegion.h
+  GVertex.h GEntity.h Range.h SPoint3.h SBoundingBox3d.h GPoint.h \
+  SPoint2.h GEdge.h SVector3.h GFace.h GEdgeLoop.h Pair.h GRegion.h
 GModel.o: GModel.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
-  SBoundingBox3d.h MVertex.h GPoint.h SPoint2.h GEdge.h SVector3.h \
-  GFace.h GEdgeLoop.h Pair.h GRegion.h gmshSurface.h ../Numeric/Numeric.h \
-  MElement.h ../Common/GmshDefines.h MEdge.h MFace.h ../Mesh/Field.h \
-  ../Post/PView.h ../Common/SmoothData.h ../Post/PViewData.h \
-  ../Geo/SBoundingBox3d.h ../Post/PViewOptions.h ../Post/ColorTable.h \
-  ../Geo/Geo.h ../Geo/gmshSurface.h ../DataStr/List.h ../DataStr/Tree.h \
-  ../DataStr/avl.h ../Geo/SPoint2.h ../Geo/ExtrudeParams.h ../Geo/GEdge.h \
-  ../Post/OctreePost.h ../Common/Octree.h ../Common/OctreeInternals.h \
-  ../Mesh/BackgroundMesh.h ../Common/Message.h ../Common/Context.h
+  SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \
+  GEdgeLoop.h Pair.h GRegion.h gmshSurface.h ../Numeric/Numeric.h \
+  MElement.h ../Common/GmshDefines.h MVertex.h MEdge.h MFace.h \
+  ../Mesh/Field.h ../Post/PView.h ../Common/SmoothData.h \
+  ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Post/PViewOptions.h \
+  ../Post/ColorTable.h ../Geo/Geo.h ../Geo/gmshSurface.h \
+  ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../Geo/SPoint2.h \
+  ../Geo/ExtrudeParams.h ../Geo/GEdge.h ../Post/OctreePost.h \
+  ../Common/Octree.h ../Common/OctreeInternals.h ../Mesh/BackgroundMesh.h \
+  ../Common/Message.h ../Common/Context.h
 GModelIO_Geo.o: GModelIO_Geo.cpp GModel.h GVertex.h GEntity.h Range.h \
-  SPoint3.h SBoundingBox3d.h MVertex.h GPoint.h SPoint2.h GEdge.h \
-  SVector3.h GFace.h GEdgeLoop.h Pair.h GRegion.h Geo.h \
-  ../Common/GmshDefines.h gmshSurface.h ../Numeric/Numeric.h \
-  ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ExtrudeParams.h \
-  ../Common/SmoothData.h ../Parser/OpenFile.h ../DataStr/Tools.h \
-  ../DataStr/List.h ../DataStr/Tree.h ../Common/Message.h gmshVertex.h \
-  gmshFace.h gmshEdge.h gmshRegion.h ../Parser/Parser.h
+  SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h \
+  GFace.h GEdgeLoop.h Pair.h GRegion.h Geo.h ../Common/GmshDefines.h \
+  gmshSurface.h ../Numeric/Numeric.h ../DataStr/List.h ../DataStr/Tree.h \
+  ../DataStr/avl.h ExtrudeParams.h ../Common/SmoothData.h \
+  ../Parser/OpenFile.h ../DataStr/Tools.h ../DataStr/List.h \
+  ../DataStr/Tree.h ../Common/Message.h gmshVertex.h MVertex.h gmshFace.h \
+  gmshEdge.h gmshRegion.h ../Parser/Parser.h
 GModelIO_Mesh.o: GModelIO_Mesh.cpp ../Common/Message.h \
   ../Common/GmshDefines.h GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
-  SBoundingBox3d.h MVertex.h GPoint.h SPoint2.h GEdge.h SVector3.h \
-  GFace.h GEdgeLoop.h Pair.h GRegion.h gmshRegion.h Geo.h gmshSurface.h \
+  SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \
+  GEdgeLoop.h Pair.h GRegion.h gmshRegion.h Geo.h gmshSurface.h \
   ../Numeric/Numeric.h ../DataStr/List.h ../DataStr/Tree.h \
   ../DataStr/avl.h ExtrudeParams.h ../Common/SmoothData.h gmshFace.h \
-  gmshVertex.h gmshEdge.h MElement.h MEdge.h MFace.h
+  gmshVertex.h MVertex.h gmshEdge.h MElement.h MEdge.h MFace.h
 GModelIO_OCC.o: GModelIO_OCC.cpp GModelIO_OCC.h GModel.h GVertex.h \
-  GEntity.h Range.h SPoint3.h SBoundingBox3d.h MVertex.h GPoint.h \
-  SPoint2.h GEdge.h SVector3.h GFace.h GEdgeLoop.h Pair.h GRegion.h \
-  OCCIncludes.h ../Common/Message.h ../Common/Context.h ../DataStr/List.h \
-  OCCVertex.h OCCEdge.h OCCFace.h OCCRegion.h
+  GEntity.h Range.h SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h \
+  SVector3.h GFace.h GEdgeLoop.h Pair.h GRegion.h OCCIncludes.h \
+  ../Common/Message.h ../Common/Context.h ../DataStr/List.h OCCVertex.h \
+  MVertex.h OCCEdge.h OCCFace.h OCCRegion.h
 GModelIO_F.o: GModelIO_F.cpp GModel.h GVertex.h GEntity.h Range.h \
-  SPoint3.h SBoundingBox3d.h MVertex.h GPoint.h SPoint2.h GEdge.h \
-  SVector3.h GFace.h GEdgeLoop.h Pair.h GRegion.h ../Common/Message.h \
-  FVertex.h FEdge.h FFace.h GModelIO_F.h
+  SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h \
+  GFace.h GEdgeLoop.h Pair.h GRegion.h ../Common/Message.h FVertex.h \
+  MVertex.h FEdge.h FFace.h GModelIO_F.h
 GModelIO_CGNS.o: GModelIO_CGNS.cpp GModel.h GVertex.h GEntity.h Range.h \
-  SPoint3.h SBoundingBox3d.h MVertex.h GPoint.h SPoint2.h GEdge.h \
-  SVector3.h GFace.h GEdgeLoop.h Pair.h GRegion.h ../Common/Message.h \
-  MElement.h ../Common/GmshDefines.h MEdge.h MFace.h MNeighbour.h \
+  SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h \
+  GFace.h GEdgeLoop.h Pair.h GRegion.h ../Common/Message.h MElement.h \
+  ../Common/GmshDefines.h MVertex.h MEdge.h MFace.h MNeighbour.h \
   MEdgeHash.h ../Common/Hash.h MFaceHash.h
 GModelIO_MED.o: GModelIO_MED.cpp GModel.h GVertex.h GEntity.h Range.h \
-  SPoint3.h SBoundingBox3d.h MVertex.h GPoint.h SPoint2.h GEdge.h \
-  SVector3.h GFace.h GEdgeLoop.h Pair.h GRegion.h MEdge.h \
+  SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h \
+  GFace.h GEdgeLoop.h Pair.h GRegion.h MVertex.h MEdge.h \
   ../Common/Message.h
 ExtrudeParams.o: ExtrudeParams.cpp ../Common/Message.h Geo.h \
   ../Common/GmshDefines.h gmshSurface.h Pair.h Range.h SPoint2.h \
@@ -207,26 +203,25 @@ Geo.o: Geo.cpp ../Common/Message.h ../Numeric/Numeric.h \
   ../DataStr/Tree.h ../DataStr/avl.h Geo.h ../Common/GmshDefines.h \
   gmshSurface.h Pair.h Range.h SPoint2.h SPoint3.h SVector3.h \
   SBoundingBox3d.h ExtrudeParams.h ../Common/SmoothData.h GModel.h \
-  GVertex.h GEntity.h MVertex.h GPoint.h GEdge.h GFace.h GEdgeLoop.h \
-  GRegion.h GeoInterpolation.h ../Parser/Parser.h ../Common/Context.h
+  GVertex.h GEntity.h GPoint.h GEdge.h GFace.h GEdgeLoop.h GRegion.h \
+  GeoInterpolation.h ../Parser/Parser.h ../Common/Context.h
 GeoStringInterface.o: GeoStringInterface.cpp ../Common/Message.h \
   ../Numeric/Numeric.h ../DataStr/Malloc.h Geo.h ../Common/GmshDefines.h \
   gmshSurface.h Pair.h Range.h SPoint2.h SPoint3.h SVector3.h \
   SBoundingBox3d.h ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h \
   ExtrudeParams.h ../Common/SmoothData.h GeoStringInterface.h \
   ../Parser/Parser.h ../Parser/OpenFile.h ../Common/Context.h GModel.h \
-  GVertex.h GEntity.h MVertex.h GPoint.h GEdge.h GFace.h GEdgeLoop.h \
-  GRegion.h
+  GVertex.h GEntity.h GPoint.h GEdge.h GFace.h GEdgeLoop.h GRegion.h
 GeoInterpolation.o: GeoInterpolation.cpp ../Common/Message.h Geo.h \
   ../Common/GmshDefines.h gmshSurface.h Pair.h Range.h SPoint2.h \
   SPoint3.h SVector3.h SBoundingBox3d.h ../Numeric/Numeric.h \
   ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ExtrudeParams.h \
   ../Common/SmoothData.h GeoInterpolation.h GeoStringInterface.h
 findLinks.o: findLinks.cpp ../Common/Message.h GModel.h GVertex.h \
-  GEntity.h Range.h SPoint3.h SBoundingBox3d.h MVertex.h GPoint.h \
-  SPoint2.h GEdge.h SVector3.h GFace.h GEdgeLoop.h Pair.h GRegion.h \
-  ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/List.h ../DataStr/Tools.h \
-  ../DataStr/List.h ../DataStr/Tree.h
+  GEntity.h Range.h SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h \
+  SVector3.h GFace.h GEdgeLoop.h Pair.h GRegion.h ../DataStr/Tree.h \
+  ../DataStr/avl.h ../DataStr/List.h ../DataStr/Tools.h ../DataStr/List.h \
+  ../DataStr/Tree.h
 MVertex.o: MVertex.cpp MVertex.h SPoint3.h GEdge.h GEntity.h Range.h \
   SBoundingBox3d.h GVertex.h GPoint.h SPoint2.h SVector3.h GFace.h \
   GEdgeLoop.h Pair.h
diff --git a/Geo/OCCFace.cpp b/Geo/OCCFace.cpp
index 2e3182fc2ea930a6a4e4fead6ab19f19b4835f01..1e859579dd7ecd31d4acc4d80f46a9985a44572a 100644
--- a/Geo/OCCFace.cpp
+++ b/Geo/OCCFace.cpp
@@ -1,4 +1,4 @@
-// $Id: OCCFace.cpp,v 1.25 2008-01-17 17:48:38 remacle Exp $
+// $Id: OCCFace.cpp,v 1.26 2008-01-20 10:10:41 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -255,18 +255,16 @@ int OCCFace::containsPoint(const SPoint3 &pt) const
   return false;
 }
 
-// retrieve surface params 
 surface_params OCCFace::getSurfaceParams() const 
 {
   surface_params p;
-  switch (geomType()) 
-    {
-    case GEntity::Cylinder :
-      {
-	p.radius = Handle(Geom_CylindricalSurface)::DownCast(occface)->Radius();
-      }
-      break;
-    }
+  switch(geomType()){
+  case GEntity::Cylinder:
+    p.radius = Handle(Geom_CylindricalSurface)::DownCast(occface)->Radius();
+    break;
+  default:
+    break;
+  }
   return p;
 }
 
diff --git a/Geo/OCCVertex.cpp b/Geo/OCCVertex.cpp
index 004104904963f8521596d6c426062eb2c22517b4..df6c165223e56d8b6b3bbd8200cb44a2e419cb79 100644
--- a/Geo/OCCVertex.cpp
+++ b/Geo/OCCVertex.cpp
@@ -1,4 +1,4 @@
-// $Id: OCCVertex.cpp,v 1.11 2007-01-22 16:31:43 geuzaine Exp $
+// $Id: OCCVertex.cpp,v 1.12 2008-01-20 10:10:41 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -26,7 +26,8 @@
 
 #if defined(HAVE_OCC)
 
-double max_surf_curvature(const GVertex *gv, double x, double y, double z, const GEdge *_myGEdge)
+double max_surf_curvature(const GVertex *gv, double x, double y, double z, 
+			  const GEdge *_myGEdge)
 {
   std::list<GFace *> faces = _myGEdge->faces();
   std::list<GFace *>::iterator it =  faces.begin();
@@ -43,10 +44,13 @@ double max_surf_curvature(const GVertex *gv, double x, double y, double z, const
 double OCCVertex::max_curvature_of_surfaces() const
 {  
   if(max_curvature < 0){
-    for(std::list<GEdge*>::const_iterator it = l_edges.begin(); it != l_edges.end(); ++it ){
-      max_curvature = std::max(max_surf_curvature(this, x(), y(), z(), *it), max_curvature);
+    for(std::list<GEdge*>::const_iterator it = l_edges.begin(); 
+	it != l_edges.end(); ++it ){
+      max_curvature = std::max(max_surf_curvature(this, x(), y(), z(), *it),
+			       max_curvature);
     }
-    // printf("max curvature (%d) = %12.5E lc = %12.5E\n",tag(),max_curvature,prescribedMeshSizeAtVertex());
+    // printf("max curvature (%d) = %12.5E lc = %12.5E\n",tag(),
+    //        max_curvature, prescribedMeshSizeAtVertex());
   }
   return max_curvature;
 }
diff --git a/Geo/OCCVertex.h b/Geo/OCCVertex.h
index 49bd651935169a8dbbe8422f90181206918055e9..83f23cf3eece259c11bc216f716bb9e0084eb997 100644
--- a/Geo/OCCVertex.h
+++ b/Geo/OCCVertex.h
@@ -23,7 +23,7 @@
 #include "GModel.h"
 #include "OCCIncludes.h"
 #include "GVertex.h"
-#include "Context.h"
+#include "MVertex.h"
 
 #if defined(HAVE_OCC)
 
diff --git a/Geo/gmshVertex.h b/Geo/gmshVertex.h
index 26af6c855996f08f70c40d98cd2135bfad656222..1869f013cd91a0a0393ec6d8a892683cd3dffa30 100644
--- a/Geo/gmshVertex.h
+++ b/Geo/gmshVertex.h
@@ -22,6 +22,7 @@
 
 #include "Geo.h"
 #include "GVertex.h"
+#include "MVertex.h"
 
 class gmshVertex : public GVertex {
  protected:
diff --git a/Graphics/Makefile b/Graphics/Makefile
index 735fa7ed88e812b2020eae8860b14270c081fec2..27f5140ec6acbcea8c87d7d6ef461a75e3e55d22 100644
--- a/Graphics/Makefile
+++ b/Graphics/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.133 2008-01-19 23:04:13 geuzaine Exp $
+# $Id: Makefile,v 1.134 2008-01-20 10:10:41 geuzaine Exp $
 #
 # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 #
@@ -72,24 +72,24 @@ Draw.o: Draw.cpp ../Common/GmshUI.h ../Common/GmshDefines.h \
   ../Common/Message.h Draw.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
   ../Common/Context.h ../DataStr/List.h ../Numeric/Numeric.h \
   ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \
-  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/MVertex.h \
-  ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
-  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
-  ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
-  ../Geo/SBoundingBox3d.h ../Post/PView.h ../Common/SmoothData.h \
-  ../Post/PViewData.h ../Post/PViewOptions.h ../Post/ColorTable.h
+  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
+  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \
+  ../Post/PView.h ../Common/SmoothData.h ../Post/PViewData.h \
+  ../Post/PViewOptions.h ../Post/ColorTable.h
 Mesh.o: Mesh.cpp ../Common/Message.h ../Common/GmshUI.h ../Geo/GModel.h \
   ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/MVertex.h \
-  ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
-  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
-  ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
-  ../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Common/GmshDefines.h \
-  ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
+  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \
+  ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \
+  ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
   ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h Draw.h \
   ../Common/Context.h ../DataStr/List.h ../Common/OS.h gl2ps.h \
   ../Common/VertexArray.h ../Common/Context.h ../Common/SmoothData.h \
@@ -97,13 +97,12 @@ Mesh.o: Mesh.cpp ../Common/Message.h ../Common/GmshUI.h ../Geo/GModel.h \
 Geom.o: Geom.cpp ../Common/GmshUI.h Draw.h ../Geo/SBoundingBox3d.h \
   ../Geo/SPoint3.h ../Common/Context.h ../DataStr/List.h gl2ps.h \
   ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \
-  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/MVertex.h \
-  ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
-  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
-  ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
-  ../Geo/SBoundingBox3d.h
+  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
+  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h
 Post.o: Post.cpp ../Common/Message.h ../Common/GmshUI.h \
   ../Numeric/Numeric.h Draw.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
   Iso.h ../Post/PView.h ../Common/SmoothData.h ../Post/PViewData.h \
@@ -113,17 +112,16 @@ Post.o: Post.cpp ../Common/Message.h ../Common/GmshUI.h \
 SelectBuffer.o: SelectBuffer.cpp ../Common/Message.h ../Common/GmshUI.h \
   ../Common/GmshDefines.h ../Geo/GModel.h ../Geo/GVertex.h \
   ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/MVertex.h \
-  ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
-  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
-  ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
-  ../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Geo/MVertex.h \
-  ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h \
-  ../Geo/MVertex.h ../Geo/SVector3.h Draw.h ../Common/Context.h \
-  ../DataStr/List.h SelectBuffer.h ../Common/VertexArray.h \
-  ../Common/Context.h
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
+  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \
+  ../Geo/MElement.h ../Geo/MVertex.h ../Geo/SPoint3.h ../Geo/MEdge.h \
+  ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \
+  ../Geo/SVector3.h Draw.h ../Common/Context.h ../DataStr/List.h \
+  SelectBuffer.h ../Common/VertexArray.h ../Common/Context.h
 Iso.o: Iso.cpp ../Numeric/Numeric.h
 Entity.o: Entity.cpp ../Common/GmshUI.h ../Numeric/Numeric.h Draw.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/Context.h \
diff --git a/Makefile b/Makefile
index 083313925780eb745d5f47e82785460969619692..60daee976029e63893986d49d1e10a6f0660c547 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.452 2008-01-19 22:29:21 geuzaine Exp $
+# $Id: Makefile,v 1.453 2008-01-20 10:10:40 geuzaine Exp $
 #
 # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 #
@@ -58,10 +58,23 @@ install-mac: variables package-mac
 	cp -rf gmsh-${GMSH_VERSION}/Gmsh.app /Applications
 	rm -rf gmsh-${GMSH_VERSION} gmsh-${GMSH_VERSION}-MacOSX.tgz
 
-embed: compile
+.PHONY: lib
+lib: compile
 	${AR} ${ARFLAGS}libGmsh${LIBEXT} lib/*${LIBEXT}
 	${RANLIB} libGmsh${LIBEXT}
 
+install-lib: lib
+	mkdir -p ${includedir}/gmsh
+	cp -f Geo/GModel.h\
+                Geo/GEntity.h Geo/GPoint.h\
+                Geo/GVertex.h Geo/GEdge.h Geo/GEdgeLoop.h Geo/GFace.h Geo/GRegion.h\
+              Geo/MVertex.h Geo/MEdge.h Geo/MFace.h Geo/MElement.h\
+              Geo/SPoint2.h Geo/SPoint3.h Geo/SVector3.h Geo/SBoundingBox3d.h\
+              Geo/Pair.h Geo/Range.h\
+              Common/GmshDefines.h\
+          ${includedir}/gmsh
+	cp -f libGmsh${LIBEXT} ${libdir}
+
 variables: configure
 	@echo "********************************************************************"
 	@echo "Please configure Gmsh by running ./configure"
diff --git a/Mesh/BDS.cpp b/Mesh/BDS.cpp
index 53fd8ea1ecd61a00a1e55c5abf7b1bdf2ab56a19..905d9b13ed9ad563c6225462a6e963106668df99 100644
--- a/Mesh/BDS.cpp
+++ b/Mesh/BDS.cpp
@@ -1,4 +1,4 @@
-// $Id: BDS.cpp,v 1.91 2008-01-18 22:23:03 geuzaine Exp $
+// $Id: BDS.cpp,v 1.92 2008-01-20 10:10:41 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -699,7 +699,7 @@ void BDS_Mesh::saturate_edge(BDS_Edge * e, std::vector<BDS_Point *> &mids)
 
   // create all the sub-edges of e 
   std::vector<BDS_Edge*> subs;
-  for (int i=0; i<mids.size()+1; i++)
+  for (unsigned int i = 0; i < mids.size() + 1; i++)
     {
       BDS_Point *a,*b;
       if (i == 0)a = p1;
@@ -714,7 +714,7 @@ void BDS_Mesh::saturate_edge(BDS_Edge * e, std::vector<BDS_Point *> &mids)
     }
   // create edges that connect op1 and op2
   std::vector<BDS_Edge*> conn1,conn2;
-  for (int i=0;i<mids.size();i++)
+  for (unsigned int i = 0; i < mids.size(); i++)
     {
       BDS_Edge *c1 = new BDS_Edge(mids[i], op[0]);
       edges.push_back(c1); 
@@ -729,7 +729,7 @@ void BDS_Mesh::saturate_edge(BDS_Edge * e, std::vector<BDS_Point *> &mids)
 
   // create the triangles
 
-  for (int i=0;i<mids.size()+1;i++)
+  for (unsigned int i = 0; i < mids.size() + 1; i++)
     {
       BDS_Edge *e1,*e2,*e3=subs[i];
 
diff --git a/Mesh/Field.cpp b/Mesh/Field.cpp
index 4d6ff27eacc08091a16ccdf24d4eecc924efc0f5..8e1a424a40f06287e6ce273bd541521edf98f9b7 100644
--- a/Mesh/Field.cpp
+++ b/Mesh/Field.cpp
@@ -1,4 +1,4 @@
-// $Id: Field.cpp,v 1.12 2008-01-19 22:06:03 geuzaine Exp $
+// $Id: Field.cpp,v 1.13 2008-01-20 10:10:41 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -21,12 +21,13 @@
 
 #include <fstream>
 #include <math.h>
+#include "GModel.h"
+#include "MVertex.h"
 #include "Message.h"
 #include "Field.h"
 #include "Context.h"
 #include "GeoInterpolation.h"
 #include "BackgroundMesh.h"
-#include "GModel.h"
 #ifdef HAVE_MATH_EVAL
 #include "matheval.h"
 #endif
diff --git a/Mesh/HighOrder.cpp b/Mesh/HighOrder.cpp
index 9c8f5330c958ccf61a7e8fbbd1776c2d371b552b..6a8afb82ec7e79e4a5be56e43b879c2212d2dd07 100644
--- a/Mesh/HighOrder.cpp
+++ b/Mesh/HighOrder.cpp
@@ -1,4 +1,4 @@
-// $Id: HighOrder.cpp,v 1.17 2008-01-19 23:04:13 geuzaine Exp $
+// $Id: HighOrder.cpp,v 1.18 2008-01-20 10:10:41 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -775,7 +775,7 @@ double smoothing_objective_function_HighOrder (double U, double V, MVertex *v, s
 
   double minJ =  1.e22;
   double maxJ = -1.e22;
-  for (int i=0;i<ts.size();i++){
+  for (unsigned int i = 0; i < ts.size(); i++){
     getMinMaxJac (ts[i], minJ, maxJ);
   }
   v->x() = oldX;
@@ -806,7 +806,7 @@ double smooth_obj_HighOrder(double U, double V, void *data){
 double smooth_obj_HighOrderN(double *uv, void *data){
   smoothVertexDataHON *svd = (smoothVertexDataHON*)data;
   double oldX[10],oldY[10],oldZ[10];
-  for (int i=0;i<svd->v.size();i++){
+  for (unsigned int i = 0; i < svd->v.size(); i++){
     GPoint gp = svd->gf->point(uv[2*i],uv[2*i+1]);
     oldX[i] = svd->v[i]->x();
     oldY[i] = svd->v[i]->y();
@@ -817,10 +817,10 @@ double smooth_obj_HighOrderN(double *uv, void *data){
   }
   double minJ =  1.e22;
   double maxJ = -1.e22;
-  for (int i=0;i<svd->ts.size();i++){
+  for(unsigned int i = 0; i < svd->ts.size(); i++){
     getMinMaxJac (svd->ts[i], minJ, maxJ);
   }
-  for (int i=0;i<svd->v.size();i++){
+  for(unsigned int i = 0; i < svd->v.size(); i++){
     svd->v[i]->x() = oldX[i];
     svd->v[i]->y() = oldY[i];
     svd->v[i]->z() = oldZ[i];
@@ -834,7 +834,7 @@ void deriv_smoothing_objective_function_HighOrderN(double *uv, double *dF, doubl
   const double SMALL = 1./LARGE;
   smoothVertexDataHON *svd = (smoothVertexDataHON*)data;
   F   = smooth_obj_HighOrderN(uv,data);
-  for (int i=0;i<svd->v.size();i++){
+  for (unsigned int i = 0; i < svd->v.size(); i++){
     uv[i] += SMALL;
     dF[i] = (smooth_obj_HighOrderN(uv,data) - F)*LARGE;
     uv[i] -= SMALL;
@@ -848,8 +848,6 @@ bool optimizeHighOrderMesh(GModel *modl, GFace *gf, edgeContainer &edgeVertices)
   v2t_cont adjv;
   buildVertexToTriangle ( gf->triangles ,  adjv );
 
-  int ITER=0;
-
   typedef std::map<std::pair<MVertex*, MVertex*>, std::vector<MElement*> > edge2tris;
   edge2tris e2t;
   for(unsigned int i = 0; i < gf->triangles.size(); i++){
@@ -877,7 +875,7 @@ bool optimizeHighOrderMesh(GModel *modl, GFace *gf, edgeContainer &edgeVertices)
       else
 	e = edgeVertices[std::make_pair<MVertex*, MVertex*> (n4, n2)];
 
-      if (e.size() == -1){
+      if (e.size() == 1){
 	double initu,initv;
 	e[0]->getParameter ( 0,initu);
 	e[0]->getParameter ( 1,initv);	  
@@ -897,7 +895,7 @@ bool optimizeHighOrderMesh(GModel *modl, GFace *gf, edgeContainer &edgeVertices)
       }
       else if (e.size() < 5){
 	double uv[20];
-	for (int i=0;i<e.size();i++){
+	for (unsigned int i = 0; i < e.size(); i++){
 	  if (!e[i]->getParameter (0,uv[2*i]))throw;
 	  if (!e[i]->getParameter (1,uv[2*i+1]))throw;
 	}
@@ -925,7 +923,7 @@ bool optimizeHighOrderMesh(GModel *modl, GFace *gf, edgeContainer &edgeVertices)
 // 	    printf("AVANT 2 minJ %22.15E maxJ %22.15E\n",minJ,maxJ);
 // 	    checkHighOrderTriangles(modl);
 
-	    for (int i=0;i<vdN.v.size();i++){
+	    for (unsigned int i = 0; i < vdN.v.size(); i++){
 	      vdN.v[i]->setParameter ( 0,uv[2*i]);
 	      vdN.v[i]->setParameter ( 1,uv[2*i+1]);
 	      GPoint gp = gf->point(uv[2*i],uv[2*i+1]);
diff --git a/Mesh/Makefile b/Mesh/Makefile
index 77dbfb3583479e765537639d485f44bd3a7fb6e8..92b24a65ce47f1b23f4ca49eb6e75c98aa399315 100644
--- a/Mesh/Makefile
+++ b/Mesh/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.194 2008-01-19 23:04:13 geuzaine Exp $
+# $Id: Makefile,v 1.195 2008-01-20 10:10:41 geuzaine Exp $
 #
 # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 #
@@ -86,54 +86,52 @@ Generator.o: Generator.cpp ../Common/Message.h ../Numeric/Numeric.h \
   ../Common/SmoothData.h ../Post/PViewData.h ../Geo/SBoundingBox3d.h \
   ../Geo/SPoint3.h ../Post/PViewOptions.h ../Post/ColorTable.h \
   ../Common/OS.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \
-  ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \
-  ../Geo/MVertex.h ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h \
-  ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h \
-  ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h \
-  ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \
-  ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h \
-  ../Geo/GEntity.h ../Geo/SBoundingBox3d.h ../Geo/MElement.h \
-  ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/MEdge.h \
-  ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \
-  ../Geo/SVector3.h meshGEdge.h meshGFace.h meshGRegion.h \
-  BackgroundMesh.h BoundaryLayer.h HighOrder.h
-Field.o: Field.cpp ../Common/Message.h Field.h ../Post/PView.h \
-  ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/PViewData.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Post/PViewOptions.h \
-  ../Post/ColorTable.h ../Geo/Geo.h ../Common/GmshDefines.h \
-  ../Geo/gmshSurface.h ../Geo/Pair.h ../Geo/Range.h ../Geo/SPoint2.h \
-  ../Geo/SPoint3.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../DataStr/List.h ../DataStr/Tree.h \
-  ../DataStr/avl.h ../Geo/SPoint2.h ../Geo/ExtrudeParams.h ../Geo/GEdge.h \
-  ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Geo/GVertex.h ../Geo/GEntity.h \
-  ../Geo/MVertex.h ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
-  ../Post/OctreePost.h ../Common/Octree.h ../Common/OctreeInternals.h \
-  ../Common/Context.h ../Geo/GeoInterpolation.h ../Geo/Geo.h \
-  BackgroundMesh.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEdge.h \
+  ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
   ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
   ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
-  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h
-meshGEdge.o: meshGEdge.cpp meshGEdge.h ../Geo/GEdge.h ../Geo/GEntity.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \
+  ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \
+  ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
+  ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h meshGEdge.h \
+  meshGFace.h meshGRegion.h BackgroundMesh.h BoundaryLayer.h HighOrder.h
+Field.o: Field.cpp ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \
   ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \
-  ../Geo/SPoint3.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/MVertex.h \
-  ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/SVector3.h \
-  ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/MElement.h \
-  ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/MEdge.h \
-  ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \
-  ../Geo/SVector3.h BackgroundMesh.h ../Numeric/Numeric.h \
-  ../Common/Message.h ../DataStr/List.h ../Common/Context.h
-meshGEdgeExtruded.o: meshGEdgeExtruded.cpp ../Geo/GModel.h \
-  ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/MVertex.h \
   ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
   ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
   ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
   ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \
   ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
-  ../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Common/GmshDefines.h \
-  ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
+  ../Geo/SBoundingBox3d.h ../Geo/MVertex.h ../Geo/SPoint3.h \
+  ../Common/Message.h Field.h ../Post/PView.h ../Common/SmoothData.h \
+  ../Numeric/Numeric.h ../Post/PViewData.h ../Post/PViewOptions.h \
+  ../Post/ColorTable.h ../Geo/Geo.h ../Common/GmshDefines.h \
+  ../Geo/gmshSurface.h ../Geo/Pair.h ../Geo/Range.h ../Geo/SPoint2.h \
+  ../Geo/SPoint3.h ../Geo/SVector3.h ../Geo/SBoundingBox3d.h \
+  ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../Geo/SPoint2.h \
+  ../Geo/ExtrudeParams.h ../Post/OctreePost.h ../Common/Octree.h \
+  ../Common/OctreeInternals.h ../Common/Context.h \
+  ../Geo/GeoInterpolation.h ../Geo/Geo.h BackgroundMesh.h
+meshGEdge.o: meshGEdge.cpp meshGEdge.h ../Geo/GEdge.h ../Geo/GEntity.h \
+  ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \
+  ../Geo/SPoint3.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h \
+  ../Geo/SPoint2.h ../Geo/MElement.h ../Common/GmshDefines.h \
+  ../Geo/MVertex.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \
+  ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
+  BackgroundMesh.h ../Numeric/Numeric.h ../Common/Message.h \
+  ../DataStr/List.h ../Common/Context.h
+meshGEdgeExtruded.o: meshGEdgeExtruded.cpp ../Geo/GModel.h \
+  ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
+  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \
+  ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \
+  ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
   ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
   ../Geo/ExtrudeParams.h ../Common/SmoothData.h ../Numeric/Numeric.h \
   ../Common/Message.h
@@ -143,42 +141,41 @@ meshGFace.o: meshGFace.cpp meshGFace.h meshGFaceDelaunayInsertion.h \
   ../Geo/SPoint3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
   meshGFaceOptimize.h DivideAndConquer.h BackgroundMesh.h \
   ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/MVertex.h \
-  ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \
-  ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
-  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
-  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
-  ../Common/Context.h ../DataStr/List.h ../Common/Message.h \
-  ../Numeric/Numeric.h BDS.h ../Post/PView.h ../Common/SmoothData.h \
-  ../Post/PViewData.h ../Post/PViewOptions.h ../Post/ColorTable.h \
-  qualityMeasures.h Field.h ../Geo/Geo.h ../Geo/gmshSurface.h \
-  ../Geo/Pair.h ../Geo/Range.h ../Geo/SPoint2.h ../Geo/SPoint3.h \
-  ../Geo/SVector3.h ../Geo/SBoundingBox3d.h ../DataStr/Tree.h \
-  ../DataStr/avl.h ../Geo/SPoint2.h ../Geo/ExtrudeParams.h \
-  ../Post/OctreePost.h ../Common/Octree.h ../Common/OctreeInternals.h \
-  ../Common/OS.h
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h \
+  ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \
+  ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Common/Context.h \
+  ../DataStr/List.h ../Common/Message.h ../Numeric/Numeric.h BDS.h \
+  ../Post/PView.h ../Common/SmoothData.h ../Post/PViewData.h \
+  ../Post/PViewOptions.h ../Post/ColorTable.h qualityMeasures.h Field.h \
+  ../Geo/Geo.h ../Geo/gmshSurface.h ../Geo/Pair.h ../Geo/Range.h \
+  ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/SVector3.h \
+  ../Geo/SBoundingBox3d.h ../DataStr/Tree.h ../DataStr/avl.h \
+  ../Geo/SPoint2.h ../Geo/ExtrudeParams.h ../Post/OctreePost.h \
+  ../Common/Octree.h ../Common/OctreeInternals.h ../Common/OS.h
 meshGFaceTransfinite.o: meshGFaceTransfinite.cpp meshGFace.h \
   ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/MVertex.h \
-  ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
-  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
-  ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/MElement.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
+  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
+  ../Geo/MVertex.h ../Geo/SPoint3.h ../Geo/MElement.h \
   ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/MEdge.h \
   ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \
   ../Geo/SVector3.h ../Common/Context.h ../DataStr/List.h \
   ../Common/Message.h ../Numeric/Numeric.h
 meshGFaceExtruded.o: meshGFaceExtruded.cpp ../Geo/GModel.h \
   ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/MVertex.h \
-  ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
-  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
-  ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
-  ../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Common/GmshDefines.h \
-  ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
+  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \
+  ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \
+  ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
   ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
   ../Geo/ExtrudeParams.h ../Common/SmoothData.h ../Numeric/Numeric.h \
   ../Common/Context.h ../DataStr/List.h ../Common/Message.h
@@ -186,15 +183,15 @@ meshGFaceDelaunayInsertion.o: meshGFaceDelaunayInsertion.cpp BDS.h \
   ../Geo/GFace.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
   ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
-  ../Geo/GEntity.h ../Geo/MVertex.h ../Geo/SPoint3.h ../Geo/GPoint.h \
-  ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint2.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
-  ../Post/PView.h ../Common/SmoothData.h ../Numeric/Numeric.h \
-  ../Post/PViewData.h ../Post/PViewOptions.h ../Post/ColorTable.h \
-  BackgroundMesh.h meshGFaceDelaunayInsertion.h ../Geo/MElement.h \
-  ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/MEdge.h \
-  ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \
-  ../Geo/SVector3.h meshGFaceOptimize.h meshGFace.h ../Common/Message.h
+  ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/SVector3.h \
+  ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/SPoint2.h \
+  ../Geo/SVector3.h ../Geo/Pair.h ../Post/PView.h ../Common/SmoothData.h \
+  ../Numeric/Numeric.h ../Post/PViewData.h ../Post/PViewOptions.h \
+  ../Post/ColorTable.h BackgroundMesh.h meshGFaceDelaunayInsertion.h \
+  ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \
+  ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
+  ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h meshGFaceOptimize.h \
+  meshGFace.h ../Common/Message.h
 meshGFaceOptimize.o: meshGFaceOptimize.cpp meshGFaceOptimize.h \
   ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \
   ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
@@ -203,9 +200,9 @@ meshGFaceOptimize.o: meshGFaceOptimize.cpp meshGFaceOptimize.h \
   ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
   ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
-  ../Geo/GEntity.h ../Geo/MVertex.h ../Geo/GPoint.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h BackgroundMesh.h
+  ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/SVector3.h \
+  ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/SPoint2.h ../Geo/SVector3.h \
+  ../Geo/Pair.h BackgroundMesh.h
 meshGRegion.o: meshGRegion.cpp meshGRegion.h \
   meshGRegionDelaunayInsertion.h ../Geo/MElement.h \
   ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/SPoint3.h \
@@ -213,11 +210,11 @@ meshGRegion.o: meshGRegion.cpp meshGRegion.h \
   ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h qualityMeasures.h \
   ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \
   ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
-  ../Geo/MVertex.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
-  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h \
-  ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h \
-  ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \
+  ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \
+  ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
+  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \
   ../Geo/gmshRegion.h ../Geo/Geo.h ../Geo/gmshSurface.h ../Geo/Pair.h \
   ../Geo/Range.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/SVector3.h \
   ../Geo/SBoundingBox3d.h ../Numeric/Numeric.h ../DataStr/List.h \
@@ -233,48 +230,48 @@ meshGRegionDelaunayInsertion.o: meshGRegionDelaunayInsertion.cpp \
   ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h qualityMeasures.h \
   ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \
   ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
-  ../Geo/MVertex.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
-  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h \
-  ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h \
-  ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \
+  ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \
+  ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
+  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \
   ../Numeric/Numeric.h ../Common/Message.h
 meshGRegionTransfinite.o: meshGRegionTransfinite.cpp meshGFace.h \
   ../Geo/GFace.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
   ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
-  ../Geo/GEntity.h ../Geo/MVertex.h ../Geo/SPoint3.h ../Geo/GPoint.h \
-  ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint2.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
-  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/MElement.h \
+  ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/SVector3.h \
+  ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/SPoint2.h \
+  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
+  ../Geo/MVertex.h ../Geo/SPoint3.h ../Geo/MElement.h \
   ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/MEdge.h \
   ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \
   ../Geo/SVector3.h ../Common/Context.h ../DataStr/List.h \
   ../Common/Message.h
 meshGRegionExtruded.o: meshGRegionExtruded.cpp ../Geo/GModel.h \
   ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/MVertex.h \
-  ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
-  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
-  ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
-  ../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Common/GmshDefines.h \
-  ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
+  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \
+  ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \
+  ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
   ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
   ../Geo/ExtrudeParams.h ../Common/SmoothData.h ../Numeric/Numeric.h \
   meshGFace.h meshGRegion.h ../Common/Context.h ../DataStr/List.h \
   ../Common/Message.h
 meshGRegionCarveHole.o: meshGRegionCarveHole.cpp ../Geo/GModel.h \
   ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/MVertex.h \
-  ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
-  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
-  ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
-  ../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Common/GmshDefines.h \
-  ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
+  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \
+  ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \
+  ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
   ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h ../Common/Message.h
 meshGRegionLocalMeshMod.o: meshGRegionLocalMeshMod.cpp \
   meshGRegionLocalMeshMod.h meshGRegionDelaunayInsertion.h \
@@ -289,16 +286,16 @@ DivideAndConquer.o: DivideAndConquer.cpp ../Common/Message.h \
 BackgroundMesh.o: BackgroundMesh.cpp ../Common/Message.h BackgroundMesh.h \
   ../Numeric/Numeric.h ../Common/Context.h ../DataStr/List.h \
   ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/MVertex.h \
-  ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
-  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
-  ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GModel.h ../Geo/GVertex.h \
-  ../Geo/GEdge.h ../Geo/GFace.h ../Geo/GRegion.h ../Geo/GEntity.h \
-  ../Geo/SBoundingBox3d.h Field.h ../Post/PView.h ../Common/SmoothData.h \
-  ../Post/PViewData.h ../Post/PViewOptions.h ../Post/ColorTable.h \
-  ../Geo/Geo.h ../Common/GmshDefines.h ../Geo/gmshSurface.h ../Geo/Pair.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
+  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
+  ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEdge.h ../Geo/GFace.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h Field.h \
+  ../Post/PView.h ../Common/SmoothData.h ../Post/PViewData.h \
+  ../Post/PViewOptions.h ../Post/ColorTable.h ../Geo/Geo.h \
+  ../Common/GmshDefines.h ../Geo/gmshSurface.h ../Geo/Pair.h \
   ../Geo/Range.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/SVector3.h \
   ../Geo/SBoundingBox3d.h ../DataStr/Tree.h ../DataStr/avl.h \
   ../Geo/SPoint2.h ../Geo/ExtrudeParams.h ../Post/OctreePost.h \
@@ -307,24 +304,24 @@ qualityMeasures.o: qualityMeasures.cpp qualityMeasures.h BDS.h \
   ../Geo/GFace.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
   ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
-  ../Geo/GEntity.h ../Geo/MVertex.h ../Geo/SPoint3.h ../Geo/GPoint.h \
-  ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint2.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
-  ../Post/PView.h ../Common/SmoothData.h ../Numeric/Numeric.h \
-  ../Post/PViewData.h ../Post/PViewOptions.h ../Post/ColorTable.h \
+  ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/SVector3.h \
+  ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/SPoint2.h \
+  ../Geo/SVector3.h ../Geo/Pair.h ../Post/PView.h ../Common/SmoothData.h \
+  ../Numeric/Numeric.h ../Post/PViewData.h ../Post/PViewOptions.h \
+  ../Post/ColorTable.h ../Geo/MVertex.h ../Geo/SPoint3.h \
   ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \
   ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h \
   ../Geo/MVertex.h ../Geo/SVector3.h
 BoundaryLayer.o: BoundaryLayer.cpp ../Geo/GModel.h ../Geo/GVertex.h \
   ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/MVertex.h \
-  ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
-  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
-  ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
-  ../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Common/GmshDefines.h \
-  ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
+  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \
+  ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \
+  ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
   ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h BoundaryLayer.h \
   ../Geo/ExtrudeParams.h ../Common/SmoothData.h ../Numeric/Numeric.h \
   meshGEdge.h meshGFace.h ../Common/Message.h
@@ -332,23 +329,21 @@ BDS.o: BDS.cpp ../Numeric/Numeric.h ../Common/GmshMatrix.h BDS.h \
   ../Geo/GFace.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
   ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
-  ../Geo/GEntity.h ../Geo/MVertex.h ../Geo/SPoint3.h ../Geo/GPoint.h \
-  ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint2.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
-  ../Post/PView.h ../Common/SmoothData.h ../Post/PViewData.h \
-  ../Post/PViewOptions.h ../Post/ColorTable.h ../Common/Message.h \
-  qualityMeasures.h
+  ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/SVector3.h \
+  ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/SPoint2.h \
+  ../Geo/SVector3.h ../Geo/Pair.h ../Post/PView.h ../Common/SmoothData.h \
+  ../Post/PViewData.h ../Post/PViewOptions.h ../Post/ColorTable.h \
+  ../Common/Message.h qualityMeasures.h
 HighOrder.o: HighOrder.cpp HighOrder.h ../Geo/GModel.h ../Geo/GVertex.h \
   ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/MVertex.h \
-  ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
-  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
-  ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
-  ../Geo/SBoundingBox3d.h meshGFaceOptimize.h ../Geo/MElement.h \
-  ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/MEdge.h \
-  ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \
-  ../Geo/SVector3.h meshGFaceDelaunayInsertion.h ../Common/Message.h \
-  ../Common/OS.h ../Numeric/Numeric.h ../Common/Context.h \
-  ../DataStr/List.h
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
+  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \
+  meshGFaceOptimize.h ../Geo/MElement.h ../Common/GmshDefines.h \
+  ../Geo/MVertex.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \
+  ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
+  meshGFaceDelaunayInsertion.h ../Common/Message.h ../Common/OS.h \
+  ../Numeric/Numeric.h ../Common/Context.h ../DataStr/List.h
diff --git a/Mesh/meshGFace.cpp b/Mesh/meshGFace.cpp
index 776349d050fe9303c5969885e18f33e2f3308132..decfcef2ba0be2f96b7bcd0bbf049ae806676bc2 100644
--- a/Mesh/meshGFace.cpp
+++ b/Mesh/meshGFace.cpp
@@ -1,4 +1,4 @@
-// $Id: meshGFace.cpp,v 1.108 2008-01-18 22:23:03 geuzaine Exp $
+// $Id: meshGFace.cpp,v 1.109 2008-01-20 10:10:42 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -81,7 +81,6 @@ void remeshUnrecoveredEdges ( std::set<EdgeToRecover> & edgesNotRecovered, std::
       // add a new point in the middle of the intersecting segment
       int p1 = itr->p1;
       int p2 = itr->p2;
-      int index = 0;
       int N = itr->ge->lines.size();
       GVertex * g1 = itr->ge->getBeginVertex();
       GVertex * g2 = itr->ge->getEndVertex();
@@ -777,7 +776,6 @@ void saturateEdgePass ( GFace *gf, BDS_Mesh &m, double MAXE_, int &nb_split)
 		  mid  = m.add_point(++m.MAXPOINTNUMBER,
 				     (1.-coord) * (*it)->p1->u + coord * (*it)->p2->u,
 				     (1.-coord) * (*it)->p1->v + coord * (*it)->p2->v,gf);
-		  double l1;
 		  //		  if (BGMExists())
 		  mid->lcBGM() = BGM_MeshSize(gf,
 					      ((1.-coord) * (*it)->p1->u + (coord) * (*it)->p2->u)*m.scalingU,
@@ -878,40 +876,38 @@ void computeElementShapes (GFace *gf, BDS_Mesh &m, double &worst, double &avg, d
 }
 
 
-void computeElementShapes (GFace *gf, double &worst, double &avg, double &best, int &nT, int &greaterThan )
+void computeElementShapes(GFace *gf, double &worst, double &avg, double &best, 
+			  int &nT, int &greaterThan)
 {
   worst = 1.e22;
   avg = 0.0;
   best = 0.0;
   nT = 0;
   greaterThan = 0;
- for (int i=0;i<gf->triangles.size();i++)
-    {
-      double q  = qmTriangle(gf->triangles[i],QMTRI_RHO);
-      if (q>.9)greaterThan++;
-      avg+=q;
-      worst = std::min(worst,q);
-      best  = std::max(best,q);
-      nT++;
-    }
+  for(unsigned int i = 0; i < gf->triangles.size(); i++){
+    double q = qmTriangle(gf->triangles[i], QMTRI_RHO);
+    if(q > .9) greaterThan++;
+    avg += q;
+    worst = std::min(worst, q);
+    best  = std::max(best, q);
+    nT++;
+  }
   avg /= nT;
 }
 
-
-void smoothVertexPass ( GFace *gf, BDS_Mesh &m, int &nb_smooth)
+void smoothVertexPass(GFace *gf, BDS_Mesh &m, int &nb_smooth)
 {
   std::set<BDS_Point*,PointLessThan>::iterator itp = m.points.begin();
-  while (itp != m.points.end())
-    {      
-      if(m.smooth_point_centroid(*itp,gf))
-	nb_smooth ++;
-      ++itp;
-    }
+  while(itp != m.points.end()){      
+    if(m.smooth_point_centroid(*itp, gf))
+      nb_smooth ++;
+    ++itp;
+  }
 }
 
-void RefineMesh ( GFace *gf, BDS_Mesh &m , const int NIT)
+void RefineMesh(GFace *gf, BDS_Mesh &m, const int NIT)
 {
-  int IT =0;
+  int IT = 0;
   AttractorField_1DMesh *attr = 0;
 //   if (CTX.mesh.lc_from_curvature){
 //     // parameters are not important
@@ -1171,7 +1167,7 @@ bool gmsh2DMeshGenerator ( GFace *gf , int RECUR_ITER, bool debug = true)
   v_container all_vertices;
   std::map<int, MVertex*>numbered_vertices;
   std::list<GEdge*> edges = gf->edges();
-  std::list<GEdge*> emb_edges = gf->emb_edges();
+  std::list<GEdge*> emb_edges = gf->embeddedEdges();
   std::list<GEdge*>::iterator it = edges.begin();
 
 //   if (gf->geomType() == GEntity::Cylinder) 
@@ -1195,7 +1191,7 @@ bool gmsh2DMeshGenerator ( GFace *gf , int RECUR_ITER, bool debug = true)
   while(it != edges.end())
     {
       if ((*it)->isSeam(gf))return false;
-      if(!(*it)->is_mesh_degenerated()){
+      if(!(*it)->isMeshDegenerated()){
         all_vertices.insert ( (*it)->mesh_vertices.begin() , (*it)->mesh_vertices.end() );
         all_vertices.insert ( (*it)->getBeginVertex()->mesh_vertices.begin() , (*it)->getBeginVertex()->mesh_vertices.end() );
         all_vertices.insert ( (*it)->getEndVertex()->mesh_vertices.begin() , (*it)->getEndVertex()->mesh_vertices.end() );
@@ -1416,7 +1412,7 @@ bool gmsh2DMeshGenerator ( GFace *gf , int RECUR_ITER, bool debug = true)
   it = edges.begin();
   while(it != edges.end())
     {
-      if(!(*it)->is_mesh_degenerated())
+      if(!(*it)->isMeshDegenerated())
 	recover_medge ( m, *it, &edgesToRecover, &edgesNotRecovered, 1);
       ++it;
     }
@@ -1434,8 +1430,8 @@ bool gmsh2DMeshGenerator ( GFace *gf , int RECUR_ITER, bool debug = true)
   it = edges.begin();
   while(it != edges.end())
     {
-      if(!(*it)->is_mesh_degenerated()){
-	recover_medge ( m, *it, &edgesToRecover, &edgesNotRecovered, 2);	
+      if(!(*it)->isMeshDegenerated()){
+	recover_medge(m, *it, &edgesToRecover, &edgesNotRecovered, 2);	
       }
       ++it;
     }
@@ -1674,7 +1670,7 @@ bool buildConsecutiveListOfVertices (  GFace *gf,
   GEdgeLoop::iter it  = gel.begin();  
 
 
-  if (_DEBUG)printf("face %d with %d edges\n",gf->tag(),gf->edges().size());
+  if (_DEBUG)printf("face %d with %d edges\n",gf->tag(), (int)gf->edges().size());
 
   while (it != gel.end())   
    {
@@ -1748,7 +1744,7 @@ bool buildConsecutiveListOfVertices (  GFace *gf,
 	     double d = dist2(last_coord,first_coord);
 	     if (d < tol) 
 	       {
-		 if (_DEBUG)printf("d = %12.5E %d\n",d, coords.size());
+		 if (_DEBUG)printf("d = %12.5E %d\n",d, (int)coords.size());
 		 coords.clear();
 		 coords = mesh1d;
 		 found = GEdgeSigned(1,ge);
@@ -1815,7 +1811,7 @@ bool buildConsecutiveListOfVertices (  GFace *gf,
 	   edgeLoop.push_back(found.ge->mesh_vertices[i]);
        }
      
-     if (_DEBUG)printf("edge %d size %d size %d\n",found.ge->tag(),edgeLoop.size(), coords.size());
+     if (_DEBUG)printf("edge %d size %d size %d\n",found.ge->tag(), (int)edgeLoop.size(), (int)coords.size());
      
      std::vector<BDS_Point*>  edgeLoop_BDS;
      for (unsigned int i=0;i<edgeLoop.size();i++)	    
diff --git a/Mesh/meshGFaceOptimize.cpp b/Mesh/meshGFaceOptimize.cpp
index d20d091e6a43fbc4368b173e2ca82c19a9c4a5b1..cebd0c94f93765c761d5b161793f657855ea1316 100644
--- a/Mesh/meshGFaceOptimize.cpp
+++ b/Mesh/meshGFaceOptimize.cpp
@@ -444,39 +444,41 @@ bool gmshEdgeSplit(const double lMax,
   return true;
 }
 
-void computeNeighboringTrisOfACavity (const std::vector<MTri3*> &cavity,std::vector<MTri3*> &outside)
+void computeNeighboringTrisOfACavity(const std::vector<MTri3*> &cavity,
+				     std::vector<MTri3*> &outside)
 {
   outside.clear();
-  for (int i=0;i<cavity.size();i++){
-    for (int j=0;j<3;j++){
+  for (unsigned int i = 0; i < cavity.size(); i++){
+    for (int j = 0; j < 3; j++){
       MTri3 * neigh = cavity[i]->getNeigh(j);
-      if (neigh)
-	{
-	  bool found = false;
-	  for (int k=0;k<outside.size();k++){
-	    if(outside[k]==neigh){
-	      found=true;
-	      break;
-	    }
+      if(neigh){
+	bool found = false;
+	for(unsigned int k = 0; k < outside.size(); k++){
+	  if(outside[k] == neigh){
+	    found = true;
+	    break;
 	  }
-	  if (!found){
-	    for (int k=0;k<cavity.size() ;k++){
-	      if(cavity[k] ==neigh){
-		found=true;
-	      }
+	}
+	if(!found){
+	  for (unsigned int k = 0; k < cavity.size(); k++){
+	    if(cavity[k] == neigh){
+	      found = true;
 	    }
 	  }
-	  if(!found)outside.push_back(neigh);
 	}
+	if(!found)outside.push_back(neigh);
+      }
     }
   }
-}		
-bool gmshBuildVertexCavity ( MTri3 *t, 
-			     int iLocalVertex, 
-			     MVertex **v1,
-			     std::vector<MTri3*> &cavity,
-			     std::vector<MTri3*> &outside,
-			     std::vector<MVertex*> &ring ){
+}
+	
+bool gmshBuildVertexCavity(MTri3 *t, 
+			   int iLocalVertex, 
+			   MVertex **v1,
+			   std::vector<MTri3*> &cavity,
+			   std::vector<MTri3*> &outside,
+			   std::vector<MVertex*> &ring)
+{
   cavity.clear();
   ring.clear();
 
@@ -554,57 +556,55 @@ bool gmshVertexCollapse(const double lMin,
   
   double l_min = lMin;
   int iMin = -1;
-  for (int i=0;i<ring.size();i++){
-    double l = computeEdgeAdimLength(v, ring[i], gf,Us,Vs,vSizes,vSizesBGM);
+  for (unsigned int i = 0; i < ring.size(); i++){
+    double l = computeEdgeAdimLength(v, ring[i], gf, Us, Vs, vSizes, vSizesBGM);
     if (l < l_min){
       iMin = i;
     }
   }
-  if (iMin == -1) return false;
+  if(iMin == -1) return false;
 
   double surfBefore = 0.0;
-  for (int i=0;i<ring.size();i++){
+  for(unsigned int i = 0; i < ring.size(); i++){
     MVertex *v1 = ring[i];
-    MVertex *v2 = ring[(i + 1)%ring.size()];
-    surfBefore +=surfaceTriangleUV (v1,v2,v,Us,Vs);
+    MVertex *v2 = ring[(i + 1) % ring.size()];
+    surfBefore += surfaceTriangleUV(v1, v2, v, Us, Vs);
   }
 
   double surfAfter = 0.0;
-  for (int i=0;i<ring.size()-2;i++){
-    MVertex *v1 = ring[(iMin + 1 + i)%ring.size()];
-    MVertex *v2 = ring[(iMin + 1 + i + 1)%ring.size()];
-    double sAfter  = surfaceTriangleUV (v1,v2,ring[iMin],Us,Vs);
-    double sBefore = surfaceTriangleUV (v1,v2,v,Us,Vs);
-    if (sAfter < 0.1 * sBefore)return false;
+  for(unsigned int i = 0; i < ring.size() - 2; i++){
+    MVertex *v1 = ring[(iMin + 1 + i) % ring.size()];
+    MVertex *v2 = ring[(iMin + 1 + i + 1) % ring.size()];
+    double sAfter = surfaceTriangleUV(v1, v2, ring[iMin], Us, Vs);
+    double sBefore = surfaceTriangleUV(v1, v2, v, Us, Vs);
+    if(sAfter < 0.1 * sBefore) return false;
     surfAfter += sAfter;
   }
 
   //  printf("%12.5E %12.5E %d\n",surfBefore,surfAfter,iMin);
-  if (fabs(surfBefore - surfAfter) > 1.e-10*(surfBefore + surfAfter))return false;
+  if(fabs(surfBefore - surfAfter) > 1.e-10*(surfBefore + surfAfter)) return false;
 
-  for (int i=0;i<ring.size()-2;i++){
-    MVertex *v1 = ring[(iMin + 1 + i)%ring.size()];
-    MVertex *v2 = ring[(iMin + 1 + i + 1)%ring.size()];
+  for(unsigned int i = 0; i < ring.size() - 2; i++){
+    MVertex *v1 = ring[(iMin + 1 + i) % ring.size()];
+    MVertex *v2 = ring[(iMin + 1 + i + 1) % ring.size()];
     MTriangle *t = new MTriangle(v1,v2,ring[iMin]);
-    double lc    = 0.3333333333*(vSizes [t->getVertex(0)->getNum()]+
-				  vSizes [t->getVertex(1)->getNum()]+
-				  vSizes [t->getVertex(2)->getNum()]);
-    double lcBGM = 0.3333333333*(vSizesBGM [t->getVertex(0)->getNum()]+
-				vSizesBGM [t->getVertex(1)->getNum()]+
-				vSizesBGM [t->getVertex(2)->getNum()]);
-    MTri3 *t3 = new MTri3 ( t , Extend1dMeshIn2dSurfaces() ? std::min(lc,lcBGM) : lcBGM); 
-    //    printf("Creation %p = %d %d %d\n",t3,v1->getNum(),v2->getNum(),ring[iMin]->getNum());
+    double lc = 0.3333333333 * (vSizes[t->getVertex(0)->getNum()] +
+				vSizes[t->getVertex(1)->getNum()] +
+				vSizes[t->getVertex(2)->getNum()]);
+    double lcBGM = 0.3333333333 * (vSizesBGM[t->getVertex(0)->getNum()] +
+				   vSizesBGM[t->getVertex(1)->getNum()] +
+				   vSizesBGM[t->getVertex(2)->getNum()]);
+    MTri3 *t3 = new MTri3(t, Extend1dMeshIn2dSurfaces() ? std::min(lc, lcBGM) : lcBGM); 
+    // printf("Creation %p = %d %d %d\n",t3,v1->getNum(),v2->getNum(),ring[iMin]->getNum());
     outside.push_back(t3);
     newTris.push_back(t3);
   }
-  for (int i=0;i<cavity.size();i++)
+  for(unsigned int i = 0; i < cavity.size(); i++)
     cavity[i]->setDeleted(true);
-  connectTriangles ( outside ); 
+  connectTriangles(outside);
   return true;
 }
 
-
-
 int edgeSwapPass (GFace *gf, std::set<MTri3*,compareTri3Ptr> &allTris,
 		  const gmshSwapCriterion &cr,		   
 		  const std::vector<double> & Us ,
@@ -670,9 +670,9 @@ int edgeSplitPass (double maxLC,
        if (it == allTris.end())break;
      }
   }  
-  printf("B %d %d tris ",allTris.size(),newTris.size());
+  printf("B %d %d tris ", (int)allTris.size(), (int)newTris.size());
   allTris.insert(newTris.begin(),newTris.end());
-  printf("A %d %d tris\n",allTris.size(),newTris.size());
+  printf("A %d %d tris\n", (int)allTris.size(), (int)newTris.size());
   return nbSplit;
 }
 
@@ -703,9 +703,9 @@ int edgeCollapsePass (double minLC,
 //      }
 //     if (nbCollapse == 114)break;
   }  
-  printf("B %d %d tris ",allTris.size(),newTris.size());
+  printf("B %d %d tris ", (int)allTris.size(), (int)newTris.size());
   allTris.insert(newTris.begin(),newTris.end());
-  printf("A %d %d tris\n",allTris.size(),newTris.size());
+  printf("A %d %d tris\n", (int)allTris.size(), (int)newTris.size());
   return nbCollapse;
 }
 
diff --git a/Mesh/meshGRegion.cpp b/Mesh/meshGRegion.cpp
index 8b261358bb788f13e0c0fab32c67b0e7adcbf45b..78aa410828ceaae87d90ad525472bacc4764dce1 100644
--- a/Mesh/meshGRegion.cpp
+++ b/Mesh/meshGRegion.cpp
@@ -1,4 +1,4 @@
-// $Id: meshGRegion.cpp,v 1.39 2008-01-19 23:04:13 geuzaine Exp $
+// $Id: meshGRegion.cpp,v 1.40 2008-01-20 10:10:42 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -619,14 +619,14 @@ bool buildFaceSearchStructure ( GModel *model , fs_cont&search )
 
   GModel::fiter fit = model->firstFace() ;
   while (fit != model->lastFace()){    
-    for (int i=0;i<(*fit)->triangles.size();i++)
-      {
-	MVertex *p1=(*fit)->triangles[i]->getVertex(0);
-	MVertex *p2=(*fit)->triangles[i]->getVertex(1);
-	MVertex *p3=(*fit)->triangles[i]->getVertex(2);
-	MVertex *p = std::min(p1,std::min(p2,p3));
-	search.insert ( std::pair<MVertex*,std::pair<MTriangle*,GFace*> > ( p, std::pair<MTriangle*,GFace*>((*fit)->triangles[i],*fit)));
-      }
+    for (unsigned int i = 0; i < (*fit)->triangles.size(); i++){
+      MVertex *p1 = (*fit)->triangles[i]->getVertex(0);
+      MVertex *p2 = (*fit)->triangles[i]->getVertex(1);
+      MVertex *p3 = (*fit)->triangles[i]->getVertex(2);
+      MVertex *p = std::min(p1, std::min(p2, p3));
+      search.insert(std::pair<MVertex*, std::pair<MTriangle*, GFace*> >
+		    (p, std::pair<MTriangle*, GFace*>((*fit)->triangles[i], *fit)));
+    }
     ++fit;
   }
   return true;
@@ -638,13 +638,13 @@ bool buildEdgeSearchStructure ( GModel *model , es_cont&search )
 
   GModel::eiter eit = model->firstEdge() ;
   while (eit != model->lastEdge()){    
-    for (int i=0;i<(*eit)->lines.size();i++)
-      {
-	MVertex *p1=(*eit)->lines[i]->getVertex(0);
-	MVertex *p2=(*eit)->lines[i]->getVertex(1);
-	MVertex *p = std::min(p1,p2);
-	search.insert ( std::pair<MVertex*,std::pair<MLine*,GEdge*> > ( p, std::pair<MLine*,GEdge*>((*eit)->lines[i],*eit)));
-      }
+    for(unsigned int i = 0; i < (*eit)->lines.size(); i++){
+      MVertex *p1 = (*eit)->lines[i]->getVertex(0);
+      MVertex *p2 = (*eit)->lines[i]->getVertex(1);
+      MVertex *p = std::min(p1, p2);
+      search.insert(std::pair<MVertex*, std::pair<MLine*, GEdge*> > 
+		    (p, std::pair<MLine*, GEdge*>((*eit)->lines[i], *eit)));
+    }
     ++eit;
   }
   return true;
diff --git a/Mesh/meshGRegionDelaunayInsertion.cpp b/Mesh/meshGRegionDelaunayInsertion.cpp
index 9813258804c8bc541275e8811ef3eb587a7fd325..4cf7f895658079c4b0c724306d5a545574e47bf6 100644
--- a/Mesh/meshGRegionDelaunayInsertion.cpp
+++ b/Mesh/meshGRegionDelaunayInsertion.cpp
@@ -1,4 +1,4 @@
-// $Id: meshGRegionDelaunayInsertion.cpp,v 1.32 2008-01-18 22:45:24 geuzaine Exp $
+// $Id: meshGRegionDelaunayInsertion.cpp,v 1.33 2008-01-20 10:10:42 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -403,8 +403,8 @@ void adaptMeshGRegion::operator () (GRegion *gr)
 
   typedef std::list<MTet4 *> CONTAINER ;
   CONTAINER allTets;
-  for (int i=0;i<gr->tetrahedra.size();i++){
-    allTets.push_back(new MTet4(gr->tetrahedra[i],qm));
+  for(unsigned int i=0;i<gr->tetrahedra.size();i++){
+    allTets.push_back(new MTet4(gr->tetrahedra[i], qm));
   }
   gr->tetrahedra.clear();
   
@@ -466,7 +466,6 @@ void adaptMeshGRegion::operator () (GRegion *gr)
 
     for (CONTAINER::iterator it = allTets.begin();it!=allTets.end();++it){
       if (!(*it)->isDeleted()){
-	double vol;
 	double qq = (*it)->getQuality();
 	if (qq < qMin){
 	  for (int i=0;i<4;i++){
@@ -501,8 +500,8 @@ void adaptMeshGRegion::operator () (GRegion *gr)
     if (!newTets.size())break;
     
     // add all the new tets in the container
-    for (int i=0;i<newTets.size();i++){
-      if (!newTets[i]->isDeleted()){
+    for(unsigned int i = 0; i < newTets.size(); i++){
+      if(!newTets[i]->isDeleted()){
 	allTets.push_back(newTets[i]);
       }
       else{
@@ -544,8 +543,8 @@ void adaptMeshGRegion::operator () (GRegion *gr)
   }
   
   int nbSlivers = 0;
-  for (int i=0;i<illegals.size();i++)
-    if (!(illegals[i]->isDeleted()))nbSlivers ++;
+  for(unsigned int i = 0; i < illegals.size(); i++)
+    if(!(illegals[i]->isDeleted())) nbSlivers ++;
   
   if (nbSlivers){
     Msg(INFO,"Opti : %d illegal tets are still in the mesh, trying to remove them",nbSlivers);
@@ -578,7 +577,7 @@ void gmshOptimizeMesh (GRegion *gr, const gmshQualityMeasure4Tet &qm)
 {
   typedef std::list<MTet4 *> CONTAINER ;
   CONTAINER allTets;
-  for (int i=0;i<gr->tetrahedra.size();i++){
+  for(unsigned int i=0;i<gr->tetrahedra.size();i++){
     MTet4 * t = new MTet4(gr->tetrahedra[i],qm);
     t->setOnWhat(gr);
     allTets.push_back(t);
@@ -630,7 +629,6 @@ void gmshOptimizeMesh (GRegion *gr, const gmshQualityMeasure4Tet &qm)
     std::vector<MTet4*> newTets;    
     for (CONTAINER::iterator it = allTets.begin();it!=allTets.end();++it){
       if (!(*it)->isDeleted()){
-	double vol;
 	double qq = (*it)->getQuality();
 	if (qq < qMin){
 	  for (int i=0;i<4;i++){
@@ -661,26 +659,26 @@ void gmshOptimizeMesh (GRegion *gr, const gmshQualityMeasure4Tet &qm)
 	  }
 	}
       }
-
-      if (0 && !newTets.size()){
-        int nbSlivers = 0;
-        int nbSliversWeCanDoSomething = 0;
-        for (int i=0;i<illegals.size();i++)
-	  if (!(illegals[i]->isDeleted())){
-	    if (gmshSliverRemoval(newTets,illegals[i],qm))
-	      nbSliversWeCanDoSomething++;
-	    nbSlivers ++;
-	  }
-	Msg(INFO,"Opti : %d Sliver Removals",nbSliversWeCanDoSomething);
-      }
-
+    
+    if (0 && !newTets.size()){
+      int nbSlivers = 0;
+      int nbSliversWeCanDoSomething = 0;
+      for(unsigned int i = 0; i < illegals.size(); i++)
+	if(!(illegals[i]->isDeleted())){
+	  if(gmshSliverRemoval(newTets, illegals[i], qm))
+	    nbSliversWeCanDoSomething++;
+	  nbSlivers ++;
+	}
+      Msg(INFO,"Opti : %d Sliver Removals",nbSliversWeCanDoSomething);
+    }
+    
     if (!newTets.size()){
       break;
     }
     
     // add all the new tets in the container
-    for (int i=0;i<newTets.size();i++){
-      if (!newTets[i]->isDeleted()){
+    for(unsigned int i = 0; i < newTets.size(); i++){
+      if(!newTets[i]->isDeleted()){
 	allTets.push_back(newTets[i]);
       }
       else{
diff --git a/Mesh/meshGRegionDelaunayInsertion.h b/Mesh/meshGRegionDelaunayInsertion.h
index 40d9e05b487532ed2e64e36771ea4ea855ef0dfb..4eb5cb9fc59de611bc1465e18b621d6d4cdc7460 100644
--- a/Mesh/meshGRegionDelaunayInsertion.h
+++ b/Mesh/meshGRegionDelaunayInsertion.h
@@ -61,23 +61,23 @@ class MTet4
 
  public :
 
-  ~MTet4 (){}
-  MTet4 () : deleted(false), base (0), gr(0),circum_radius(0.0)
-    {
-      neigh[0] = neigh[1] = neigh[2] = neigh[3] = 0;
-    }
-  MTet4 (MTetrahedron * t, double qual) : deleted(false),  gr(0),circum_radius(qual),base(t)
+  ~MTet4(){}
+  MTet4() : deleted(false), circum_radius(0.0), base(0), gr(0)
+  {
+    neigh[0] = neigh[1] = neigh[2] = neigh[3] = 0;
+  }
+  MTet4(MTetrahedron *t, double qual) : deleted(false), circum_radius(qual), base(t), gr(0)
   {
     neigh[0] = neigh[1] = neigh[2] = neigh[3] = 0;
   }
-  MTet4 (MTetrahedron * t, const gmshQualityMeasure4Tet &qm) : deleted(false), gr(0),base(t)
+  MTet4(MTetrahedron *t, const gmshQualityMeasure4Tet &qm) : deleted(false), base(t), gr(0)
   {
     neigh[0] = neigh[1] = neigh[2] = neigh[3] = 0;
     double vol;
-    circum_radius = qmTet(t,qm,&vol);
+    circum_radius = qmTet(t, qm, &vol);
   }
 
-  void setup ( MTetrahedron * t, std::vector<double> & sizes)
+  void setup(MTetrahedron *t, std::vector<double> &sizes)
   {
     base = t;
     neigh[0] = neigh[1] = neigh[2] = neigh[3] = 0;
diff --git a/Mesh/meshGRegionLocalMeshMod.cpp b/Mesh/meshGRegionLocalMeshMod.cpp
index a23d09f38ebd319de468103f55b7ba3f05af1332..c2f7313ad5589227faa49bb1e2b7cfbf84530572 100644
--- a/Mesh/meshGRegionLocalMeshMod.cpp
+++ b/Mesh/meshGRegionLocalMeshMod.cpp
@@ -6,8 +6,8 @@
 
 static int edges[6][2] =    {{0,1},{0,2},{0,3},{1,2},{1,3},{2,3}};
 static int efaces[6][2] =   {{0,2},{0,1},{1,2},{0,3},{2,3},{1,3}};
-static int enofaces[6][2] = {{1,3},{2,3},{0,3},{1,2},{0,1},{0,2}};
-static int facesXedges[4][3] = {{0,1,3},{1,2,5},{0,2,4},{3,4,5}};
+//static int enofaces[6][2] = {{1,3},{2,3},{0,3},{1,2},{0,1},{0,2}};
+//static int facesXedges[4][3] = {{0,1,3},{1,2,5},{0,2,4},{3,4,5}};
 static int faces[4][3] = {{0,1,2},{0,2,3},{0,1,3},{1,2,3}};
 static int vnofaces[4] = {3,1,2,0};
 static int vFac[4][3] = {{0,1,2},{0,2,3},{0,1,3},{1,2,3}};
@@ -17,39 +17,40 @@ static int vFac[4][3] = {{0,1,2},{0,2,3},{0,1,3},{1,2,3}};
 // forming the outer ring of the cavity 
 // we return true if the cavity is closed and false if it is open
 
-void computeNeighboringTetsOfACavity (const std::vector<MTet4*> &cavity,std::vector<MTet4*> &outside)
+void computeNeighboringTetsOfACavity(const std::vector<MTet4*> &cavity,
+				     std::vector<MTet4*> &outside)
 {
   outside.clear();
-  for (int i=0;i<cavity.size();i++){
-    for (int j=0;j<4;j++){
+  for (unsigned int i = 0; i < cavity.size(); i++){
+    for (int j = 0; j < 4; j++){
       MTet4 * neigh = cavity[i]->getNeigh(j);
-      if (neigh)
-	{
-	  bool found = false;
-	  for (int k=0;k<outside.size();k++){
-	    if(outside[k]==neigh){
-	      found=true;
-	      break;
-	    }
+      if(neigh){
+	bool found = false;
+	for (unsigned int k = 0; k < outside.size(); k++){
+	  if(outside[k] == neigh){
+	    found = true;
+	    break;
 	  }
-	  if (!found){
-	    for (int k=0;k<cavity.size() ;k++){
-	      if(cavity[k] ==neigh){
-		found=true;
-	      }
+	}
+	if(!found){
+	  for (unsigned int k = 0; k < cavity.size(); k++){
+	    if(cavity[k] == neigh){
+	      found = true;
 	    }
 	  }
-	  if(!found)outside.push_back(neigh);
 	}
+	if(!found)outside.push_back(neigh);
+      }
     }
   }
-}			   
-bool gmshBuildEdgeCavity ( MTet4 *t, 
-			   int iLocalEdge, 
-			   MVertex **v1,MVertex **v2,
-			   std::vector<MTet4*> &cavity,
-			   std::vector<MTet4*> &outside,
-			   std::vector<MVertex*> &ring ){
+}
+		   
+bool gmshBuildEdgeCavity(MTet4 *t, 
+			 int iLocalEdge, 
+			 MVertex **v1,MVertex **v2,
+			 std::vector<MTet4*> &cavity,
+			 std::vector<MTet4*> &outside,
+			 std::vector<MVertex*> &ring){
   cavity.clear();
   ring.clear();
 
@@ -116,8 +117,8 @@ typedef struct {
 
 void BuildSwapPattern3(SwapPattern *sc)
 {
-  static int trgl[][3] = { 0,1,2 } ;
-  static int trgul[][5] = { 0,-1,-1,-1,-1 } ;
+  static int trgl[][3] = { {0,1,2} };
+  static int trgul[][5] = { {0,-1,-1,-1,-1} };
 
   sc->nbr_triangles = 1 ;
   sc->nbr_triangles_2 = 1 ;
@@ -129,9 +130,9 @@ void BuildSwapPattern3(SwapPattern *sc)
 void BuildSwapPattern4(SwapPattern *sc)
 {
   static int trgl[][3] =
-    { 0,1,2, 0,2,3, 0,1,3, 1,2,3 } ;
+    { {0,1,2}, {0,2,3}, {0,1,3}, {1,2,3} };
   static int trgul[][5] = 
-    { 0,1,-1,-1,-1, 2,3,-1,-1,-1 } ;
+    { {0,1,-1,-1,-1}, {2,3,-1,-1,-1} };
 
   sc->nbr_triangles = 4 ;
   sc->nbr_triangles_2 = 2 ; 
@@ -144,9 +145,10 @@ void BuildSwapPattern4(SwapPattern *sc)
 void BuildSwapPattern5(SwapPattern *sc)
 {
   static int trgl[][3] = 
-    { 0,1,2, 0,2,3, 0,3,4, 0,1,4, 1,3,4, 1,2,3, 2,3,4, 0,2,4, 0,1,3, 1,2,4 } ;
+    { {0,1,2}, {0,2,3}, {0,3,4}, {0,1,4}, {1,3,4}, 
+      {1,2,3}, {2,3,4}, {0,2,4}, {0,1,3}, {1,2,4} };
   static int trgul[][5] =
-    { 0,1,2,-1,-1, 3,4,5,-1,-1, 0,6,7,-1,-1, 2,5,8,-1,-1, 3,6,9,-1,-1 } ;
+    { {0,1,2,-1,-1}, {3,4,5,-1,-1}, {0,6,7,-1,-1}, {2,5,8,-1,-1}, {3,6,9,-1,-1} };
 
   sc->nbr_triangles = 10 ;
   sc->nbr_triangles_2 = 3 ;
@@ -158,14 +160,14 @@ void BuildSwapPattern5(SwapPattern *sc)
 void BuildSwapPattern6(SwapPattern *sc)
 {
   static int trgl[][3] = 
-    { 0,1,2, 0,2,3, 0,3,4, 0,4,5, 0,2,5, 2,4,5, 2,3,4, 0,3,5,
-      3,4,5, 0,2,4, 2,3,5, 1,2,3, 0,1,3, 0,1,5, 1,4,5, 1,3,4,
-      0,1,4, 1,3,5, 1,2,4, 1,2,5 } ;
+    { {0,1,2}, {0,2,3}, {0,3,4}, {0,4,5}, {0,2,5}, {2,4,5}, {2,3,4}, {0,3,5},
+      {3,4,5}, {0,2,4}, {2,3,5}, {1,2,3}, {0,1,3}, {0,1,5}, {1,4,5}, {1,3,4},
+      {0,1,4}, {1,3,5}, {1,2,4}, {1,2,5} };
   static int trgul[][5] = 
-    { 0,1,2,3,-1, 0,4,5,6,-1, 0,1,7,8,-1, 0,3,6,9,-1, 0,4,8,10,-1,
-      2,3,11,12,-1, 11,13,14,15,-1, 7,8,11,12,-1, 3,11,15,16,-1,
-      8,11,13,17,-1, 6,13,14,18,-1, 3,6,16,18,-1, 5,6,13,19,-1, 
-      8,10,13,19,-1 } ;
+    { {0,1,2,3,-1}, {0,4,5,6,-1}, {0,1,7,8,-1}, {0,3,6,9,-1}, {0,4,8,10,-1},
+      {2,3,11,12,-1}, {11,13,14,15,-1}, {7,8,11,12,-1}, {3,11,15,16,-1},
+      {8,11,13,17,-1}, {6,13,14,18,-1}, {3,6,16,18,-1}, {5,6,13,19,-1}, 
+      {8,10,13,19,-1} };
 
   sc->nbr_triangles = 20 ; 
   sc->nbr_triangles_2 = 4 ; 
@@ -177,20 +179,20 @@ void BuildSwapPattern6(SwapPattern *sc)
 void BuildSwapPattern7(SwapPattern *sc)
 {
   static int trgl[][3] = 
-    { 0,1,2, 0,2,3, 0,3,4, 0,4,5, 0,5,6, 0,3,6, 3,5,6, 3,4,5, 0,4,6,
-      4,5,6, 0,3,5, 3,4,6, 0,2,4, 2,3,4, 0,2,6, 2,5,6, 2,4,5, 0,2,5,
-      2,4,6, 2,3,5, 2,3,6, 0,1,3, 1,2,3, 0,1,4, 1,3,4, 0,1,6, 1,5,6,
-      1,4,5, 0,1,5, 1,4,6, 1,3,5, 1,3,6, 1,2,4, 1,2,5, 1,2,6 };
+    { {0,1,2}, {0,2,3}, {0,3,4}, {0,4,5}, {0,5,6}, {0,3,6}, {3,5,6}, {3,4,5}, {0,4,6},
+      {4,5,6}, {0,3,5}, {3,4,6}, {0,2,4}, {2,3,4}, {0,2,6}, {2,5,6}, {2,4,5}, {0,2,5},
+      {2,4,6}, {2,3,5}, {2,3,6}, {0,1,3}, {1,2,3}, {0,1,4}, {1,3,4}, {0,1,6}, {1,5,6},
+      {1,4,5}, {0,1,5}, {1,4,6}, {1,3,5}, {1,3,6}, {1,2,4}, {1,2,5}, {1,2,6} };
   static int trgul[][5] = 
-    { 0,1,2,3,4, 0,1,5,6,7, 0,1,2,8,9, 0,1,4,7,10, 0,1,5,9,11, 0,3,4,12,13,
-      0,13,14,15,16, 0,8,9,12,13, 0,4,13,16,17, 0,9,13,14,18, 0,7,14,15,19,
-      0,4,7,17,19, 0,6,7,14,20, 0,9,11,14,20, 2,3,4,21,22, 5,6,7,21,22,
-      2,8,9,21,22, 4,7,10,21,22, 5,9,11,21,22, 3,4,22,23,24, 22,24,25,26,27,
-      8,9,22,23,24, 4,22,24,27,28, 9,22,24,25,29, 7,22,25,26,30, 4,7,22,28,30,
-      6,7,22,25,31, 9,11,22,25,31, 3,4,13,23,32, 13,25,26,27,32, 8,9,13,23,32,
-      4,13,27,28,32, 9,13,25,29,32, 13,16,25,26,33, 4,13,16,28,33, 
-      13,15,16,25,34, 9,13,18,25,34, 7,19,25,26,33, 4,7,19,28,33,
-      7,15,19,25,34, 6,7,20,25,34, 9,11,20,25,34 } ;
+    { {0,1,2,3,4}, {0,1,5,6,7}, {0,1,2,8,9}, {0,1,4,7,10}, {0,1,5,9,11}, {0,3,4,12,13},
+      {0,13,14,15,16}, {0,8,9,12,13}, {0,4,13,16,17}, {0,9,13,14,18}, {0,7,14,15,19},
+      {0,4,7,17,19}, {0,6,7,14,20}, {0,9,11,14,20}, {2,3,4,21,22}, {5,6,7,21,22},
+      {2,8,9,21,22}, {4,7,10,21,22}, {5,9,11,21,22}, {3,4,22,23,24}, {22,24,25,26,27},
+      {8,9,22,23,24}, {4,22,24,27,28}, {9,22,24,25,29}, {7,22,25,26,30}, {4,7,22,28,30},
+      {6,7,22,25,31}, {9,11,22,25,31}, {3,4,13,23,32}, {13,25,26,27,32}, {8,9,13,23,32},
+      {4,13,27,28,32}, {9,13,25,29,32}, {13,16,25,26,33}, {4,13,16,28,33},
+      {13,15,16,25,34}, {9,13,18,25,34}, {7,19,25,26,33}, {4,7,19,28,33},
+      {7,15,19,25,34}, {6,7,20,25,34}, {9,11,20,25,34} };
 
   sc->nbr_triangles = 35 ;
   sc->nbr_triangles_2 = 5 ;
@@ -199,7 +201,6 @@ void BuildSwapPattern7(SwapPattern *sc)
   sc->trianguls = trgul ;
 }
 
-
 bool gmshEdgeSwap (std::vector<MTet4 *> &newTets,
 		   MTet4 *tet, 
 		   int iLocalEdge,
@@ -216,7 +217,7 @@ bool gmshEdgeSwap (std::vector<MTet4 *> &newTets,
   
   double volumeRef = 0.0;
   double tetQualityRef = 1;
-  for (int i=0;i<cavity.size();i++){
+  for(unsigned int i = 0; i < cavity.size(); i++){
     double vol = fabs(cavity[i]->tet()->getVolume());
     tetQualityRef = std::min(tetQualityRef,cavity[i]->getQuality());
     volumeRef += vol;
@@ -263,7 +264,7 @@ bool gmshEdgeSwap (std::vector<MTet4 *> &newTets,
     if (fabs(volume-volumeRef) > 1.e-10 * (volume+volumeRef))minQuality[i] = -1;
   }
 
-  int iBest;
+  int iBest = 0;
   double best = -1.0;
   for (int i=0;i<sp.nbr_trianguls;i++){
     if(minQuality[i] > best){
@@ -306,7 +307,7 @@ bool gmshEdgeSwap (std::vector<MTet4 *> &newTets,
     newTets.push_back(t42);
   }
 
-  for (int i=0;i<cavity.size();i++)cavity[i]->setDeleted(true);
+  for(unsigned int i = 0; i < cavity.size(); i++) cavity[i]->setDeleted(true);
   
   connectTets ( outside );      
 
@@ -326,7 +327,7 @@ bool gmshEdgeSplit (std::vector<MTet4 *> &newTets,
   bool closed = gmshBuildEdgeCavity ( tet,iLocalEdge,&v1,&v2,cavity,outside,ring);
   if (!closed)return false;
   
-  for (int j=0;j<ring.size();j++){
+  for(unsigned int j = 0; j < ring.size(); j++){
     MVertex *pv1 = ring[j];
     MVertex *pv2 = ring[(j+1)%ring.size()];
     MTetrahedron *tr1 = new MTetrahedron ( pv1,
@@ -347,9 +348,9 @@ bool gmshEdgeSplit (std::vector<MTet4 *> &newTets,
     newTets.push_back(t42);
   }
 
-  for (int i=0;i<cavity.size();i++)cavity[i]->setDeleted(true);
+  for(unsigned int i = 0; i < cavity.size(); i++) cavity[i]->setDeleted(true);
   
-  connectTets ( outside );      
+  connectTets(outside);
 
   return true;
 }
@@ -399,26 +400,26 @@ bool gmshFaceSwap (std::vector<MTet4 *> &newTets,
   //  printf("qs = %g %g vs %g %g %g\n",q1,q2,q3,q4,q5);
 
   std::vector<MTet4*> outside;
-  for (int i=0;i<4;i++){
-    if (t1->getNeigh(i) && t1->getNeigh(i) != t2){
+  for(int i = 0; i < 4; i++){
+    if(t1->getNeigh(i) && t1->getNeigh(i) != t2){
       bool found = false;
-      for (int j=0;j<outside.size();j++){
-	if (outside[j] == t1->getNeigh(i)) {found = true;break;}
+      for(unsigned int j = 0; j < outside.size(); j++){
+	if(outside[j] == t1->getNeigh(i)) { found = true; break; }
       }
-      if (!found)outside.push_back(t1->getNeigh(i));
+      if(!found) outside.push_back(t1->getNeigh(i));
     }    
   }
-  for (int i=0;i<4;i++){
-    if (t2->getNeigh(i) && t2->getNeigh(i) != t1){
+  for(int i = 0; i < 4; i++){
+    if(t2->getNeigh(i) && t2->getNeigh(i) != t1){
       bool found = false;
-      for (int j=0;j<outside.size();j++){
-	if (outside[j] == t2->getNeigh(i)) {found = true;break;}
+      for(unsigned int j = 0; j < outside.size(); j++){
+	if(outside[j] == t2->getNeigh(i)) { found = true; break; }
       }
-      if (!found)outside.push_back(t2->getNeigh(i));
+      if(!found) outside.push_back(t2->getNeigh(i));
     }    
   }
 
-  //  printf("we have a face swap %d\n",outside.size());
+  // printf("we have a face swap %d\n",outside.size());
 
   t1->setDeleted(true);
   t2->setDeleted(true);
@@ -464,15 +465,15 @@ void gmshBuildVertexCavity_recur ( MTet4 *t,
     MTet4 *neigh = t->getNeigh(vFac[iV][i]);
     if (neigh){
       bool found = false;
-      for (int j=0;j<cavity.size();j++){
-	if (cavity[j] == neigh){
+      for(unsigned int j = 0; j < cavity.size(); j++){
+	if(cavity[j] == neigh){
 	  found = true; 
-	  j=cavity.size();
+	  j = cavity.size();
 	}
       }
-      if (!found){
+      if(!found){
 	cavity.push_back(neigh);
-	gmshBuildVertexCavity_recur ( neigh,v,cavity);
+	gmshBuildVertexCavity_recur(neigh, v, cavity);
       }
     }
   }
@@ -496,7 +497,7 @@ bool gmshSliverRemoval ( std::vector<MTet4   *> &newTets,
   
   bool isClosed[6];  
   int nbSwappable = 0;
-  int iSwappable;
+  int iSwappable = 0;
   for (int i=0;i<6;i++){
      isClosed[i] = gmshBuildEdgeCavity ( t,i,&v1,&v2,cavity,outside,ring);    
      if (isClosed[i]){
@@ -531,10 +532,10 @@ bool gmshSliverRemoval ( std::vector<MTet4   *> &newTets,
  	}
      }
     
-    for (int i=0; i<newTets.size();i++){
+    for (unsigned int i = 0; i < newTets.size(); i++){
       MTet4 *new_t = newTets[i];
       if (!(new_t->isDeleted())){
-	for (int j=0;j<6;j++){
+	for (int j = 0; j < 6; j++){
 	  MVertex *va = new_t->tet()->getVertex(edges[j][0]);
 	  MVertex *vb = new_t->tet()->getVertex(edges[j][1]);
 	  if (va == newv &&
@@ -585,12 +586,12 @@ bool gmshCollapseVertex ( std::vector<MTet4 *> &newTets,
   std::vector<MTet4*> toUpdate;
   double volume = 0;
   double worst = 1.0;
-  for (int i=0;i<cavity_v.size();i++){
+  for(unsigned int i = 0; i < cavity_v.size(); i++){
     bool found = false;
-    volume+=fabs(cavity_v[i]->tet()->getVolume());
+    volume += fabs(cavity_v[i]->tet()->getVolume());
     double q = cavity_v[i]->getQuality();
     worst = std::min(worst,q);
-    for (int j=0;j<4;j++){
+    for (int j = 0; j < 4; j++){
       if (cavity_v[i]->tet()->getVertex(j) == tg)found=true;
     }
     if (found) toDelete.push_back(cavity_v[i]);
@@ -609,7 +610,7 @@ bool gmshCollapseVertex ( std::vector<MTet4 *> &newTets,
   double worstAfter = 1.0;
   double newQuals[2000];
   if (toUpdate.size() >= 2000) throw;
-  for (int i=0;i<toUpdate.size();i++){
+  for (unsigned int i = 0; i < toUpdate.size(); i++){
     double vv;
     newQuals[i] = qmTet(toUpdate[i]->tet(),cr,&vv);
     worstAfter = std::min(worstAfter,newQuals[i]);
@@ -631,20 +632,21 @@ bool gmshCollapseVertex ( std::vector<MTet4 *> &newTets,
   }
   // ok we collapse
   computeNeighboringTetsOfACavity (cavity_v,outside);
-  for (int i=0;i<toUpdate.size();i++){
-    MTetrahedron *tr1 = new MTetrahedron ( toUpdate[i]->tet()->getVertex(0) == v ? tg : toUpdate[i]->tet()->getVertex(0),
-					   toUpdate[i]->tet()->getVertex(1) == v ? tg : toUpdate[i]->tet()->getVertex(1),
-					   toUpdate[i]->tet()->getVertex(2) == v ? tg : toUpdate[i]->tet()->getVertex(2),
-					   toUpdate[i]->tet()->getVertex(3) == v ? tg : toUpdate[i]->tet()->getVertex(3));
-    MTet4 *t41 = new MTet4 ( tr1 , cr) ; 
+  for (unsigned int i = 0; i < toUpdate.size(); i++){
+    MTetrahedron *tr1 = new MTetrahedron 
+      (toUpdate[i]->tet()->getVertex(0) == v ? tg : toUpdate[i]->tet()->getVertex(0),
+       toUpdate[i]->tet()->getVertex(1) == v ? tg : toUpdate[i]->tet()->getVertex(1),
+       toUpdate[i]->tet()->getVertex(2) == v ? tg : toUpdate[i]->tet()->getVertex(2),
+       toUpdate[i]->tet()->getVertex(3) == v ? tg : toUpdate[i]->tet()->getVertex(3));
+    MTet4 *t41 = new MTet4(tr1, cr); 
     t41->setOnWhat(cavity_v[0]->onWhat());
     t41->setQuality(newQuals[i]);
     outside.push_back(t41);
     newTets.push_back(t41);
   }
-  for (int i=0;i<cavity_v.size();i++)cavity_v[i]->setDeleted(true);
+  for(unsigned int i = 0; i < cavity_v.size(); i++) cavity_v[i]->setDeleted(true);
   
-  connectTets ( outside );      
+  connectTets(outside);
   
   return true;
 }
@@ -664,7 +666,7 @@ bool gmshSmoothVertex( MTet4 *t,
   double vTot=0;
   double worst = 1.0;
 
-  for (int i=0 ; i< cavity.size() ; i++){
+  for(unsigned int i = 0 ; i < cavity.size(); i++){
     double volume = fabs(cavity[i]->tet()->getVolume());
     double q = cavity[i]->getQuality();
     worst = std::min(worst,q);
@@ -698,7 +700,7 @@ bool gmshSmoothVertex( MTet4 *t,
   double worstAfter = 1.0;
   double newQuals[2000];
   if (cavity.size() >= 2000) throw;
-  for (int i=0 ; i< cavity.size() ; i++){
+  for (unsigned int i = 0; i < cavity.size(); i++){
     double volume;
     newQuals[i] = qmTet(cavity[i]->tet(),cr,&volume);
     volumeAfter += volume;
@@ -713,7 +715,7 @@ bool gmshSmoothVertex( MTet4 *t,
   }
   else{
     // restore new quality
-    for (int i=0 ; i< cavity.size() ; i++){
+    for(unsigned int i = 0; i < cavity.size(); i++){
       cavity[i]->setQuality(newQuals[i]);
     }    
     return true;
@@ -791,7 +793,7 @@ bool gmshSmoothVertexOptimize ( MTet4 *t,
 
   double vTot=0;
 
-  for (int i=0 ; i< vd.ts.size() ; i++){
+  for(unsigned int i = 0; i < vd.ts.size(); i++){
     double volume = fabs(vd.ts[i]->tet()->getVolume());
     vTot += volume;    
   }
@@ -807,14 +809,14 @@ bool gmshSmoothVertexOptimize ( MTet4 *t,
   t->tet()->getVertex(iVertex)->z() = zopti;
 
   double newQuals[2000];
-  if (vd.ts.size() >= 2000) throw;
-  for (int i=0 ; i< vd.ts.size() ; i++){
+  if(vd.ts.size() >= 2000) throw;
+  for(unsigned int i = 0; i < vd.ts.size(); i++){
     double volume;
-    newQuals[i] = qmTet(vd.ts[i]->tet(),cr,&volume);
+    newQuals[i] = qmTet(vd.ts[i]->tet(), cr, &volume);
     volumeAfter += volume;
   }
 
-  if (fabs(volumeAfter-vTot) > 1.e-10 * vTot){
+  if(fabs(volumeAfter-vTot) > 1.e-10 * vTot){
     t->tet()->getVertex(iVertex)->x() = x;
     t->tet()->getVertex(iVertex)->y() = y;
     t->tet()->getVertex(iVertex)->z() = z;
@@ -822,7 +824,7 @@ bool gmshSmoothVertexOptimize ( MTet4 *t,
   }
   else{
     // restore new quality
-    for (int i=0 ; i< vd.ts.size() ; i++){
+    for(unsigned int i = 0; i < vd.ts.size(); i++){
       vd.ts[i]->setQuality(newQuals[i]);
     }    
     return true;
diff --git a/Parser/Gmsh.l b/Parser/Gmsh.l
index 5662ebfefa45a22ad48ff5a3fe872c5c37d248df..780f88ec7d710b67159a62cef2d1f1f0faeb4de1 100644
--- a/Parser/Gmsh.l
+++ b/Parser/Gmsh.l
@@ -1,5 +1,5 @@
 %{
-// $Id: Gmsh.l,v 1.95 2008-01-19 22:06:04 geuzaine Exp $
+// $Id: Gmsh.l,v 1.96 2008-01-20 10:10:42 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -30,9 +30,9 @@
 #include "Geo.h"
 #include "Gmsh.tab.hpp"
 
-char yyname[256] = "";
-int  yyerrorstate = 0;
-int  yyviewindex = 0;
+char gmsh_yyname[256] = "";
+int  gmsh_yyerrorstate = 0;
+int  gmsh_yyviewindex = 0;
 
 void   parsestring(char endchar);
 char  *strsave(char *ptr);
@@ -73,16 +73,16 @@ string	{alpha}({alpha}|{digit})*
 ";"                     return tEND;
 "/*"			skipcomments();
 "//"			skipline();
-"\""			{parsestring('\"'); return tBIGSTR;}
-"\'"			{parsestring('\''); return tBIGSTR;}
-"newreg"		{yylval.d = NEWREG(); return tDOUBLE;}
-"newp"  		{yylval.d = NEWPOINT(); return tDOUBLE;}
-"newl"  		{yylval.d = NEWLINE(); return tDOUBLE;}
-"newc"  		{yylval.d = NEWLINE(); return tDOUBLE;}
-"newll"  		{yylval.d = NEWLINELOOP(); return tDOUBLE;}
-"news"  		{yylval.d = NEWSURFACE(); return tDOUBLE;}
-"newsl"  		{yylval.d = NEWSURFACELOOP(); return tDOUBLE;}
-"newv"  		{yylval.d = NEWVOLUME(); return tDOUBLE;}
+"\""			{ parsestring('\"'); return tBIGSTR; }
+"\'"			{ parsestring('\''); return tBIGSTR; }
+"newreg"		{ gmsh_yylval.d = NEWREG(); return tDOUBLE; }
+"newp"  		{ gmsh_yylval.d = NEWPOINT(); return tDOUBLE; }
+"newl"  		{ gmsh_yylval.d = NEWLINE(); return tDOUBLE; }
+"newc"  		{ gmsh_yylval.d = NEWLINE(); return tDOUBLE; }
+"newll"  		{ gmsh_yylval.d = NEWLINELOOP(); return tDOUBLE; }
+"news"  		{ gmsh_yylval.d = NEWSURFACE(); return tDOUBLE; }
+"newsl"  		{ gmsh_yylval.d = NEWSURFACELOOP(); return tDOUBLE; }
+"newv"  		{ gmsh_yylval.d = NEWVOLUME(); return tDOUBLE; }
 "="                     return tAFFECT;
 "+="                    return tAFFECTPLUS;
 "-="                    return tAFFECTMINUS;
@@ -236,17 +236,17 @@ TIME                    return tTime;
 {digit}+ |
 {digit}+"."{digit}*({exp})? |
 {digit}*"."{digit}+({exp})? |
-{digit}+{exp}           {yylval.d = atof((char *)yytext); return tDOUBLE;}
+{digit}+{exp}           { gmsh_yylval.d = atof((char *)yytext); return tDOUBLE; }
 
-{string}		{yylval.c = strsave((char*)yytext); return tSTRING;}
+{string}		{ gmsh_yylval.c = strsave((char*)yytext); return tSTRING; }
 
 .                       return yytext[0];
 
 %%
 
-#undef yywrap
+#undef gmsh_yywrap
 
-int yywrap() {return 1;}
+int gmsh_yywrap() {return 1;}
 
 void skipcomments(void)
 {
@@ -287,7 +287,7 @@ void parsestring(char endchar)
     }
   }
   tmp[i] = '\0';
-  yylval.c = strsave(tmp);
+  gmsh_yylval.c = strsave(tmp);
 }
 
 char *strsave(char *ptr)
diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp
index 3ce0c7e7d6198a82954b6ad36b744fd5cc8cddb8..faa8e671f2857b56e07e0471e2ae3cfad44ebf84 100644
--- a/Parser/Gmsh.tab.cpp
+++ b/Parser/Gmsh.tab.cpp
@@ -58,6 +58,14 @@
 /* Using locations.  */
 #define YYLSP_NEEDED 0
 
+/* Substitute the variable and function names.  */
+#define yyparse gmsh_yyparse
+#define yylex   gmsh_yylex
+#define yyerror gmsh_yyerror
+#define yylval  gmsh_yylval
+#define yychar  gmsh_yychar
+#define yydebug gmsh_yydebug
+#define yynerrs gmsh_yynerrs
 
 
 /* Tokens.  */
@@ -326,7 +334,7 @@
 /* Copy the first part of user declarations.  */
 #line 1 "Gmsh.y"
 
-// $Id: Gmsh.tab.cpp,v 1.341 2008-01-19 22:06:04 geuzaine Exp $
+// $Id: Gmsh.tab.cpp,v 1.342 2008-01-20 10:10:42 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -433,7 +441,7 @@ typedef union YYSTYPE
   List_T *l;
 }
 /* Line 193 of yacc.c.  */
-#line 437 "Gmsh.tab.cpp"
+#line 445 "Gmsh.tab.cpp"
 	YYSTYPE;
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
@@ -446,7 +454,7 @@ typedef union YYSTYPE
 
 
 /* Line 216 of yacc.c.  */
-#line 450 "Gmsh.tab.cpp"
+#line 458 "Gmsh.tab.cpp"
 
 #ifdef short
 # undef short
@@ -995,31 +1003,31 @@ static const yytype_uint16 yyrline[] =
      961,   976,   980,   993,  1015,  1031,  1052,  1059,  1070,  1085,
     1093,  1108,  1115,  1127,  1161,  1197,  1219,  1237,  1255,  1273,
     1299,  1317,  1343,  1363,  1381,  1399,  1425,  1442,  1461,  1479,
-    1517,  1521,  1525,  1530,  1552,  1574,  1590,  1610,  1627,  1644,
-    1665,  1670,  1675,  1680,  1685,  1696,  1702,  1711,  1712,  1717,
-    1720,  1724,  1747,  1770,  1793,  1821,  1830,  1843,  1859,  1874,
-    1888,  1894,  1900,  1909,  1923,  1971,  1987,  2003,  2022,  2032,
-    2054,  2058,  2063,  2068,  2080,  2095,  2111,  2136,  2162,  2193,
-    2200,  2205,  2211,  2215,  2224,  2232,  2240,  2249,  2248,  2261,
-    2260,  2273,  2272,  2285,  2284,  2296,  2295,  2311,  2318,  2325,
-    2332,  2339,  2346,  2353,  2360,  2367,  2375,  2374,  2386,  2385,
-    2397,  2396,  2408,  2407,  2419,  2418,  2430,  2429,  2441,  2440,
-    2452,  2451,  2463,  2462,  2477,  2480,  2486,  2495,  2515,  2538,
-    2542,  2566,  2584,  2602,  2620,  2649,  2684,  2689,  2716,  2730,
-    2749,  2755,  2761,  2764,  2773,  2783,  2784,  2785,  2786,  2787,
-    2788,  2789,  2790,  2791,  2798,  2799,  2800,  2801,  2802,  2803,
-    2804,  2805,  2806,  2807,  2808,  2809,  2810,  2811,  2812,  2813,
+    1517,  1523,  1529,  1536,  1560,  1584,  1600,  1620,  1637,  1654,
+    1675,  1680,  1685,  1690,  1695,  1706,  1712,  1721,  1722,  1727,
+    1730,  1734,  1757,  1780,  1803,  1831,  1840,  1853,  1869,  1884,
+    1898,  1904,  1910,  1919,  1933,  1981,  1997,  2013,  2032,  2042,
+    2064,  2068,  2073,  2078,  2090,  2105,  2121,  2146,  2172,  2203,
+    2210,  2215,  2221,  2225,  2234,  2242,  2250,  2259,  2258,  2271,
+    2270,  2283,  2282,  2295,  2294,  2306,  2305,  2321,  2328,  2335,
+    2342,  2349,  2356,  2363,  2370,  2377,  2385,  2384,  2396,  2395,
+    2407,  2406,  2418,  2417,  2429,  2428,  2440,  2439,  2451,  2450,
+    2462,  2461,  2473,  2472,  2487,  2490,  2496,  2505,  2525,  2548,
+    2552,  2576,  2594,  2612,  2630,  2659,  2694,  2699,  2726,  2740,
+    2759,  2765,  2771,  2774,  2783,  2793,  2794,  2795,  2796,  2797,
+    2798,  2799,  2800,  2801,  2808,  2809,  2810,  2811,  2812,  2813,
     2814,  2815,  2816,  2817,  2818,  2819,  2820,  2821,  2822,  2823,
-    2824,  2825,  2826,  2827,  2828,  2829,  2831,  2832,  2833,  2834,
-    2835,  2836,  2837,  2838,  2839,  2840,  2841,  2842,  2843,  2844,
-    2845,  2846,  2847,  2848,  2849,  2850,  2851,  2860,  2861,  2862,
-    2863,  2864,  2865,  2866,  2870,  2886,  2901,  2921,  2934,  2947,
-    2970,  2988,  3006,  3024,  3042,  3050,  3054,  3058,  3062,  3066,
-    3073,  3077,  3081,  3085,  3092,  3097,  3105,  3110,  3114,  3119,
-    3123,  3131,  3142,  3150,  3158,  3164,  3175,  3195,  3205,  3215,
-    3232,  3259,  3264,  3268,  3272,  3285,  3289,  3301,  3308,  3329,
-    3333,  3348,  3353,  3360,  3364,  3371,  3375,  3383,  3391,  3405,
-    3419,  3423,  3442,  3464
+    2824,  2825,  2826,  2827,  2828,  2829,  2830,  2831,  2832,  2833,
+    2834,  2835,  2836,  2837,  2838,  2839,  2841,  2842,  2843,  2844,
+    2845,  2846,  2847,  2848,  2849,  2850,  2851,  2852,  2853,  2854,
+    2855,  2856,  2857,  2858,  2859,  2860,  2861,  2870,  2871,  2872,
+    2873,  2874,  2875,  2876,  2880,  2896,  2911,  2931,  2944,  2957,
+    2980,  2998,  3016,  3034,  3052,  3060,  3064,  3068,  3072,  3076,
+    3083,  3087,  3091,  3095,  3102,  3107,  3115,  3120,  3124,  3129,
+    3133,  3141,  3152,  3160,  3168,  3174,  3185,  3205,  3215,  3225,
+    3242,  3269,  3274,  3278,  3282,  3295,  3299,  3311,  3318,  3339,
+    3343,  3358,  3363,  3370,  3374,  3381,  3385,  3393,  3401,  3415,
+    3429,  3433,  3452,  3474
 };
 #endif
 
@@ -3906,8 +3914,8 @@ yyreduce:
     { 
       if(!strcmp((yyvsp[(1) - (6)].c), "View") && ViewData->finalize()){
 	ViewData->setName((yyvsp[(2) - (6)].c));
-	ViewData->setFileName(yyname);
-	ViewData->setFileIndex(yyviewindex++);
+	ViewData->setFileName(gmsh_yyname);
+	ViewData->setFileIndex(gmsh_yyviewindex++);
 	if(ViewData->adaptive){
 	  ViewData->adaptive->setGlobalResolutionLevel
 	    (ViewData, PViewOptions::reference.MaxRecursionLevel);
@@ -3926,7 +3934,7 @@ yyreduce:
     {
       if(!strcmp((yyvsp[(2) - (6)].c), "View")){
 	int index = (int)(yyvsp[(4) - (6)].d);
-	if(index >= 0 && index < PView::list.size())
+	if(index >= 0 && index < (int)PView::list.size())
 	  new PView(PView::list[index], false);
       }
       Free((yyvsp[(2) - (6)].c));
@@ -3938,7 +3946,7 @@ yyreduce:
     {
       if(!strcmp((yyvsp[(2) - (6)].c), "View")){
 	int index = (int)(yyvsp[(4) - (6)].d);
-	if(index >= 0 && index < PView::list.size())
+	if(index >= 0 && index < (int)PView::list.size())
 	  new PView(PView::list[index], true);
       }
       Free((yyvsp[(2) - (6)].c));
@@ -4811,7 +4819,7 @@ yyreduce:
 #line 1060 "Gmsh.y"
     {
       int index = (int)(yyvsp[(7) - (8)].d);
-      if(index >= 0 && index < PView::list.size()) 
+      if(index >= 0 && index < (int)PView::list.size()) 
         fields.insert(new PostViewField(PView::list[index]), (int)(yyvsp[(4) - (8)].d));
       else
         yymsg(GERROR, "Field %i error, view %i does not exist", (int)(yyvsp[(4) - (8)].d), (int)(yyvsp[(7) - (8)].d));
@@ -5330,28 +5338,34 @@ yyreduce:
 #line 1518 "Gmsh.y"
     {
       myGmshSurface = 0;
+      (yyval.s).Type = 0;
+      (yyval.s).Num = 0;
     ;}
     break;
 
   case 111:
-#line 1522 "Gmsh.y"
+#line 1524 "Gmsh.y"
     {
-      myGmshSurface = gmshSurface :: surfaceByTag ( (int) (yyvsp[(3) - (4)].d));
+      myGmshSurface = gmshSurface::surfaceByTag((int)(yyvsp[(3) - (4)].d));
+      (yyval.s).Type = 0;
+      (yyval.s).Num = 0;
     ;}
     break;
 
   case 112:
-#line 1526 "Gmsh.y"
+#line 1530 "Gmsh.y"
     {
-      int num = (int)(yyvsp[(4) - (10)].d), type = 0;
-      myGmshSurface = gmshParametricSurface::NewParametricSurface ((int)(yyvsp[(4) - (10)].d),(yyvsp[(7) - (10)].c),(yyvsp[(8) - (10)].c),(yyvsp[(9) - (10)].c));
+      int num = (int)(yyvsp[(4) - (10)].d);
+      myGmshSurface = gmshParametricSurface::NewParametricSurface(num, (yyvsp[(7) - (10)].c), (yyvsp[(8) - (10)].c), (yyvsp[(9) - (10)].c));
+      (yyval.s).Type = 0;
+      (yyval.s).Num = num;
     ;}
     break;
 
   case 113:
-#line 1531 "Gmsh.y"
+#line 1537 "Gmsh.y"
     {
-      int num = (int)(yyvsp[(3) - (7)].d), type = 0;
+      int num = (int)(yyvsp[(3) - (7)].d);
       if (List_Nbr((yyvsp[(6) - (7)].l)) != 2){
 	yymsg(GERROR, "Sphere %d has to be defined using 2 points (center + "
 	      "any point) and not %d", num, List_Nbr((yyvsp[(6) - (7)].l)));
@@ -5370,13 +5384,15 @@ yyreduce:
 		(v2->Pos.Y - v1->Pos.Y) * (v2->Pos.Y - v1->Pos.Y) +
 		(v2->Pos.Z - v1->Pos.Z) * (v2->Pos.Z - v1->Pos.Z)));
       }      
+      (yyval.s).Type = 0;
+      (yyval.s).Num = num;
     ;}
     break;
 
   case 114:
-#line 1553 "Gmsh.y"
+#line 1561 "Gmsh.y"
     {
-      int num = (int)(yyvsp[(3) - (7)].d), type = 0;
+      int num = (int)(yyvsp[(3) - (7)].d);
       if (List_Nbr((yyvsp[(6) - (7)].l)) != 2){
 	yymsg(GERROR, "PolarSphere %d has to be defined using 2 points (center + "
 	      "any point) and not %d", num, List_Nbr((yyvsp[(6) - (7)].l)));
@@ -5395,11 +5411,13 @@ yyreduce:
 		(v2->Pos.Y - v1->Pos.Y) * (v2->Pos.Y - v1->Pos.Y) +
 		(v2->Pos.Z - v1->Pos.Z) * (v2->Pos.Z - v1->Pos.Z)));
       }      
+      (yyval.s).Type = 0;
+      (yyval.s).Num = num;
     ;}
     break;
 
   case 115:
-#line 1575 "Gmsh.y"
+#line 1585 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (8)].d);
       if(FindSurfaceLoop(num)){
@@ -5418,7 +5436,7 @@ yyreduce:
     break;
 
   case 116:
-#line 1591 "Gmsh.y"
+#line 1601 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (8)].i);
       if(FindPhysicalGroup(num, MSH_PHYSICAL_SURFACE)){
@@ -5437,7 +5455,7 @@ yyreduce:
     break;
 
   case 117:
-#line 1611 "Gmsh.y"
+#line 1621 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (8)].d);
       if(FindVolume(num)){
@@ -5457,7 +5475,7 @@ yyreduce:
     break;
 
   case 118:
-#line 1628 "Gmsh.y"
+#line 1638 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (7)].d);
       if(FindVolume(num)){
@@ -5477,7 +5495,7 @@ yyreduce:
     break;
 
   case 119:
-#line 1645 "Gmsh.y"
+#line 1655 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (8)].i);
       if(FindPhysicalGroup(num, MSH_PHYSICAL_VOLUME)){
@@ -5496,7 +5514,7 @@ yyreduce:
     break;
 
   case 120:
-#line 1666 "Gmsh.y"
+#line 1676 "Gmsh.y"
     {
       TranslateShapes((yyvsp[(2) - (5)].v)[0], (yyvsp[(2) - (5)].v)[1], (yyvsp[(2) - (5)].v)[2], (yyvsp[(4) - (5)].l));
       (yyval.l) = (yyvsp[(4) - (5)].l);
@@ -5504,7 +5522,7 @@ yyreduce:
     break;
 
   case 121:
-#line 1671 "Gmsh.y"
+#line 1681 "Gmsh.y"
     {
       RotateShapes((yyvsp[(3) - (11)].v)[0], (yyvsp[(3) - (11)].v)[1], (yyvsp[(3) - (11)].v)[2], (yyvsp[(5) - (11)].v)[0], (yyvsp[(5) - (11)].v)[1], (yyvsp[(5) - (11)].v)[2], (yyvsp[(7) - (11)].d), (yyvsp[(10) - (11)].l));
       (yyval.l) = (yyvsp[(10) - (11)].l);
@@ -5512,7 +5530,7 @@ yyreduce:
     break;
 
   case 122:
-#line 1676 "Gmsh.y"
+#line 1686 "Gmsh.y"
     {
       SymmetryShapes((yyvsp[(2) - (5)].v)[0], (yyvsp[(2) - (5)].v)[1], (yyvsp[(2) - (5)].v)[2], (yyvsp[(2) - (5)].v)[3], (yyvsp[(4) - (5)].l));
       (yyval.l) = (yyvsp[(4) - (5)].l);
@@ -5520,7 +5538,7 @@ yyreduce:
     break;
 
   case 123:
-#line 1681 "Gmsh.y"
+#line 1691 "Gmsh.y"
     {
       DilatShapes((yyvsp[(3) - (9)].v)[0], (yyvsp[(3) - (9)].v)[1], (yyvsp[(3) - (9)].v)[2], (yyvsp[(5) - (9)].d), (yyvsp[(8) - (9)].l));
       (yyval.l) = (yyvsp[(8) - (9)].l);
@@ -5528,7 +5546,7 @@ yyreduce:
     break;
 
   case 124:
-#line 1686 "Gmsh.y"
+#line 1696 "Gmsh.y"
     {
       (yyval.l) = List_Create(3, 3, sizeof(Shape));
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){
@@ -5542,7 +5560,7 @@ yyreduce:
     break;
 
   case 125:
-#line 1697 "Gmsh.y"
+#line 1707 "Gmsh.y"
     { 
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       IntersectCurvesWithSurface((yyvsp[(4) - (9)].l), (int)(yyvsp[(8) - (9)].d), (yyval.l));
@@ -5551,7 +5569,7 @@ yyreduce:
     break;
 
   case 126:
-#line 1703 "Gmsh.y"
+#line 1713 "Gmsh.y"
     { 
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       BoundaryShapes((yyvsp[(3) - (4)].l), (yyval.l));
@@ -5560,31 +5578,31 @@ yyreduce:
     break;
 
   case 127:
-#line 1711 "Gmsh.y"
+#line 1721 "Gmsh.y"
     { (yyval.l) = (yyvsp[(1) - (1)].l); ;}
     break;
 
   case 128:
-#line 1712 "Gmsh.y"
+#line 1722 "Gmsh.y"
     { (yyval.l) = (yyvsp[(1) - (1)].l); ;}
     break;
 
   case 129:
-#line 1717 "Gmsh.y"
+#line 1727 "Gmsh.y"
     {
       (yyval.l) = List_Create(3, 3, sizeof(Shape));
     ;}
     break;
 
   case 130:
-#line 1721 "Gmsh.y"
+#line 1731 "Gmsh.y"
     {
       List_Add((yyval.l), &(yyvsp[(2) - (2)].s));
     ;}
     break;
 
   case 131:
-#line 1725 "Gmsh.y"
+#line 1735 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){
 	double d;
@@ -5610,7 +5628,7 @@ yyreduce:
     break;
 
   case 132:
-#line 1748 "Gmsh.y"
+#line 1758 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){
 	double d;
@@ -5636,7 +5654,7 @@ yyreduce:
     break;
 
   case 133:
-#line 1771 "Gmsh.y"
+#line 1781 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){
 	double d;
@@ -5662,7 +5680,7 @@ yyreduce:
     break;
 
   case 134:
-#line 1794 "Gmsh.y"
+#line 1804 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){
 	double d;
@@ -5688,7 +5706,7 @@ yyreduce:
     break;
 
   case 135:
-#line 1822 "Gmsh.y"
+#line 1832 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){
 	Shape TheShape;
@@ -5700,11 +5718,11 @@ yyreduce:
     break;
 
   case 136:
-#line 1831 "Gmsh.y"
+#line 1841 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(2) - (6)].c), "View")){
 	int index = (int)(yyvsp[(4) - (6)].d);
-	if(index >= 0 && index < PView::list.size())
+	if(index >= 0 && index < (int)PView::list.size())
 	  delete PView::list[index];
 	else
 	  yymsg(GERROR, "Unknown view %d", index);
@@ -5716,7 +5734,7 @@ yyreduce:
     break;
 
   case 137:
-#line 1844 "Gmsh.y"
+#line 1854 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(2) - (3)].c), "Meshes") || !strcmp((yyvsp[(2) - (3)].c), "All")){
 	GModel::current()->destroy();
@@ -5735,7 +5753,7 @@ yyreduce:
     break;
 
   case 138:
-#line 1860 "Gmsh.y"
+#line 1870 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(2) - (4)].c), "Empty") && !strcmp((yyvsp[(3) - (4)].c), "Views")){
 	for(int i = PView::list.size() - 1; i >= 0; i--)
@@ -5748,7 +5766,7 @@ yyreduce:
     break;
 
   case 139:
-#line 1875 "Gmsh.y"
+#line 1885 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){
 	Shape TheShape;
@@ -5760,7 +5778,7 @@ yyreduce:
     break;
 
   case 140:
-#line 1889 "Gmsh.y"
+#line 1899 "Gmsh.y"
     {
       for(int i = 0; i < 4; i++)
 	VisibilityShape((yyvsp[(2) - (3)].c), i, 1);
@@ -5769,7 +5787,7 @@ yyreduce:
     break;
 
   case 141:
-#line 1895 "Gmsh.y"
+#line 1905 "Gmsh.y"
     {
       for(int i = 0; i < 4; i++)
 	VisibilityShape((yyvsp[(2) - (3)].c), i, 0);
@@ -5778,7 +5796,7 @@ yyreduce:
     break;
 
   case 142:
-#line 1901 "Gmsh.y"
+#line 1911 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){
 	Shape TheShape;
@@ -5790,7 +5808,7 @@ yyreduce:
     break;
 
   case 143:
-#line 1910 "Gmsh.y"
+#line 1920 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){
 	Shape TheShape;
@@ -5802,7 +5820,7 @@ yyreduce:
     break;
 
   case 144:
-#line 1924 "Gmsh.y"
+#line 1934 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(1) - (3)].c), "Include")){
 	char tmpstring[1024];
@@ -5853,11 +5871,11 @@ yyreduce:
     break;
 
   case 145:
-#line 1972 "Gmsh.y"
+#line 1982 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(1) - (7)].c), "Save") && !strcmp((yyvsp[(2) - (7)].c), "View")){
 	int index = (int)(yyvsp[(4) - (7)].d);
-	if(index >= 0 && index < PView::list.size()){
+	if(index >= 0 && index < (int)PView::list.size()){
 	  char tmpstring[1024];
 	  FixRelativePath((yyvsp[(6) - (7)].c), tmpstring);
 	  PView::list[index]->write(tmpstring, CTX.post.file_format);
@@ -5872,11 +5890,11 @@ yyreduce:
     break;
 
   case 146:
-#line 1988 "Gmsh.y"
+#line 1998 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(1) - (7)].c), "Background") && !strcmp((yyvsp[(2) - (7)].c), "Mesh")  && !strcmp((yyvsp[(3) - (7)].c), "View")){
 	int index = (int)(yyvsp[(5) - (7)].d);
-	if(index >= 0 && index < PView::list.size()){
+	if(index >= 0 && index < (int)PView::list.size()){
 	  Field *field = new PostViewField(PView::list[index]);
 	  fields.insert(field);
 	  BGMAddField(field);
@@ -5891,7 +5909,7 @@ yyreduce:
     break;
 
   case 147:
-#line 2004 "Gmsh.y"
+#line 2014 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(1) - (3)].c), "Sleep")){
 	SleepInSeconds((yyvsp[(2) - (3)].d));
@@ -5913,7 +5931,7 @@ yyreduce:
     break;
 
   case 148:
-#line 2023 "Gmsh.y"
+#line 2033 "Gmsh.y"
     {
        try {
 	 GMSH_PluginManager::instance()->action((yyvsp[(3) - (7)].c), (yyvsp[(6) - (7)].c), 0);
@@ -5926,7 +5944,7 @@ yyreduce:
     break;
 
   case 149:
-#line 2033 "Gmsh.y"
+#line 2043 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(2) - (3)].c), "ElementsFromAllViews"))
 	PView::combine(false, 1, CTX.post.combine_remove_orig);
@@ -5951,14 +5969,14 @@ yyreduce:
     break;
 
   case 150:
-#line 2055 "Gmsh.y"
+#line 2065 "Gmsh.y"
     {
       exit(0);
     ;}
     break;
 
   case 151:
-#line 2059 "Gmsh.y"
+#line 2069 "Gmsh.y"
     {
       CTX.forced_bbox = 0;
       SetBoundingBox();
@@ -5966,7 +5984,7 @@ yyreduce:
     break;
 
   case 152:
-#line 2064 "Gmsh.y"
+#line 2074 "Gmsh.y"
     {
       CTX.forced_bbox = 1;
       SetBoundingBox((yyvsp[(3) - (15)].d), (yyvsp[(5) - (15)].d), (yyvsp[(7) - (15)].d), (yyvsp[(9) - (15)].d), (yyvsp[(11) - (15)].d), (yyvsp[(13) - (15)].d));
@@ -5974,7 +5992,7 @@ yyreduce:
     break;
 
   case 153:
-#line 2069 "Gmsh.y"
+#line 2079 "Gmsh.y"
     {
 #if defined(HAVE_FLTK)
       Draw();
@@ -5983,14 +6001,14 @@ yyreduce:
     break;
 
   case 154:
-#line 2081 "Gmsh.y"
+#line 2091 "Gmsh.y"
     {
       LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (6)].d);
       LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(5) - (6)].d);
       LoopControlVariablesTab[ImbricatedLoop][2] = 1.0;
       LoopControlVariablesNameTab[ImbricatedLoop] = NULL;
-      fgetpos(yyin, &yyposImbricatedLoopsTab[ImbricatedLoop]);
-      yylinenoImbricatedLoopsTab[ImbricatedLoop] = yylineno;
+      fgetpos(gmsh_yyin, &yyposImbricatedLoopsTab[ImbricatedLoop]);
+      yylinenoImbricatedLoopsTab[ImbricatedLoop] = gmsh_yylineno;
       ImbricatedLoop++;
       if(ImbricatedLoop > MAX_RECUR_LOOPS-1){
 	yymsg(GERROR, "Reached maximum number of imbricated loops");
@@ -6001,14 +6019,14 @@ yyreduce:
     break;
 
   case 155:
-#line 2096 "Gmsh.y"
+#line 2106 "Gmsh.y"
     {
       LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (8)].d);
       LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(5) - (8)].d);
       LoopControlVariablesTab[ImbricatedLoop][2] = (yyvsp[(7) - (8)].d);
       LoopControlVariablesNameTab[ImbricatedLoop] = NULL;
-      fgetpos(yyin, &yyposImbricatedLoopsTab[ImbricatedLoop]);
-      yylinenoImbricatedLoopsTab[ImbricatedLoop] = yylineno;
+      fgetpos(gmsh_yyin, &yyposImbricatedLoopsTab[ImbricatedLoop]);
+      yylinenoImbricatedLoopsTab[ImbricatedLoop] = gmsh_yylineno;
       ImbricatedLoop++;
       if(ImbricatedLoop > MAX_RECUR_LOOPS-1){
 	yymsg(GERROR, "Reached maximum number of imbricated loops");
@@ -6020,7 +6038,7 @@ yyreduce:
     break;
 
   case 156:
-#line 2112 "Gmsh.y"
+#line 2122 "Gmsh.y"
     {
       LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (8)].d);
       LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(7) - (8)].d);
@@ -6036,8 +6054,8 @@ yyreduce:
       }
       else
 	List_Write(pSymbol->val, 0, &(yyvsp[(5) - (8)].d));
-      fgetpos(yyin, &yyposImbricatedLoopsTab[ImbricatedLoop]);
-      yylinenoImbricatedLoopsTab[ImbricatedLoop] = yylineno;
+      fgetpos(gmsh_yyin, &yyposImbricatedLoopsTab[ImbricatedLoop]);
+      yylinenoImbricatedLoopsTab[ImbricatedLoop] = gmsh_yylineno;
       ImbricatedLoop++;
       if(ImbricatedLoop > MAX_RECUR_LOOPS-1){
 	yymsg(GERROR, "Reached maximum number of imbricated loops");
@@ -6048,7 +6066,7 @@ yyreduce:
     break;
 
   case 157:
-#line 2137 "Gmsh.y"
+#line 2147 "Gmsh.y"
     {
       LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (10)].d);
       LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(7) - (10)].d);
@@ -6064,8 +6082,8 @@ yyreduce:
       }
       else
 	List_Write(pSymbol->val, 0, &(yyvsp[(5) - (10)].d));
-      fgetpos(yyin, &yyposImbricatedLoopsTab[ImbricatedLoop]);
-      yylinenoImbricatedLoopsTab[ImbricatedLoop] = yylineno;
+      fgetpos(gmsh_yyin, &yyposImbricatedLoopsTab[ImbricatedLoop]);
+      yylinenoImbricatedLoopsTab[ImbricatedLoop] = gmsh_yylineno;
       ImbricatedLoop++;
       if(ImbricatedLoop > MAX_RECUR_LOOPS-1){
 	yymsg(GERROR, "Reached maximum number of imbricated loops");
@@ -6077,7 +6095,7 @@ yyreduce:
     break;
 
   case 158:
-#line 2163 "Gmsh.y"
+#line 2173 "Gmsh.y"
     {
       if(ImbricatedLoop <= 0){
 	yymsg(GERROR, "Invalid For/EndFor loop");
@@ -6101,8 +6119,8 @@ yyreduce:
 	      *(double*)List_Pointer_Fast(pSymbol->val, 0) += 
 		LoopControlVariablesTab[ImbricatedLoop-1][2];
 	  }
-	  fsetpos(yyin, &yyposImbricatedLoopsTab[ImbricatedLoop-1]);
-	  yylineno = yylinenoImbricatedLoopsTab[ImbricatedLoop-1];
+	  fsetpos(gmsh_yyin, &yyposImbricatedLoopsTab[ImbricatedLoop-1]);
+	  gmsh_yylineno = yylinenoImbricatedLoopsTab[ImbricatedLoop-1];
 	}
 	else
 	  ImbricatedLoop--;
@@ -6111,9 +6129,9 @@ yyreduce:
     break;
 
   case 159:
-#line 2194 "Gmsh.y"
+#line 2204 "Gmsh.y"
     {
-      if(!FunctionManager::Instance()->createFunction((yyvsp[(2) - (2)].c), yyin, yyname, yylineno))
+      if(!FunctionManager::Instance()->createFunction((yyvsp[(2) - (2)].c), gmsh_yyin, gmsh_yyname, gmsh_yylineno))
 	yymsg(GERROR, "Redefinition of function %s", (yyvsp[(2) - (2)].c));
       skip_until(NULL, "Return");
       //FIXME: wee leak $2
@@ -6121,37 +6139,37 @@ yyreduce:
     break;
 
   case 160:
-#line 2201 "Gmsh.y"
+#line 2211 "Gmsh.y"
     {
-      if(!FunctionManager::Instance()->leaveFunction(&yyin, yyname, yylineno))
+      if(!FunctionManager::Instance()->leaveFunction(&gmsh_yyin, gmsh_yyname, gmsh_yylineno))
 	yymsg(GERROR, "Error while exiting function");
     ;}
     break;
 
   case 161:
-#line 2206 "Gmsh.y"
+#line 2216 "Gmsh.y"
     {
-      if(!FunctionManager::Instance()->enterFunction((yyvsp[(2) - (3)].c), &yyin, yyname, yylineno))
+      if(!FunctionManager::Instance()->enterFunction((yyvsp[(2) - (3)].c), &gmsh_yyin, gmsh_yyname, gmsh_yylineno))
 	yymsg(GERROR, "Unknown function %s", (yyvsp[(2) - (3)].c));
       //FIXME: wee leak $2
     ;}
     break;
 
   case 162:
-#line 2212 "Gmsh.y"
+#line 2222 "Gmsh.y"
     {
       if(!(yyvsp[(3) - (4)].d)) skip_until("If", "EndIf");
     ;}
     break;
 
   case 163:
-#line 2216 "Gmsh.y"
+#line 2226 "Gmsh.y"
     {
     ;}
     break;
 
   case 164:
-#line 2225 "Gmsh.y"
+#line 2235 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(TRANSLATE, (yyvsp[(4) - (5)].l), 
@@ -6162,7 +6180,7 @@ yyreduce:
     break;
 
   case 165:
-#line 2233 "Gmsh.y"
+#line 2243 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(ROTATE, (yyvsp[(10) - (11)].l), 
@@ -6173,7 +6191,7 @@ yyreduce:
     break;
 
   case 166:
-#line 2241 "Gmsh.y"
+#line 2251 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(TRANSLATE_ROTATE, (yyvsp[(12) - (13)].l), 
@@ -6184,14 +6202,14 @@ yyreduce:
     break;
 
   case 167:
-#line 2249 "Gmsh.y"
+#line 2259 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;}
     break;
 
   case 168:
-#line 2253 "Gmsh.y"
+#line 2263 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(TRANSLATE, (yyvsp[(4) - (7)].l), 
@@ -6202,14 +6220,14 @@ yyreduce:
     break;
 
   case 169:
-#line 2261 "Gmsh.y"
+#line 2271 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;}
     break;
 
   case 170:
-#line 2265 "Gmsh.y"
+#line 2275 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(ROTATE, (yyvsp[(10) - (13)].l), 
@@ -6220,14 +6238,14 @@ yyreduce:
     break;
 
   case 171:
-#line 2273 "Gmsh.y"
+#line 2283 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;}
     break;
 
   case 172:
-#line 2277 "Gmsh.y"
+#line 2287 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(TRANSLATE_ROTATE, (yyvsp[(12) - (15)].l), 
@@ -6238,14 +6256,14 @@ yyreduce:
     break;
 
   case 173:
-#line 2285 "Gmsh.y"
+#line 2295 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;}
     break;
 
   case 174:
-#line 2289 "Gmsh.y"
+#line 2299 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(BOUNDARY_LAYER, (yyvsp[(3) - (6)].l), 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
@@ -6255,14 +6273,14 @@ yyreduce:
     break;
 
   case 175:
-#line 2296 "Gmsh.y"
+#line 2306 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;}
     break;
 
   case 176:
-#line 2300 "Gmsh.y"
+#line 2310 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       extr.mesh.ViewIndex = (int)(yyvsp[(4) - (10)].d);
@@ -6275,7 +6293,7 @@ yyreduce:
     break;
 
   case 177:
-#line 2312 "Gmsh.y"
+#line 2322 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_POINT, (int)(yyvsp[(4) - (8)].d), 
@@ -6285,7 +6303,7 @@ yyreduce:
     break;
 
   case 178:
-#line 2319 "Gmsh.y"
+#line 2329 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (8)].d), 
@@ -6295,7 +6313,7 @@ yyreduce:
     break;
 
   case 179:
-#line 2326 "Gmsh.y"
+#line 2336 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (8)].d), 
@@ -6305,7 +6323,7 @@ yyreduce:
     break;
 
   case 180:
-#line 2333 "Gmsh.y"
+#line 2343 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_POINT, (int)(yyvsp[(4) - (12)].d), 
@@ -6315,7 +6333,7 @@ yyreduce:
     break;
 
   case 181:
-#line 2340 "Gmsh.y"
+#line 2350 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (12)].d), 
@@ -6325,7 +6343,7 @@ yyreduce:
     break;
 
   case 182:
-#line 2347 "Gmsh.y"
+#line 2357 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (12)].d), 
@@ -6335,7 +6353,7 @@ yyreduce:
     break;
 
   case 183:
-#line 2354 "Gmsh.y"
+#line 2364 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)(yyvsp[(4) - (14)].d), 
@@ -6345,7 +6363,7 @@ yyreduce:
     break;
 
   case 184:
-#line 2361 "Gmsh.y"
+#line 2371 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (14)].d), 
@@ -6355,7 +6373,7 @@ yyreduce:
     break;
 
   case 185:
-#line 2368 "Gmsh.y"
+#line 2378 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (14)].d), 
@@ -6365,14 +6383,14 @@ yyreduce:
     break;
 
   case 186:
-#line 2375 "Gmsh.y"
+#line 2385 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;}
     break;
 
   case 187:
-#line 2379 "Gmsh.y"
+#line 2389 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_POINT, (int)(yyvsp[(4) - (12)].d), 
@@ -6382,14 +6400,14 @@ yyreduce:
     break;
 
   case 188:
-#line 2386 "Gmsh.y"
+#line 2396 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;}
     break;
 
   case 189:
-#line 2390 "Gmsh.y"
+#line 2400 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (12)].d), 
@@ -6399,14 +6417,14 @@ yyreduce:
     break;
 
   case 190:
-#line 2397 "Gmsh.y"
+#line 2407 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;}
     break;
 
   case 191:
-#line 2401 "Gmsh.y"
+#line 2411 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (12)].d), 
@@ -6416,14 +6434,14 @@ yyreduce:
     break;
 
   case 192:
-#line 2408 "Gmsh.y"
+#line 2418 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;}
     break;
 
   case 193:
-#line 2412 "Gmsh.y"
+#line 2422 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_POINT, (int)(yyvsp[(4) - (16)].d), 
@@ -6433,14 +6451,14 @@ yyreduce:
     break;
 
   case 194:
-#line 2419 "Gmsh.y"
+#line 2429 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;}
     break;
 
   case 195:
-#line 2423 "Gmsh.y"
+#line 2433 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (16)].d), 
@@ -6450,14 +6468,14 @@ yyreduce:
     break;
 
   case 196:
-#line 2430 "Gmsh.y"
+#line 2440 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;}
     break;
 
   case 197:
-#line 2434 "Gmsh.y"
+#line 2444 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (16)].d), 
@@ -6467,14 +6485,14 @@ yyreduce:
     break;
 
   case 198:
-#line 2441 "Gmsh.y"
+#line 2451 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;}
     break;
 
   case 199:
-#line 2445 "Gmsh.y"
+#line 2455 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)(yyvsp[(4) - (18)].d), 
@@ -6484,14 +6502,14 @@ yyreduce:
     break;
 
   case 200:
-#line 2452 "Gmsh.y"
+#line 2462 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;}
     break;
 
   case 201:
-#line 2456 "Gmsh.y"
+#line 2466 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (18)].d), 
@@ -6501,14 +6519,14 @@ yyreduce:
     break;
 
   case 202:
-#line 2463 "Gmsh.y"
+#line 2473 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;}
     break;
 
   case 203:
-#line 2467 "Gmsh.y"
+#line 2477 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (18)].d), 
@@ -6518,19 +6536,19 @@ yyreduce:
     break;
 
   case 204:
-#line 2478 "Gmsh.y"
+#line 2488 "Gmsh.y"
     {
     ;}
     break;
 
   case 205:
-#line 2481 "Gmsh.y"
+#line 2491 "Gmsh.y"
     {
     ;}
     break;
 
   case 206:
-#line 2487 "Gmsh.y"
+#line 2497 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = true;
       extr.mesh.NbLayer = 1;
@@ -6542,7 +6560,7 @@ yyreduce:
     break;
 
   case 207:
-#line 2496 "Gmsh.y"
+#line 2506 "Gmsh.y"
     {
       double d;
       extr.mesh.ExtrudeMesh = true;
@@ -6565,7 +6583,7 @@ yyreduce:
     break;
 
   case 208:
-#line 2516 "Gmsh.y"
+#line 2526 "Gmsh.y"
     {
       yymsg(GERROR, "Explicit region numbers in layers are deprecated");
       double d;
@@ -6591,14 +6609,14 @@ yyreduce:
     break;
 
   case 209:
-#line 2539 "Gmsh.y"
+#line 2549 "Gmsh.y"
     {
       extr.mesh.Recombine = true;
     ;}
     break;
 
   case 210:
-#line 2543 "Gmsh.y"
+#line 2553 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (9)].d);
       if(FindSurface(num)){
@@ -6620,7 +6638,7 @@ yyreduce:
     break;
 
   case 211:
-#line 2567 "Gmsh.y"
+#line 2577 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){
 	double d;
@@ -6641,7 +6659,7 @@ yyreduce:
     break;
 
   case 212:
-#line 2585 "Gmsh.y"
+#line 2595 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (9)].l)); i++){
 	double d;
@@ -6662,7 +6680,7 @@ yyreduce:
     break;
 
   case 213:
-#line 2603 "Gmsh.y"
+#line 2613 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (9)].l)); i++){
 	double d;
@@ -6683,7 +6701,7 @@ yyreduce:
     break;
 
   case 214:
-#line 2621 "Gmsh.y"
+#line 2631 "Gmsh.y"
     {
       Surface *s = FindSurface((int)(yyvsp[(4) - (8)].d));
       if(!s)
@@ -6715,7 +6733,7 @@ yyreduce:
     break;
 
   case 215:
-#line 2650 "Gmsh.y"
+#line 2660 "Gmsh.y"
     {
       Surface *s = FindSurface((int)(yyvsp[(4) - (9)].d));
       if(!s)
@@ -6753,7 +6771,7 @@ yyreduce:
     break;
 
   case 216:
-#line 2685 "Gmsh.y"
+#line 2695 "Gmsh.y"
     {
       yymsg(WARNING, "Elliptic Surface is deprecated: use Transfinite instead (with smoothing)");
       List_Delete((yyvsp[(7) - (8)].l));
@@ -6761,7 +6779,7 @@ yyreduce:
     break;
 
   case 217:
-#line 2690 "Gmsh.y"
+#line 2700 "Gmsh.y"
     {
       Volume *v = FindVolume((int)(yyvsp[(4) - (8)].d));
       if(!v)
@@ -6791,7 +6809,7 @@ yyreduce:
     break;
 
   case 218:
-#line 2717 "Gmsh.y"
+#line 2727 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){
 	double d;
@@ -6808,7 +6826,7 @@ yyreduce:
     break;
 
   case 219:
-#line 2731 "Gmsh.y"
+#line 2741 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){
 	double d;
@@ -6824,7 +6842,7 @@ yyreduce:
     break;
 
   case 220:
-#line 2750 "Gmsh.y"
+#line 2760 "Gmsh.y"
     { 
       Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d));
       if(s)
@@ -6833,7 +6851,7 @@ yyreduce:
     break;
 
   case 221:
-#line 2756 "Gmsh.y"
+#line 2766 "Gmsh.y"
     {
       Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d));
       if(s)
@@ -6842,66 +6860,66 @@ yyreduce:
     break;
 
   case 222:
-#line 2762 "Gmsh.y"
+#line 2772 "Gmsh.y"
     {
     ;}
     break;
 
   case 223:
-#line 2765 "Gmsh.y"
+#line 2775 "Gmsh.y"
     {
     ;}
     break;
 
   case 224:
-#line 2774 "Gmsh.y"
+#line 2784 "Gmsh.y"
     { 
       ReplaceAllDuplicates();
     ;}
     break;
 
   case 225:
-#line 2783 "Gmsh.y"
+#line 2793 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (1)].d);           ;}
     break;
 
   case 226:
-#line 2784 "Gmsh.y"
+#line 2794 "Gmsh.y"
     { (yyval.d) = (yyvsp[(2) - (3)].d);           ;}
     break;
 
   case 227:
-#line 2785 "Gmsh.y"
+#line 2795 "Gmsh.y"
     { (yyval.d) = -(yyvsp[(2) - (2)].d);          ;}
     break;
 
   case 228:
-#line 2786 "Gmsh.y"
+#line 2796 "Gmsh.y"
     { (yyval.d) = (yyvsp[(2) - (2)].d);           ;}
     break;
 
   case 229:
-#line 2787 "Gmsh.y"
+#line 2797 "Gmsh.y"
     { (yyval.d) = !(yyvsp[(2) - (2)].d);          ;}
     break;
 
   case 230:
-#line 2788 "Gmsh.y"
+#line 2798 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) - (yyvsp[(3) - (3)].d);      ;}
     break;
 
   case 231:
-#line 2789 "Gmsh.y"
+#line 2799 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) + (yyvsp[(3) - (3)].d);      ;}
     break;
 
   case 232:
-#line 2790 "Gmsh.y"
+#line 2800 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) * (yyvsp[(3) - (3)].d);      ;}
     break;
 
   case 233:
-#line 2792 "Gmsh.y"
+#line 2802 "Gmsh.y"
     { 
       if(!(yyvsp[(3) - (3)].d))
 	yymsg(GERROR, "Division by zero in '%g / %g'", (yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d));
@@ -6911,307 +6929,307 @@ yyreduce:
     break;
 
   case 234:
-#line 2798 "Gmsh.y"
+#line 2808 "Gmsh.y"
     { (yyval.d) = (int)(yyvsp[(1) - (3)].d) % (int)(yyvsp[(3) - (3)].d);  ;}
     break;
 
   case 235:
-#line 2799 "Gmsh.y"
+#line 2809 "Gmsh.y"
     { (yyval.d) = pow((yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d));  ;}
     break;
 
   case 236:
-#line 2800 "Gmsh.y"
+#line 2810 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d);      ;}
     break;
 
   case 237:
-#line 2801 "Gmsh.y"
+#line 2811 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) > (yyvsp[(3) - (3)].d);      ;}
     break;
 
   case 238:
-#line 2802 "Gmsh.y"
+#line 2812 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) <= (yyvsp[(3) - (3)].d);     ;}
     break;
 
   case 239:
-#line 2803 "Gmsh.y"
+#line 2813 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) >= (yyvsp[(3) - (3)].d);     ;}
     break;
 
   case 240:
-#line 2804 "Gmsh.y"
+#line 2814 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) == (yyvsp[(3) - (3)].d);     ;}
     break;
 
   case 241:
-#line 2805 "Gmsh.y"
+#line 2815 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) != (yyvsp[(3) - (3)].d);     ;}
     break;
 
   case 242:
-#line 2806 "Gmsh.y"
+#line 2816 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) && (yyvsp[(3) - (3)].d);     ;}
     break;
 
   case 243:
-#line 2807 "Gmsh.y"
+#line 2817 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) || (yyvsp[(3) - (3)].d);     ;}
     break;
 
   case 244:
-#line 2808 "Gmsh.y"
+#line 2818 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (5)].d)? (yyvsp[(3) - (5)].d) : (yyvsp[(5) - (5)].d);  ;}
     break;
 
   case 245:
-#line 2809 "Gmsh.y"
+#line 2819 "Gmsh.y"
     { (yyval.d) = exp((yyvsp[(3) - (4)].d));      ;}
     break;
 
   case 246:
-#line 2810 "Gmsh.y"
+#line 2820 "Gmsh.y"
     { (yyval.d) = log((yyvsp[(3) - (4)].d));      ;}
     break;
 
   case 247:
-#line 2811 "Gmsh.y"
+#line 2821 "Gmsh.y"
     { (yyval.d) = log10((yyvsp[(3) - (4)].d));    ;}
     break;
 
   case 248:
-#line 2812 "Gmsh.y"
+#line 2822 "Gmsh.y"
     { (yyval.d) = sqrt((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 249:
-#line 2813 "Gmsh.y"
+#line 2823 "Gmsh.y"
     { (yyval.d) = sin((yyvsp[(3) - (4)].d));      ;}
     break;
 
   case 250:
-#line 2814 "Gmsh.y"
+#line 2824 "Gmsh.y"
     { (yyval.d) = asin((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 251:
-#line 2815 "Gmsh.y"
+#line 2825 "Gmsh.y"
     { (yyval.d) = cos((yyvsp[(3) - (4)].d));      ;}
     break;
 
   case 252:
-#line 2816 "Gmsh.y"
+#line 2826 "Gmsh.y"
     { (yyval.d) = acos((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 253:
-#line 2817 "Gmsh.y"
+#line 2827 "Gmsh.y"
     { (yyval.d) = tan((yyvsp[(3) - (4)].d));      ;}
     break;
 
   case 254:
-#line 2818 "Gmsh.y"
+#line 2828 "Gmsh.y"
     { (yyval.d) = atan((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 255:
-#line 2819 "Gmsh.y"
+#line 2829 "Gmsh.y"
     { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));;}
     break;
 
   case 256:
-#line 2820 "Gmsh.y"
+#line 2830 "Gmsh.y"
     { (yyval.d) = sinh((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 257:
-#line 2821 "Gmsh.y"
+#line 2831 "Gmsh.y"
     { (yyval.d) = cosh((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 258:
-#line 2822 "Gmsh.y"
+#line 2832 "Gmsh.y"
     { (yyval.d) = tanh((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 259:
-#line 2823 "Gmsh.y"
+#line 2833 "Gmsh.y"
     { (yyval.d) = fabs((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 260:
-#line 2824 "Gmsh.y"
+#line 2834 "Gmsh.y"
     { (yyval.d) = floor((yyvsp[(3) - (4)].d));    ;}
     break;
 
   case 261:
-#line 2825 "Gmsh.y"
+#line 2835 "Gmsh.y"
     { (yyval.d) = ceil((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 262:
-#line 2826 "Gmsh.y"
+#line 2836 "Gmsh.y"
     { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;}
     break;
 
   case 263:
-#line 2827 "Gmsh.y"
+#line 2837 "Gmsh.y"
     { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;}
     break;
 
   case 264:
-#line 2828 "Gmsh.y"
+#line 2838 "Gmsh.y"
     { (yyval.d) = sqrt((yyvsp[(3) - (6)].d)*(yyvsp[(3) - (6)].d)+(yyvsp[(5) - (6)].d)*(yyvsp[(5) - (6)].d)); ;}
     break;
 
   case 265:
-#line 2829 "Gmsh.y"
+#line 2839 "Gmsh.y"
     { (yyval.d) = (yyvsp[(3) - (4)].d)*(double)rand()/(double)RAND_MAX; ;}
     break;
 
   case 266:
-#line 2831 "Gmsh.y"
+#line 2841 "Gmsh.y"
     { (yyval.d) = exp((yyvsp[(3) - (4)].d));      ;}
     break;
 
   case 267:
-#line 2832 "Gmsh.y"
+#line 2842 "Gmsh.y"
     { (yyval.d) = log((yyvsp[(3) - (4)].d));      ;}
     break;
 
   case 268:
-#line 2833 "Gmsh.y"
+#line 2843 "Gmsh.y"
     { (yyval.d) = log10((yyvsp[(3) - (4)].d));    ;}
     break;
 
   case 269:
-#line 2834 "Gmsh.y"
+#line 2844 "Gmsh.y"
     { (yyval.d) = sqrt((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 270:
-#line 2835 "Gmsh.y"
+#line 2845 "Gmsh.y"
     { (yyval.d) = sin((yyvsp[(3) - (4)].d));      ;}
     break;
 
   case 271:
-#line 2836 "Gmsh.y"
+#line 2846 "Gmsh.y"
     { (yyval.d) = asin((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 272:
-#line 2837 "Gmsh.y"
+#line 2847 "Gmsh.y"
     { (yyval.d) = cos((yyvsp[(3) - (4)].d));      ;}
     break;
 
   case 273:
-#line 2838 "Gmsh.y"
+#line 2848 "Gmsh.y"
     { (yyval.d) = acos((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 274:
-#line 2839 "Gmsh.y"
+#line 2849 "Gmsh.y"
     { (yyval.d) = tan((yyvsp[(3) - (4)].d));      ;}
     break;
 
   case 275:
-#line 2840 "Gmsh.y"
+#line 2850 "Gmsh.y"
     { (yyval.d) = atan((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 276:
-#line 2841 "Gmsh.y"
+#line 2851 "Gmsh.y"
     { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));;}
     break;
 
   case 277:
-#line 2842 "Gmsh.y"
+#line 2852 "Gmsh.y"
     { (yyval.d) = sinh((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 278:
-#line 2843 "Gmsh.y"
+#line 2853 "Gmsh.y"
     { (yyval.d) = cosh((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 279:
-#line 2844 "Gmsh.y"
+#line 2854 "Gmsh.y"
     { (yyval.d) = tanh((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 280:
-#line 2845 "Gmsh.y"
+#line 2855 "Gmsh.y"
     { (yyval.d) = fabs((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 281:
-#line 2846 "Gmsh.y"
+#line 2856 "Gmsh.y"
     { (yyval.d) = floor((yyvsp[(3) - (4)].d));    ;}
     break;
 
   case 282:
-#line 2847 "Gmsh.y"
+#line 2857 "Gmsh.y"
     { (yyval.d) = ceil((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 283:
-#line 2848 "Gmsh.y"
+#line 2858 "Gmsh.y"
     { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;}
     break;
 
   case 284:
-#line 2849 "Gmsh.y"
+#line 2859 "Gmsh.y"
     { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;}
     break;
 
   case 285:
-#line 2850 "Gmsh.y"
+#line 2860 "Gmsh.y"
     { (yyval.d) = sqrt((yyvsp[(3) - (6)].d)*(yyvsp[(3) - (6)].d)+(yyvsp[(5) - (6)].d)*(yyvsp[(5) - (6)].d)); ;}
     break;
 
   case 286:
-#line 2851 "Gmsh.y"
+#line 2861 "Gmsh.y"
     { (yyval.d) = (yyvsp[(3) - (4)].d)*(double)rand()/(double)RAND_MAX; ;}
     break;
 
   case 287:
-#line 2860 "Gmsh.y"
+#line 2870 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (1)].d); ;}
     break;
 
   case 288:
-#line 2861 "Gmsh.y"
+#line 2871 "Gmsh.y"
     { (yyval.d) = 3.141592653589793; ;}
     break;
 
   case 289:
-#line 2862 "Gmsh.y"
+#line 2872 "Gmsh.y"
     { (yyval.d) = ParUtil::Instance()->rank(); ;}
     break;
 
   case 290:
-#line 2863 "Gmsh.y"
+#line 2873 "Gmsh.y"
     { (yyval.d) = ParUtil::Instance()->size(); ;}
     break;
 
   case 291:
-#line 2864 "Gmsh.y"
+#line 2874 "Gmsh.y"
     { (yyval.d) = Get_GmshMajorVersion(); ;}
     break;
 
   case 292:
-#line 2865 "Gmsh.y"
+#line 2875 "Gmsh.y"
     { (yyval.d) = Get_GmshMinorVersion(); ;}
     break;
 
   case 293:
-#line 2866 "Gmsh.y"
+#line 2876 "Gmsh.y"
     { (yyval.d) = Get_GmshPatchVersion(); ;}
     break;
 
   case 294:
-#line 2871 "Gmsh.y"
+#line 2881 "Gmsh.y"
     {
       Symbol TheSymbol;
       TheSymbol.Name = (yyvsp[(1) - (1)].c);
@@ -7227,7 +7245,7 @@ yyreduce:
     break;
 
   case 295:
-#line 2887 "Gmsh.y"
+#line 2897 "Gmsh.y"
     {
       char tmpstring[1024];
       sprintf(tmpstring, "%s_%d", (yyvsp[(1) - (5)].c), (int)(yyvsp[(4) - (5)].d)) ;
@@ -7245,7 +7263,7 @@ yyreduce:
     break;
 
   case 296:
-#line 2902 "Gmsh.y"
+#line 2912 "Gmsh.y"
     {
       Symbol TheSymbol;
       TheSymbol.Name = (yyvsp[(1) - (4)].c);
@@ -7268,7 +7286,7 @@ yyreduce:
     break;
 
   case 297:
-#line 2922 "Gmsh.y"
+#line 2932 "Gmsh.y"
     {
       Symbol TheSymbol;
       TheSymbol.Name = (yyvsp[(2) - (4)].c);
@@ -7284,7 +7302,7 @@ yyreduce:
     break;
 
   case 298:
-#line 2935 "Gmsh.y"
+#line 2945 "Gmsh.y"
     {
       Symbol TheSymbol;
       TheSymbol.Name = (yyvsp[(1) - (2)].c);
@@ -7300,7 +7318,7 @@ yyreduce:
     break;
 
   case 299:
-#line 2948 "Gmsh.y"
+#line 2958 "Gmsh.y"
     {
       Symbol TheSymbol;
       TheSymbol.Name = (yyvsp[(1) - (5)].c);
@@ -7323,7 +7341,7 @@ yyreduce:
     break;
 
   case 300:
-#line 2971 "Gmsh.y"
+#line 2981 "Gmsh.y"
     {
       double (*pNumOpt)(int num, int action, double value);
       StringXNumber *pNumCat;
@@ -7344,7 +7362,7 @@ yyreduce:
     break;
 
   case 301:
-#line 2989 "Gmsh.y"
+#line 2999 "Gmsh.y"
     {
       double (*pNumOpt)(int num, int action, double value);
       StringXNumber *pNumCat;
@@ -7365,7 +7383,7 @@ yyreduce:
     break;
 
   case 302:
-#line 3007 "Gmsh.y"
+#line 3017 "Gmsh.y"
     {
       double (*pNumOpt)(int num, int action, double value);
       StringXNumber *pNumCat;
@@ -7386,7 +7404,7 @@ yyreduce:
     break;
 
   case 303:
-#line 3025 "Gmsh.y"
+#line 3035 "Gmsh.y"
     {
       double (*pNumOpt)(int num, int action, double value);
       StringXNumber *pNumCat;
@@ -7407,7 +7425,7 @@ yyreduce:
     break;
 
   case 304:
-#line 3043 "Gmsh.y"
+#line 3053 "Gmsh.y"
     { 
       (yyval.d) = GetValue((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].d));
       Free((yyvsp[(3) - (6)].c));
@@ -7415,70 +7433,70 @@ yyreduce:
     break;
 
   case 305:
-#line 3051 "Gmsh.y"
+#line 3061 "Gmsh.y"
     {
       memcpy((yyval.v), (yyvsp[(1) - (1)].v), 5*sizeof(double));
     ;}
     break;
 
   case 306:
-#line 3055 "Gmsh.y"
+#line 3065 "Gmsh.y"
     {
       for(int i = 0; i < 5; i++) (yyval.v)[i] = -(yyvsp[(2) - (2)].v)[i];
     ;}
     break;
 
   case 307:
-#line 3059 "Gmsh.y"
+#line 3069 "Gmsh.y"
     { 
       for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(2) - (2)].v)[i];
     ;}
     break;
 
   case 308:
-#line 3063 "Gmsh.y"
+#line 3073 "Gmsh.y"
     { 
       for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] - (yyvsp[(3) - (3)].v)[i];
     ;}
     break;
 
   case 309:
-#line 3067 "Gmsh.y"
+#line 3077 "Gmsh.y"
     {
       for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] + (yyvsp[(3) - (3)].v)[i];
     ;}
     break;
 
   case 310:
-#line 3074 "Gmsh.y"
+#line 3084 "Gmsh.y"
     { 
       (yyval.v)[0] = (yyvsp[(2) - (11)].d);  (yyval.v)[1] = (yyvsp[(4) - (11)].d);  (yyval.v)[2] = (yyvsp[(6) - (11)].d);  (yyval.v)[3] = (yyvsp[(8) - (11)].d); (yyval.v)[4] = (yyvsp[(10) - (11)].d);
     ;}
     break;
 
   case 311:
-#line 3078 "Gmsh.y"
+#line 3088 "Gmsh.y"
     { 
       (yyval.v)[0] = (yyvsp[(2) - (9)].d);  (yyval.v)[1] = (yyvsp[(4) - (9)].d);  (yyval.v)[2] = (yyvsp[(6) - (9)].d);  (yyval.v)[3] = (yyvsp[(8) - (9)].d); (yyval.v)[4] = 1.0;
     ;}
     break;
 
   case 312:
-#line 3082 "Gmsh.y"
+#line 3092 "Gmsh.y"
     {
       (yyval.v)[0] = (yyvsp[(2) - (7)].d);  (yyval.v)[1] = (yyvsp[(4) - (7)].d);  (yyval.v)[2] = (yyvsp[(6) - (7)].d);  (yyval.v)[3] = 0.0; (yyval.v)[4] = 1.0;
     ;}
     break;
 
   case 313:
-#line 3086 "Gmsh.y"
+#line 3096 "Gmsh.y"
     {
       (yyval.v)[0] = (yyvsp[(2) - (7)].d);  (yyval.v)[1] = (yyvsp[(4) - (7)].d);  (yyval.v)[2] = (yyvsp[(6) - (7)].d);  (yyval.v)[3] = 0.0; (yyval.v)[4] = 1.0;
     ;}
     break;
 
   case 314:
-#line 3093 "Gmsh.y"
+#line 3103 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(List_T*));
       List_Add((yyval.l), &((yyvsp[(1) - (1)].l)));
@@ -7486,14 +7504,14 @@ yyreduce:
     break;
 
   case 315:
-#line 3098 "Gmsh.y"
+#line 3108 "Gmsh.y"
     {
       List_Add((yyval.l), &((yyvsp[(3) - (3)].l)));
     ;}
     break;
 
   case 316:
-#line 3106 "Gmsh.y"
+#line 3116 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       List_Add((yyval.l), &((yyvsp[(1) - (1)].d)));
@@ -7501,14 +7519,14 @@ yyreduce:
     break;
 
   case 317:
-#line 3111 "Gmsh.y"
+#line 3121 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(1) - (1)].l);
     ;}
     break;
 
   case 318:
-#line 3115 "Gmsh.y"
+#line 3125 "Gmsh.y"
     {
       // creates an empty list
       (yyval.l) = List_Create(2, 1, sizeof(double));
@@ -7516,14 +7534,14 @@ yyreduce:
     break;
 
   case 319:
-#line 3120 "Gmsh.y"
+#line 3130 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(2) - (3)].l);
     ;}
     break;
 
   case 320:
-#line 3124 "Gmsh.y"
+#line 3134 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(3) - (4)].l);
       for(int i = 0; i < List_Nbr((yyval.l)); i++){
@@ -7534,7 +7552,7 @@ yyreduce:
     break;
 
   case 321:
-#line 3132 "Gmsh.y"
+#line 3142 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(4) - (5)].l);
       for(int i = 0; i < List_Nbr((yyval.l)); i++){
@@ -7545,7 +7563,7 @@ yyreduce:
     break;
 
   case 322:
-#line 3143 "Gmsh.y"
+#line 3153 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(2) - (2)].l);
       for(int i = 0; i < List_Nbr((yyval.l)); i++){
@@ -7556,7 +7574,7 @@ yyreduce:
     break;
 
   case 323:
-#line 3151 "Gmsh.y"
+#line 3161 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(3) - (3)].l);
       for(int i = 0; i < List_Nbr((yyval.l)); i++){
@@ -7567,7 +7585,7 @@ yyreduce:
     break;
 
   case 324:
-#line 3159 "Gmsh.y"
+#line 3169 "Gmsh.y"
     { 
       (yyval.l) = List_Create(2, 1, sizeof(double)); 
       for(double d = (yyvsp[(1) - (3)].d); ((yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d)) ? (d <= (yyvsp[(3) - (3)].d)) : (d >= (yyvsp[(3) - (3)].d)); ((yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d)) ? (d += 1.) : (d -= 1.)) 
@@ -7576,7 +7594,7 @@ yyreduce:
     break;
 
   case 325:
-#line 3165 "Gmsh.y"
+#line 3175 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double)); 
       if(!(yyvsp[(5) - (5)].d) || ((yyvsp[(1) - (5)].d) < (yyvsp[(3) - (5)].d) && (yyvsp[(5) - (5)].d) < 0) || ((yyvsp[(1) - (5)].d) > (yyvsp[(3) - (5)].d) && (yyvsp[(5) - (5)].d) > 0)){
@@ -7590,7 +7608,7 @@ yyreduce:
     break;
 
   case 326:
-#line 3176 "Gmsh.y"
+#line 3186 "Gmsh.y"
     {
       // Returns the coordinates of a point and fills a list with it.
       // This allows to ensure e.g. that relative point positions are
@@ -7613,7 +7631,7 @@ yyreduce:
     break;
 
   case 327:
-#line 3196 "Gmsh.y"
+#line 3206 "Gmsh.y"
     {
       (yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double));
       for(int i = 0; i < List_Nbr((yyvsp[(1) - (1)].l)); i++){
@@ -7626,7 +7644,7 @@ yyreduce:
     break;
 
   case 328:
-#line 3206 "Gmsh.y"
+#line 3216 "Gmsh.y"
     {
       (yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double));
       for(int i = 0; i < List_Nbr((yyvsp[(1) - (1)].l)); i++){
@@ -7639,7 +7657,7 @@ yyreduce:
     break;
 
   case 329:
-#line 3216 "Gmsh.y"
+#line 3226 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       Symbol TheSymbol;
@@ -7659,7 +7677,7 @@ yyreduce:
     break;
 
   case 330:
-#line 3233 "Gmsh.y"
+#line 3243 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       Symbol TheSymbol;
@@ -7686,7 +7704,7 @@ yyreduce:
     break;
 
   case 331:
-#line 3260 "Gmsh.y"
+#line 3270 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       List_Add((yyval.l), &((yyvsp[(1) - (1)].d)));
@@ -7694,21 +7712,21 @@ yyreduce:
     break;
 
   case 332:
-#line 3265 "Gmsh.y"
+#line 3275 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(1) - (1)].l);
     ;}
     break;
 
   case 333:
-#line 3269 "Gmsh.y"
+#line 3279 "Gmsh.y"
     {
       List_Add((yyval.l), &((yyvsp[(3) - (3)].d)));
     ;}
     break;
 
   case 334:
-#line 3273 "Gmsh.y"
+#line 3283 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (3)].l)); i++){
 	double d;
@@ -7720,21 +7738,21 @@ yyreduce:
     break;
 
   case 335:
-#line 3286 "Gmsh.y"
+#line 3296 "Gmsh.y"
     {
       (yyval.u) = CTX.PACK_COLOR((int)(yyvsp[(2) - (9)].d), (int)(yyvsp[(4) - (9)].d), (int)(yyvsp[(6) - (9)].d), (int)(yyvsp[(8) - (9)].d));
     ;}
     break;
 
   case 336:
-#line 3290 "Gmsh.y"
+#line 3300 "Gmsh.y"
     {
       (yyval.u) = CTX.PACK_COLOR((int)(yyvsp[(2) - (7)].d), (int)(yyvsp[(4) - (7)].d), (int)(yyvsp[(6) - (7)].d), 255);
     ;}
     break;
 
   case 337:
-#line 3302 "Gmsh.y"
+#line 3312 "Gmsh.y"
     {
       int flag;
       (yyval.u) = Get_ColorForString(ColorString, -1, (yyvsp[(1) - (1)].c), &flag);
@@ -7744,7 +7762,7 @@ yyreduce:
     break;
 
   case 338:
-#line 3309 "Gmsh.y"
+#line 3319 "Gmsh.y"
     {
       unsigned int (*pColOpt)(int num, int action, unsigned int value);
       StringXColor *pColCat;
@@ -7765,14 +7783,14 @@ yyreduce:
     break;
 
   case 339:
-#line 3330 "Gmsh.y"
+#line 3340 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(2) - (3)].l);
     ;}
     break;
 
   case 340:
-#line 3334 "Gmsh.y"
+#line 3344 "Gmsh.y"
     {
       (yyval.l) = List_Create(256, 10, sizeof(unsigned int));
       GmshColorTable *ct = Get_ColorTable((int)(yyvsp[(3) - (6)].d));
@@ -7787,7 +7805,7 @@ yyreduce:
     break;
 
   case 341:
-#line 3349 "Gmsh.y"
+#line 3359 "Gmsh.y"
     {
       (yyval.l) = List_Create(256, 10, sizeof(unsigned int));
       List_Add((yyval.l), &((yyvsp[(1) - (1)].u)));
@@ -7795,35 +7813,35 @@ yyreduce:
     break;
 
   case 342:
-#line 3354 "Gmsh.y"
+#line 3364 "Gmsh.y"
     {
       List_Add((yyval.l), &((yyvsp[(3) - (3)].u)));
     ;}
     break;
 
   case 343:
-#line 3361 "Gmsh.y"
+#line 3371 "Gmsh.y"
     {
       (yyval.c) = (yyvsp[(1) - (1)].c);
     ;}
     break;
 
   case 344:
-#line 3365 "Gmsh.y"
+#line 3375 "Gmsh.y"
     {
       Msg(WARNING, "Named string expressions not implemented yet");
     ;}
     break;
 
   case 345:
-#line 3372 "Gmsh.y"
+#line 3382 "Gmsh.y"
     {
       (yyval.c) = (yyvsp[(1) - (1)].c);
     ;}
     break;
 
   case 346:
-#line 3376 "Gmsh.y"
+#line 3386 "Gmsh.y"
     {
       (yyval.c) = (char *)Malloc(32*sizeof(char));
       time_t now;
@@ -7834,7 +7852,7 @@ yyreduce:
     break;
 
   case 347:
-#line 3384 "Gmsh.y"
+#line 3394 "Gmsh.y"
     {
       (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (6)].c))+strlen((yyvsp[(5) - (6)].c))+1)*sizeof(char));
       strcpy((yyval.c), (yyvsp[(3) - (6)].c));
@@ -7845,7 +7863,7 @@ yyreduce:
     break;
 
   case 348:
-#line 3392 "Gmsh.y"
+#line 3402 "Gmsh.y"
     {
       (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c))+1)*sizeof(char));
       int i;
@@ -7862,7 +7880,7 @@ yyreduce:
     break;
 
   case 349:
-#line 3406 "Gmsh.y"
+#line 3416 "Gmsh.y"
     {
       (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c))+1)*sizeof(char));
       int i;
@@ -7879,14 +7897,14 @@ yyreduce:
     break;
 
   case 350:
-#line 3420 "Gmsh.y"
+#line 3430 "Gmsh.y"
     {
       (yyval.c) = (yyvsp[(3) - (4)].c);
     ;}
     break;
 
   case 351:
-#line 3424 "Gmsh.y"
+#line 3434 "Gmsh.y"
     {
       char tmpstring[1024];
       int i = PrintListOfDouble((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].l), tmpstring);
@@ -7908,7 +7926,7 @@ yyreduce:
     break;
 
   case 352:
-#line 3443 "Gmsh.y"
+#line 3453 "Gmsh.y"
     { 
       char* (*pStrOpt)(int num, int action, char *value);
       StringXString *pStrCat;
@@ -7933,7 +7951,7 @@ yyreduce:
     break;
 
   case 353:
-#line 3465 "Gmsh.y"
+#line 3475 "Gmsh.y"
     { 
       char* (*pStrOpt)(int num, int action, char *value);
       StringXString *pStrCat;
@@ -7959,7 +7977,7 @@ yyreduce:
 
 
 /* Line 1267 of yacc.c.  */
-#line 7963 "Gmsh.tab.cpp"
+#line 7981 "Gmsh.tab.cpp"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -8173,7 +8191,7 @@ yyreturn:
 }
 
 
-#line 3488 "Gmsh.y"
+#line 3498 "Gmsh.y"
 
 
 void DeleteSymbol(void *a, void *b){
@@ -8229,8 +8247,8 @@ int PrintListOfDouble(char *format, List_T *list, char *buffer){
 }
 
 void yyerror(char *s){
-  Msg(GERROR, "'%s', line %d : %s (%s)", yyname, yylineno-1, s, yytext);
-  yyerrorstate++;
+  Msg(GERROR, "'%s', line %d : %s (%s)", gmsh_yyname, gmsh_yylineno - 1, s, gmsh_yytext);
+  gmsh_yyerrorstate++;
 }
 
 void yymsg(int type, char *fmt, ...){
@@ -8241,8 +8259,8 @@ void yymsg(int type, char *fmt, ...){
   vsprintf (tmp, fmt, args);
   va_end (args);
 
-  Msg(type, "'%s', line %d : %s", yyname, yylineno-1, tmp);
+  Msg(type, "'%s', line %d : %s", gmsh_yyname, gmsh_yylineno - 1, tmp);
 
-  if(type == GERROR) yyerrorstate++;
+  if(type == GERROR) gmsh_yyerrorstate++;
 }
 
diff --git a/Parser/Gmsh.tab.hpp b/Parser/Gmsh.tab.hpp
index 68b9d1b761256aa93896a82f63507e01e522f955..7bd919c540445a6a148a0741270c8955b0cc7db2 100644
--- a/Parser/Gmsh.tab.hpp
+++ b/Parser/Gmsh.tab.hpp
@@ -316,5 +316,5 @@ typedef union YYSTYPE
 # define YYSTYPE_IS_TRIVIAL 1
 #endif
 
-extern YYSTYPE yylval;
+extern YYSTYPE gmsh_yylval;
 
diff --git a/Parser/Gmsh.y b/Parser/Gmsh.y
index 205966329a4b12537ed4739e749a53a5429de6b3..4182ba81fad432a4d8dc2506e12b382f3e6b2108 100644
--- a/Parser/Gmsh.y
+++ b/Parser/Gmsh.y
@@ -1,5 +1,5 @@
 %{
-// $Id: Gmsh.y,v 1.294 2008-01-19 22:06:07 geuzaine Exp $
+// $Id: Gmsh.y,v 1.295 2008-01-20 10:10:44 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -248,8 +248,8 @@ View :
     { 
       if(!strcmp($1, "View") && ViewData->finalize()){
 	ViewData->setName($2);
-	ViewData->setFileName(yyname);
-	ViewData->setFileIndex(yyviewindex++);
+	ViewData->setFileName(gmsh_yyname);
+	ViewData->setFileIndex(gmsh_yyviewindex++);
 	if(ViewData->adaptive){
 	  ViewData->adaptive->setGlobalResolutionLevel
 	    (ViewData, PViewOptions::reference.MaxRecursionLevel);
@@ -265,7 +265,7 @@ View :
     {
       if(!strcmp($2, "View")){
 	int index = (int)$4;
-	if(index >= 0 && index < PView::list.size())
+	if(index >= 0 && index < (int)PView::list.size())
 	  new PView(PView::list[index], false);
       }
       Free($2);
@@ -274,7 +274,7 @@ View :
     {
       if(!strcmp($2, "View")){
 	int index = (int)$4;
-	if(index >= 0 && index < PView::list.size())
+	if(index >= 0 && index < (int)PView::list.size())
 	  new PView(PView::list[index], true);
       }
       Free($2);
@@ -1059,7 +1059,7 @@ Shape :
   | tPostView tField '(' FExpr ')' tAFFECT FExpr tEND 
     {
       int index = (int)$7;
-      if(index >= 0 && index < PView::list.size()) 
+      if(index >= 0 && index < (int)PView::list.size()) 
         fields.insert(new PostViewField(PView::list[index]), (int)$4);
       else
         yymsg(GERROR, "Field %i error, view %i does not exist", (int)$4, (int)$7);
@@ -1517,19 +1517,25 @@ Shape :
   | tEuclidian tCoordinates tEND
     {
       myGmshSurface = 0;
+      $$.Type = 0;
+      $$.Num = 0;
     }  
   | tCoordinates tSurface FExpr tEND
     {
-      myGmshSurface = gmshSurface :: surfaceByTag ( (int) $3);
+      myGmshSurface = gmshSurface::surfaceByTag((int)$3);
+      $$.Type = 0;
+      $$.Num = 0;
     }  
   | tParametric tSurface '(' FExpr ')' tAFFECT tBIGSTR tBIGSTR tBIGSTR tEND
     {
-      int num = (int)$4, type = 0;
-      myGmshSurface = gmshParametricSurface::NewParametricSurface ((int)$4,$7,$8,$9);
+      int num = (int)$4;
+      myGmshSurface = gmshParametricSurface::NewParametricSurface(num, $7, $8, $9);
+      $$.Type = 0;
+      $$.Num = num;
     }
   | tSphere '(' FExpr ')' tAFFECT ListOfDouble tEND
     {
-      int num = (int)$3, type = 0;
+      int num = (int)$3;
       if (List_Nbr($6) != 2){
 	yymsg(GERROR, "Sphere %d has to be defined using 2 points (center + "
 	      "any point) and not %d", num, List_Nbr($6));
@@ -1548,10 +1554,12 @@ Shape :
 		(v2->Pos.Y - v1->Pos.Y) * (v2->Pos.Y - v1->Pos.Y) +
 		(v2->Pos.Z - v1->Pos.Z) * (v2->Pos.Z - v1->Pos.Z)));
       }      
+      $$.Type = 0;
+      $$.Num = num;
     }
   | tPolarSphere '(' FExpr ')' tAFFECT ListOfDouble tEND
     {
-      int num = (int)$3, type = 0;
+      int num = (int)$3;
       if (List_Nbr($6) != 2){
 	yymsg(GERROR, "PolarSphere %d has to be defined using 2 points (center + "
 	      "any point) and not %d", num, List_Nbr($6));
@@ -1570,6 +1578,8 @@ Shape :
 		(v2->Pos.Y - v1->Pos.Y) * (v2->Pos.Y - v1->Pos.Y) +
 		(v2->Pos.Z - v1->Pos.Z) * (v2->Pos.Z - v1->Pos.Z)));
       }      
+      $$.Type = 0;
+      $$.Num = num;
     }
   | tSurface tLoop '(' FExpr ')' tAFFECT ListOfDouble tEND
     {
@@ -1831,7 +1841,7 @@ Delete :
     {
       if(!strcmp($2, "View")){
 	int index = (int)$4;
-	if(index >= 0 && index < PView::list.size())
+	if(index >= 0 && index < (int)PView::list.size())
 	  delete PView::list[index];
 	else
 	  yymsg(GERROR, "Unknown view %d", index);
@@ -1972,7 +1982,7 @@ Command :
     {
       if(!strcmp($1, "Save") && !strcmp($2, "View")){
 	int index = (int)$4;
-	if(index >= 0 && index < PView::list.size()){
+	if(index >= 0 && index < (int)PView::list.size()){
 	  char tmpstring[1024];
 	  FixRelativePath($6, tmpstring);
 	  PView::list[index]->write(tmpstring, CTX.post.file_format);
@@ -1988,7 +1998,7 @@ Command :
     {
       if(!strcmp($1, "Background") && !strcmp($2, "Mesh")  && !strcmp($3, "View")){
 	int index = (int)$5;
-	if(index >= 0 && index < PView::list.size()){
+	if(index >= 0 && index < (int)PView::list.size()){
 	  Field *field = new PostViewField(PView::list[index]);
 	  fields.insert(field);
 	  BGMAddField(field);
@@ -2083,8 +2093,8 @@ Loop :
       LoopControlVariablesTab[ImbricatedLoop][1] = $5;
       LoopControlVariablesTab[ImbricatedLoop][2] = 1.0;
       LoopControlVariablesNameTab[ImbricatedLoop] = NULL;
-      fgetpos(yyin, &yyposImbricatedLoopsTab[ImbricatedLoop]);
-      yylinenoImbricatedLoopsTab[ImbricatedLoop] = yylineno;
+      fgetpos(gmsh_yyin, &yyposImbricatedLoopsTab[ImbricatedLoop]);
+      yylinenoImbricatedLoopsTab[ImbricatedLoop] = gmsh_yylineno;
       ImbricatedLoop++;
       if(ImbricatedLoop > MAX_RECUR_LOOPS-1){
 	yymsg(GERROR, "Reached maximum number of imbricated loops");
@@ -2098,8 +2108,8 @@ Loop :
       LoopControlVariablesTab[ImbricatedLoop][1] = $5;
       LoopControlVariablesTab[ImbricatedLoop][2] = $7;
       LoopControlVariablesNameTab[ImbricatedLoop] = NULL;
-      fgetpos(yyin, &yyposImbricatedLoopsTab[ImbricatedLoop]);
-      yylinenoImbricatedLoopsTab[ImbricatedLoop] = yylineno;
+      fgetpos(gmsh_yyin, &yyposImbricatedLoopsTab[ImbricatedLoop]);
+      yylinenoImbricatedLoopsTab[ImbricatedLoop] = gmsh_yylineno;
       ImbricatedLoop++;
       if(ImbricatedLoop > MAX_RECUR_LOOPS-1){
 	yymsg(GERROR, "Reached maximum number of imbricated loops");
@@ -2124,8 +2134,8 @@ Loop :
       }
       else
 	List_Write(pSymbol->val, 0, &$5);
-      fgetpos(yyin, &yyposImbricatedLoopsTab[ImbricatedLoop]);
-      yylinenoImbricatedLoopsTab[ImbricatedLoop] = yylineno;
+      fgetpos(gmsh_yyin, &yyposImbricatedLoopsTab[ImbricatedLoop]);
+      yylinenoImbricatedLoopsTab[ImbricatedLoop] = gmsh_yylineno;
       ImbricatedLoop++;
       if(ImbricatedLoop > MAX_RECUR_LOOPS-1){
 	yymsg(GERROR, "Reached maximum number of imbricated loops");
@@ -2149,8 +2159,8 @@ Loop :
       }
       else
 	List_Write(pSymbol->val, 0, &$5);
-      fgetpos(yyin, &yyposImbricatedLoopsTab[ImbricatedLoop]);
-      yylinenoImbricatedLoopsTab[ImbricatedLoop] = yylineno;
+      fgetpos(gmsh_yyin, &yyposImbricatedLoopsTab[ImbricatedLoop]);
+      yylinenoImbricatedLoopsTab[ImbricatedLoop] = gmsh_yylineno;
       ImbricatedLoop++;
       if(ImbricatedLoop > MAX_RECUR_LOOPS-1){
 	yymsg(GERROR, "Reached maximum number of imbricated loops");
@@ -2183,8 +2193,8 @@ Loop :
 	      *(double*)List_Pointer_Fast(pSymbol->val, 0) += 
 		LoopControlVariablesTab[ImbricatedLoop-1][2];
 	  }
-	  fsetpos(yyin, &yyposImbricatedLoopsTab[ImbricatedLoop-1]);
-	  yylineno = yylinenoImbricatedLoopsTab[ImbricatedLoop-1];
+	  fsetpos(gmsh_yyin, &yyposImbricatedLoopsTab[ImbricatedLoop-1]);
+	  gmsh_yylineno = yylinenoImbricatedLoopsTab[ImbricatedLoop-1];
 	}
 	else
 	  ImbricatedLoop--;
@@ -2192,19 +2202,19 @@ Loop :
     }
   | tFunction tSTRING
     {
-      if(!FunctionManager::Instance()->createFunction($2, yyin, yyname, yylineno))
+      if(!FunctionManager::Instance()->createFunction($2, gmsh_yyin, gmsh_yyname, gmsh_yylineno))
 	yymsg(GERROR, "Redefinition of function %s", $2);
       skip_until(NULL, "Return");
       //FIXME: wee leak $2
     }
   | tReturn
     {
-      if(!FunctionManager::Instance()->leaveFunction(&yyin, yyname, yylineno))
+      if(!FunctionManager::Instance()->leaveFunction(&gmsh_yyin, gmsh_yyname, gmsh_yylineno))
 	yymsg(GERROR, "Error while exiting function");
     } 
   | tCall tSTRING tEND
     {
-      if(!FunctionManager::Instance()->enterFunction($2, &yyin, yyname, yylineno))
+      if(!FunctionManager::Instance()->enterFunction($2, &gmsh_yyin, gmsh_yyname, gmsh_yylineno))
 	yymsg(GERROR, "Unknown function %s", $2);
       //FIXME: wee leak $2
     } 
@@ -3540,8 +3550,8 @@ int PrintListOfDouble(char *format, List_T *list, char *buffer){
 }
 
 void yyerror(char *s){
-  Msg(GERROR, "'%s', line %d : %s (%s)", yyname, yylineno-1, s, yytext);
-  yyerrorstate++;
+  Msg(GERROR, "'%s', line %d : %s (%s)", gmsh_yyname, gmsh_yylineno - 1, s, gmsh_yytext);
+  gmsh_yyerrorstate++;
 }
 
 void yymsg(int type, char *fmt, ...){
@@ -3552,7 +3562,7 @@ void yymsg(int type, char *fmt, ...){
   vsprintf (tmp, fmt, args);
   va_end (args);
 
-  Msg(type, "'%s', line %d : %s", yyname, yylineno-1, tmp);
+  Msg(type, "'%s', line %d : %s", gmsh_yyname, gmsh_yylineno - 1, tmp);
 
-  if(type == GERROR) yyerrorstate++;
+  if(type == GERROR) gmsh_yyerrorstate++;
 }
diff --git a/Parser/Gmsh.yy.cpp b/Parser/Gmsh.yy.cpp
index 6822dd0d80e9a1f42363d2f2c7a4b58387cd4116..02aeedb46d3701a748a824064910ebe0e00ca4cb 100644
--- a/Parser/Gmsh.yy.cpp
+++ b/Parser/Gmsh.yy.cpp
@@ -134,7 +134,7 @@ typedef unsigned int flex_uint32_t;
 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
 
 /* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart(yyin  )
+#define YY_NEW_FILE gmsh_yyrestart(gmsh_yyin  )
 
 #define YY_END_OF_BUFFER_CHAR 0
 
@@ -152,9 +152,9 @@ typedef unsigned int flex_uint32_t;
 typedef struct yy_buffer_state *YY_BUFFER_STATE;
 #endif
 
-extern int yyleng;
+extern int gmsh_yyleng;
 
-extern FILE *yyin, *yyout;
+extern FILE *gmsh_yyin, *gmsh_yyout;
 
 #define EOB_ACT_CONTINUE_SCAN 0
 #define EOB_ACT_END_OF_FILE 1
@@ -166,13 +166,13 @@ extern FILE *yyin, *yyout;
 #define yyless(n) \
 	do \
 		{ \
-		/* Undo effects of setting up yytext. */ \
+		/* Undo effects of setting up gmsh_yytext. */ \
         int yyless_macro_arg = (n); \
         YY_LESS_LINENO(yyless_macro_arg);\
 		*yy_cp = (yy_hold_char); \
 		YY_RESTORE_YY_MORE_OFFSET \
 		(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
-		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+		YY_DO_BEFORE_ACTION; /* set up gmsh_yytext again */ \
 		} \
 	while ( 0 )
 
@@ -245,8 +245,8 @@ struct yy_buffer_state
 	 * possible backing-up.
 	 *
 	 * When we actually see the EOF, we change the status to "new"
-	 * (via yyrestart()), so that the user can continue scanning by
-	 * just pointing yyin at a new input file.
+	 * (via gmsh_yyrestart()), so that the user can continue scanning by
+	 * just pointing gmsh_yyin at a new input file.
 	 */
 #define YY_BUFFER_EOF_PENDING 2
 
@@ -273,51 +273,51 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
  */
 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
 
-/* yy_hold_char holds the character lost when yytext is formed. */
+/* yy_hold_char holds the character lost when gmsh_yytext is formed. */
 static char yy_hold_char;
 static int yy_n_chars;		/* number of characters read into yy_ch_buf */
-int yyleng;
+int gmsh_yyleng;
 
 /* Points to current character in buffer. */
 static char *yy_c_buf_p = (char *) 0;
 static int yy_init = 0;		/* whether we need to initialize */
 static int yy_start = 0;	/* start state number */
 
-/* Flag which is used to allow yywrap()'s to do buffer switches
- * instead of setting up a fresh yyin.  A bit of a hack ...
+/* Flag which is used to allow gmsh_yywrap()'s to do buffer switches
+ * instead of setting up a fresh gmsh_yyin.  A bit of a hack ...
  */
 static int yy_did_buffer_switch_on_eof;
 
-void yyrestart (FILE *input_file  );
-void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
-YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  );
-void yy_delete_buffer (YY_BUFFER_STATE b  );
-void yy_flush_buffer (YY_BUFFER_STATE b  );
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer  );
-void yypop_buffer_state (void );
+void gmsh_yyrestart (FILE *input_file  );
+void gmsh_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
+YY_BUFFER_STATE gmsh_yy_create_buffer (FILE *file,int size  );
+void gmsh_yy_delete_buffer (YY_BUFFER_STATE b  );
+void gmsh_yy_flush_buffer (YY_BUFFER_STATE b  );
+void gmsh_yypush_buffer_state (YY_BUFFER_STATE new_buffer  );
+void gmsh_yypop_buffer_state (void );
 
-static void yyensure_buffer_stack (void );
-static void yy_load_buffer_state (void );
-static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file  );
+static void gmsh_yyensure_buffer_stack (void );
+static void gmsh_yy_load_buffer_state (void );
+static void gmsh_yy_init_buffer (YY_BUFFER_STATE b,FILE *file  );
 
-#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
+#define YY_FLUSH_BUFFER gmsh_yy_flush_buffer(YY_CURRENT_BUFFER )
 
-YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size  );
-YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  );
-YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len  );
+YY_BUFFER_STATE gmsh_yy_scan_buffer (char *base,yy_size_t size  );
+YY_BUFFER_STATE gmsh_yy_scan_string (yyconst char *yy_str  );
+YY_BUFFER_STATE gmsh_yy_scan_bytes (yyconst char *bytes,int len  );
 
-void *yyalloc (yy_size_t  );
-void *yyrealloc (void *,yy_size_t  );
-void yyfree (void *  );
+void *gmsh_yyalloc (yy_size_t  );
+void *gmsh_yyrealloc (void *,yy_size_t  );
+void gmsh_yyfree (void *  );
 
-#define yy_new_buffer yy_create_buffer
+#define yy_new_buffer gmsh_yy_create_buffer
 
 #define yy_set_interactive(is_interactive) \
 	{ \
 	if ( ! YY_CURRENT_BUFFER ){ \
-        yyensure_buffer_stack (); \
+        gmsh_yyensure_buffer_stack (); \
 		YY_CURRENT_BUFFER_LVALUE =    \
-            yy_create_buffer(yyin,YY_BUF_SIZE ); \
+            gmsh_yy_create_buffer(gmsh_yyin,YY_BUF_SIZE ); \
 	} \
 	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
 	}
@@ -325,9 +325,9 @@ void yyfree (void *  );
 #define yy_set_bol(at_bol) \
 	{ \
 	if ( ! YY_CURRENT_BUFFER ){\
-        yyensure_buffer_stack (); \
+        gmsh_yyensure_buffer_stack (); \
 		YY_CURRENT_BUFFER_LVALUE =    \
-            yy_create_buffer(yyin,YY_BUF_SIZE ); \
+            gmsh_yy_create_buffer(gmsh_yyin,YY_BUF_SIZE ); \
 	} \
 	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
 	}
@@ -338,16 +338,16 @@ void yyfree (void *  );
 
 typedef unsigned char YY_CHAR;
 
-FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+FILE *gmsh_yyin = (FILE *) 0, *gmsh_yyout = (FILE *) 0;
 
 typedef int yy_state_type;
 
-extern int yylineno;
+extern int gmsh_yylineno;
 
-int yylineno = 1;
+int gmsh_yylineno = 1;
 
-extern char *yytext;
-#define yytext_ptr yytext
+extern char *gmsh_yytext;
+#define yytext_ptr gmsh_yytext
 
 static yy_state_type yy_get_previous_state (void );
 static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
@@ -355,11 +355,11 @@ static int yy_get_next_buffer (void );
 static void yy_fatal_error (yyconst char msg[]  );
 
 /* Done after the current pattern has been matched and before the
- * corresponding action - sets up yytext.
+ * corresponding action - sets up gmsh_yytext.
  */
 #define YY_DO_BEFORE_ACTION \
 	(yytext_ptr) = yy_bp; \
-	yyleng = (size_t) (yy_cp - yy_bp); \
+	gmsh_yyleng = (size_t) (yy_cp - yy_bp); \
 	(yy_hold_char) = *yy_cp; \
 	*yy_cp = '\0'; \
 	(yy_c_buf_p) = yy_cp;
@@ -834,8 +834,8 @@ static yyconst flex_int16_t yy_chk[835] =
 static yy_state_type yy_last_accepting_state;
 static char *yy_last_accepting_cpos;
 
-extern int yy_flex_debug;
-int yy_flex_debug = 0;
+extern int gmsh_yy_flex_debug;
+int gmsh_yy_flex_debug = 0;
 
 /* The intent behind this definition is that it'll catch
  * any uses of REJECT which flex missed.
@@ -844,10 +844,10 @@ int yy_flex_debug = 0;
 #define yymore() yymore_used_but_not_detected
 #define YY_MORE_ADJ 0
 #define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
+char *gmsh_yytext;
 #line 1 "Gmsh.l"
 #line 2 "Gmsh.l"
-// $Id: Gmsh.yy.cpp,v 1.341 2008-01-19 22:06:07 geuzaine Exp $
+// $Id: Gmsh.yy.cpp,v 1.342 2008-01-20 10:10:45 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -878,9 +878,9 @@ char *yytext;
 #include "Geo.h"
 #include "Gmsh.tab.hpp"
 
-char yyname[256] = "";
-int  yyerrorstate = 0;
-int  yyviewindex = 0;
+char gmsh_yyname[256] = "";
+int  gmsh_yyerrorstate = 0;
+int  gmsh_yyviewindex = 0;
 
 void   parsestring(char endchar);
 char  *strsave(char *ptr);
@@ -891,13 +891,13 @@ void   skipline(void);
      {									\
        int c = '*', n;							\
        for ( n = 0; n < max_size &&					\
-	       (c = getc( yyin )) != EOF && c != '\n'; ++n )		\
+	       (c = getc( gmsh_yyin )) != EOF && c != '\n'; ++n )		\
 	 buf[n] = (char) c;						\
        if ( c == '\n' ){						\
 	 buf[n++] = (char) c;						\
-	 yylineno++;							\
+	 gmsh_yylineno++;							\
        }								\
-       if ( c == EOF && ferror( yyin ) )				\
+       if ( c == EOF && ferror( gmsh_yyin ) )				\
 	 Msg(FATAL, "Input in flex scanner failed");			\
        result = n;							\
      }									\
@@ -930,9 +930,9 @@ static int yy_init_globals (void );
 
 #ifndef YY_SKIP_YYWRAP
 #ifdef __cplusplus
-extern "C" int yywrap (void );
+extern "C" int gmsh_yywrap (void );
 #else
-extern int yywrap (void );
+extern int gmsh_yywrap (void );
 #endif
 #endif
 
@@ -966,7 +966,7 @@ static int input (void );
 /* This used to be an fputs(), but since the string might contain NUL's,
  * we now use fwrite().
  */
-#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
+#define ECHO (void) fwrite( gmsh_yytext, gmsh_yyleng, 1, gmsh_yyout )
 #endif
 
 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
@@ -979,18 +979,18 @@ static int input (void );
 		int c = '*'; \
 		size_t n; \
 		for ( n = 0; n < max_size && \
-			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+			     (c = getc( gmsh_yyin )) != EOF && c != '\n'; ++n ) \
 			buf[n] = (char) c; \
 		if ( c == '\n' ) \
 			buf[n++] = (char) c; \
-		if ( c == EOF && ferror( yyin ) ) \
+		if ( c == EOF && ferror( gmsh_yyin ) ) \
 			YY_FATAL_ERROR( "input in flex scanner failed" ); \
 		result = n; \
 		} \
 	else \
 		{ \
 		errno=0; \
-		while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
+		while ( (result = fread(buf, 1, max_size, gmsh_yyin))==0 && ferror(gmsh_yyin)) \
 			{ \
 			if( errno != EINTR) \
 				{ \
@@ -998,7 +998,7 @@ static int input (void );
 				break; \
 				} \
 			errno=0; \
-			clearerr(yyin); \
+			clearerr(gmsh_yyin); \
 			} \
 		}\
 \
@@ -1031,12 +1031,12 @@ static int input (void );
 #ifndef YY_DECL
 #define YY_DECL_IS_OURS 1
 
-extern int yylex (void);
+extern int gmsh_yylex (void);
 
-#define YY_DECL int yylex (void)
+#define YY_DECL int gmsh_yylex (void)
 #endif /* !YY_DECL */
 
-/* Code executed at the beginning of each rule, after yytext and yyleng
+/* Code executed at the beginning of each rule, after gmsh_yytext and gmsh_yyleng
  * have been set up.
  */
 #ifndef YY_USER_ACTION
@@ -1075,26 +1075,26 @@ YY_DECL
 		if ( ! (yy_start) )
 			(yy_start) = 1;	/* first start state */
 
-		if ( ! yyin )
-			yyin = stdin;
+		if ( ! gmsh_yyin )
+			gmsh_yyin = stdin;
 
-		if ( ! yyout )
-			yyout = stdout;
+		if ( ! gmsh_yyout )
+			gmsh_yyout = stdout;
 
 		if ( ! YY_CURRENT_BUFFER ) {
-			yyensure_buffer_stack ();
+			gmsh_yyensure_buffer_stack ();
 			YY_CURRENT_BUFFER_LVALUE =
-				yy_create_buffer(yyin,YY_BUF_SIZE );
+				gmsh_yy_create_buffer(gmsh_yyin,YY_BUF_SIZE );
 		}
 
-		yy_load_buffer_state( );
+		gmsh_yy_load_buffer_state( );
 		}
 
 	while ( 1 )		/* loops until end-of-file is reached */
 		{
 		yy_cp = (yy_c_buf_p);
 
-		/* Support of yytext. */
+		/* Support of gmsh_yytext. */
 		*yy_cp = (yy_hold_char);
 
 		/* yy_bp points to the position in yy_ch_buf of the start of
@@ -1169,52 +1169,52 @@ skipline();
 case 5:
 YY_RULE_SETUP
 #line 76 "Gmsh.l"
-{parsestring('\"'); return tBIGSTR;}
+{ parsestring('\"'); return tBIGSTR; }
 	YY_BREAK
 case 6:
 YY_RULE_SETUP
 #line 77 "Gmsh.l"
-{parsestring('\''); return tBIGSTR;}
+{ parsestring('\''); return tBIGSTR; }
 	YY_BREAK
 case 7:
 YY_RULE_SETUP
 #line 78 "Gmsh.l"
-{yylval.d = NEWREG(); return tDOUBLE;}
+{ gmsh_yylval.d = NEWREG(); return tDOUBLE; }
 	YY_BREAK
 case 8:
 YY_RULE_SETUP
 #line 79 "Gmsh.l"
-{yylval.d = NEWPOINT(); return tDOUBLE;}
+{ gmsh_yylval.d = NEWPOINT(); return tDOUBLE; }
 	YY_BREAK
 case 9:
 YY_RULE_SETUP
 #line 80 "Gmsh.l"
-{yylval.d = NEWLINE(); return tDOUBLE;}
+{ gmsh_yylval.d = NEWLINE(); return tDOUBLE; }
 	YY_BREAK
 case 10:
 YY_RULE_SETUP
 #line 81 "Gmsh.l"
-{yylval.d = NEWLINE(); return tDOUBLE;}
+{ gmsh_yylval.d = NEWLINE(); return tDOUBLE; }
 	YY_BREAK
 case 11:
 YY_RULE_SETUP
 #line 82 "Gmsh.l"
-{yylval.d = NEWLINELOOP(); return tDOUBLE;}
+{ gmsh_yylval.d = NEWLINELOOP(); return tDOUBLE; }
 	YY_BREAK
 case 12:
 YY_RULE_SETUP
 #line 83 "Gmsh.l"
-{yylval.d = NEWSURFACE(); return tDOUBLE;}
+{ gmsh_yylval.d = NEWSURFACE(); return tDOUBLE; }
 	YY_BREAK
 case 13:
 YY_RULE_SETUP
 #line 84 "Gmsh.l"
-{yylval.d = NEWSURFACELOOP(); return tDOUBLE;}
+{ gmsh_yylval.d = NEWSURFACELOOP(); return tDOUBLE; }
 	YY_BREAK
 case 14:
 YY_RULE_SETUP
 #line 85 "Gmsh.l"
-{yylval.d = NEWVOLUME(); return tDOUBLE;}
+{ gmsh_yylval.d = NEWVOLUME(); return tDOUBLE; }
 	YY_BREAK
 case 15:
 YY_RULE_SETUP
@@ -1865,17 +1865,17 @@ case 145:
 case 146:
 YY_RULE_SETUP
 #line 239 "Gmsh.l"
-{yylval.d = atof((char *)yytext); return tDOUBLE;}
+{ gmsh_yylval.d = atof((char *)gmsh_yytext); return tDOUBLE; }
 	YY_BREAK
 case 147:
 YY_RULE_SETUP
 #line 241 "Gmsh.l"
-{yylval.c = strsave((char*)yytext); return tSTRING;}
+{ gmsh_yylval.c = strsave((char*)gmsh_yytext); return tSTRING; }
 	YY_BREAK
 case 148:
 YY_RULE_SETUP
 #line 243 "Gmsh.l"
-return yytext[0];
+return gmsh_yytext[0];
 	YY_BREAK
 case 149:
 YY_RULE_SETUP
@@ -1899,15 +1899,15 @@ case YY_STATE_EOF(INITIAL):
 			{
 			/* We're scanning a new file or input source.  It's
 			 * possible that this happened because the user
-			 * just pointed yyin at a new source and called
-			 * yylex().  If so, then we have to assure
+			 * just pointed gmsh_yyin at a new source and called
+			 * gmsh_yylex().  If so, then we have to assure
 			 * consistency between YY_CURRENT_BUFFER and our
 			 * globals.  Here is the right place to do so, because
 			 * this is the first action (other than possibly a
 			 * back-up) that will match for the new input source.
 			 */
 			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
-			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
+			YY_CURRENT_BUFFER_LVALUE->yy_input_file = gmsh_yyin;
 			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
 			}
 
@@ -1960,11 +1960,11 @@ case YY_STATE_EOF(INITIAL):
 				{
 				(yy_did_buffer_switch_on_eof) = 0;
 
-				if ( yywrap( ) )
+				if ( gmsh_yywrap( ) )
 					{
 					/* Note: because we've taken care in
 					 * yy_get_next_buffer() to have set up
-					 * yytext, we can now set up
+					 * gmsh_yytext, we can now set up
 					 * yy_c_buf_p so that if some total
 					 * hoser (like flex itself) wants to
 					 * call the scanner after we return the
@@ -2013,7 +2013,7 @@ case YY_STATE_EOF(INITIAL):
 			"fatal flex scanner internal error--no action found" );
 	} /* end of action switch */
 		} /* end of scanning one token */
-} /* end of yylex */
+} /* end of gmsh_yylex */
 
 /* yy_get_next_buffer - try to read in a new buffer
  *
@@ -2091,7 +2091,7 @@ static int yy_get_next_buffer (void)
 
 				b->yy_ch_buf = (char *)
 					/* Include room in for 2 EOB chars. */
-					yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
+					gmsh_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
 				}
 			else
 				/* Can't grow it, we don't own it. */
@@ -2123,7 +2123,7 @@ static int yy_get_next_buffer (void)
 		if ( number_to_move == YY_MORE_ADJ )
 			{
 			ret_val = EOB_ACT_END_OF_FILE;
-			yyrestart(yyin  );
+			gmsh_yyrestart(gmsh_yyin  );
 			}
 
 		else
@@ -2209,7 +2209,7 @@ static int yy_get_next_buffer (void)
     
     yy_cp = (yy_c_buf_p);
 
-	/* undo effects of setting up yytext */
+	/* undo effects of setting up gmsh_yytext */
 	*yy_cp = (yy_hold_char);
 
 	if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
@@ -2281,13 +2281,13 @@ static int yy_get_next_buffer (void)
 					 */
 
 					/* Reset buffer status. */
-					yyrestart(yyin );
+					gmsh_yyrestart(gmsh_yyin );
 
 					/*FALLTHROUGH*/
 
 				case EOB_ACT_END_OF_FILE:
 					{
-					if ( yywrap( ) )
+					if ( gmsh_yywrap( ) )
 						return 0;
 
 					if ( ! (yy_did_buffer_switch_on_eof) )
@@ -2307,7 +2307,7 @@ static int yy_get_next_buffer (void)
 		}
 
 	c = *(unsigned char *) (yy_c_buf_p);	/* cast for 8-bit char's */
-	*(yy_c_buf_p) = '\0';	/* preserve yytext */
+	*(yy_c_buf_p) = '\0';	/* preserve gmsh_yytext */
 	(yy_hold_char) = *++(yy_c_buf_p);
 
 	return c;
@@ -2319,32 +2319,32 @@ static int yy_get_next_buffer (void)
  * 
  * @note This function does not reset the start condition to @c INITIAL .
  */
-    void yyrestart  (FILE * input_file )
+    void gmsh_yyrestart  (FILE * input_file )
 {
     
 	if ( ! YY_CURRENT_BUFFER ){
-        yyensure_buffer_stack ();
+        gmsh_yyensure_buffer_stack ();
 		YY_CURRENT_BUFFER_LVALUE =
-            yy_create_buffer(yyin,YY_BUF_SIZE );
+            gmsh_yy_create_buffer(gmsh_yyin,YY_BUF_SIZE );
 	}
 
-	yy_init_buffer(YY_CURRENT_BUFFER,input_file );
-	yy_load_buffer_state( );
+	gmsh_yy_init_buffer(YY_CURRENT_BUFFER,input_file );
+	gmsh_yy_load_buffer_state( );
 }
 
 /** Switch to a different input buffer.
  * @param new_buffer The new input buffer.
  * 
  */
-    void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
+    void gmsh_yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
 {
     
 	/* TODO. We should be able to replace this entire function body
 	 * with
-	 *		yypop_buffer_state();
-	 *		yypush_buffer_state(new_buffer);
+	 *		gmsh_yypop_buffer_state();
+	 *		gmsh_yypush_buffer_state(new_buffer);
      */
-	yyensure_buffer_stack ();
+	gmsh_yyensure_buffer_stack ();
 	if ( YY_CURRENT_BUFFER == new_buffer )
 		return;
 
@@ -2357,21 +2357,21 @@ static int yy_get_next_buffer (void)
 		}
 
 	YY_CURRENT_BUFFER_LVALUE = new_buffer;
-	yy_load_buffer_state( );
+	gmsh_yy_load_buffer_state( );
 
 	/* We don't actually know whether we did this switch during
-	 * EOF (yywrap()) processing, but the only time this flag
-	 * is looked at is after yywrap() is called, so it's safe
+	 * EOF (gmsh_yywrap()) processing, but the only time this flag
+	 * is looked at is after gmsh_yywrap() is called, so it's safe
 	 * to go ahead and always set it.
 	 */
 	(yy_did_buffer_switch_on_eof) = 1;
 }
 
-static void yy_load_buffer_state  (void)
+static void gmsh_yy_load_buffer_state  (void)
 {
     	(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
 	(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
-	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+	gmsh_yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
 	(yy_hold_char) = *(yy_c_buf_p);
 }
 
@@ -2381,35 +2381,35 @@ static void yy_load_buffer_state  (void)
  * 
  * @return the allocated buffer state.
  */
-    YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
+    YY_BUFFER_STATE gmsh_yy_create_buffer  (FILE * file, int  size )
 {
 	YY_BUFFER_STATE b;
     
-	b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
+	b = (YY_BUFFER_STATE) gmsh_yyalloc(sizeof( struct yy_buffer_state )  );
 	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+		YY_FATAL_ERROR( "out of dynamic memory in gmsh_yy_create_buffer()" );
 
 	b->yy_buf_size = size;
 
 	/* yy_ch_buf has to be 2 characters longer than the size given because
 	 * we need to put in 2 end-of-buffer characters.
 	 */
-	b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2  );
+	b->yy_ch_buf = (char *) gmsh_yyalloc(b->yy_buf_size + 2  );
 	if ( ! b->yy_ch_buf )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+		YY_FATAL_ERROR( "out of dynamic memory in gmsh_yy_create_buffer()" );
 
 	b->yy_is_our_buffer = 1;
 
-	yy_init_buffer(b,file );
+	gmsh_yy_init_buffer(b,file );
 
 	return b;
 }
 
 /** Destroy the buffer.
- * @param b a buffer created with yy_create_buffer()
+ * @param b a buffer created with gmsh_yy_create_buffer()
  * 
  */
-    void yy_delete_buffer (YY_BUFFER_STATE  b )
+    void gmsh_yy_delete_buffer (YY_BUFFER_STATE  b )
 {
     
 	if ( ! b )
@@ -2419,9 +2419,9 @@ static void yy_load_buffer_state  (void)
 		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
 
 	if ( b->yy_is_our_buffer )
-		yyfree((void *) b->yy_ch_buf  );
+		gmsh_yyfree((void *) b->yy_ch_buf  );
 
-	yyfree((void *) b  );
+	gmsh_yyfree((void *) b  );
 }
 
 #ifndef __cplusplus
@@ -2430,20 +2430,20 @@ extern int isatty (int );
     
 /* Initializes or reinitializes a buffer.
  * This function is sometimes called more than once on the same buffer,
- * such as during a yyrestart() or at EOF.
+ * such as during a gmsh_yyrestart() or at EOF.
  */
-    static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
+    static void gmsh_yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
 
 {
 	int oerrno = errno;
     
-	yy_flush_buffer(b );
+	gmsh_yy_flush_buffer(b );
 
 	b->yy_input_file = file;
 	b->yy_fill_buffer = 1;
 
-    /* If b is the current buffer, then yy_init_buffer was _probably_
-     * called from yyrestart() or through yy_get_next_buffer.
+    /* If b is the current buffer, then gmsh_yy_init_buffer was _probably_
+     * called from gmsh_yyrestart() or through yy_get_next_buffer.
      * In that case, we don't want to reset the lineno or column.
      */
     if (b != YY_CURRENT_BUFFER){
@@ -2460,7 +2460,7 @@ extern int isatty (int );
  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
  * 
  */
-    void yy_flush_buffer (YY_BUFFER_STATE  b )
+    void gmsh_yy_flush_buffer (YY_BUFFER_STATE  b )
 {
     	if ( ! b )
 		return;
@@ -2480,7 +2480,7 @@ extern int isatty (int );
 	b->yy_buffer_status = YY_BUFFER_NEW;
 
 	if ( b == YY_CURRENT_BUFFER )
-		yy_load_buffer_state( );
+		gmsh_yy_load_buffer_state( );
 }
 
 /** Pushes the new state onto the stack. The new state becomes
@@ -2489,14 +2489,14 @@ extern int isatty (int );
  *  @param new_buffer The new state.
  *  
  */
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
+void gmsh_yypush_buffer_state (YY_BUFFER_STATE new_buffer )
 {
     	if (new_buffer == NULL)
 		return;
 
-	yyensure_buffer_stack();
+	gmsh_yyensure_buffer_stack();
 
-	/* This block is copied from yy_switch_to_buffer. */
+	/* This block is copied from gmsh_yy_switch_to_buffer. */
 	if ( YY_CURRENT_BUFFER )
 		{
 		/* Flush out information for old buffer. */
@@ -2510,8 +2510,8 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
 		(yy_buffer_stack_top)++;
 	YY_CURRENT_BUFFER_LVALUE = new_buffer;
 
-	/* copied from yy_switch_to_buffer. */
-	yy_load_buffer_state( );
+	/* copied from gmsh_yy_switch_to_buffer. */
+	gmsh_yy_load_buffer_state( );
 	(yy_did_buffer_switch_on_eof) = 1;
 }
 
@@ -2519,18 +2519,18 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
  *  The next element becomes the new top.
  *  
  */
-void yypop_buffer_state (void)
+void gmsh_yypop_buffer_state (void)
 {
     	if (!YY_CURRENT_BUFFER)
 		return;
 
-	yy_delete_buffer(YY_CURRENT_BUFFER );
+	gmsh_yy_delete_buffer(YY_CURRENT_BUFFER );
 	YY_CURRENT_BUFFER_LVALUE = NULL;
 	if ((yy_buffer_stack_top) > 0)
 		--(yy_buffer_stack_top);
 
 	if (YY_CURRENT_BUFFER) {
-		yy_load_buffer_state( );
+		gmsh_yy_load_buffer_state( );
 		(yy_did_buffer_switch_on_eof) = 1;
 	}
 }
@@ -2538,7 +2538,7 @@ void yypop_buffer_state (void)
 /* Allocates the stack if it does not exist.
  *  Guarantees space for at least one push.
  */
-static void yyensure_buffer_stack (void)
+static void gmsh_yyensure_buffer_stack (void)
 {
 	int num_to_alloc;
     
@@ -2549,7 +2549,7 @@ static void yyensure_buffer_stack (void)
 		 * immediate realloc on the next call.
          */
 		num_to_alloc = 1;
-		(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
+		(yy_buffer_stack) = (struct yy_buffer_state**)gmsh_yyalloc
 								(num_to_alloc * sizeof(struct yy_buffer_state*)
 								);
 		
@@ -2566,7 +2566,7 @@ static void yyensure_buffer_stack (void)
 		int grow_size = 8 /* arbitrary grow size */;
 
 		num_to_alloc = (yy_buffer_stack_max) + grow_size;
-		(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
+		(yy_buffer_stack) = (struct yy_buffer_state**)gmsh_yyrealloc
 								((yy_buffer_stack),
 								num_to_alloc * sizeof(struct yy_buffer_state*)
 								);
@@ -2583,7 +2583,7 @@ static void yyensure_buffer_stack (void)
  * 
  * @return the newly allocated buffer state object. 
  */
-YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
+YY_BUFFER_STATE gmsh_yy_scan_buffer  (char * base, yy_size_t  size )
 {
 	YY_BUFFER_STATE b;
     
@@ -2593,9 +2593,9 @@ YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
 		/* They forgot to leave room for the EOB's. */
 		return 0;
 
-	b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
+	b = (YY_BUFFER_STATE) gmsh_yyalloc(sizeof( struct yy_buffer_state )  );
 	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+		YY_FATAL_ERROR( "out of dynamic memory in gmsh_yy_scan_buffer()" );
 
 	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
 	b->yy_buf_pos = b->yy_ch_buf = base;
@@ -2607,33 +2607,33 @@ YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
 	b->yy_fill_buffer = 0;
 	b->yy_buffer_status = YY_BUFFER_NEW;
 
-	yy_switch_to_buffer(b  );
+	gmsh_yy_switch_to_buffer(b  );
 
 	return b;
 }
 
-/** Setup the input buffer state to scan a string. The next call to yylex() will
+/** Setup the input buffer state to scan a string. The next call to gmsh_yylex() will
  * scan from a @e copy of @a str.
  * @param str a NUL-terminated string to scan
  * 
  * @return the newly allocated buffer state object.
  * @note If you want to scan bytes that may contain NUL values, then use
- *       yy_scan_bytes() instead.
+ *       gmsh_yy_scan_bytes() instead.
  */
-YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
+YY_BUFFER_STATE gmsh_yy_scan_string (yyconst char * yystr )
 {
     
-	return yy_scan_bytes(yystr,strlen(yystr) );
+	return gmsh_yy_scan_bytes(yystr,strlen(yystr) );
 }
 
-/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
+/** Setup the input buffer state to scan the given bytes. The next call to gmsh_yylex() will
  * scan from a @e copy of @a bytes.
  * @param bytes the byte buffer to scan
  * @param len the number of bytes in the buffer pointed to by @a bytes.
  * 
  * @return the newly allocated buffer state object.
  */
-YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
+YY_BUFFER_STATE gmsh_yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
 {
 	YY_BUFFER_STATE b;
 	char *buf;
@@ -2642,18 +2642,18 @@ YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
     
 	/* Get memory for full buffer, including space for trailing EOB's. */
 	n = _yybytes_len + 2;
-	buf = (char *) yyalloc(n  );
+	buf = (char *) gmsh_yyalloc(n  );
 	if ( ! buf )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+		YY_FATAL_ERROR( "out of dynamic memory in gmsh_yy_scan_bytes()" );
 
 	for ( i = 0; i < _yybytes_len; ++i )
 		buf[i] = yybytes[i];
 
 	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
 
-	b = yy_scan_buffer(buf,n );
+	b = gmsh_yy_scan_buffer(buf,n );
 	if ( ! b )
-		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+		YY_FATAL_ERROR( "bad buffer in gmsh_yy_scan_bytes()" );
 
 	/* It's okay to grow etc. this buffer, and we should throw it
 	 * away when we're done.
@@ -2679,14 +2679,14 @@ static void yy_fatal_error (yyconst char* msg )
 #define yyless(n) \
 	do \
 		{ \
-		/* Undo effects of setting up yytext. */ \
+		/* Undo effects of setting up gmsh_yytext. */ \
         int yyless_macro_arg = (n); \
         YY_LESS_LINENO(yyless_macro_arg);\
-		yytext[yyleng] = (yy_hold_char); \
-		(yy_c_buf_p) = yytext + yyless_macro_arg; \
+		gmsh_yytext[gmsh_yyleng] = (yy_hold_char); \
+		(yy_c_buf_p) = gmsh_yytext + yyless_macro_arg; \
 		(yy_hold_char) = *(yy_c_buf_p); \
 		*(yy_c_buf_p) = '\0'; \
-		yyleng = yyless_macro_arg; \
+		gmsh_yyleng = yyless_macro_arg; \
 		} \
 	while ( 0 )
 
@@ -2695,85 +2695,85 @@ static void yy_fatal_error (yyconst char* msg )
 /** Get the current line number.
  * 
  */
-int yyget_lineno  (void)
+int gmsh_yyget_lineno  (void)
 {
         
-    return yylineno;
+    return gmsh_yylineno;
 }
 
 /** Get the input stream.
  * 
  */
-FILE *yyget_in  (void)
+FILE *gmsh_yyget_in  (void)
 {
-        return yyin;
+        return gmsh_yyin;
 }
 
 /** Get the output stream.
  * 
  */
-FILE *yyget_out  (void)
+FILE *gmsh_yyget_out  (void)
 {
-        return yyout;
+        return gmsh_yyout;
 }
 
 /** Get the length of the current token.
  * 
  */
-int yyget_leng  (void)
+int gmsh_yyget_leng  (void)
 {
-        return yyleng;
+        return gmsh_yyleng;
 }
 
 /** Get the current token.
  * 
  */
 
-char *yyget_text  (void)
+char *gmsh_yyget_text  (void)
 {
-        return yytext;
+        return gmsh_yytext;
 }
 
 /** Set the current line number.
  * @param line_number
  * 
  */
-void yyset_lineno (int  line_number )
+void gmsh_yyset_lineno (int  line_number )
 {
     
-    yylineno = line_number;
+    gmsh_yylineno = line_number;
 }
 
 /** Set the input stream. This does not discard the current
  * input buffer.
  * @param in_str A readable stream.
  * 
- * @see yy_switch_to_buffer
+ * @see gmsh_yy_switch_to_buffer
  */
-void yyset_in (FILE *  in_str )
+void gmsh_yyset_in (FILE *  in_str )
 {
-        yyin = in_str ;
+        gmsh_yyin = in_str ;
 }
 
-void yyset_out (FILE *  out_str )
+void gmsh_yyset_out (FILE *  out_str )
 {
-        yyout = out_str ;
+        gmsh_yyout = out_str ;
 }
 
-int yyget_debug  (void)
+int gmsh_yyget_debug  (void)
 {
-        return yy_flex_debug;
+        return gmsh_yy_flex_debug;
 }
 
-void yyset_debug (int  bdebug )
+void gmsh_yyset_debug (int  bdebug )
 {
-        yy_flex_debug = bdebug ;
+        gmsh_yy_flex_debug = bdebug ;
 }
 
 static int yy_init_globals (void)
 {
         /* Initialization is the same as for the non-reentrant scanner.
-     * This function is called from yylex_destroy(), so don't allocate here.
+     * This function is called from gmsh_yylex_destroy(), so don't allocate here.
      */
 
     (yy_buffer_stack) = 0;
@@ -2785,36 +2785,36 @@ static int yy_init_globals (void)
 
 /* Defined in main.c */
 #ifdef YY_STDINIT
-    yyin = stdin;
-    yyout = stdout;
+    gmsh_yyin = stdin;
+    gmsh_yyout = stdout;
 #else
-    yyin = (FILE *) 0;
-    yyout = (FILE *) 0;
+    gmsh_yyin = (FILE *) 0;
+    gmsh_yyout = (FILE *) 0;
 #endif
 
     /* For future reference: Set errno on error, since we are called by
-     * yylex_init()
+     * gmsh_yylex_init()
      */
     return 0;
 }
 
-/* yylex_destroy is for both reentrant and non-reentrant scanners. */
-int yylex_destroy  (void)
+/* gmsh_yylex_destroy is for both reentrant and non-reentrant scanners. */
+int gmsh_yylex_destroy  (void)
 {
     
     /* Pop the buffer stack, destroying each element. */
 	while(YY_CURRENT_BUFFER){
-		yy_delete_buffer(YY_CURRENT_BUFFER  );
+		gmsh_yy_delete_buffer(YY_CURRENT_BUFFER  );
 		YY_CURRENT_BUFFER_LVALUE = NULL;
-		yypop_buffer_state();
+		gmsh_yypop_buffer_state();
 	}
 
 	/* Destroy the stack itself. */
-	yyfree((yy_buffer_stack) );
+	gmsh_yyfree((yy_buffer_stack) );
 	(yy_buffer_stack) = NULL;
 
     /* Reset the globals. This is important in a non-reentrant scanner so the next time
-     * yylex() is called, initialization will occur. */
+     * gmsh_yylex() is called, initialization will occur. */
     yy_init_globals( );
 
     return 0;
@@ -2844,12 +2844,12 @@ static int yy_flex_strlen (yyconst char * s )
 }
 #endif
 
-void *yyalloc (yy_size_t  size )
+void *gmsh_yyalloc (yy_size_t  size )
 {
 	return (void *) malloc( size );
 }
 
-void *yyrealloc  (void * ptr, yy_size_t  size )
+void *gmsh_yyrealloc  (void * ptr, yy_size_t  size )
 {
 	/* The cast to (char *) in the following accommodates both
 	 * implementations that use char* generic pointers, and those
@@ -2861,9 +2861,9 @@ void *yyrealloc  (void * ptr, yy_size_t  size )
 	return (void *) realloc( (char *) ptr, size );
 }
 
-void yyfree (void * ptr )
+void gmsh_yyfree (void * ptr )
 {
-	free( (char *) ptr );	/* see yyrealloc() for (char *) cast */
+	free( (char *) ptr );	/* see gmsh_yyrealloc() for (char *) cast */
 }
 
 #define YYTABLES_NAME "yytables"
@@ -2872,9 +2872,9 @@ void yyfree (void * ptr )
 
 
 
-#undef yywrap
+#undef gmsh_yywrap
 
-int yywrap() {return 1;}
+int gmsh_yywrap() {return 1;}
 
 void skipcomments(void)
 {
@@ -2915,7 +2915,7 @@ void parsestring(char endchar)
     }
   }
   tmp[i] = '\0';
-  yylval.c = strsave(tmp);
+  gmsh_yylval.c = strsave(tmp);
 }
 
 char *strsave(char *ptr)
diff --git a/Parser/Makefile b/Parser/Makefile
index 27d912ca9467c46c31dd0a1ea83045aab92e8f01..e7498005365a84a01708c378ef5789495d3bc9d5 100644
--- a/Parser/Makefile
+++ b/Parser/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.134 2008-01-19 22:06:07 geuzaine Exp $
+# $Id: Makefile,v 1.135 2008-01-20 10:10:45 geuzaine Exp $
 #
 # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 #
@@ -50,9 +50,9 @@ Gmsh.tab.o:
 	${CXX} ${FLAGS} ${INCLUDE} ${SYSINCLUDE} ${DASH}c Gmsh.tab.cpp
 
 parser:
-	bison --output Gmsh.tab.cpp -d Gmsh.y 
+	bison -p gmsh_yy --output Gmsh.tab.cpp -d Gmsh.y 
 	if [ -r Gmsh.tab.cpp.h ]; then mv Gmsh.tab.cpp.h Gmsh.tab.hpp ; fi
-	flex -oGmsh.yy.cpp Gmsh.l
+	flex -P gmsh_yy -oGmsh.yy.cpp Gmsh.l
 
 clean:
 	rm -f *.o
@@ -75,21 +75,20 @@ Gmsh.tab.o: Gmsh.tab.cpp ../Common/Message.h ../DataStr/Malloc.h \
   ../Post/PViewDataList.h ../Post/PViewData.h ../Post/AdaptiveViews.h \
   ../Common/GmshMatrix.h ../Parallel/ParUtil.h ../Common/Context.h \
   ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \
-  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/MVertex.h \
-  ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
-  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
-  ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
-  ../Geo/SBoundingBox3d.h ../Geo/Geo.h ../Common/GmshDefines.h \
-  ../Geo/gmshSurface.h ../Geo/Pair.h ../Geo/Range.h ../Geo/SPoint2.h \
-  ../Geo/SPoint3.h ../Geo/SVector3.h ../Geo/SBoundingBox3d.h \
-  ../Geo/SPoint2.h ../Geo/ExtrudeParams.h ../Geo/GeoInterpolation.h \
-  ../Geo/Geo.h ../Mesh/Generator.h ../Graphics/Draw.h ../Common/Colors.h \
-  ../Common/Options.h Parser.h OpenFile.h ../Common/CommandLine.h \
-  FunctionManager.h ../Common/OS.h CreateFile.h ../Mesh/Field.h \
-  ../Post/OctreePost.h ../Common/Octree.h ../Common/OctreeInternals.h \
-  ../Mesh/BackgroundMesh.h
+  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
+  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h ../Geo/Geo.h \
+  ../Common/GmshDefines.h ../Geo/gmshSurface.h ../Geo/Pair.h \
+  ../Geo/Range.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/SVector3.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint2.h ../Geo/ExtrudeParams.h \
+  ../Geo/GeoInterpolation.h ../Geo/Geo.h ../Mesh/Generator.h \
+  ../Graphics/Draw.h ../Common/Colors.h ../Common/Options.h Parser.h \
+  OpenFile.h ../Common/CommandLine.h FunctionManager.h ../Common/OS.h \
+  CreateFile.h ../Mesh/Field.h ../Post/OctreePost.h ../Common/Octree.h \
+  ../Common/OctreeInternals.h ../Mesh/BackgroundMesh.h
 Gmsh.yy.o: Gmsh.yy.cpp ../Common/Message.h ../Numeric/Numeric.h \
   ../Geo/Geo.h ../Common/GmshDefines.h ../Geo/gmshSurface.h ../Geo/Pair.h \
   ../Geo/Range.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/SVector3.h \
@@ -104,12 +103,11 @@ OpenFile.o: OpenFile.cpp ../Common/Message.h ../Geo/Geo.h \
   ../DataStr/avl.h ../Geo/SPoint2.h ../Geo/ExtrudeParams.h \
   ../Common/SmoothData.h ../Geo/GModel.h ../Geo/GVertex.h \
   ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Geo/MVertex.h ../Geo/SPoint3.h \
-  ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \
-  ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
-  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
-  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
-  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \
+  ../Geo/SBoundingBox3d.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
+  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
+  ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h \
+  ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h \
+  ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \
   ../Common/Context.h Parser.h OpenFile.h ../Common/CommandLine.h \
   ../Post/PView.h ../Post/PViewData.h ../Post/PViewOptions.h \
   ../Post/ColorTable.h ../Graphics/ReadImg.h ../Common/OS.h \
@@ -119,18 +117,18 @@ OpenFile.o: OpenFile.cpp ../Common/Message.h ../Geo/Geo.h \
   ../Fltk/SpherePosition_Widget.h
 CreateFile.o: CreateFile.cpp ../Common/Message.h ../Geo/GModel.h \
   ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/MVertex.h \
-  ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
-  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
-  ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
-  ../Geo/SBoundingBox3d.h ../Common/GmshDefines.h OpenFile.h \
-  ../Common/Context.h ../DataStr/List.h ../Common/Options.h \
-  ../Post/ColorTable.h ../Common/GmshUI.h ../Graphics/gl2ps.h \
-  ../Graphics/gl2gif.h ../Graphics/PixelBuffer.h ../DataStr/Malloc.h \
-  ../Graphics/Draw.h ../Graphics/gl2jpeg.h ../Graphics/PixelBuffer.h \
-  ../Graphics/gl2png.h ../Graphics/PixelBuffer.h ../Graphics/gl2ppm.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
+  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h \
+  ../Common/GmshDefines.h OpenFile.h ../Common/Context.h \
+  ../DataStr/List.h ../Common/Options.h ../Post/ColorTable.h \
+  ../Common/GmshUI.h ../Graphics/gl2ps.h ../Graphics/gl2gif.h \
+  ../Graphics/PixelBuffer.h ../DataStr/Malloc.h ../Graphics/Draw.h \
+  ../Graphics/gl2jpeg.h ../Graphics/PixelBuffer.h ../Graphics/gl2png.h \
+  ../Graphics/PixelBuffer.h ../Graphics/gl2ppm.h \
   ../Graphics/PixelBuffer.h ../Graphics/gl2yuv.h \
   ../Graphics/PixelBuffer.h
 FunctionManager.o: FunctionManager.cpp FunctionManager.h
diff --git a/Parser/OpenFile.cpp b/Parser/OpenFile.cpp
index 3e6de2236a395879be76715af50b1aedc0771feb..f6817e4c68f309c28e8508cc0ba748226320fb4e 100644
--- a/Parser/OpenFile.cpp
+++ b/Parser/OpenFile.cpp
@@ -1,4 +1,4 @@
-// $Id: OpenFile.cpp,v 1.167 2008-01-19 22:06:07 geuzaine Exp $
+// $Id: OpenFile.cpp,v 1.168 2008-01-20 10:10:45 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -53,9 +53,9 @@ void FixRelativePath(const char *in, char *out){
   }
   else{
     // append 'in' to the path of the parent file
-    strcpy(out, yyname);
+    strcpy(out, gmsh_yyname);
     int i = strlen(out)-1 ;
-    while(i >= 0 && yyname[i] != '/' && yyname[i] != '\\') i-- ;
+    while(i >= 0 && gmsh_yyname[i] != '/' && gmsh_yyname[i] != '\\') i-- ;
     out[i+1] = '\0';
     strcat(out, in);
   }
@@ -201,39 +201,39 @@ int ParseFile(const char *f, int close, int warn_if_missing)
 
   int numViewsBefore = PView::list.size();
 
-  strncpy(yyname_old, yyname, 255);
-  yyin_old = yyin;
-  yyerrorstate_old = yyerrorstate;
-  yylineno_old = yylineno;
-  yyviewindex_old = yyviewindex;
+  strncpy(yyname_old, gmsh_yyname, 255);
+  yyin_old = gmsh_yyin;
+  yyerrorstate_old = gmsh_yyerrorstate;
+  yylineno_old = gmsh_yylineno;
+  yyviewindex_old = gmsh_yyviewindex;
 
-  strncpy(yyname, f, 255);
-  yyin = fp;
-  yyerrorstate = 0;
-  yylineno = 1;
-  yyviewindex = 0;
+  strncpy(gmsh_yyname, f, 255);
+  gmsh_yyin = fp;
+  gmsh_yyerrorstate = 0;
+  gmsh_yylineno = 1;
+  gmsh_yyviewindex = 0;
 
   fpos_t position;
-  fgetpos(yyin, &position);
-  fgets(tmp, sizeof(tmp), yyin);
-  fsetpos(yyin, &position);
+  fgetpos(gmsh_yyin, &position);
+  fgets(tmp, sizeof(tmp), gmsh_yyin);
+  fsetpos(gmsh_yyin, &position);
 
-  while(!feof(yyin)){
-    yyparse();
-    if(yyerrorstate > 20){
+  while(!feof(gmsh_yyin)){
+    gmsh_yyparse();
+    if(gmsh_yyerrorstate > 20){
       Msg(GERROR, "Too many errors: aborting...");
       force_yyflush();
       break;
     }
   }
 
-  if(close) fclose(yyin);
+  if(close) fclose(gmsh_yyin);
 
-  strncpy(yyname, yyname_old, 255);
-  yyin = yyin_old;
-  yyerrorstate = yyerrorstate_old;
-  yylineno = yylineno_old;
-  yyviewindex = yyviewindex_old;
+  strncpy(gmsh_yyname, yyname_old, 255);
+  gmsh_yyin = yyin_old;
+  gmsh_yyerrorstate = yyerrorstate_old;
+  gmsh_yylineno = yylineno_old;
+  gmsh_yyviewindex = yyviewindex_old;
 
 #if defined(HAVE_FLTK)
   if(!CTX.batch && numViewsBefore != (int)PView::list.size())
diff --git a/Parser/Parser.h b/Parser/Parser.h
index 8d32e933352b8f41c48d1092ecad99812b642909..e43302e0f1dd2f618eb99bd85d0b2f3162d9e047 100644
--- a/Parser/Parser.h
+++ b/Parser/Parser.h
@@ -32,15 +32,17 @@ void InitSymbols();
 
 extern Tree_T *Symbol_T;
 
-int yyparse();
-int yylex();
+int gmsh_yyparse();
+int gmsh_yylex();
+
 void force_yyflush();
 
-extern FILE *yyin;
-extern int yylineno;
-extern int yyviewindex;
-extern char yyname[256];
-extern char *yytext;
-extern int yyerrorstate;
+extern FILE *gmsh_yyin;
+extern int gmsh_yylineno;
+extern char *gmsh_yytext;
+
+extern int gmsh_yyviewindex;
+extern char gmsh_yyname[256];
+extern int gmsh_yyerrorstate;
 
 #endif
diff --git a/Plugin/CutPlane.cpp b/Plugin/CutPlane.cpp
index cf6cc4459f8091d85e62ee62487ef2d04eb5f18f..41f0b356b5df8adefcf071c6254ec62122d1a559 100644
--- a/Plugin/CutPlane.cpp
+++ b/Plugin/CutPlane.cpp
@@ -1,4 +1,4 @@
-// $Id: CutPlane.cpp,v 1.53 2007-09-11 14:01:54 geuzaine Exp $
+// $Id: CutPlane.cpp,v 1.54 2008-01-20 10:10:46 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -61,7 +61,7 @@ void GMSH_CutPlanePlugin::draw()
 #if defined(HAVE_FLTK)
   int num = (int)CutPlaneOptions_Number[7].def;
   if(num < 0) num = iview;
-  if(num >= 0 && num < PView::list.size()){
+  if(num >= 0 && num < (int)PView::list.size()){
     glColor4ubv((GLubyte *) & CTX.color.fg);
     glLineWidth(CTX.line_width);
     SBoundingBox3d bb = PView::list[num]->getData()->getBoundingBox();
diff --git a/Plugin/Makefile b/Plugin/Makefile
index d7783a63594a331a865b55be79c2db4dfb54a239..096731030e21f11bafcba356bb412ec9b9e4a885 100644
--- a/Plugin/Makefile
+++ b/Plugin/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.139 2008-01-19 22:06:07 geuzaine Exp $
+# $Id: Makefile,v 1.140 2008-01-20 10:10:46 geuzaine Exp $
 #
 # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 #
@@ -194,10 +194,10 @@ Triangulate.o: Triangulate.cpp ../Common/Message.h ../Geo/gmshFace.h \
   ../Common/SmoothData.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/Range.h \
   ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/GPoint.h \
   ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
-  ../Geo/GEntity.h ../Geo/MVertex.h ../Geo/SPoint3.h ../Geo/GPoint.h \
-  ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
-  ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/gmshVertex.h \
-  ../Geo/Geo.h ../Geo/GVertex.h ../Geo/Range.h Triangulate.h Plugin.h \
+  ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/SVector3.h \
+  ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/SPoint2.h ../Geo/SVector3.h \
+  ../Geo/Pair.h ../Geo/gmshVertex.h ../Geo/Geo.h ../Geo/GVertex.h \
+  ../Geo/MVertex.h ../Geo/SPoint3.h ../Geo/Range.h Triangulate.h Plugin.h \
   ../Common/Options.h ../Post/ColorTable.h ../Post/PView.h \
   ../Post/PViewData.h ../Post/PViewOptions.h ../Post/ColorTable.h \
   ../Post/PViewDataList.h ../Post/PViewData.h ../Post/AdaptiveViews.h \
@@ -244,9 +244,9 @@ ExtractEdges.o: ExtractEdges.cpp ExtractEdges.h Plugin.h \
   ../Common/GmshMatrix.h ../Mesh/BDS.h ../Geo/GFace.h ../Geo/GEntity.h \
   ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/GPoint.h \
   ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
-  ../Geo/GEntity.h ../Geo/MVertex.h ../Geo/SPoint3.h ../Geo/GPoint.h \
-  ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint2.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h
+  ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/SVector3.h \
+  ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/SPoint2.h \
+  ../Geo/SVector3.h ../Geo/Pair.h
 MakeSimplex.o: MakeSimplex.cpp MakeSimplex.h Plugin.h ../Common/Options.h \
   ../Post/ColorTable.h ../Common/Message.h ../Post/PView.h \
   ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/PViewData.h \
@@ -272,10 +272,9 @@ FieldView.o: FieldView.cpp FieldView.h Plugin.h ../Common/Options.h \
   ../Geo/SBoundingBox3d.h ../DataStr/Tree.h ../DataStr/avl.h \
   ../Geo/SPoint2.h ../Geo/ExtrudeParams.h ../Geo/GEdge.h ../Geo/GEntity.h \
   ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \
-  ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/MVertex.h ../Geo/SPoint3.h \
-  ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint2.h ../Post/OctreePost.h ../Common/Octree.h \
-  ../Common/OctreeInternals.h
+  ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/SPoint2.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Post/OctreePost.h ../Common/Octree.h ../Common/OctreeInternals.h
 Integrate.o: Integrate.cpp Integrate.h Plugin.h ../Common/Options.h \
   ../Post/ColorTable.h ../Common/Message.h ../Post/PView.h \
   ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/PViewData.h \
diff --git a/Post/Makefile b/Post/Makefile
index 93c24c2231edabc8f54eb89866dd2d04e74b8222..6782101f15f30d424b5160427db8cbcda3bd0db5 100644
--- a/Post/Makefile
+++ b/Post/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.22 2008-01-19 22:06:09 geuzaine Exp $
+# $Id: Makefile,v 1.23 2008-01-20 10:10:46 geuzaine Exp $
 #
 # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 #
@@ -79,13 +79,12 @@ PViewDataGModel.o: PViewDataGModel.cpp PViewDataGModel.h PViewData.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h PViewDataList.h \
   AdaptiveViews.h ../DataStr/List.h ../Common/GmshMatrix.h \
   ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \
-  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/MVertex.h \
-  ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
-  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
-  ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
-  ../Geo/SBoundingBox3d.h
+  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
+  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SBoundingBox3d.h
 PViewOptions.o: PViewOptions.cpp PViewOptions.h ColorTable.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/Message.h
 AdaptiveViews.o: AdaptiveViews.cpp AdaptiveViews.h ../DataStr/List.h \