diff --git a/Box/Box.cpp b/Box/Box.cpp
index 667d09eba06a607b092f4dfacbbf1aa6b1681830..0e6af5c28858c50449a4608acaff029bae2a4737 100644
--- a/Box/Box.cpp
+++ b/Box/Box.cpp
@@ -1,4 +1,4 @@
-// $Id: Box.cpp,v 1.36 2007-08-21 19:05:38 geuzaine Exp $
+// $Id: Box.cpp,v 1.37 2007-09-10 04:47:01 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -110,10 +110,8 @@ int GMSHBOX(int argc, char *argv[])
       MergeFile(*(char**)List_Pointer(CTX.files, i));
     if(CTX.bgm_filename) {
       MergeFile(CTX.bgm_filename);
-      if(List_Nbr(CTX.post.list)){
-	Post_View *v;
-	List_Read(CTX.post.list, List_Nbr(CTX.post.list) - 1, &v);
-	Field *field = new PostViewField(v);
+      if(PView::list.size()){
+	Field *field = new PostViewField(PView::list.back());
 	BGMAddField(field);
 	fields.insert(field);
       }
diff --git a/Common/CommandLine.cpp b/Common/CommandLine.cpp
index ab2f4e83dac45fb97914c9f9bf7f4c0fc7d67b3f..0465ee2a4388b411dfb566248a262e82ba2ab7d1 100644
--- a/Common/CommandLine.cpp
+++ b/Common/CommandLine.cpp
@@ -1,4 +1,4 @@
-// $Id: CommandLine.cpp,v 1.103 2007-09-04 13:47:00 remacle Exp $
+// $Id: CommandLine.cpp,v 1.104 2007-09-10 04:47:01 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -28,7 +28,7 @@
 #include "Context.h"
 #include "Options.h"
 #include "Geo.h"
-#include "Views.h"
+#include "PView.h"
 #include "OpenFile.h"
 #include "CreateFile.h"
 #include "Parser.h"
@@ -288,13 +288,11 @@ void Get_Options(int argc, char *argv[])
 	while(i < argc) {
 	  char filename[256];
 	  sprintf(filename, "%s_new", argv[i]);
-	  int numviews_old = List_Nbr(CTX.post.list);
+	  int n = PView::list.size();
           OpenProject(argv[i]);
 	  // convert post-processing views to latest binary format
-          for(int j = numviews_old; j < List_Nbr(CTX.post.list); j++){
-	    Post_View *v = *(Post_View **)List_Pointer(CTX.post.list, j);
-            WriteView(v, filename, 1, (j == numviews_old) ? 0 : 1);
-	  }
+          for(unsigned int j = n; j < PView::list.size(); j++)
+	    PView::list[j]->write(filename, 1, (j == n) ? false : true);
 	  // convert mesh to latest binary format
 	  if(GModel::current()->getMeshStatus() > 0){
 	    CTX.mesh.msh_file_version = 2.0;
diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h
index 56bdd366965c124408bc7bca8fa87824f97cc9ce..684f5306b313bbf681dcdb1fdf0ab946c095c8be 100644
--- a/Common/DefaultOptions.h
+++ b/Common/DefaultOptions.h
@@ -22,7 +22,6 @@
 
 #include "GmshDefines.h"
 #include "Options.h"
-#include "Views.h"
 
 //          PLEASE RESPECT THE ALPHABETICAL ORDER WHEN 
 //                    INSERTING A NEW OPTION!
@@ -781,7 +780,7 @@ StringXNumber GeneralOptions_Number[] = {
   { F,   "TranslationZ" , opt_general_translation2 , 0.0 , 
     "Z-axis translation (in model units)" },
 
-  { F|O, "VectorType" , opt_general_vector_type , DRAW_POST_ARROW3D ,
+  { F|O, "VectorType" , opt_general_vector_type , 4 ,
     "Default vector display type (for normals, etc.)" },
   { F|O, "Verbosity" , opt_general_verbosity , 3. ,
     "Level of information printed during processing (0=no information)" },
@@ -847,7 +846,7 @@ StringXNumber GeometryOptions_Number[] = {
   { F|O, "PointSize" , opt_geometry_point_size , 4. , 
     "Display size of points (in pixels)" },
   { F|O, "PointType" , opt_geometry_point_type , 0. , 
-    "Display points as solid color dots (0), 3D spheres (1) or growing spheres (2)" },
+    "Display points as solid color dots (0), 3D spheres (1) or scaled spheres (2)" },
 
   { F|O, "ScalingFactor" , opt_geometry_scaling_factor , 1.0 , 
     "Global geometry scaling factor" },
@@ -1240,13 +1239,13 @@ StringXNumber ViewOptions_Number[] = {
     "Generalized raise amplification factor" },
   { F|O, "GeneralizedRaiseView" , opt_view_gen_raise_view , -1. ,
     "Index of the view used for generalized raise (-1=self)" },
-  { F|O, "GlyphLocation" , opt_view_glyph_location , DRAW_POST_LOCATE_COG , 
+  { F|O, "GlyphLocation" , opt_view_glyph_location , 1, 
     "Glyph (arrow, number, etc.) location (1=center of gravity, 2=node)" },
 
   { F|O, "Height" , opt_view_size1 , 200. , 
     "Height (in pixels) of the scale or 2D plot" }, 
 
-  { F|O, "IntervalsType" , opt_view_intervals_type , DRAW_POST_CONTINUOUS ,
+  { F|O, "IntervalsType" , opt_view_intervals_type , 2 ,
     "Type of interval display (1=iso, 2=continuous, 3=discrete, 4=numeric)" },
 
   { F|O, "Light" , opt_view_light , 1. ,
@@ -1306,12 +1305,12 @@ StringXNumber ViewOptions_Number[] = {
     "Elevation of the view along Y-axis (in model coordinates)" },
   { F,   "RaiseZ" , opt_view_raise2 , 0. , 
     "Elevation of the view along Z-axis (in model coordinates)" },
-  { F|O, "RangeType" , opt_view_range_type , DRAW_POST_RANGE_DEFAULT ,
+  { F|O, "RangeType" , opt_view_range_type , 1 ,
     "Value scale range type (1=default, 2=custom, 3=per time step)" },
 
   { F|O, "SaturateValues" , opt_view_saturate_values , 0. ,
     "Saturate the view values to custom min and max (1=true, 0=false)" },
-  { F|O, "ScaleType" , opt_view_scale_type , DRAW_POST_LINEAR ,
+  { F|O, "ScaleType" , opt_view_scale_type , 1 ,
     "Value scale type (1=linear, 2=logarithmic, 3=double logarithmic)" },
   { F|O, "ShowElement" , opt_view_show_element , 0. ,
     "Show element boundaries?" },
@@ -1348,13 +1347,13 @@ StringXNumber ViewOptions_Number[] = {
     "Element (3,2) of the 3x3 coordinate transformation matrix" },
   { F,   "Transform33" , opt_view_transform22 , 1. ,
     "Element (3,3) of the 3x3 coordinate transformation matrix" },
-  { F,   "Type" , opt_view_type , DRAW_POST_3D ,
+  { F,   "Type" , opt_view_type , 1 ,
     "Type of plot (1=3D, 2=2D space, 3=2D time)" },
 
   { F|O, "UseGeneralizedRaise" , opt_view_use_gen_raise , 0 ,
     "Use generalized raise?" },
 
-  { F|O, "VectorType" , opt_view_vector_type , DRAW_POST_ARROW3D ,
+  { F|O, "VectorType" , opt_view_vector_type , 4 ,
     "Vector display type (1=segment, 2=arrow, 3=pyramid, 4=3D arrow, 5=displacement)" },
   { F,   "Visible" , opt_view_visible , 1. ,
     "Is the view visible?" },
diff --git a/Common/Makefile b/Common/Makefile
index c3cfd07794995ef58930c46fedb771abf3349a51..202b3e9dfad594d65823a2120b11db610e685dec 100644
--- a/Common/Makefile
+++ b/Common/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.139 2007-09-04 15:19:24 geuzaine Exp $
+# $Id: Makefile,v 1.140 2007-09-10 04:47:02 geuzaine Exp $
 #
 # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 #
@@ -64,46 +64,47 @@ depend:
 Context.o: Context.cpp Gmsh.h Message.h ../DataStr/Malloc.h \
   ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \
   ../DataStr/List.h ../DataStr/Tree.h ../Numeric/Numeric.h Context.h \
-  DefaultOptions.h GmshDefines.h Options.h ../Post/Views.h \
-  ../Post/ColorTable.h ../Common/VertexArray.h ../Geo/SVector3.h \
-  ../Geo/SPoint3.h ../Common/SmoothData.h ../Post/AdaptiveViews.h \
-  ../Common/GmshMatrix.h Trackball.h
+  DefaultOptions.h GmshDefines.h Options.h ../Post/ColorTable.h \
+  Trackball.h
 Octree.o: Octree.cpp Octree.h OctreeInternals.h
 OctreeInternals.o: OctreeInternals.cpp Message.h OctreeInternals.h
 Options.o: Options.cpp Gmsh.h Message.h ../DataStr/Malloc.h \
   ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \
   ../DataStr/List.h ../DataStr/Tree.h GmshUI.h GmshDefines.h \
   ../Graphics/Draw.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
+  ../Post/PView.h ../Common/VertexArray.h ../Geo/SVector3.h \
+  ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \
+  ../Post/PViewData.h ../Post/PViewOptions.h ../Post/ColorTable.h \
   ../Mesh/Generator.h Context.h Options.h ../Mesh/BackgroundMesh.h \
   ../Plugin/PluginManager.h ../Plugin/Plugin.h ../Common/Options.h \
   ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \
-  ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \
-  ../Common/GmshMatrix.h ../Fltk/Solvers.h ../Fltk/GUI.h \
-  ../Fltk/Opengl_Window.h ../Fltk/Colorbar_Window.h ../Common/GmshUI.h \
-  ../Fltk/Popup_Button.h ../Fltk/SpherePosition_Widget.h
+  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h ../Fltk/Solvers.h \
+  ../Fltk/GUI.h ../Fltk/Opengl_Window.h ../Fltk/Colorbar_Window.h \
+  ../Common/GmshUI.h ../Fltk/Popup_Button.h \
+  ../Fltk/SpherePosition_Widget.h
 CommandLine.o: CommandLine.cpp Gmsh.h Message.h ../DataStr/Malloc.h \
   ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \
   ../DataStr/List.h ../DataStr/Tree.h GmshUI.h GmshDefines.h \
   GmshVersion.h CommandLine.h ../Numeric/Numeric.h Context.h Options.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 ../Geo/SPoint3.h \
-  ../Geo/SPoint2.h ../Geo/ExtrudeParams.h ../Common/SmoothData.h \
-  ../Post/Views.h ../Post/ColorTable.h ../Common/VertexArray.h \
-  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h ../Parser/OpenFile.h \
-  ../Parser/CreateFile.h ../Parser/Parser.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/MElement.h ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h \
-  ../Geo/SVector3.h ../Common/Hash.h ../Geo/MFace.h ../Geo/MVertex.h \
-  ../Geo/SVector3.h ../Common/Context.h ../Geo/ExtrudeParams.h \
-  ../Geo/GFace.h ../Geo/GPoint.h ../Geo/GEntity.h ../Geo/GEdgeLoop.h \
-  ../Geo/GEdge.h ../Geo/MElement.h ../Geo/SPoint2.h ../Geo/SVector3.h \
-  ../Geo/Pair.h ../Geo/ExtrudeParams.h ../Geo/GRegion.h ../Geo/GEntity.h \
-  ../Geo/MElement.h ../Geo/ExtrudeParams.h ../Geo/SBoundingBox3d.h OS.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 ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Geo/ExtrudeParams.h ../Common/SmoothData.h ../Post/PView.h \
+  ../Common/VertexArray.h ../Post/PViewData.h ../Post/PViewOptions.h \
+  ../Post/ColorTable.h ../Parser/OpenFile.h ../Parser/CreateFile.h \
+  ../Parser/Parser.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/MElement.h ../Geo/MVertex.h \
+  ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h ../Common/Hash.h \
+  ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h ../Common/Context.h \
+  ../Geo/ExtrudeParams.h ../Geo/GFace.h ../Geo/GPoint.h ../Geo/GEntity.h \
+  ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/MElement.h ../Geo/SPoint2.h \
+  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/ExtrudeParams.h ../Geo/GRegion.h \
+  ../Geo/GEntity.h ../Geo/MElement.h ../Geo/ExtrudeParams.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 \
diff --git a/Common/Options.cpp b/Common/Options.cpp
index 308cd4739bd6210d1968bb6ec88cf6c8ca2f5499..6325e6cc2b9aeee0ec19388411f27ef5abf1fee7 100644
--- a/Common/Options.cpp
+++ b/Common/Options.cpp
@@ -1,4 +1,4 @@
-// $Id: Options.cpp,v 1.352 2007-09-04 13:47:00 remacle Exp $
+// $Id: Options.cpp,v 1.353 2007-09-10 04:47:02 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -23,6 +23,7 @@
 #include "GmshUI.h"
 #include "GmshDefines.h"
 #include "Draw.h"
+#include "PView.h"
 #include "Generator.h"
 #include "Context.h"
 #include "Options.h"
@@ -38,15 +39,10 @@ extern GUI *WID;
 extern void activate_cb(Fl_Widget* w, void* data);
 #endif
 
-extern Post_View *Post_ViewReference;
-
 // General routines
 
 void Init_Options_Safe(int num)
 {
-  ColorTable_InitParam(1, &Post_ViewReference->CT);
-  ColorTable_Recompute(&Post_ViewReference->CT);
-
   // Default string options
   Set_DefaultStringOptions(num, GeneralOptions_String);
   Set_DefaultStringOptions(num, GeometryOptions_String);
@@ -114,9 +110,6 @@ void Init_Options(int num)
   if(len && CTX.home_dir[len-1] != '/')
     strcat(CTX.home_dir, "/");
 
-  // Reference view storing default options
-  Post_ViewReference = (Post_View *) Malloc(sizeof(Post_View));
-
   Init_Options_Safe(num);
 
   // The following defaults cannot be set by the user 
@@ -157,16 +150,13 @@ void Init_Options(int num)
 
 void ReInit_Options(int num)
 {
-  // horrible trick so that the opt_view_XXX will act on the reference view
-  List_T *l = CTX.post.list;
-  CTX.post.list = NULL; 
+  // horrible trick so that opt_view_XXX will act on the reference view
+  std::vector<PView*> tmp = PView::list;
+  PView::list.clear(); 
   Init_Options_Safe(num);
-  CTX.post.list = l;
-
-  for(int i = 0; i < List_Nbr(CTX.post.list); i++) {
-    Post_View *v = *(Post_View **) List_Pointer(CTX.post.list, i);
-    CopyViewOptions(Post_ViewReference, v);
-  }
+  PView::list = tmp; 
+  for(unsigned int i = 0; i < PView::list.size(); i++)
+    PView::list[i]->setOptions();
 }
 
 void Init_Options_GUI(int num)
@@ -209,11 +199,58 @@ void Print_OptionCategory(int level, int diff, int help, char *cat, FILE * file)
   }
 }
 
+GmshColorTable *Get_ColorTable(int num)
+{
+  PViewOptions *opt;
+  if(PView::list.empty() || num < 0 || num > PView::list.size() - 1)
+    opt = &PViewOptions::reference;
+  else{
+    opt = PView::list[num]->getOptions();
+    // assume that if we access the colortable we will change it
+    PView::list[num]->setChanged(true);
+  }
+  return &opt->CT;
+}
+
+void Print_ColorTable(int num, int diff, char *prefix, FILE *file)
+{
+  PViewOptions *opt;
+  if(PView::list.empty() || num < 0 || num > PView::list.size() - 1)
+    opt = &PViewOptions::reference;
+  else
+    opt = PView::list[num]->getOptions();
+
+  if(diff){
+    // compare the current colormap with a vanilla colormap having the
+    // parameters
+    GmshColorTable ref;
+    ColorTable_InitParam(opt->CT.ipar[COLORTABLE_NUMBER], &ref); 
+    for(int i = 0; i < COLORTABLE_NBMAX_PARAM; i++){
+      ref.ipar[i] = opt->CT.ipar[i];
+      ref.dpar[i] = opt->CT.dpar[i];
+    }
+    ColorTable_Recompute(&ref);
+    if(!ColorTable_Diff(&ref, &opt->CT))
+      return;
+  }
+
+  char tmp[1024];
+  sprintf(tmp, "%s = {", prefix);
+  if(file)
+    fprintf(file, "%s\n", tmp);
+  else
+    Msg(DIRECT, tmp);
+  ColorTable_Print(&opt->CT, file);
+  sprintf(tmp, "};");
+  if(file)
+    fprintf(file, "%s\n", tmp);
+  else
+    Msg(DIRECT, tmp);
+}
+
 void Print_Options(int num, int level, int diff, int help, char *filename)
 {
   FILE *file;
-  char tmp[256];
-  int i;
 
   if(filename) {
     file = fopen(filename, "w");
@@ -287,7 +324,8 @@ void Print_Options(int num, int level, int diff, int help, char *filename)
                      "PostProcessing.", file);
 
   if(level & GMSH_FULLRC) {
-    for(i = 0; i < List_Nbr(CTX.post.list); i++) {
+    for(unsigned int i = 0; i < PView::list.size(); i++) {
+      char tmp[256];
       sprintf(tmp, "View[%d].", i);
       Print_OptionCategory(level, diff, help, "View options (strings)", file);
       Print_StringOptions(i, level, diff, help, ViewOptions_String, tmp, file);
@@ -799,24 +837,24 @@ int Get_ColorForString(StringX4Int SX4I[], int alpha,
     return CTX.PACK_COLOR(SX4I[i].int1, SX4I[i].int2, SX4I[i].int3, SX4I[i].int4);
 }
 
-
-
-
+#define GET_VIEW(error_val)					\
+  PView *view = 0;						\
+  PViewData *data = 0;						\
+  PViewOptions *opt;						\
+  if(PView::list.empty())					\
+    opt = &PViewOptions::reference;				\
+  else{								\
+    if(num < 0 || num >= PView::list.size()){			\
+      Msg(WARNING, "View[%d] does not exist", num) ;		\
+      return (error_val) ;					\
+    }								\
+    view = PView::list[num];					\
+    data = view->getData();					\
+    opt = view->getOptions();					\
+  }
 
 // String option routines
 
-#define GET_VIEW(error_val)						\
-  Post_View *v, **vv;							\
-  if(!List_Nbr(CTX.post.list))						\
-    v = Post_ViewReference ;						\
-  else{									\
-    if(!(vv = (Post_View **)List_Pointer_Test(CTX.post.list, num))){	\
-      Msg(WARNING, "View[%d] does not exist", num) ;			\
-      return (error_val) ;						\
-    }									\
-    v = *vv;                                                            \
-  }
-
 char *opt_general_axes_label0(OPT_ARGS_STR)
 {
   if(action & GMSH_SET)
@@ -1894,167 +1932,162 @@ int _gui_action_valid(int action, int num)
 char *opt_view_name(OPT_ARGS_STR)
 {
   GET_VIEW(""); 
+  if(!data) return "";
   if(action & GMSH_SET) {
-    strcpy(v->Name, val);
+    data->setName(val);
 #if defined(HAVE_FLTK)
     if(WID && (num < (int)WID->m_toggle_butt.size())) {
-      // this is OK even if v->Name is not static or allocated, since
-      // we reset it correctly in the main GUI routines when the view
-      // associated with the button changes (i.e., when views are
-      // removed)
-      WID->m_toggle_butt[num]->label(v->Name);
+      WID->m_toggle_butt[num]->label(data->getName().c_str());
       WID->m_toggle_butt[num]->redraw();
     }
 #endif
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    WID->view_input[0]->value(v->Name);
+    WID->view_input[0]->value(data->getName().c_str());
   }
 #endif
-  return v->Name;
+  return (char*)data->getName().c_str();
 }
 
 char *opt_view_format(OPT_ARGS_STR)
 {
   GET_VIEW("");
   if(action & GMSH_SET) {
-    strcpy(v->Format, val);
+    strcpy(opt->Format, val);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_input[1]->value(v->Format);
+    WID->view_input[1]->value(opt->Format);
 #endif
-  return v->Format;
+  return opt->Format;
 }
 
 char *opt_view_filename(OPT_ARGS_STR)
 {
   GET_VIEW("");
-  if(action & GMSH_SET) {
-    strcpy(v->FileName, val);
-  }
-  return v->FileName;
+  if(!data) return "";
+  return (char*)data->getFileName().c_str();
 }
 
 char *opt_view_axes_label0(OPT_ARGS_STR)
 {
   GET_VIEW("");
   if(action & GMSH_SET) {
-    strcpy(v->AxesLabel[0], val);
+    strcpy(opt->AxesLabel[0], val);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_input[10]->value(v->AxesLabel[0]);
+    WID->view_input[10]->value(opt->AxesLabel[0]);
 #endif
-  return v->AxesLabel[0];
+  return opt->AxesLabel[0];
 }
 
 char *opt_view_axes_label1(OPT_ARGS_STR)
 {
   GET_VIEW("");
   if(action & GMSH_SET) {
-    strcpy(v->AxesLabel[1], val);
+    strcpy(opt->AxesLabel[1], val);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_input[11]->value(v->AxesLabel[1]);
+    WID->view_input[11]->value(opt->AxesLabel[1]);
 #endif
-  return v->AxesLabel[1];
+  return opt->AxesLabel[1];
 }
 
 char *opt_view_axes_label2(OPT_ARGS_STR)
 {
   GET_VIEW("");
   if(action & GMSH_SET) {
-    strcpy(v->AxesLabel[2], val);
+    strcpy(opt->AxesLabel[2], val);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_input[12]->value(v->AxesLabel[2]);
+    WID->view_input[12]->value(opt->AxesLabel[2]);
 #endif
-  return v->AxesLabel[2];
+  return opt->AxesLabel[2];
 }
 
 char *opt_view_axes_format0(OPT_ARGS_STR)
 {
   GET_VIEW("");
   if(action & GMSH_SET) {
-    strcpy(v->AxesFormat[0], val);
+    strcpy(opt->AxesFormat[0], val);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_input[7]->value(v->AxesFormat[0]);
+    WID->view_input[7]->value(opt->AxesFormat[0]);
 #endif
-  return v->AxesFormat[0];
+  return opt->AxesFormat[0];
 }
 
 char *opt_view_axes_format1(OPT_ARGS_STR)
 {
   GET_VIEW("");
   if(action & GMSH_SET) {
-    strcpy(v->AxesFormat[1], val);
+    strcpy(opt->AxesFormat[1], val);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_input[8]->value(v->AxesFormat[1]);
+    WID->view_input[8]->value(opt->AxesFormat[1]);
 #endif
-  return v->AxesFormat[1];
+  return opt->AxesFormat[1];
 }
 
 char *opt_view_axes_format2(OPT_ARGS_STR)
 {
   GET_VIEW("");
   if(action & GMSH_SET) {
-    strcpy(v->AxesFormat[2], val);
+    strcpy(opt->AxesFormat[2], val);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_input[9]->value(v->AxesFormat[2]);
+    WID->view_input[9]->value(opt->AxesFormat[2]);
 #endif
-  return v->AxesFormat[2];
+  return opt->AxesFormat[2];
 }
 
 char * opt_view_gen_raise0(OPT_ARGS_STR)
 {
   GET_VIEW("");
   if(action & GMSH_SET) {
-    strcpy(v->GenRaiseX, val);
-    v->Changed = 1;
+    strcpy(opt->GenRaiseX, val);
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_input[4]->value(v->GenRaiseX);
+    WID->view_input[4]->value(opt->GenRaiseX);
 #endif
-  return v->GenRaiseX;
+  return opt->GenRaiseX;
 }
 
 char * opt_view_gen_raise1(OPT_ARGS_STR)
 {
   GET_VIEW("");
   if(action & GMSH_SET) {
-    strcpy(v->GenRaiseY, val);
-    v->Changed = 1;
+    strcpy(opt->GenRaiseY, val);
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_input[5]->value(v->GenRaiseY);
+    WID->view_input[5]->value(opt->GenRaiseY);
 #endif
-  return v->GenRaiseY;
+  return opt->GenRaiseY;
 }
 
 char * opt_view_gen_raise2(OPT_ARGS_STR)
 {
   GET_VIEW("");
   if(action & GMSH_SET) {
-    strcpy(v->GenRaiseZ, val);
-    v->Changed = 1;
+    strcpy(opt->GenRaiseZ, val);
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_input[6]->value(v->GenRaiseZ);
+    WID->view_input[6]->value(opt->GenRaiseZ);
 #endif
-  return v->GenRaiseZ;
+  return opt->GenRaiseZ;
 }
 
 int _h2d(char c)
@@ -2092,110 +2125,110 @@ char * opt_view_stipple0(OPT_ARGS_STR)
 {
   GET_VIEW("");
   if(action & GMSH_SET) {
-    strncpy(v->StippleString[0], val, 31);
-    v->StippleString[0][31] = '\0'; // just as a precaution
-    _string2stipple(v->StippleString[0], v->Stipple[0][0], v->Stipple[0][1]);
+    strncpy(opt->StippleString[0], val, 31);
+    opt->StippleString[0][31] = '\0'; // just as a precaution
+    _string2stipple(opt->StippleString[0], opt->Stipple[0][0], opt->Stipple[0][1]);
   }
-  return v->StippleString[0];
+  return opt->StippleString[0];
 }
 
 char * opt_view_stipple1(OPT_ARGS_STR)
 {
   GET_VIEW("");
   if(action & GMSH_SET) {
-    strncpy(v->StippleString[1], val, 31);
-    v->StippleString[1][31] = '\0'; // just as a precaution
-    _string2stipple(v->StippleString[1], v->Stipple[1][0], v->Stipple[1][1]);
+    strncpy(opt->StippleString[1], val, 31);
+    opt->StippleString[1][31] = '\0'; // just as a precaution
+    _string2stipple(opt->StippleString[1], opt->Stipple[1][0], opt->Stipple[1][1]);
   }
-  return v->StippleString[1];
+  return opt->StippleString[1];
 }
 
 char * opt_view_stipple2(OPT_ARGS_STR)
 {
   GET_VIEW("");
   if(action & GMSH_SET) {
-    strncpy(v->StippleString[2], val, 31);
-    v->StippleString[2][31] = '\0'; // just as a precaution
-    _string2stipple(v->StippleString[2], v->Stipple[2][0], v->Stipple[2][1]);
+    strncpy(opt->StippleString[2], val, 31);
+    opt->StippleString[2][31] = '\0'; // just as a precaution
+    _string2stipple(opt->StippleString[2], opt->Stipple[2][0], opt->Stipple[2][1]);
   }
-  return v->StippleString[2];
+  return opt->StippleString[2];
 }
 
 char * opt_view_stipple3(OPT_ARGS_STR)
 {
   GET_VIEW("");
   if(action & GMSH_SET) {
-    strncpy(v->StippleString[3], val, 31);
-    v->StippleString[3][31] = '\0'; // just as a precaution
-    _string2stipple(v->StippleString[3], v->Stipple[3][0], v->Stipple[3][1]);
+    strncpy(opt->StippleString[3], val, 31);
+    opt->StippleString[3][31] = '\0'; // just as a precaution
+    _string2stipple(opt->StippleString[3], opt->Stipple[3][0], opt->Stipple[3][1]);
   }
-  return v->StippleString[3];
+  return opt->StippleString[3];
 }
 
 char * opt_view_stipple4(OPT_ARGS_STR)
 {
   GET_VIEW("");
   if(action & GMSH_SET) {
-    strncpy(v->StippleString[4], val, 31);
-    v->StippleString[4][31] = '\0'; // just as a precaution
-    _string2stipple(v->StippleString[4], v->Stipple[4][0], v->Stipple[4][1]);
+    strncpy(opt->StippleString[4], val, 31);
+    opt->StippleString[4][31] = '\0'; // just as a precaution
+    _string2stipple(opt->StippleString[4], opt->Stipple[4][0], opt->Stipple[4][1]);
   }
-  return v->StippleString[4];
+  return opt->StippleString[4];
 }
 
 char * opt_view_stipple5(OPT_ARGS_STR)
 {
   GET_VIEW("");
   if(action & GMSH_SET) {
-    strncpy(v->StippleString[5], val, 31);
-    v->StippleString[5][31] = '\0'; // just as a precaution
-    _string2stipple(v->StippleString[5], v->Stipple[5][0], v->Stipple[5][1]);
+    strncpy(opt->StippleString[5], val, 31);
+    opt->StippleString[5][31] = '\0'; // just as a precaution
+    _string2stipple(opt->StippleString[5], opt->Stipple[5][0], opt->Stipple[5][1]);
   }
-  return v->StippleString[5];
+  return opt->StippleString[5];
 }
 
 char * opt_view_stipple6(OPT_ARGS_STR)
 {
   GET_VIEW("");
   if(action & GMSH_SET) {
-    strncpy(v->StippleString[6], val, 31);
-    v->StippleString[6][31] = '\0'; // just as a precaution
-    _string2stipple(v->StippleString[6], v->Stipple[6][0], v->Stipple[6][1]);
+    strncpy(opt->StippleString[6], val, 31);
+    opt->StippleString[6][31] = '\0'; // just as a precaution
+    _string2stipple(opt->StippleString[6], opt->Stipple[6][0], opt->Stipple[6][1]);
   }
-  return v->StippleString[6];
+  return opt->StippleString[6];
 }
 
 char * opt_view_stipple7(OPT_ARGS_STR)
 {
   GET_VIEW("");
   if(action & GMSH_SET) {
-    strncpy(v->StippleString[7], val, 31);
-    v->StippleString[7][31] = '\0'; // just as a precaution
-    _string2stipple(v->StippleString[7], v->Stipple[7][0], v->Stipple[7][1]);
+    strncpy(opt->StippleString[7], val, 31);
+    opt->StippleString[7][31] = '\0'; // just as a precaution
+    _string2stipple(opt->StippleString[7], opt->Stipple[7][0], opt->Stipple[7][1]);
   }
-  return v->StippleString[7];
+  return opt->StippleString[7];
 }
 
 char * opt_view_stipple8(OPT_ARGS_STR)
 {
   GET_VIEW("");
   if(action & GMSH_SET) {
-    strncpy(v->StippleString[8], val, 31);
-    v->StippleString[8][31] = '\0'; // just as a precaution
-    _string2stipple(v->StippleString[8], v->Stipple[8][0], v->Stipple[8][1]);
+    strncpy(opt->StippleString[8], val, 31);
+    opt->StippleString[8][31] = '\0'; // just as a precaution
+    _string2stipple(opt->StippleString[8], opt->Stipple[8][0], opt->Stipple[8][1]);
   }
-  return v->StippleString[8];
+  return opt->StippleString[8];
 }
 
 char * opt_view_stipple9(OPT_ARGS_STR)
 {
   GET_VIEW("");
   if(action & GMSH_SET) {
-    strncpy(v->StippleString[9], val, 31);
-    v->StippleString[9][31] = '\0'; // just as a precaution
-    _string2stipple(v->StippleString[9], v->Stipple[9][0], v->Stipple[9][1]);
+    strncpy(opt->StippleString[9], val, 31);
+    opt->StippleString[9][31] = '\0'; // just as a precaution
+    _string2stipple(opt->StippleString[9], opt->Stipple[9][0], opt->Stipple[9][1]);
   }
-  return v->StippleString[9];
+  return opt->StippleString[9];
 }
 
 // Numeric option routines
@@ -3111,25 +3144,14 @@ double opt_general_alpha_blending(OPT_ARGS_NUM)
 
 double opt_general_vector_type(OPT_ARGS_NUM)
 {
-  if(action & GMSH_SET)
+  if(action & GMSH_SET){
     CTX.vector_type = (int)val;
+    if(CTX.vector_type < 1 || CTX.vector_type > 4)
+      CTX.vector_type = 1;
+  }
 #if defined(HAVE_FLTK)
   if(WID && (action & GMSH_GUI)){
-    switch (CTX.vector_type) {
-    case DRAW_POST_SEGMENT:
-      WID->gen_choice[0]->value(0);
-      break;
-    case DRAW_POST_ARROW:
-      WID->gen_choice[0]->value(1);
-      break;
-    case DRAW_POST_PYRAMID:
-      WID->gen_choice[0]->value(2);
-      break;
-    case DRAW_POST_ARROW3D:
-    default:
-      WID->gen_choice[0]->value(3);
-      break;
-    }
+    WID->gen_choice[0]->value(CTX.vector_type - 1);
   }
 #endif
   return CTX.vector_type;
@@ -3176,7 +3198,7 @@ double opt_general_color_scheme(OPT_ARGS_NUM)
     Set_DefaultColorOptions(0, MeshOptions_Color);
     Set_DefaultColorOptions(0, SolverOptions_Color);
     Set_DefaultColorOptions(0, PostProcessingOptions_Color);
-    for(int i = 0; i < List_Nbr(CTX.post.list); i++)
+    for(unsigned int i = 0; i < PView::list.size(); i++)
       Set_DefaultColorOptions(i, ViewOptions_Color);
     Set_DefaultColorOptions(0, PrintOptions_Color);
 
@@ -3185,15 +3207,15 @@ double opt_general_color_scheme(OPT_ARGS_NUM)
     Set_ColorOptions_GUI(0, MeshOptions_Color);
     Set_ColorOptions_GUI(0, SolverOptions_Color);
     Set_ColorOptions_GUI(0, PostProcessingOptions_Color);
-    for(int i = 0; i < List_Nbr(CTX.post.list); i++)
+    for(unsigned int i = 0; i < PView::list.size(); i++)
       Set_ColorOptions_GUI(i, ViewOptions_Color);
     Set_ColorOptions_GUI(0, PrintOptions_Color);
 
-    // horrible trick so that the opt_view_XXX will act on the reference view
-    List_T *l = CTX.post.list;
-    CTX.post.list = NULL; 
+    // horrible trick so that opt_view_XXX will act on the reference view
+    std::vector<PView*> tmp = PView::list;
+    PView::list.clear();
     Set_DefaultColorOptions(0, ViewOptions_Color);
-    CTX.post.list = l;
+    PView::list = tmp;
   }
 #if defined(HAVE_FLTK)
   if(WID && (action & GMSH_GUI))
@@ -4801,24 +4823,13 @@ double opt_mesh_algo2d(OPT_ARGS_NUM)
 double opt_mesh_recombine_algo(OPT_ARGS_NUM)
 {
   if(action & GMSH_SET){
-    int algo = (int)val;
-    if(algo != 1 && algo != 2){
-      Msg(WARNING, "Unknown mesh algorithm: keeping existing value");
-    }
-    else{
-      CTX.mesh.algo_recombine = algo;
-    }
+    CTX.mesh.algo_recombine = (int)val;
+    if(CTX.mesh.algo_recombine < 1 && CTX.mesh.algo_recombine > 2)
+      CTX.mesh.algo_recombine = 1;
   }
 #if defined(HAVE_FLTK)
   if(WID && (action & GMSH_GUI)) {
-    switch (CTX.mesh.algo_recombine) {
-    case 2:
-      WID->mesh_choice[5]->value(1);
-      break;
-    default :
-      WID->mesh_choice[5]->value(0);
-      break;
-    }
+    WID->mesh_choice[5]->value(CTX.mesh.algo_recombine - 1);
   }
 #endif
   return CTX.mesh.algo_recombine;
@@ -5352,7 +5363,7 @@ double opt_post_plugins(OPT_ARGS_NUM)
 
 double opt_post_nb_views(OPT_ARGS_NUM)
 {
-  return List_Nbr(CTX.post.list);
+  return PView::list.size();
 }
 
 double opt_post_file_format(OPT_ARGS_NUM)
@@ -5365,346 +5376,354 @@ double opt_post_file_format(OPT_ARGS_NUM)
 double opt_view_nb_timestep(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
-  if(action & GMSH_SET)
-    v->NbTimeStep = (int)val;
+  if(!data) return 1;
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[50]->maximum(v->NbTimeStep - 1);
+    WID->view_value[50]->maximum(data->getNumTimeSteps() - 1);
   if(WID)
     WID->check_anim_buttons();
 #endif
-  return v->NbTimeStep;
+  return data->getNumTimeSteps();
 }
 
 double opt_view_timestep(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
+  if(!data) return 0.;
   if(action & GMSH_SET) {
-    v->TimeStep = (int)val;
-    if(v->TimeStep > v->NbTimeStep - 1)
-      v->TimeStep = 0;
-    else if(v->TimeStep < 0)
-      v->TimeStep = v->NbTimeStep - 1;
-    v->Changed = 1;
+    opt->TimeStep = (int)val;
+    if(opt->TimeStep > data->getNumTimeSteps() - 1)
+      opt->TimeStep = 0;
+    else if(opt->TimeStep < 0)
+      opt->TimeStep = data->getNumTimeSteps() - 1;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[50]->value(v->TimeStep);
+    WID->view_value[50]->value(opt->TimeStep);
 #endif
-  return v->TimeStep;
+  return opt->TimeStep;
 }
 
 double opt_view_min(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
-  return v->Min;
+  if(!data) return 0.;
+  return data->getMin();
 }
 
 double opt_view_max(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
-  return v->Max;
+  if(!data) return 0.;
+  return data->getMax();
 }
 
 double opt_view_custom_min(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->CustomMin = val;
-    v->Changed = 1;
+    opt->CustomMin = val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    WID->view_value[31]->value(v->CustomMin);
+    WID->view_value[31]->value(opt->CustomMin);
   }
 #endif
-  return v->CustomMin;
+  return opt->CustomMin;
 }
 
 double opt_view_custom_max(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->CustomMax = val;
-    v->Changed = 1;
+    opt->CustomMax = val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[32]->value(v->CustomMax);
+    WID->view_value[32]->value(opt->CustomMax);
 #endif
-  return v->CustomMax;
+  return opt->CustomMax;
 }
 
 double opt_view_xmin(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
-  return v->BBox[0];
+  if(!data) return 0.;
+  return data->getBoundingBox().min().x();
 }
 
 double opt_view_xmax(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
-  return v->BBox[1];
+  if(!data) return 0.;
+  return data->getBoundingBox().max().x();
 }
 
 double opt_view_ymin(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
-  return v->BBox[2];
+  if(!data) return 0.;
+  return data->getBoundingBox().min().y();
 }
 
 double opt_view_ymax(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
-  return v->BBox[3];
+  if(!data) return 0.;
+  return data->getBoundingBox().max().y();
 }
 
 double opt_view_zmin(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
-  return v->BBox[4];
+  if(!data) return 0.;
+  return data->getBoundingBox().min().z();
 }
 
 double opt_view_zmax(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
-  return v->BBox[5];
+  if(!data) return 0.;
+  return data->getBoundingBox().max().z();
 }
 
 double opt_view_offset0(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Offset[0] = val;
-    v->Changed = 1;
+    opt->Offset[0] = val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[40]->value(v->Offset[0]);
+    WID->view_value[40]->value(opt->Offset[0]);
 #endif
-  return v->Offset[0];
+  return opt->Offset[0];
 }
 
 double opt_view_offset1(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Offset[1] = val;
-    v->Changed = 1;
+    opt->Offset[1] = val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[41]->value(v->Offset[1]);
+    WID->view_value[41]->value(opt->Offset[1]);
 #endif
-  return v->Offset[1];
+  return opt->Offset[1];
 }
 
 double opt_view_offset2(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Offset[2] = val;
-    v->Changed = 1;
+    opt->Offset[2] = val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[42]->value(v->Offset[2]);
+    WID->view_value[42]->value(opt->Offset[2]);
 #endif
-  return v->Offset[2];
+  return opt->Offset[2];
 }
 
 double opt_view_raise0(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Raise[0] = val;
-    v->Changed = 1;
+    opt->Raise[0] = val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[43]->value(v->Raise[0]);
+    WID->view_value[43]->value(opt->Raise[0]);
 #endif
-  return v->Raise[0];
+  return opt->Raise[0];
 }
 
 double opt_view_raise1(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Raise[1] = val;
-    v->Changed = 1;
+    opt->Raise[1] = val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[44]->value(v->Raise[1]);
+    WID->view_value[44]->value(opt->Raise[1]);
 #endif
-  return v->Raise[1];
+  return opt->Raise[1];
 }
 
 double opt_view_raise2(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Raise[2] = val;
-    v->Changed = 1;
+    opt->Raise[2] = val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[45]->value(v->Raise[2]);
+    WID->view_value[45]->value(opt->Raise[2]);
 #endif
-  return v->Raise[2];
+  return opt->Raise[2];
 }
 
 double opt_view_transform00(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Transform[0][0] = val;
-    v->Changed = 1;
+    opt->Transform[0][0] = val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[51]->value(v->Transform[0][0]);
+    WID->view_value[51]->value(opt->Transform[0][0]);
 #endif
-  return v->Transform[0][0];
+  return opt->Transform[0][0];
 }
 
 double opt_view_transform01(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Transform[0][1] = val;
-    v->Changed = 1;
+    opt->Transform[0][1] = val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[52]->value(v->Transform[0][1]);
+    WID->view_value[52]->value(opt->Transform[0][1]);
 #endif
-  return v->Transform[0][1];
+  return opt->Transform[0][1];
 }
 
 double opt_view_transform02(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Transform[0][2] = val;
-    v->Changed = 1;
+    opt->Transform[0][2] = val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[53]->value(v->Transform[0][2]);
+    WID->view_value[53]->value(opt->Transform[0][2]);
 #endif
-  return v->Transform[0][2];
+  return opt->Transform[0][2];
 }
 
 double opt_view_transform10(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Transform[1][0] = val;
-    v->Changed = 1;
+    opt->Transform[1][0] = val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[54]->value(v->Transform[1][0]);
+    WID->view_value[54]->value(opt->Transform[1][0]);
 #endif
-  return v->Transform[1][0];
+  return opt->Transform[1][0];
 }
 
 double opt_view_transform11(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Transform[1][1] = val;
-    v->Changed = 1;
+    opt->Transform[1][1] = val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[55]->value(v->Transform[1][1]);
+    WID->view_value[55]->value(opt->Transform[1][1]);
 #endif
-  return v->Transform[1][1];
+  return opt->Transform[1][1];
 }
 
 double opt_view_transform12(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Transform[1][2] = val;
-    v->Changed = 1;
+    opt->Transform[1][2] = val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[56]->value(v->Transform[1][2]);
+    WID->view_value[56]->value(opt->Transform[1][2]);
 #endif
-  return v->Transform[1][2];
+  return opt->Transform[1][2];
 }
 
 double opt_view_transform20(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Transform[2][0] = val;
-    v->Changed = 1;
+    opt->Transform[2][0] = val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[57]->value(v->Transform[2][0]);
+    WID->view_value[57]->value(opt->Transform[2][0]);
 #endif
-  return v->Transform[2][0];
+  return opt->Transform[2][0];
 }
 
 double opt_view_transform21(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Transform[2][1] = val;
-    v->Changed = 1;
+    opt->Transform[2][1] = val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[58]->value(v->Transform[2][1]);
+    WID->view_value[58]->value(opt->Transform[2][1]);
 #endif
-  return v->Transform[2][1];
+  return opt->Transform[2][1];
 }
 
 double opt_view_transform22(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Transform[2][2] = val;
-    v->Changed = 1;
+    opt->Transform[2][2] = val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[59]->value(v->Transform[2][2]);
+    WID->view_value[59]->value(opt->Transform[2][2]);
 #endif
-  return v->Transform[2][2];
+  return opt->Transform[2][2];
 }
 
 double opt_view_arrow_size(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->ArrowSize = val;
+    opt->ArrowSize = val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[60]->value(v->ArrowSize);
+    WID->view_value[60]->value(opt->ArrowSize);
 #endif
-  return v->ArrowSize;
+  return opt->ArrowSize;
 }
 
 double opt_view_arrow_size_proportional(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->ArrowSizeProportional = (int)val;
+    opt->ArrowSizeProportional = (int)val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_butt[0]->value(v->ArrowSizeProportional);
+    WID->view_butt[0]->value(opt->ArrowSizeProportional);
 #endif
-  return v->ArrowSizeProportional;
+  return opt->ArrowSizeProportional;
 }
 
 double opt_view_arrow_head_radius(OPT_ARGS_NUM)
@@ -5713,9 +5732,9 @@ double opt_view_arrow_head_radius(OPT_ARGS_NUM)
   if(action & GMSH_SET){
     if(val < 0.) val = 0.;
     if(val > 1.) val = 1.;
-    v->ArrowRelHeadRadius = val;
+    opt->ArrowRelHeadRadius = val;
   }
-  return v->ArrowRelHeadRadius;
+  return opt->ArrowRelHeadRadius;
 }
 
 double opt_view_arrow_stem_length(OPT_ARGS_NUM)
@@ -5724,9 +5743,9 @@ double opt_view_arrow_stem_length(OPT_ARGS_NUM)
   if(action & GMSH_SET){
     if(val < 0.) val = 0.;
     if(val > 1.) val = 1.;
-    v->ArrowRelStemLength = val;
+    opt->ArrowRelStemLength = val;
   }
-  return v->ArrowRelStemLength;
+  return opt->ArrowRelStemLength;
 }
 
 double opt_view_arrow_stem_radius(OPT_ARGS_NUM)
@@ -5735,153 +5754,128 @@ double opt_view_arrow_stem_radius(OPT_ARGS_NUM)
   if(action & GMSH_SET){
     if(val < 0.) val = 0.;
     if(val > 1.) val = 1.;
-    v->ArrowRelStemRadius = val;
+    opt->ArrowRelStemRadius = val;
   }
-  return v->ArrowRelStemRadius;
+  return opt->ArrowRelStemRadius;
 }
 
 double opt_view_normals(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Normals = val;
+    opt->Normals = val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[0]->value(v->Normals);
+    WID->view_value[0]->value(opt->Normals);
 #endif
-  return v->Normals;
+  return opt->Normals;
 }
 
 double opt_view_tangents(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Tangents = val;
+    opt->Tangents = val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[1]->value(v->Tangents);
+    WID->view_value[1]->value(opt->Tangents);
 #endif
-  return v->Tangents;
+  return opt->Tangents;
 }
 
 double opt_view_displacement_factor(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->DisplacementFactor = val;
-    v->Changed = 1;
+    opt->DisplacementFactor = val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[63]->value(v->DisplacementFactor);
+    WID->view_value[63]->value(opt->DisplacementFactor);
 #endif
-  return v->DisplacementFactor;
+  return opt->DisplacementFactor;
 }
 
 double opt_view_fake_transparency(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->FakeTransparency = (int)val;
-    v->Changed = 1;
+    opt->FakeTransparency = (int)val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_butt[24]->value(v->FakeTransparency);
+    WID->view_butt[24]->value(opt->FakeTransparency);
 #endif
-  return v->FakeTransparency;
+  return opt->FakeTransparency;
 }
 
 double opt_view_explode(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Explode = val;
-    v->Changed = 1;
+    opt->Explode = val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[12]->value(v->Explode);
+    WID->view_value[12]->value(opt->Explode);
 #endif
-  return v->Explode;
+  return opt->Explode;
 }
 
 double opt_view_visible(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Visible = (int)val;
+    opt->Visible = (int)val;
   }
 #if defined(HAVE_FLTK)
   if(WID && (action & GMSH_GUI) && (num < (int)WID->m_toggle_butt.size()))
-    WID->m_toggle_butt[num]->value(v->Visible);
+    WID->m_toggle_butt[num]->value(opt->Visible);
 #endif
-  Msg(DEBUG1, "View %d", v->Num);
-  Msg(DEBUG2, "  -> Name '%s'", v->Name);
-  Msg(DEBUG2, "  -> FileName '%s'", v->FileName);
-  Msg(DEBUG2, "  -> AliasOf %d", v->AliasOf);
-  Msg(DEBUG3, "  -> Links %d", v->Links);
-  return v->Visible;
+  return opt->Visible;
 }
 
 double opt_view_intervals_type(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    int type = (int)val;
-    if(type != DRAW_POST_ISO &&
-       type != DRAW_POST_DISCRETE &&
-       type != DRAW_POST_CONTINUOUS &&
-       type != DRAW_POST_NUMERIC){
-      Msg(WARNING, "Unknown interval type: keeping existing value");
-    }
-    else{
-      v->IntervalsType = type;
-      v->Changed = 1;
-    }
+    opt->IntervalsType = (int)val;
+    if(opt->IntervalsType < 1 || opt->IntervalsType > 4)
+      opt->IntervalsType = 1;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    switch (v->IntervalsType) {
-    case DRAW_POST_ISO:
-      WID->view_choice[0]->value(0);
-      break;
-    case DRAW_POST_DISCRETE:
-      WID->view_choice[0]->value(1);
-      break;
-    case DRAW_POST_NUMERIC:
-      WID->view_choice[0]->value(3);
-      break;
-    case DRAW_POST_CONTINUOUS:
-    default:
-      WID->view_choice[0]->value(2);
-      break;
-    }
+    WID->view_choice[0]->value(opt->IntervalsType - 1);
   }
 #endif
-  return v->IntervalsType;
+  return opt->IntervalsType;
 }
 
 double opt_view_saturate_values(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->SaturateValues = (int)val;
-    v->Changed = 1;
+    opt->SaturateValues = (int)val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    WID->view_butt[38]->value(v->SaturateValues);
+    WID->view_butt[38]->value(opt->SaturateValues);
   }
 #endif
-  return v->SaturateValues;
+  return opt->SaturateValues;
 }
 
 
 double opt_view_max_recursion_level(OPT_ARGS_NUM)
 {
+  /*
   GET_VIEW(0.);
   if(action & GMSH_SET) {
     if(v->adaptive)
@@ -5896,11 +5890,13 @@ double opt_view_max_recursion_level(OPT_ARGS_NUM)
 #endif
   if(v->adaptive)
     return v->adaptive->getGlobalResolutionLevel();
+  */
   return 0;
 }
 
 double opt_view_target_error(OPT_ARGS_NUM)
 {
+  /*
   GET_VIEW(0.);
   if(action & GMSH_SET) {
     if(v->adaptive) {
@@ -5917,6 +5913,7 @@ double opt_view_target_error(OPT_ARGS_NUM)
 #endif
   if (v->adaptive)
     return v->adaptive->getTolerance();
+  */
   return 1.e-2;
 }
 
@@ -5925,1060 +5922,970 @@ double opt_view_type(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    int type = (int)val;
-    if(type != DRAW_POST_3D &&
-       type != DRAW_POST_2D_SPACE &&
-       type != DRAW_POST_2D_TIME){
-      Msg(WARNING, "Unknown view type: keeping existing value");
-    }
-    else{
-      v->Type = type;
-      v->Changed = 1;
-    }
+    opt->Type = (int)val;
+    if(opt->Type < 1 || opt->Type > 3)
+      opt->Type = 1;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    switch (v->Type) {
-    case DRAW_POST_3D:
-      WID->view_choice[13]->value(0);
-      break;
-    case DRAW_POST_2D_SPACE:
-      WID->view_choice[13]->value(1);
-      break;
-    case DRAW_POST_2D_TIME:
-    default:
-      WID->view_choice[13]->value(2);
-      break;
-    }
+    WID->view_choice[13]->value(opt->Type - 1);
   }
 #endif
-  return v->Type;
+  return opt->Type;
 }
 
 double opt_view_auto_position(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->AutoPosition = (int)val;
+    opt->AutoPosition = (int)val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    WID->view_butt[7]->value(v->AutoPosition);
+    WID->view_butt[7]->value(opt->AutoPosition);
     activate_cb(NULL, (void*)"view_axes_auto_2d");
   }
 #endif
-  return v->AutoPosition;
+  return opt->AutoPosition;
 }
 
 double opt_view_position0(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Position[0] = (int)val;
+    opt->Position[0] = (int)val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[20]->value(v->Position[0]);
+    WID->view_value[20]->value(opt->Position[0]);
 #endif
-  return v->Position[0];
+  return opt->Position[0];
 }
 
 double opt_view_position1(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Position[1] = (int)val;
+    opt->Position[1] = (int)val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[21]->value(v->Position[1]);
+    WID->view_value[21]->value(opt->Position[1]);
 #endif
-  return v->Position[1];
+  return opt->Position[1];
 }
 
 double opt_view_size0(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Size[0] = (int)val;
+    opt->Size[0] = (int)val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[22]->value(v->Size[0]);
+    WID->view_value[22]->value(opt->Size[0]);
 #endif
-  return v->Size[0];
+  return opt->Size[0];
 }
 
 double opt_view_size1(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Size[1] = (int)val;
+    opt->Size[1] = (int)val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[23]->value(v->Size[1]);
+    WID->view_value[23]->value(opt->Size[1]);
 #endif
-  return v->Size[1];
+  return opt->Size[1];
 }
 
 double opt_view_axes(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Axes = (int)val;
-    if(v->Axes < 0 || v->Axes > 5)
-      v->Axes = 0;
+    opt->Axes = (int)val;
+    if(opt->Axes < 0 || opt->Axes > 5)
+      opt->Axes = 0;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    WID->view_choice[8]->value(v->Axes);
+    WID->view_choice[8]->value(opt->Axes);
     activate_cb(NULL, (void*)"view_axes");
   }
 #endif
-  return v->Axes;
+  return opt->Axes;
 }
 
 double opt_view_axes_auto_position(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->AxesAutoPosition = (int)val;
+    opt->AxesAutoPosition = (int)val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    WID->view_butt[25]->value(v->AxesAutoPosition);
+    WID->view_butt[25]->value(opt->AxesAutoPosition);
     activate_cb(NULL, (void*)"view_axes_auto_3d");
   }
 #endif
-  return v->AxesAutoPosition;
+  return opt->AxesAutoPosition;
 }
 
 double opt_view_axes_xmin(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->AxesPosition[0] = val;
+    opt->AxesPosition[0] = val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    WID->view_value[13]->value(v->AxesPosition[0]);
+    WID->view_value[13]->value(opt->AxesPosition[0]);
   }
 #endif
-  return v->AxesPosition[0];
+  return opt->AxesPosition[0];
 }
 
 double opt_view_axes_xmax(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->AxesPosition[1] = val;
+    opt->AxesPosition[1] = val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    WID->view_value[16]->value(v->AxesPosition[1]);
+    WID->view_value[16]->value(opt->AxesPosition[1]);
   }
 #endif
-  return v->AxesPosition[1];
+  return opt->AxesPosition[1];
 }
 
 double opt_view_axes_ymin(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->AxesPosition[2] = val;
+    opt->AxesPosition[2] = val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    WID->view_value[14]->value(v->AxesPosition[2]);
+    WID->view_value[14]->value(opt->AxesPosition[2]);
   }
 #endif
-  return v->AxesPosition[2];
+  return opt->AxesPosition[2];
 }
 
 double opt_view_axes_ymax(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->AxesPosition[3] = val;
+    opt->AxesPosition[3] = val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    WID->view_value[17]->value(v->AxesPosition[3]);
+    WID->view_value[17]->value(opt->AxesPosition[3]);
   }
 #endif
-  return v->AxesPosition[3];
+  return opt->AxesPosition[3];
 }
 
 double opt_view_axes_zmin(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->AxesPosition[4] = val;
+    opt->AxesPosition[4] = val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    WID->view_value[15]->value(v->AxesPosition[4]);
+    WID->view_value[15]->value(opt->AxesPosition[4]);
   }
 #endif
-  return v->AxesPosition[4];
+  return opt->AxesPosition[4];
 }
 
 double opt_view_axes_zmax(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->AxesPosition[5] = val;
+    opt->AxesPosition[5] = val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    WID->view_value[18]->value(v->AxesPosition[5]);
+    WID->view_value[18]->value(opt->AxesPosition[5]);
   }
 #endif
-  return v->AxesPosition[5];
+  return opt->AxesPosition[5];
 }
 
 double opt_view_axes_tics0(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->AxesTics[0] = (int)val;
+    opt->AxesTics[0] = (int)val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    WID->view_value[3]->value(v->AxesTics[0]);
+    WID->view_value[3]->value(opt->AxesTics[0]);
   }
 #endif
-  return v->AxesTics[0];
+  return opt->AxesTics[0];
 }
 
 double opt_view_axes_tics1(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->AxesTics[1] = (int)val;
+    opt->AxesTics[1] = (int)val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    WID->view_value[4]->value(v->AxesTics[1]);
+    WID->view_value[4]->value(opt->AxesTics[1]);
   }
 #endif
-  return v->AxesTics[1];
+  return opt->AxesTics[1];
 }
 
 double opt_view_axes_tics2(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->AxesTics[2] = (int)val;
+    opt->AxesTics[2] = (int)val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    WID->view_value[5]->value(v->AxesTics[2]);
+    WID->view_value[5]->value(opt->AxesTics[2]);
   }
 #endif
-  return v->AxesTics[2];
+  return opt->AxesTics[2];
 }
 
 double opt_view_nb_iso(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->NbIso = (int)val;
-    v->Changed = 1;
+    opt->NbIso = (int)val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[30]->value(v->NbIso);
+    WID->view_value[30]->value(opt->NbIso);
 #endif
-  return v->NbIso;
+  return opt->NbIso;
 }
 
 double opt_view_boundary(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Boundary = (int)val;
-    if(v->Boundary < 0 || v->Boundary > 3)
-      v->Boundary = 0;
-    v->Changed = 1;
+    opt->Boundary = (int)val;
+    if(opt->Boundary < 0 || opt->Boundary > 3)
+      opt->Boundary = 0;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    WID->view_choice[9]->value(v->Boundary);
+    WID->view_choice[9]->value(opt->Boundary);
   }
 #endif
-  return v->Boundary;
+  return opt->Boundary;
 }
 
 double opt_view_light(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Light = (int)val;
-    v->Changed = 1;
+    opt->Light = (int)val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)){
-    WID->view_butt[11]->value(v->Light);
+    WID->view_butt[11]->value(opt->Light);
     activate_cb(NULL, (void*)"view_light");
   }
 #endif
-  return v->Light;
+  return opt->Light;
 }
 
 double opt_view_light_two_side(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->LightTwoSide = (int)val;
+    opt->LightTwoSide = (int)val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_butt[9]->value(v->LightTwoSide);
+    WID->view_butt[9]->value(opt->LightTwoSide);
 #endif
-  return v->LightTwoSide;
+  return opt->LightTwoSide;
 }
 
 double opt_view_light_lines(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->LightLines = (int)val;
+    opt->LightLines = (int)val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_butt[8]->value(v->LightLines);
+    WID->view_butt[8]->value(opt->LightLines);
 #endif
-  return v->LightLines;
+  return opt->LightLines;
 }
 
 double opt_view_smooth_normals(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->SmoothNormals = (int)val;
-    v->Changed = 1;
+    opt->SmoothNormals = (int)val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_butt[12]->value(v->SmoothNormals);
+    WID->view_butt[12]->value(opt->SmoothNormals);
 #endif
-  return v->SmoothNormals;
+  return opt->SmoothNormals;
 }
 
 double opt_view_angle_smooth_normals(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->AngleSmoothNormals = val;
-    v->Changed = 1;
+    opt->AngleSmoothNormals = val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[10]->value(v->AngleSmoothNormals);
+    WID->view_value[10]->value(opt->AngleSmoothNormals);
 #endif
-  return v->AngleSmoothNormals;
+  return opt->AngleSmoothNormals;
 }
 
 double opt_view_show_element(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->ShowElement = (int)val;
+    opt->ShowElement = (int)val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_butt[10]->value(v->ShowElement);
+    WID->view_butt[10]->value(opt->ShowElement);
 #endif
-  return v->ShowElement;
+  return opt->ShowElement;
 }
 
 double opt_view_show_time(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->ShowTime = (int)val;
-    if(v->ShowTime < 0 || v->ShowTime > 4)
-      v->ShowTime = 0;
+    opt->ShowTime = (int)val;
+    if(opt->ShowTime < 0 || opt->ShowTime > 4)
+      opt->ShowTime = 0;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_choice[12]->value(v->ShowTime);
+    WID->view_choice[12]->value(opt->ShowTime);
 #endif
-  return v->ShowTime;
+  return opt->ShowTime;
 }
 
 double opt_view_show_scale(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->ShowScale = (int)val;
+    opt->ShowScale = (int)val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_butt[4]->value(v->ShowScale);
+    WID->view_butt[4]->value(opt->ShowScale);
 #endif
-  return v->ShowScale;
+  return opt->ShowScale;
 }
 
 double opt_view_draw_strings(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->DrawStrings = (int)val;
+    opt->DrawStrings = (int)val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_butt[5]->value(v->DrawStrings);
+    WID->view_butt[5]->value(opt->DrawStrings);
 #endif
-  return v->DrawStrings;
+  return opt->DrawStrings;
 }
 
 double opt_view_draw_points(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->DrawPoints = (int)val;
+    opt->DrawPoints = (int)val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)){
-    if(v->DrawPoints)
+    if(opt->DrawPoints)
       ((Fl_Menu_Item*)WID->view_menu_butt[1]->menu())[0].set();
     else
       ((Fl_Menu_Item*)WID->view_menu_butt[1]->menu())[0].clear();
   }
 #endif
-  return v->DrawPoints;
+  return opt->DrawPoints;
 }
 
 double opt_view_draw_lines(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->DrawLines = (int)val;
+    opt->DrawLines = (int)val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)){
-    if(v->DrawLines)
+    if(opt->DrawLines)
       ((Fl_Menu_Item*)WID->view_menu_butt[1]->menu())[1].set();
     else
       ((Fl_Menu_Item*)WID->view_menu_butt[1]->menu())[1].clear();
   }
 #endif
-  return v->DrawLines;
+  return opt->DrawLines;
 }
 
 double opt_view_draw_triangles(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->DrawTriangles = (int)val;
-    v->Changed = 1;
+    opt->DrawTriangles = (int)val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)){
-    if(v->DrawTriangles)
+    if(opt->DrawTriangles)
       ((Fl_Menu_Item*)WID->view_menu_butt[1]->menu())[2].set();
     else
       ((Fl_Menu_Item*)WID->view_menu_butt[1]->menu())[2].clear();
   }
 #endif
-  return v->DrawTriangles;
+  return opt->DrawTriangles;
 }
 
 double opt_view_draw_quadrangles(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->DrawQuadrangles = (int)val;
-    v->Changed = 1;
+    opt->DrawQuadrangles = (int)val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)){
-    if(v->DrawQuadrangles)
+    if(opt->DrawQuadrangles)
       ((Fl_Menu_Item*)WID->view_menu_butt[1]->menu())[3].set();
     else
       ((Fl_Menu_Item*)WID->view_menu_butt[1]->menu())[3].clear();
   }
 #endif
-  return v->DrawQuadrangles;
+  return opt->DrawQuadrangles;
 }
 
 double opt_view_draw_tetrahedra(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->DrawTetrahedra = (int)val;
-    v->Changed = 1;
+    opt->DrawTetrahedra = (int)val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)){
-    if(v->DrawTetrahedra)
+    if(opt->DrawTetrahedra)
       ((Fl_Menu_Item*)WID->view_menu_butt[1]->menu())[4].set();
     else
       ((Fl_Menu_Item*)WID->view_menu_butt[1]->menu())[4].clear();
   }
 #endif
-  return v->DrawTetrahedra;
+  return opt->DrawTetrahedra;
 }
 
 double opt_view_draw_hexahedra(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->DrawHexahedra = (int)val;
-    v->Changed = 1;
+    opt->DrawHexahedra = (int)val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)){
-    if(v->DrawHexahedra)
+    if(opt->DrawHexahedra)
       ((Fl_Menu_Item*)WID->view_menu_butt[1]->menu())[5].set();
     else
       ((Fl_Menu_Item*)WID->view_menu_butt[1]->menu())[5].clear();
   }
 #endif
-  return v->DrawHexahedra;
+  return opt->DrawHexahedra;
 }
 
 double opt_view_draw_prisms(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->DrawPrisms = (int)val;
-    v->Changed = 1;
+    opt->DrawPrisms = (int)val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)){
-    if(v->DrawPrisms)
+    if(opt->DrawPrisms)
       ((Fl_Menu_Item*)WID->view_menu_butt[1]->menu())[6].set();
     else
       ((Fl_Menu_Item*)WID->view_menu_butt[1]->menu())[6].clear();
   }
 #endif
-  return v->DrawPrisms;
+  return opt->DrawPrisms;
 }
 
 double opt_view_draw_pyramids(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->DrawPyramids = (int)val;
-    v->Changed = 1;
+    opt->DrawPyramids = (int)val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)){
-    if(v->DrawPyramids)
+    if(opt->DrawPyramids)
       ((Fl_Menu_Item*)WID->view_menu_butt[1]->menu())[7].set();
     else
       ((Fl_Menu_Item*)WID->view_menu_butt[1]->menu())[7].clear();
   }
 #endif
-  return v->DrawPyramids;
+  return opt->DrawPyramids;
 }
 
 double opt_view_draw_scalars(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->DrawScalars = (int)val;
-    v->Changed = 1;
+    opt->DrawScalars = (int)val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)){
-    if(v->DrawScalars)
+    if(opt->DrawScalars)
       ((Fl_Menu_Item*)WID->view_menu_butt[0]->menu())[0].set();
     else
       ((Fl_Menu_Item*)WID->view_menu_butt[0]->menu())[0].clear();
   }
 #endif
-  return v->DrawScalars;
+  return opt->DrawScalars;
 }
 
 double opt_view_draw_vectors(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->DrawVectors = (int)val;
-    v->Changed = 1;
+    opt->DrawVectors = (int)val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)){
-    if(v->DrawVectors)
+    if(opt->DrawVectors)
       ((Fl_Menu_Item*)WID->view_menu_butt[0]->menu())[1].set();
     else
       ((Fl_Menu_Item*)WID->view_menu_butt[0]->menu())[1].clear();
   }
 #endif
-  return v->DrawVectors;
+  return opt->DrawVectors;
 }
 
 double opt_view_draw_tensors(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->DrawTensors = (int)val;
-    v->Changed = 1;
+    opt->DrawTensors = (int)val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)){
-    if(v->DrawTensors)
+    if(opt->DrawTensors)
       ((Fl_Menu_Item*)WID->view_menu_butt[0]->menu())[2].set();
     else
       ((Fl_Menu_Item*)WID->view_menu_butt[0]->menu())[2].clear();
   }
 #endif
-  return v->DrawTensors;
+  return opt->DrawTensors;
 }
 
 double opt_view_scale_type(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    int type = (int)val;
-    if(type != DRAW_POST_LINEAR &&
-       type != DRAW_POST_LOGARITHMIC &&
-       type != DRAW_POST_DOUBLELOGARITHMIC){
-      Msg(WARNING, "Unknown scale type: keeping existing value");
-    }
-    else{
-      v->ScaleType = type;
-      v->Changed = 1;
-    }
+    opt->ScaleType = (int)val;
+    if(opt->ScaleType < 1 || opt->ScaleType > 3)
+      opt->ScaleType = 1;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    switch (v->ScaleType) {
-    case DRAW_POST_LOGARITHMIC:
-      WID->view_choice[1]->value(1);
-      break;
-    case DRAW_POST_DOUBLELOGARITHMIC:
-      WID->view_choice[1]->value(2);
-      break;
-    case DRAW_POST_LINEAR:
-    default:
-      WID->view_choice[1]->value(0);
-      break;
-    }
+    WID->view_choice[1]->value(opt->ScaleType - 1);
   }
 #endif
-  return v->ScaleType;
+  return opt->ScaleType;
 }
 
 double opt_view_range_type(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->RangeType = (int)val;
-    v->Changed = 1;
+    opt->RangeType = (int)val;
+    if(opt->RangeType < 1 || opt->RangeType > 3)
+      opt->RangeType = 1;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)){
-    switch(v->RangeType){
-    case DRAW_POST_RANGE_PER_STEP:
-      WID->view_choice[7]->value(1);
-      break;
-    case DRAW_POST_RANGE_CUSTOM:
-      WID->view_choice[7]->value(2);
-      break;
-    case DRAW_POST_RANGE_DEFAULT:
-    default:
-      WID->view_choice[7]->value(0);
-      break;
-    }
+    WID->view_choice[7]->value(opt->RangeType - 1);
     activate_cb(NULL, (void*)"custom_range");
   }
 #endif
-  return v->RangeType;
+  return opt->RangeType;
 }
 
 double opt_view_tensor_type(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->TensorType = (int)val;
-    v->Changed = 1;
+    opt->TensorType = (int)val;
+    if(opt->TensorType != 1)
+      opt->TensorType = 1;
+    if(view) view->setChanged(true);
   }
  #if defined(HAVE_FLTK)
    if(_gui_action_valid(action, num)) {
-     switch (v->TensorType) {
-     case DRAW_POST_LMGC90:
-       WID->view_choice[4]->value(1);
-       break;
-     case DRAW_POST_LMGC90_TYPE:
-       WID->view_choice[4]->value(2);
-       break;
-     case DRAW_POST_LMGC90_COORD:
-       WID->view_choice[4]->value(3);
-       break;
-     case DRAW_POST_LMGC90_PRES:
-       WID->view_choice[4]->value(4);
-       break;
-     case DRAW_POST_LMGC90_SN:
-       WID->view_choice[4]->value(5);
-       break;
-     case DRAW_POST_LMGC90_DEPX:
-       WID->view_choice[4]->value(6);
-       break;
-     case DRAW_POST_LMGC90_DEPY:
-       WID->view_choice[4]->value(7);
-       break;
-     case DRAW_POST_LMGC90_DEPZ:
-       WID->view_choice[4]->value(8);
-       break;
-     case DRAW_POST_LMGC90_DEPAV:
-       WID->view_choice[4]->value(9);
-       break;
-     case DRAW_POST_LMGC90_DEPNORM:
-       WID->view_choice[4]->value(10);
-       break;
-     case DRAW_POST_VONMISES:
-     default:
-       WID->view_choice[4]->value(0);
-       break;
-     }
+     WID->view_choice[4]->value(opt->TensorType - 1);
    }
  #endif
-  return v->TensorType;
+  return opt->TensorType;
 }
 
 double opt_view_vector_type(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->VectorType = (int)val;
-    v->Changed = 1;
+    opt->VectorType = (int)val;
+    if(opt->VectorType < 1 || opt->VectorType > 5)
+      opt->VectorType = 1;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    switch (v->VectorType) {
-    case DRAW_POST_SEGMENT:
-      WID->view_choice[2]->value(0);
-      break;
-    case DRAW_POST_ARROW:
-      WID->view_choice[2]->value(1);
-      break;
-    case DRAW_POST_PYRAMID:
-      WID->view_choice[2]->value(2);
-      break;
-    case DRAW_POST_DISPLACEMENT:
-      WID->view_choice[2]->value(4);
-      break;
-    case DRAW_POST_ARROW3D:
-    default:
-      WID->view_choice[2]->value(3);
-      break;
-    }
+    WID->view_choice[2]->value(opt->VectorType - 1);
   }
 #endif
-  return v->VectorType;
+  return opt->VectorType;
 }
 
 double opt_view_glyph_location(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->GlyphLocation = (int)val;
+    opt->GlyphLocation = (int)val;
+    if(opt->GlyphLocation < 1 || opt->GlyphLocation > 2)
+      opt->GlyphLocation = 1;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    switch (v->GlyphLocation) {
-    case DRAW_POST_LOCATE_VERTEX:
-      WID->view_choice[3]->value(1);
-      break;
-    case DRAW_POST_LOCATE_COG:
-    default:
-      WID->view_choice[3]->value(0);
-      break;
-    }
+    WID->view_choice[3]->value(opt->GlyphLocation - 1);
   }
 #endif
-  return v->GlyphLocation;
+  return opt->GlyphLocation;
 }
 
 double opt_view_point_size(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->PointSize = val;
+    opt->PointSize = val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[61]->value(v->PointSize);
+    WID->view_value[61]->value(opt->PointSize);
 #endif
-  return v->PointSize;
+  return opt->PointSize;
 }
 
 double opt_view_line_width(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->LineWidth = val;
+    opt->LineWidth = val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[62]->value(v->LineWidth);
+    WID->view_value[62]->value(opt->LineWidth);
 #endif
-  return v->LineWidth;
+  return opt->LineWidth;
 }
 
 double opt_view_point_type(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->PointType = (int)val;
-    if(v->PointType < 0 || v->PointType > 2) v->PointType = 0;
+    opt->PointType = (int)val;
+    if(opt->PointType < 0 || opt->PointType > 2) 
+      opt->PointType = 0;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    WID->view_choice[5]->value(v->PointType);
+    WID->view_choice[5]->value(opt->PointType);
   }
 #endif
-  return v->PointType;
+  return opt->PointType;
 }
 
 double opt_view_line_type(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->LineType = (int)val;
-    if(v->LineType < 0 || v->LineType > 2) v->LineType = 0;
-    v->Changed = 1;
+    opt->LineType = (int)val;
+    if(opt->LineType < 0 || opt->LineType > 2) 
+      opt->LineType = 0;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    WID->view_choice[6]->value(v->LineType);
+    WID->view_choice[6]->value(opt->LineType);
   }
 #endif
-  return v->LineType;
+  return opt->LineType;
 }
 
 double opt_view_colormap_alpha(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->CT.dpar[COLORTABLE_ALPHA] = val;
-    ColorTable_Recompute(&v->CT);
-    v->Changed = 1;
+    opt->CT.dpar[COLORTABLE_ALPHA] = val;
+    ColorTable_Recompute(&opt->CT);
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
     WID->view_colorbar_window->redraw();
   }
 #endif
-  return v->CT.dpar[COLORTABLE_ALPHA];
+  return opt->CT.dpar[COLORTABLE_ALPHA];
 }
 
 double opt_view_colormap_alpha_power(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->CT.dpar[COLORTABLE_ALPHAPOW] = val;
-    ColorTable_Recompute(&v->CT);
-    v->Changed = 1;
+    opt->CT.dpar[COLORTABLE_ALPHAPOW] = val;
+    ColorTable_Recompute(&opt->CT);
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
     WID->view_colorbar_window->redraw();
   }
 #endif
-  return v->CT.dpar[COLORTABLE_ALPHAPOW];
+  return opt->CT.dpar[COLORTABLE_ALPHAPOW];
 }
 
 double opt_view_colormap_beta(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->CT.dpar[COLORTABLE_BETA] = val;
-    ColorTable_Recompute(&v->CT);
-    v->Changed = 1;
+    opt->CT.dpar[COLORTABLE_BETA] = val;
+    ColorTable_Recompute(&opt->CT);
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
     WID->view_colorbar_window->redraw();
   }
 #endif
-  return v->CT.dpar[COLORTABLE_BETA];
+  return opt->CT.dpar[COLORTABLE_BETA];
 }
 
 double opt_view_colormap_bias(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->CT.dpar[COLORTABLE_BIAS] = val;
-    ColorTable_Recompute(&v->CT);
-    v->Changed = 1;
+    opt->CT.dpar[COLORTABLE_BIAS] = val;
+    ColorTable_Recompute(&opt->CT);
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
     WID->view_colorbar_window->redraw();
   }
 #endif
-  return v->CT.dpar[COLORTABLE_BIAS];
+  return opt->CT.dpar[COLORTABLE_BIAS];
 }
 
 double opt_view_colormap_curvature(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->CT.dpar[COLORTABLE_CURVATURE] = val;
-    ColorTable_Recompute(&v->CT);
-    v->Changed = 1;
+    opt->CT.dpar[COLORTABLE_CURVATURE] = val;
+    ColorTable_Recompute(&opt->CT);
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
     WID->view_colorbar_window->redraw();
   }
 #endif
-  return v->CT.dpar[COLORTABLE_CURVATURE];
+  return opt->CT.dpar[COLORTABLE_CURVATURE];
 }
 
 double opt_view_colormap_invert(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->CT.ipar[COLORTABLE_INVERT] = (int)val;
-    ColorTable_Recompute(&v->CT);
-    v->Changed = 1;
+    opt->CT.ipar[COLORTABLE_INVERT] = (int)val;
+    ColorTable_Recompute(&opt->CT);
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
     WID->view_colorbar_window->redraw();
   }
 #endif
-  return v->CT.ipar[COLORTABLE_INVERT];
+  return opt->CT.ipar[COLORTABLE_INVERT];
 }
 
 double opt_view_colormap_number(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->CT.ipar[COLORTABLE_NUMBER] = (int)val;
-    ColorTable_Recompute(&v->CT);
-    v->Changed = 1;
+    opt->CT.ipar[COLORTABLE_NUMBER] = (int)val;
+    ColorTable_Recompute(&opt->CT);
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
     WID->view_colorbar_window->redraw();
   }
 #endif
-  return v->CT.ipar[COLORTABLE_NUMBER];
+  return opt->CT.ipar[COLORTABLE_NUMBER];
 }
 
 double opt_view_colormap_rotation(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->CT.ipar[COLORTABLE_ROTATION] = (int)val;
-    ColorTable_Recompute(&v->CT);
-    v->Changed = 1;
+    opt->CT.ipar[COLORTABLE_ROTATION] = (int)val;
+    ColorTable_Recompute(&opt->CT);
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
     WID->view_colorbar_window->redraw();
   }
 #endif
-  return v->CT.ipar[COLORTABLE_ROTATION];
+  return opt->CT.ipar[COLORTABLE_ROTATION];
 }
 
 double opt_view_colormap_swap(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->CT.ipar[COLORTABLE_SWAP] = (int)val;
-    ColorTable_Recompute(&v->CT);
-    v->Changed = 1;
+    opt->CT.ipar[COLORTABLE_SWAP] = (int)val;
+    ColorTable_Recompute(&opt->CT);
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
     WID->view_colorbar_window->redraw();
   }
 #endif
-  return v->CT.ipar[COLORTABLE_SWAP];
+  return opt->CT.ipar[COLORTABLE_SWAP];
 }
 
 double opt_view_external_view(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->ExternalViewIndex = (int)val;
-    v->Changed = 1;
+    opt->ExternalViewIndex = (int)val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)){
     // warning: Fl_Choice::size() returns number of items+1
-    int item = v->ExternalViewIndex + 1;
+    int item = opt->ExternalViewIndex + 1;
     if(item > -1 && item < WID->view_choice[10]->size()-1)
       WID->view_choice[10]->value(item);
     else
       WID->view_choice[10]->value(0);
   }
 #endif
-  return v->ExternalViewIndex;
+  return opt->ExternalViewIndex;
 }
 
 double opt_view_gen_raise_view(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->ViewIndexForGenRaise = (int)val;
-    v->Changed = 1;
+    opt->ViewIndexForGenRaise = (int)val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)){
     // warning: Fl_Choice::size() returns number of items+1
-    int item = v->ViewIndexForGenRaise + 1;
+    int item = opt->ViewIndexForGenRaise + 1;
     if(item > -1 && item < WID->view_choice[11]->size()-1)
       WID->view_choice[11]->value(item);
     else
       WID->view_choice[11]->value(0);
   }
 #endif
-  return v->ViewIndexForGenRaise;
+  return opt->ViewIndexForGenRaise;
 }
 
 double opt_view_gen_raise_factor(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->GenRaiseFactor = val;
-    v->Changed = 1;
+    opt->GenRaiseFactor = val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[2]->value(v->GenRaiseFactor);
+    WID->view_value[2]->value(opt->GenRaiseFactor);
 #endif
-  return v->GenRaiseFactor;
+  return opt->GenRaiseFactor;
 }
 
 double opt_view_use_gen_raise(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->UseGenRaise = (int)val;
-    v->Changed = 1;
+    opt->UseGenRaise = (int)val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)){
-    WID->view_butt[6]->value(v->UseGenRaise);
+    WID->view_butt[6]->value(opt->UseGenRaise);
     activate_cb(NULL, (void*)"general_transform");
   }
 #endif
-  return v->UseGenRaise;
+  return opt->UseGenRaise;
 }
 
 double opt_view_use_stipple(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->UseStipple = (int)val;
+    opt->UseStipple = (int)val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)){
-    WID->view_butt[26]->value(v->UseStipple);
+    WID->view_butt[26]->value(opt->UseStipple);
   }
 #endif
-  return v->UseStipple;
+  return opt->UseStipple;
 }
 
 double opt_print_format(OPT_ARGS_NUM)
@@ -7523,191 +7430,191 @@ unsigned int opt_view_color_points(OPT_ARGS_COL)
 {
   GET_VIEW(0);
   if(action & GMSH_SET) {
-    v->color.point = val;
-    v->Changed = 1;
+    opt->color.point = val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)){
-    CCC(v->color.point, WID->view_col[0]);
+    CCC(opt->color.point, WID->view_col[0]);
   }
 #endif
-  return v->color.point;
+  return opt->color.point;
 }
 
 unsigned int opt_view_color_lines(OPT_ARGS_COL)
 {
   GET_VIEW(0);
   if(action & GMSH_SET) {
-    v->color.line = val;
-    v->Changed = 1;
+    opt->color.line = val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)){
-    CCC(v->color.line, WID->view_col[1]);
+    CCC(opt->color.line, WID->view_col[1]);
   }
 #endif
-  return v->color.line;
+  return opt->color.line;
 }
 
 unsigned int opt_view_color_triangles(OPT_ARGS_COL)
 {
   GET_VIEW(0);
   if(action & GMSH_SET) {
-    v->color.triangle = val;
-    v->Changed = 1;
+    opt->color.triangle = val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)){
-    CCC(v->color.triangle, WID->view_col[2]);
+    CCC(opt->color.triangle, WID->view_col[2]);
   }
 #endif
-  return v->color.triangle;
+  return opt->color.triangle;
 }
 
 unsigned int opt_view_color_quadrangles(OPT_ARGS_COL)
 {
   GET_VIEW(0);
   if(action & GMSH_SET) {
-    v->color.quadrangle = val;
-    v->Changed = 1;
+    opt->color.quadrangle = val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)){
-    CCC(v->color.quadrangle, WID->view_col[3]);
+    CCC(opt->color.quadrangle, WID->view_col[3]);
   }
 #endif
-  return v->color.quadrangle;
+  return opt->color.quadrangle;
 }
 
 unsigned int opt_view_color_tetrahedra(OPT_ARGS_COL)
 {
   GET_VIEW(0);
   if(action & GMSH_SET) {
-    v->color.tetrahedron = val;
-    v->Changed = 1;
+    opt->color.tetrahedron = val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)){
-    CCC(v->color.tetrahedron, WID->view_col[4]);
+    CCC(opt->color.tetrahedron, WID->view_col[4]);
   }
 #endif
-  return v->color.tetrahedron;
+  return opt->color.tetrahedron;
 }
 
 unsigned int opt_view_color_hexahedra(OPT_ARGS_COL)
 {
   GET_VIEW(0);
   if(action & GMSH_SET) {
-    v->color.hexahedron = val;
-    v->Changed = 1;
+    opt->color.hexahedron = val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)){
-    CCC(v->color.hexahedron, WID->view_col[5]);
+    CCC(opt->color.hexahedron, WID->view_col[5]);
   }
 #endif
-  return v->color.hexahedron;
+  return opt->color.hexahedron;
 }
 
 unsigned int opt_view_color_prisms(OPT_ARGS_COL)
 {
   GET_VIEW(0);
   if(action & GMSH_SET) {
-    v->color.prism = val;
-    v->Changed = 1;
+    opt->color.prism = val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)){
-    CCC(v->color.prism, WID->view_col[6]);
+    CCC(opt->color.prism, WID->view_col[6]);
   }
 #endif
-  return v->color.prism;
+  return opt->color.prism;
 }
 
 unsigned int opt_view_color_pyramids(OPT_ARGS_COL)
 {
   GET_VIEW(0);
   if(action & GMSH_SET) {
-    v->color.pyramid = val;
-    v->Changed = 1;
+    opt->color.pyramid = val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)){
-    CCC(v->color.pyramid, WID->view_col[7]);
+    CCC(opt->color.pyramid, WID->view_col[7]);
   }
 #endif
-  return v->color.pyramid;
+  return opt->color.pyramid;
 }
 
 unsigned int opt_view_color_tangents(OPT_ARGS_COL)
 {
   GET_VIEW(0);
   if(action & GMSH_SET) {
-    v->color.tangents = val;
-    v->Changed = 1;
+    opt->color.tangents = val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)){
-    CCC(v->color.tangents, WID->view_col[8]);
+    CCC(opt->color.tangents, WID->view_col[8]);
   }
 #endif
-  return v->color.tangents;
+  return opt->color.tangents;
 }
 
 unsigned int opt_view_color_normals(OPT_ARGS_COL)
 {
   GET_VIEW(0);
   if(action & GMSH_SET) {
-    v->color.normals = val;
-    v->Changed = 1;
+    opt->color.normals = val;
+    if(view) view->setChanged(true);
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)){
-    CCC(v->color.normals, WID->view_col[9]);
+    CCC(opt->color.normals, WID->view_col[9]);
   }
 #endif
-  return v->color.normals;
+  return opt->color.normals;
 }
 
 unsigned int opt_view_color_text2d(OPT_ARGS_COL)
 {
   GET_VIEW(0);
   if(action & GMSH_SET) {
-    v->color.text2d = val;
+    opt->color.text2d = val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)){
-    CCC(v->color.text2d, WID->view_col[10]);
+    CCC(opt->color.text2d, WID->view_col[10]);
   }
 #endif
-  return v->color.text2d;
+  return opt->color.text2d;
 }
 
 unsigned int opt_view_color_text3d(OPT_ARGS_COL)
 {
   GET_VIEW(0);
   if(action & GMSH_SET) {
-    v->color.text3d = val;
+    opt->color.text3d = val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)){
-    CCC(v->color.text3d, WID->view_col[11]);
+    CCC(opt->color.text3d, WID->view_col[11]);
   }
 #endif
-  return v->color.text3d;
+  return opt->color.text3d;
 }
 
 unsigned int opt_view_color_axes(OPT_ARGS_COL)
 {
   GET_VIEW(0);
   if(action & GMSH_SET) {
-    v->color.axes = val;
+    opt->color.axes = val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)){
-    CCC(v->color.axes, WID->view_col[12]);
+    CCC(opt->color.axes, WID->view_col[12]);
   }
 #endif
-  return v->color.axes;
+  return opt->color.axes;
 }
 
diff --git a/Common/Options.h b/Common/Options.h
index ba52ec6eb4035d054521a9bbc27a6b9c169eae25..a936eed5f5ffccbbaf34cf213177384532dbb639 100644
--- a/Common/Options.h
+++ b/Common/Options.h
@@ -20,6 +20,8 @@
 // 
 // Please report all bugs and problems to <gmsh@geuz.org>.
 
+#include "ColorTable.h"
+
 #define GMSH_SET       (1<<0)
 #define GMSH_GET       (1<<1)
 #define GMSH_GUI       (1<<2)
@@ -36,191 +38,191 @@
 
 // STRINGS
 
-char * opt_general_axes_label0(OPT_ARGS_STR);
-char * opt_general_axes_label1(OPT_ARGS_STR);
-char * opt_general_axes_label2(OPT_ARGS_STR);
-char * opt_general_axes_format0(OPT_ARGS_STR);
-char * opt_general_axes_format1(OPT_ARGS_STR);
-char * opt_general_axes_format2(OPT_ARGS_STR);
-char * opt_general_display(OPT_ARGS_STR);
-char * opt_general_filename(OPT_ARGS_STR);
-char * opt_general_default_filename(OPT_ARGS_STR);
-char * opt_general_tmp_filename(OPT_ARGS_STR);
-char * opt_general_error_filename(OPT_ARGS_STR);
-char * opt_general_session_filename(OPT_ARGS_STR);
-char * opt_general_options_filename(OPT_ARGS_STR);
-char * opt_general_editor(OPT_ARGS_STR);
-char * opt_general_web_browser(OPT_ARGS_STR);
-char * opt_general_gui_theme(OPT_ARGS_STR);
-char * opt_general_graphics_font(OPT_ARGS_STR);
-char * opt_mesh_triangle_options(OPT_ARGS_STR);
-char * opt_solver_socket_name(OPT_ARGS_STR);
-char * opt_solver_name(OPT_ARGS_STR);
-char * opt_solver_name0(OPT_ARGS_STR);
-char * opt_solver_name1(OPT_ARGS_STR);
-char * opt_solver_name2(OPT_ARGS_STR);
-char * opt_solver_name3(OPT_ARGS_STR);
-char * opt_solver_name4(OPT_ARGS_STR);
-char * opt_solver_executable(OPT_ARGS_STR);
-char * opt_solver_executable0(OPT_ARGS_STR);
-char * opt_solver_executable1(OPT_ARGS_STR);
-char * opt_solver_executable2(OPT_ARGS_STR);
-char * opt_solver_executable3(OPT_ARGS_STR);
-char * opt_solver_executable4(OPT_ARGS_STR);
-char * opt_solver_help(OPT_ARGS_STR);
-char * opt_solver_help0(OPT_ARGS_STR);
-char * opt_solver_help1(OPT_ARGS_STR);
-char * opt_solver_help2(OPT_ARGS_STR);
-char * opt_solver_help3(OPT_ARGS_STR);
-char * opt_solver_help4(OPT_ARGS_STR);
-char * opt_solver_extension(OPT_ARGS_STR);
-char * opt_solver_extension0(OPT_ARGS_STR);
-char * opt_solver_extension1(OPT_ARGS_STR);
-char * opt_solver_extension2(OPT_ARGS_STR);
-char * opt_solver_extension3(OPT_ARGS_STR);
-char * opt_solver_extension4(OPT_ARGS_STR);
-char * opt_solver_mesh_name(OPT_ARGS_STR);
-char * opt_solver_mesh_name0(OPT_ARGS_STR);
-char * opt_solver_mesh_name1(OPT_ARGS_STR);
-char * opt_solver_mesh_name2(OPT_ARGS_STR);
-char * opt_solver_mesh_name3(OPT_ARGS_STR);
-char * opt_solver_mesh_name4(OPT_ARGS_STR);
-char * opt_solver_mesh_command(OPT_ARGS_STR);
-char * opt_solver_mesh_command0(OPT_ARGS_STR);
-char * opt_solver_mesh_command1(OPT_ARGS_STR);
-char * opt_solver_mesh_command2(OPT_ARGS_STR);
-char * opt_solver_mesh_command3(OPT_ARGS_STR);
-char * opt_solver_mesh_command4(OPT_ARGS_STR);
-char * opt_solver_socket_command(OPT_ARGS_STR);
-char * opt_solver_socket_command0(OPT_ARGS_STR);
-char * opt_solver_socket_command1(OPT_ARGS_STR);
-char * opt_solver_socket_command2(OPT_ARGS_STR);
-char * opt_solver_socket_command3(OPT_ARGS_STR);
-char * opt_solver_socket_command4(OPT_ARGS_STR);
-char * opt_solver_name_command(OPT_ARGS_STR);
-char * opt_solver_name_command0(OPT_ARGS_STR);
-char * opt_solver_name_command1(OPT_ARGS_STR);
-char * opt_solver_name_command2(OPT_ARGS_STR);
-char * opt_solver_name_command3(OPT_ARGS_STR);
-char * opt_solver_name_command4(OPT_ARGS_STR);
-char * opt_solver_option_command(OPT_ARGS_STR);
-char * opt_solver_option_command0(OPT_ARGS_STR);
-char * opt_solver_option_command1(OPT_ARGS_STR);
-char * opt_solver_option_command2(OPT_ARGS_STR);
-char * opt_solver_option_command3(OPT_ARGS_STR);
-char * opt_solver_option_command4(OPT_ARGS_STR);
-char * opt_solver_first_option(OPT_ARGS_STR);
-char * opt_solver_first_option0(OPT_ARGS_STR);
-char * opt_solver_first_option1(OPT_ARGS_STR);
-char * opt_solver_first_option2(OPT_ARGS_STR);
-char * opt_solver_first_option3(OPT_ARGS_STR);
-char * opt_solver_first_option4(OPT_ARGS_STR);
-char * opt_solver_second_option(OPT_ARGS_STR);
-char * opt_solver_second_option0(OPT_ARGS_STR);
-char * opt_solver_second_option1(OPT_ARGS_STR);
-char * opt_solver_second_option2(OPT_ARGS_STR);
-char * opt_solver_second_option3(OPT_ARGS_STR);
-char * opt_solver_second_option4(OPT_ARGS_STR);
-char * opt_solver_third_option(OPT_ARGS_STR);
-char * opt_solver_third_option0(OPT_ARGS_STR);
-char * opt_solver_third_option1(OPT_ARGS_STR);
-char * opt_solver_third_option2(OPT_ARGS_STR);
-char * opt_solver_third_option3(OPT_ARGS_STR);
-char * opt_solver_third_option4(OPT_ARGS_STR);
-char * opt_solver_fourth_option(OPT_ARGS_STR);
-char * opt_solver_fourth_option0(OPT_ARGS_STR);
-char * opt_solver_fourth_option1(OPT_ARGS_STR);
-char * opt_solver_fourth_option2(OPT_ARGS_STR);
-char * opt_solver_fourth_option3(OPT_ARGS_STR);
-char * opt_solver_fourth_option4(OPT_ARGS_STR);
-char * opt_solver_fifth_option(OPT_ARGS_STR);
-char * opt_solver_fifth_option0(OPT_ARGS_STR);
-char * opt_solver_fifth_option1(OPT_ARGS_STR);
-char * opt_solver_fifth_option2(OPT_ARGS_STR);
-char * opt_solver_fifth_option3(OPT_ARGS_STR);
-char * opt_solver_fifth_option4(OPT_ARGS_STR);
-char * opt_solver_first_button(OPT_ARGS_STR);
-char * opt_solver_first_button0(OPT_ARGS_STR);
-char * opt_solver_first_button1(OPT_ARGS_STR);
-char * opt_solver_first_button2(OPT_ARGS_STR);
-char * opt_solver_first_button3(OPT_ARGS_STR);
-char * opt_solver_first_button4(OPT_ARGS_STR);
-char * opt_solver_first_button_command(OPT_ARGS_STR);
-char * opt_solver_first_button_command0(OPT_ARGS_STR);
-char * opt_solver_first_button_command1(OPT_ARGS_STR);
-char * opt_solver_first_button_command2(OPT_ARGS_STR);
-char * opt_solver_first_button_command3(OPT_ARGS_STR);
-char * opt_solver_first_button_command4(OPT_ARGS_STR);
-char * opt_solver_second_button(OPT_ARGS_STR);
-char * opt_solver_second_button0(OPT_ARGS_STR);
-char * opt_solver_second_button1(OPT_ARGS_STR);
-char * opt_solver_second_button2(OPT_ARGS_STR);
-char * opt_solver_second_button3(OPT_ARGS_STR);
-char * opt_solver_second_button4(OPT_ARGS_STR);
-char * opt_solver_second_button_command(OPT_ARGS_STR);
-char * opt_solver_second_button_command0(OPT_ARGS_STR);
-char * opt_solver_second_button_command1(OPT_ARGS_STR);
-char * opt_solver_second_button_command2(OPT_ARGS_STR);
-char * opt_solver_second_button_command3(OPT_ARGS_STR);
-char * opt_solver_second_button_command4(OPT_ARGS_STR);
-char * opt_solver_third_button(OPT_ARGS_STR);
-char * opt_solver_third_button0(OPT_ARGS_STR);
-char * opt_solver_third_button1(OPT_ARGS_STR);
-char * opt_solver_third_button2(OPT_ARGS_STR);
-char * opt_solver_third_button3(OPT_ARGS_STR);
-char * opt_solver_third_button4(OPT_ARGS_STR);
-char * opt_solver_third_button_command(OPT_ARGS_STR);
-char * opt_solver_third_button_command0(OPT_ARGS_STR);
-char * opt_solver_third_button_command1(OPT_ARGS_STR);
-char * opt_solver_third_button_command2(OPT_ARGS_STR);
-char * opt_solver_third_button_command3(OPT_ARGS_STR);
-char * opt_solver_third_button_command4(OPT_ARGS_STR);
-char * opt_solver_fourth_button(OPT_ARGS_STR);
-char * opt_solver_fourth_button0(OPT_ARGS_STR);
-char * opt_solver_fourth_button1(OPT_ARGS_STR);
-char * opt_solver_fourth_button2(OPT_ARGS_STR);
-char * opt_solver_fourth_button3(OPT_ARGS_STR);
-char * opt_solver_fourth_button4(OPT_ARGS_STR);
-char * opt_solver_fourth_button_command(OPT_ARGS_STR);
-char * opt_solver_fourth_button_command0(OPT_ARGS_STR);
-char * opt_solver_fourth_button_command1(OPT_ARGS_STR);
-char * opt_solver_fourth_button_command2(OPT_ARGS_STR);
-char * opt_solver_fourth_button_command3(OPT_ARGS_STR);
-char * opt_solver_fourth_button_command4(OPT_ARGS_STR);
-char * opt_solver_fifth_button(OPT_ARGS_STR);
-char * opt_solver_fifth_button0(OPT_ARGS_STR);
-char * opt_solver_fifth_button1(OPT_ARGS_STR);
-char * opt_solver_fifth_button2(OPT_ARGS_STR);
-char * opt_solver_fifth_button3(OPT_ARGS_STR);
-char * opt_solver_fifth_button4(OPT_ARGS_STR);
-char * opt_solver_fifth_button_command(OPT_ARGS_STR);
-char * opt_solver_fifth_button_command0(OPT_ARGS_STR);
-char * opt_solver_fifth_button_command1(OPT_ARGS_STR);
-char * opt_solver_fifth_button_command2(OPT_ARGS_STR);
-char * opt_solver_fifth_button_command3(OPT_ARGS_STR);
-char * opt_solver_fifth_button_command4(OPT_ARGS_STR);
-char * opt_view_name(OPT_ARGS_STR);
-char * opt_view_format(OPT_ARGS_STR);
-char * opt_view_filename(OPT_ARGS_STR);
-char * opt_view_axes_label0(OPT_ARGS_STR);
-char * opt_view_axes_label1(OPT_ARGS_STR);
-char * opt_view_axes_label2(OPT_ARGS_STR);
-char * opt_view_axes_format0(OPT_ARGS_STR);
-char * opt_view_axes_format1(OPT_ARGS_STR);
-char * opt_view_axes_format2(OPT_ARGS_STR);
-char * opt_view_gen_raise0(OPT_ARGS_STR);
-char * opt_view_gen_raise1(OPT_ARGS_STR);
-char * opt_view_gen_raise2(OPT_ARGS_STR);
-char * opt_view_stipple0(OPT_ARGS_STR);
-char * opt_view_stipple1(OPT_ARGS_STR);
-char * opt_view_stipple2(OPT_ARGS_STR);
-char * opt_view_stipple3(OPT_ARGS_STR);
-char * opt_view_stipple4(OPT_ARGS_STR);
-char * opt_view_stipple5(OPT_ARGS_STR);
-char * opt_view_stipple6(OPT_ARGS_STR);
-char * opt_view_stipple7(OPT_ARGS_STR);
-char * opt_view_stipple8(OPT_ARGS_STR);
-char * opt_view_stipple9(OPT_ARGS_STR);
+char *opt_general_axes_label0(OPT_ARGS_STR);
+char *opt_general_axes_label1(OPT_ARGS_STR);
+char *opt_general_axes_label2(OPT_ARGS_STR);
+char *opt_general_axes_format0(OPT_ARGS_STR);
+char *opt_general_axes_format1(OPT_ARGS_STR);
+char *opt_general_axes_format2(OPT_ARGS_STR);
+char *opt_general_display(OPT_ARGS_STR);
+char *opt_general_filename(OPT_ARGS_STR);
+char *opt_general_default_filename(OPT_ARGS_STR);
+char *opt_general_tmp_filename(OPT_ARGS_STR);
+char *opt_general_error_filename(OPT_ARGS_STR);
+char *opt_general_session_filename(OPT_ARGS_STR);
+char *opt_general_options_filename(OPT_ARGS_STR);
+char *opt_general_editor(OPT_ARGS_STR);
+char *opt_general_web_browser(OPT_ARGS_STR);
+char *opt_general_gui_theme(OPT_ARGS_STR);
+char *opt_general_graphics_font(OPT_ARGS_STR);
+char *opt_mesh_triangle_options(OPT_ARGS_STR);
+char *opt_solver_socket_name(OPT_ARGS_STR);
+char *opt_solver_name(OPT_ARGS_STR);
+char *opt_solver_name0(OPT_ARGS_STR);
+char *opt_solver_name1(OPT_ARGS_STR);
+char *opt_solver_name2(OPT_ARGS_STR);
+char *opt_solver_name3(OPT_ARGS_STR);
+char *opt_solver_name4(OPT_ARGS_STR);
+char *opt_solver_executable(OPT_ARGS_STR);
+char *opt_solver_executable0(OPT_ARGS_STR);
+char *opt_solver_executable1(OPT_ARGS_STR);
+char *opt_solver_executable2(OPT_ARGS_STR);
+char *opt_solver_executable3(OPT_ARGS_STR);
+char *opt_solver_executable4(OPT_ARGS_STR);
+char *opt_solver_help(OPT_ARGS_STR);
+char *opt_solver_help0(OPT_ARGS_STR);
+char *opt_solver_help1(OPT_ARGS_STR);
+char *opt_solver_help2(OPT_ARGS_STR);
+char *opt_solver_help3(OPT_ARGS_STR);
+char *opt_solver_help4(OPT_ARGS_STR);
+char *opt_solver_extension(OPT_ARGS_STR);
+char *opt_solver_extension0(OPT_ARGS_STR);
+char *opt_solver_extension1(OPT_ARGS_STR);
+char *opt_solver_extension2(OPT_ARGS_STR);
+char *opt_solver_extension3(OPT_ARGS_STR);
+char *opt_solver_extension4(OPT_ARGS_STR);
+char *opt_solver_mesh_name(OPT_ARGS_STR);
+char *opt_solver_mesh_name0(OPT_ARGS_STR);
+char *opt_solver_mesh_name1(OPT_ARGS_STR);
+char *opt_solver_mesh_name2(OPT_ARGS_STR);
+char *opt_solver_mesh_name3(OPT_ARGS_STR);
+char *opt_solver_mesh_name4(OPT_ARGS_STR);
+char *opt_solver_mesh_command(OPT_ARGS_STR);
+char *opt_solver_mesh_command0(OPT_ARGS_STR);
+char *opt_solver_mesh_command1(OPT_ARGS_STR);
+char *opt_solver_mesh_command2(OPT_ARGS_STR);
+char *opt_solver_mesh_command3(OPT_ARGS_STR);
+char *opt_solver_mesh_command4(OPT_ARGS_STR);
+char *opt_solver_socket_command(OPT_ARGS_STR);
+char *opt_solver_socket_command0(OPT_ARGS_STR);
+char *opt_solver_socket_command1(OPT_ARGS_STR);
+char *opt_solver_socket_command2(OPT_ARGS_STR);
+char *opt_solver_socket_command3(OPT_ARGS_STR);
+char *opt_solver_socket_command4(OPT_ARGS_STR);
+char *opt_solver_name_command(OPT_ARGS_STR);
+char *opt_solver_name_command0(OPT_ARGS_STR);
+char *opt_solver_name_command1(OPT_ARGS_STR);
+char *opt_solver_name_command2(OPT_ARGS_STR);
+char *opt_solver_name_command3(OPT_ARGS_STR);
+char *opt_solver_name_command4(OPT_ARGS_STR);
+char *opt_solver_option_command(OPT_ARGS_STR);
+char *opt_solver_option_command0(OPT_ARGS_STR);
+char *opt_solver_option_command1(OPT_ARGS_STR);
+char *opt_solver_option_command2(OPT_ARGS_STR);
+char *opt_solver_option_command3(OPT_ARGS_STR);
+char *opt_solver_option_command4(OPT_ARGS_STR);
+char *opt_solver_first_option(OPT_ARGS_STR);
+char *opt_solver_first_option0(OPT_ARGS_STR);
+char *opt_solver_first_option1(OPT_ARGS_STR);
+char *opt_solver_first_option2(OPT_ARGS_STR);
+char *opt_solver_first_option3(OPT_ARGS_STR);
+char *opt_solver_first_option4(OPT_ARGS_STR);
+char *opt_solver_second_option(OPT_ARGS_STR);
+char *opt_solver_second_option0(OPT_ARGS_STR);
+char *opt_solver_second_option1(OPT_ARGS_STR);
+char *opt_solver_second_option2(OPT_ARGS_STR);
+char *opt_solver_second_option3(OPT_ARGS_STR);
+char *opt_solver_second_option4(OPT_ARGS_STR);
+char *opt_solver_third_option(OPT_ARGS_STR);
+char *opt_solver_third_option0(OPT_ARGS_STR);
+char *opt_solver_third_option1(OPT_ARGS_STR);
+char *opt_solver_third_option2(OPT_ARGS_STR);
+char *opt_solver_third_option3(OPT_ARGS_STR);
+char *opt_solver_third_option4(OPT_ARGS_STR);
+char *opt_solver_fourth_option(OPT_ARGS_STR);
+char *opt_solver_fourth_option0(OPT_ARGS_STR);
+char *opt_solver_fourth_option1(OPT_ARGS_STR);
+char *opt_solver_fourth_option2(OPT_ARGS_STR);
+char *opt_solver_fourth_option3(OPT_ARGS_STR);
+char *opt_solver_fourth_option4(OPT_ARGS_STR);
+char *opt_solver_fifth_option(OPT_ARGS_STR);
+char *opt_solver_fifth_option0(OPT_ARGS_STR);
+char *opt_solver_fifth_option1(OPT_ARGS_STR);
+char *opt_solver_fifth_option2(OPT_ARGS_STR);
+char *opt_solver_fifth_option3(OPT_ARGS_STR);
+char *opt_solver_fifth_option4(OPT_ARGS_STR);
+char *opt_solver_first_button(OPT_ARGS_STR);
+char *opt_solver_first_button0(OPT_ARGS_STR);
+char *opt_solver_first_button1(OPT_ARGS_STR);
+char *opt_solver_first_button2(OPT_ARGS_STR);
+char *opt_solver_first_button3(OPT_ARGS_STR);
+char *opt_solver_first_button4(OPT_ARGS_STR);
+char *opt_solver_first_button_command(OPT_ARGS_STR);
+char *opt_solver_first_button_command0(OPT_ARGS_STR);
+char *opt_solver_first_button_command1(OPT_ARGS_STR);
+char *opt_solver_first_button_command2(OPT_ARGS_STR);
+char *opt_solver_first_button_command3(OPT_ARGS_STR);
+char *opt_solver_first_button_command4(OPT_ARGS_STR);
+char *opt_solver_second_button(OPT_ARGS_STR);
+char *opt_solver_second_button0(OPT_ARGS_STR);
+char *opt_solver_second_button1(OPT_ARGS_STR);
+char *opt_solver_second_button2(OPT_ARGS_STR);
+char *opt_solver_second_button3(OPT_ARGS_STR);
+char *opt_solver_second_button4(OPT_ARGS_STR);
+char *opt_solver_second_button_command(OPT_ARGS_STR);
+char *opt_solver_second_button_command0(OPT_ARGS_STR);
+char *opt_solver_second_button_command1(OPT_ARGS_STR);
+char *opt_solver_second_button_command2(OPT_ARGS_STR);
+char *opt_solver_second_button_command3(OPT_ARGS_STR);
+char *opt_solver_second_button_command4(OPT_ARGS_STR);
+char *opt_solver_third_button(OPT_ARGS_STR);
+char *opt_solver_third_button0(OPT_ARGS_STR);
+char *opt_solver_third_button1(OPT_ARGS_STR);
+char *opt_solver_third_button2(OPT_ARGS_STR);
+char *opt_solver_third_button3(OPT_ARGS_STR);
+char *opt_solver_third_button4(OPT_ARGS_STR);
+char *opt_solver_third_button_command(OPT_ARGS_STR);
+char *opt_solver_third_button_command0(OPT_ARGS_STR);
+char *opt_solver_third_button_command1(OPT_ARGS_STR);
+char *opt_solver_third_button_command2(OPT_ARGS_STR);
+char *opt_solver_third_button_command3(OPT_ARGS_STR);
+char *opt_solver_third_button_command4(OPT_ARGS_STR);
+char *opt_solver_fourth_button(OPT_ARGS_STR);
+char *opt_solver_fourth_button0(OPT_ARGS_STR);
+char *opt_solver_fourth_button1(OPT_ARGS_STR);
+char *opt_solver_fourth_button2(OPT_ARGS_STR);
+char *opt_solver_fourth_button3(OPT_ARGS_STR);
+char *opt_solver_fourth_button4(OPT_ARGS_STR);
+char *opt_solver_fourth_button_command(OPT_ARGS_STR);
+char *opt_solver_fourth_button_command0(OPT_ARGS_STR);
+char *opt_solver_fourth_button_command1(OPT_ARGS_STR);
+char *opt_solver_fourth_button_command2(OPT_ARGS_STR);
+char *opt_solver_fourth_button_command3(OPT_ARGS_STR);
+char *opt_solver_fourth_button_command4(OPT_ARGS_STR);
+char *opt_solver_fifth_button(OPT_ARGS_STR);
+char *opt_solver_fifth_button0(OPT_ARGS_STR);
+char *opt_solver_fifth_button1(OPT_ARGS_STR);
+char *opt_solver_fifth_button2(OPT_ARGS_STR);
+char *opt_solver_fifth_button3(OPT_ARGS_STR);
+char *opt_solver_fifth_button4(OPT_ARGS_STR);
+char *opt_solver_fifth_button_command(OPT_ARGS_STR);
+char *opt_solver_fifth_button_command0(OPT_ARGS_STR);
+char *opt_solver_fifth_button_command1(OPT_ARGS_STR);
+char *opt_solver_fifth_button_command2(OPT_ARGS_STR);
+char *opt_solver_fifth_button_command3(OPT_ARGS_STR);
+char *opt_solver_fifth_button_command4(OPT_ARGS_STR);
+char *opt_view_name(OPT_ARGS_STR);
+char *opt_view_format(OPT_ARGS_STR);
+char *opt_view_filename(OPT_ARGS_STR);
+char *opt_view_axes_label0(OPT_ARGS_STR);
+char *opt_view_axes_label1(OPT_ARGS_STR);
+char *opt_view_axes_label2(OPT_ARGS_STR);
+char *opt_view_axes_format0(OPT_ARGS_STR);
+char *opt_view_axes_format1(OPT_ARGS_STR);
+char *opt_view_axes_format2(OPT_ARGS_STR);
+char *opt_view_gen_raise0(OPT_ARGS_STR);
+char *opt_view_gen_raise1(OPT_ARGS_STR);
+char *opt_view_gen_raise2(OPT_ARGS_STR);
+char *opt_view_stipple0(OPT_ARGS_STR);
+char *opt_view_stipple1(OPT_ARGS_STR);
+char *opt_view_stipple2(OPT_ARGS_STR);
+char *opt_view_stipple3(OPT_ARGS_STR);
+char *opt_view_stipple4(OPT_ARGS_STR);
+char *opt_view_stipple5(OPT_ARGS_STR);
+char *opt_view_stipple6(OPT_ARGS_STR);
+char *opt_view_stipple7(OPT_ARGS_STR);
+char *opt_view_stipple8(OPT_ARGS_STR);
+char *opt_view_stipple9(OPT_ARGS_STR);
 
 // NUMBERS
 
@@ -787,6 +789,8 @@ void Print_StringOptionsDoc(StringXString s[], char *prefix, FILE * file);
 void Print_NumberOptionsDoc(StringXNumber s[], char *prefix, FILE * file);
 void Print_ColorOptionsDoc(StringXColor s[], char *prefix, FILE * file);
 
+GmshColorTable *Get_ColorTable(int num);
+
 extern StringXString GeneralOptions_String[] ;
 extern StringXString GeometryOptions_String[] ;
 extern StringXString MeshOptions_String[] ;
diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp
index 3bb3ca6abc0011815c188369ef3ef22c3ccca865..88b521478f1a06b5e46a7a99f798e61b9c2d69ef 100644
--- a/Fltk/Callbacks.cpp
+++ b/Fltk/Callbacks.cpp
@@ -1,4 +1,4 @@
-// $Id: Callbacks.cpp,v 1.541 2007-09-04 13:47:01 remacle Exp $
+// $Id: Callbacks.cpp,v 1.542 2007-09-10 04:47:02 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -32,7 +32,7 @@
 #include "HighOrder.h"
 #include "Draw.h"
 #include "SelectBuffer.h"
-#include "Views.h"
+#include "PView.h"
 #include "CreateFile.h"
 #include "OpenFile.h"
 #include "CommandLine.h"
@@ -270,7 +270,7 @@ void activate_cb(CALLBACK_ARGS)
     }
   }
   else if(!strcmp(str, "custom_range")){
-    if(WID->view_choice[7]->value() == 2){
+    if(WID->view_choice[7]->value() == 1){
       WID->view_value[31]->activate();
       WID->view_value[32]->activate();
       WID->view_push_butt[1]->activate();
@@ -501,22 +501,22 @@ void ManualPlay(int time, int step)
   if(busy) return;
   busy = 1;
   if(time) {
-    for(int i = 0; i < List_Nbr(CTX.post.list); i++)
+    for(unsigned int i = 0; i < PView::list.size(); i++)
       if(opt_view_visible(i, GMSH_GET, 0))
         opt_view_timestep(i, GMSH_SET | GMSH_GUI,
                           opt_view_timestep(i, GMSH_GET, 0) + step);
   }
   else { // hide all views except view_in_cycle
     if(step > 0) {
-      if((view_in_cycle += step) >= List_Nbr(CTX.post.list))
+      if((view_in_cycle += step) >= PView::list.size())
         view_in_cycle = 0;
-      for(int i = 0; i < List_Nbr(CTX.post.list); i += step)
+      for(unsigned int i = 0; i < PView::list.size(); i += step)
         opt_view_visible(i, GMSH_SET | GMSH_GUI, (i == view_in_cycle));
     }
     else {
       if((view_in_cycle += step) < 0)
-        view_in_cycle = List_Nbr(CTX.post.list) - 1;
-      for(int i = List_Nbr(CTX.post.list) - 1; i >= 0; i += step)
+        view_in_cycle = PView::list.size() - 1;
+      for(int i = PView::list.size() - 1; i >= 0; i += step)
         opt_view_visible(i, GMSH_SET | GMSH_GUI, (i == view_in_cycle));
     }
   }
@@ -549,14 +549,13 @@ void status_pause_cb(CALLBACK_ARGS)
 
 void status_rewind_cb(CALLBACK_ARGS)
 {
-  int i;
   if(!CTX.post.anim_cycle) {
-    for(i = 0; i < List_Nbr(CTX.post.list); i++)
+    for(unsigned int i = 0; i < PView::list.size(); i++)
       opt_view_timestep(i, GMSH_SET | GMSH_GUI, 0);
   }
   else {
     view_in_cycle = 0;
-    for(i = 0; i < List_Nbr(CTX.post.list); i++)
+    for(unsigned int i = 0; i < PView::list.size(); i++)
       opt_view_visible(i, GMSH_SET | GMSH_GUI, !i);
   }
   Draw();
@@ -630,25 +629,25 @@ static char *input_formats =
 
 void file_open_cb(CALLBACK_ARGS)
 {
-  int n = List_Nbr(CTX.post.list);
+  int n = PView::list.size();
   if(file_chooser(0, 0, "Open", input_formats)) {
     OpenProject(file_chooser_get_name(1));
     Draw();
   }
-  if(n != List_Nbr(CTX.post.list))
+  if(n != PView::list.size())
     WID->set_context(menu_post, 0);
 }
 
 void file_merge_cb(CALLBACK_ARGS)
 {
-  int n = List_Nbr(CTX.post.list);
+  int n = PView::list.size();
   int f = file_chooser(1, 0, "Merge", input_formats);
   if(f) {
     for(int i = 1; i <= f; i++)
       MergeFile(file_chooser_get_name(i));
     Draw();
   }
-  if(n != List_Nbr(CTX.post.list))
+  if(n != PView::list.size())
     WID->set_context(menu_post, 0);
 }
 
@@ -992,14 +991,7 @@ void general_options_ok_cb(CALLBACK_ARGS)
   opt_general_axes_label1(0, GMSH_SET, (char *)WID->gen_input[7]->value());
   opt_general_axes_label2(0, GMSH_SET, (char *)WID->gen_input[8]->value());
 
-  int val;
-  switch (WID->gen_choice[0]->value()) {
-  case 0: val = DRAW_POST_SEGMENT; break;
-  case 1: val = DRAW_POST_ARROW; break;
-  case 2: val = DRAW_POST_PYRAMID; break;
-  default: val = DRAW_POST_ARROW3D; break;
-  }
-  opt_general_vector_type(0, GMSH_SET, val);
+  opt_general_vector_type(0, GMSH_SET, WID->gen_choice[0]->value() + 1);
   opt_general_graphics_font(0, GMSH_SET, (char *)WID->gen_choice[1]->text());
   opt_general_orthographic(0, GMSH_SET, !WID->gen_choice[2]->value());
   opt_general_axes(0, GMSH_SET, WID->gen_choice[4]->value());
@@ -1221,7 +1213,7 @@ void view_options_cb(CALLBACK_ARGS)
 void view_options_timestep_cb(CALLBACK_ARGS)
 {
   int links = (int)opt_post_link(0, GMSH_GET, 0);
-  for(int i = 0; i < List_Nbr(CTX.post.list); i++) {
+  for(unsigned int i = 0; i < PView::list.size(); i++) {
     if((links == 2 || links == 4) ||
        ((links == 1 || links == 3) && opt_view_visible(i, GMSH_GET, 0)) ||
        (links == 0 && i == WID->view_number)) {
@@ -1234,7 +1226,7 @@ void view_options_timestep_cb(CALLBACK_ARGS)
 void view_options_timestep_decr_cb(CALLBACK_ARGS)
 {
   int links = (int)opt_post_link(0, GMSH_GET, 0);
-  for(int i = 0; i < List_Nbr(CTX.post.list); i++) {
+  for(unsigned int i = 0; i < PView::list.size(); i++) {
     if((links == 2 || links == 4) ||
        ((links == 1 || links == 3) && opt_view_visible(i, GMSH_GET, 0)) ||
        (links == 0 && i == WID->view_number)) {
@@ -1248,7 +1240,7 @@ void view_options_timestep_decr_cb(CALLBACK_ARGS)
 void view_options_timestep_incr_cb(CALLBACK_ARGS)
 {
   int links = (int)opt_post_link(0, GMSH_GET, 0);
-  for(int i = 0; i < List_Nbr(CTX.post.list); i++) {
+  for(unsigned int i = 0; i < PView::list.size(); i++) {
     if((links == 2 || links == 4) ||
        ((links == 1 || links == 3) && opt_view_visible(i, GMSH_GET, 0)) ||
        (links == 0 && i == WID->view_number)) {
@@ -1393,7 +1385,7 @@ void view_options_ok_cb(CALLBACK_ARGS)
   char gen_raise2[256]; strcpy(gen_raise2, opt_view_gen_raise2(current, GMSH_GET, NULL));
 
   // modify only the views that need to be updated
-  for(int i = 0; i < List_Nbr(CTX.post.list); i++) {
+  for(unsigned int i = 0; i < PView::list.size(); i++) {
     if((links == 2 || links == 4) ||
        ((links == 1 || links == 3) && opt_view_visible(i, GMSH_GET, 0)) ||
        (links == 0 && i == current)) {
@@ -1405,20 +1397,11 @@ void view_options_ok_cb(CALLBACK_ARGS)
 
       // view_choice
 
-      switch (WID->view_choice[1]->value()) {
-      case 0: val = DRAW_POST_LINEAR; break;
-      case 1: val = DRAW_POST_LOGARITHMIC; break;
-      default: val = DRAW_POST_DOUBLELOGARITHMIC; break; // 2
-      }
+      val = WID->view_choice[1]->value() + 1;
       if(force || (val != scale_type))
         opt_view_scale_type(i, GMSH_SET, val);
 
-      switch (WID->view_choice[0]->value()) {
-      case 0: val = DRAW_POST_ISO; break;
-      case 1: val = DRAW_POST_DISCRETE; break;
-      case 2: val = DRAW_POST_CONTINUOUS; break;
-      default: val = DRAW_POST_NUMERIC; break; // 3
-      }
+      val = WID->view_choice[0]->value() + 1;
       if(force || (val != intervals_type))
 	opt_view_intervals_type(i, GMSH_SET, val);
       
@@ -1430,44 +1413,19 @@ void view_options_ok_cb(CALLBACK_ARGS)
       if(force || (val != line_type))
         opt_view_line_type(i, GMSH_SET, val);
 
-      switch (WID->view_choice[2]->value()) {
-      case 0: val = DRAW_POST_SEGMENT; break;
-      case 1: val = DRAW_POST_ARROW; break;
-      case 2: val = DRAW_POST_PYRAMID; break;
-      case 4: val = DRAW_POST_DISPLACEMENT; break;
-      default: val = DRAW_POST_ARROW3D; break; // 3
-      }
+      val = WID->view_choice[2]->value() + 1;
       if(force || (val != vector_type))
         opt_view_vector_type(i, GMSH_SET, val);
 
-      switch (WID->view_choice[3]->value()) {
-      case 0: val = DRAW_POST_LOCATE_COG; break;
-      default: val = DRAW_POST_LOCATE_VERTEX; break;
-      }
+      val = WID->view_choice[3]->value() + 1;
       if(force || (val != glyph_location))
         opt_view_glyph_location(i, GMSH_SET, val);
 
-     switch (WID->view_choice[4]->value()) {
-     case 0: val = DRAW_POST_VONMISES; break;
-     case 2: val = DRAW_POST_LMGC90_TYPE; break;
-     case 3: val = DRAW_POST_LMGC90_COORD; break;
-     case 4: val = DRAW_POST_LMGC90_PRES; break;
-     case 5: val = DRAW_POST_LMGC90_SN; break;
-     case 6: val = DRAW_POST_LMGC90_DEPX; break;
-     case 7: val = DRAW_POST_LMGC90_DEPY; break;
-     case 8: val = DRAW_POST_LMGC90_DEPZ; break;
-     case 9: val = DRAW_POST_LMGC90_DEPAV; break;
-     case 10: val = DRAW_POST_LMGC90_DEPNORM; break;
-     default: val = DRAW_POST_LMGC90; break; // 1
-     }
-     if(force || (val != tensor_type))
-       opt_view_tensor_type(i, GMSH_SET, val);
-
-      switch (WID->view_choice[7]->value()) {
-      case 0: val = DRAW_POST_RANGE_DEFAULT; break;
-      case 1: val = DRAW_POST_RANGE_PER_STEP; break;
-      default: val = DRAW_POST_RANGE_CUSTOM; break; // 2
-      }
+      val = WID->view_choice[4]->value() + 1;
+      if(force || (val != tensor_type))
+	opt_view_tensor_type(i, GMSH_SET, val);
+      
+      val = WID->view_choice[7]->value() + 1;
       if(force || (val != range_type))
         opt_view_range_type(i, GMSH_SET, val);
 
@@ -1491,11 +1449,7 @@ void view_options_ok_cb(CALLBACK_ARGS)
       if(force || (val != show_time))
         opt_view_show_time(i, GMSH_SET, val);
       
-      switch(WID->view_choice[13]->value()){
-      case 0: val = DRAW_POST_3D; break;
-      case 1: val = DRAW_POST_2D_SPACE; break;
-      default: val = DRAW_POST_2D_TIME; break; // 2
-      }
+      val = WID->view_choice[13]->value() + 1;
       if(force || (val != type))
         opt_view_type(i, GMSH_SET, val);
 
@@ -1844,11 +1798,9 @@ void view_options_ok_cb(CALLBACK_ARGS)
       // colorbar window
 
       if(force || (i != current)) {
-	Post_View *src = *(Post_View **)List_Pointer(CTX.post.list, current);
-	Post_View *dest = *(Post_View **)List_Pointer(CTX.post.list, i);
-        ColorTable_Copy(&src->CT);
-        ColorTable_Paste(&dest->CT);
-	dest->Changed = 1;
+        ColorTable_Copy(&PView::list[current]->getOptions()->CT);
+        ColorTable_Paste(&PView::list[i]->getOptions()->CT);
+	PView::list[i]->setChanged(true);
       }
     }
   }
@@ -1881,7 +1833,10 @@ void statistics_histogram_cb(CALLBACK_ARGS)
     type = 1;
   else
     type = 2;
-  Create2DGraph(name, "# Elements", 100, 0, WID->quality[type]);
+  std::vector<double> x, y;
+  for(int i = 0; i < 100; i++) y.push_back(WID->quality[type][i]);
+  new PView(name, "# Elements", x, y);
+  UpdateViewsInGUI();
   Draw();
 }
 
@@ -4258,30 +4213,31 @@ void view_toggle_cb(CALLBACK_ARGS)
   Draw();
 }
 
-static void _view_reload(int num)
+static void _view_reload(int index)
 {
-  if(!CTX.post.list)
-    return;
-
-  Post_View *v = *(Post_View **) List_Pointer(CTX.post.list, num);
+  if(index >= 0 && index < PView::list.size()){
+    PView *p = PView::list[index];
 
-  if(StatFile(v->FileName)){
-    Msg(GERROR, "File '%s' does not exist", v->FileName);
-    return;
-  }
+    if(StatFile((char*)p->getData()->getFileName().c_str())){
+      Msg(GERROR, "File '%s' does not exist", p->getData()->getFileName().c_str());
+      return;
+    }
 
-  CTX.post.force_num = v->Num;
-  MergeFile(v->FileName);
-  CTX.post.force_num = 0;
+    // FIXME: use fileIndex
+    MergeFile((char*)p->getData()->getFileName().c_str());
 
-  Post_View *v2 = *(Post_View **) List_Pointer(CTX.post.list, num);
-  CopyViewOptions(v, v2);
+    // delete old data and replace with new
+    delete p->getData();
+    p->setData(PView::list.back()->getData());
+    PView::list.back()->setData(0);
 
-  // In case the reloaded view has a different number of time steps
-  if(v2->TimeStep > v2->NbTimeStep - 1)
-    v2->TimeStep = 0;
+    // delete new view
+    delete PView::list.back();
 
-  FreeView(v);
+    // in case the reloaded view has a different number of time steps
+    if(p->getOptions()->TimeStep > p->getData()->getNumTimeSteps() - 1)
+      p->getOptions()->TimeStep = 0;
+  }
 }
 
 void view_reload_cb(CALLBACK_ARGS)
@@ -4292,14 +4248,14 @@ void view_reload_cb(CALLBACK_ARGS)
 
 void view_reload_all_cb(CALLBACK_ARGS)
 {
-  for(int i = 0; i < List_Nbr(CTX.post.list); i++)
+  for(unsigned int i = 0; i < PView::list.size(); i++)
     _view_reload(i);
   Draw();
 }
 
 void view_reload_visible_cb(CALLBACK_ARGS)
 {
-  for(int i = 0; i < List_Nbr(CTX.post.list); i++)
+  for(unsigned int i = 0; i < PView::list.size(); i++)
     if(opt_view_visible(i, GMSH_GET, 0))
       _view_reload(i);
   Draw();
@@ -4307,68 +4263,61 @@ void view_reload_visible_cb(CALLBACK_ARGS)
 
 void view_remove_other_cb(CALLBACK_ARGS)
 {
-  if(!CTX.post.list) return;
-  for(int i = List_Nbr(CTX.post.list) - 1; i >= 0; i--)
-    if(i != (long)data)
-      RemoveViewByIndex(i);
+  if(PView::list.empty()) return;
+  for(int i = PView::list.size() - 1; i >= 0; i--)
+    if(i != (long)data) delete PView::list[i];
   UpdateViewsInGUI();
   Draw();
 }
 
 void view_remove_all_cb(CALLBACK_ARGS)
 {
-  if(!CTX.post.list) return;
-  while(List_Nbr(CTX.post.list))
-    RemoveViewByIndex(0);
+  if(PView::list.empty()) return;
+  while(PView::list.size()) delete PView::list[0];
   UpdateViewsInGUI();
   Draw();
 }
 
 void view_remove_visible_cb(CALLBACK_ARGS)
 {
-  if(!CTX.post.list) return;
-  for(int i = List_Nbr(CTX.post.list) - 1; i >= 0; i--)
-    if(opt_view_visible(i, GMSH_GET, 0))
-      RemoveViewByIndex(i);
+  if(PView::list.empty()) return;
+  for(int i = PView::list.size() - 1; i >= 0; i--)
+    if(opt_view_visible(i, GMSH_GET, 0)) delete PView::list[i];
   UpdateViewsInGUI();
   Draw();
 }
 
 void view_remove_invisible_cb(CALLBACK_ARGS)
 {
-  if(!CTX.post.list) return;
-  for(int i = List_Nbr(CTX.post.list) - 1; i >= 0; i--)
-    if(!opt_view_visible(i, GMSH_GET, 0))
-      RemoveViewByIndex(i);
+  if(PView::list.empty()) return;
+  for(int i = PView::list.size() - 1; i >= 0; i--)
+    if(!opt_view_visible(i, GMSH_GET, 0)) delete PView::list[i];
   UpdateViewsInGUI();
   Draw();
 }
 
 void view_remove_empty_cb(CALLBACK_ARGS)
 {
-  if(!CTX.post.list) return;
-  for(int i = List_Nbr(CTX.post.list) - 1; i >= 0; i--){
-    Post_View *v = *(Post_View **) List_Pointer(CTX.post.list, i);
-    if(v->empty())
-      RemoveViewByIndex(i);
-  }
+  if(PView::list.empty()) return;
+  for(int i = PView::list.size() - 1; i >= 0; i--)
+    if(PView::list[i]->getData()->empty()) delete PView::list[i];
   UpdateViewsInGUI();
   Draw();
 }
 
 void view_remove_cb(CALLBACK_ARGS)
 {
-  RemoveViewByIndex((int)(long)data);
+  delete PView::list[(int)(long)data];
   UpdateViewsInGUI();
   Draw();
 }
 
-static void _view_save_as(int view_num, char *title, int type)
+static void _view_save_as(int view_num, char *title, int format)
 {
-  Post_View *v = *(Post_View **) List_Pointer(CTX.post.list, view_num);
+  PView *view = PView::list[view_num];
   
  test:
-  if(file_chooser(0, 1, title, "*", v->FileName)) {
+  if(file_chooser(0, 1, title, "*", (char*)view->getData()->getFileName().c_str())){
     char *name = file_chooser_get_name(1);
     if(CTX.confirm_overwrite) {
       if(!StatFile(name))
@@ -4376,7 +4325,7 @@ static void _view_save_as(int view_num, char *title, int type)
 		      "Cancel", "Replace", NULL, name))
           goto test;
     }
-    WriteView(v, name, type, 0);
+    view->write(name, format);
   }
 }
 
@@ -4412,55 +4361,63 @@ void view_save_msh_cb(CALLBACK_ARGS)
 
 void view_alias_cb(CALLBACK_ARGS)
 {
-  AliasView((int)(long)data, 0);
+  new PView(PView::list[(int)(long)data], false);
+  UpdateViewsInGUI();
   Draw();
 }
 
 void view_alias_with_options_cb(CALLBACK_ARGS)
 {
-  AliasView((int)(long)data, 1);
+  new PView(PView::list[(int)(long)data], true);
+  UpdateViewsInGUI();
   Draw();
 }
 
 void view_combine_space_all_cb(CALLBACK_ARGS)
 {
-  CombineViews(0, 1, CTX.post.combine_remove_orig);
+  PView::combine(false, 1, CTX.post.combine_remove_orig);
+  UpdateViewsInGUI();
   Draw();
 }
 
 void view_combine_space_visible_cb(CALLBACK_ARGS)
 {
-  CombineViews(0, 0, CTX.post.combine_remove_orig);
+  PView::combine(false, 0, CTX.post.combine_remove_orig);
+  UpdateViewsInGUI();
   Draw();
 }
 
 void view_combine_space_by_name_cb(CALLBACK_ARGS)
 {
-  CombineViews(0, 2, CTX.post.combine_remove_orig);
+  PView::combine(false, 2, CTX.post.combine_remove_orig);
+  UpdateViewsInGUI();
   Draw();
 }
 
 void view_combine_time_all_cb(CALLBACK_ARGS)
 {
-  CombineViews(1, 1, CTX.post.combine_remove_orig);
+  PView::combine(true, 1, CTX.post.combine_remove_orig);
+  UpdateViewsInGUI();
   Draw();
 }
 
 void view_combine_time_visible_cb(CALLBACK_ARGS)
 {
-  CombineViews(1, 0, CTX.post.combine_remove_orig);
+  PView::combine(true, 0, CTX.post.combine_remove_orig);
+  UpdateViewsInGUI();
   Draw();
 }
 
 void view_combine_time_by_name_cb(CALLBACK_ARGS)
 {
-  CombineViews(1, 2, CTX.post.combine_remove_orig);
+  PView::combine(true, 2, CTX.post.combine_remove_orig);
+  UpdateViewsInGUI();
   Draw();
 }
 
 void view_all_visible_cb(CALLBACK_ARGS)
 {
-  for(int i = 0; i < List_Nbr(CTX.post.list); i ++)
+  for(unsigned int i = 0; i < PView::list.size(); i++)
     opt_view_visible(i, GMSH_SET | GMSH_GUI, 
 		     (long)data < 0 ? !opt_view_visible(i, GMSH_GET, 0) :
 		     (long)data > 0 ? 1 : 0);
@@ -4469,15 +4426,13 @@ void view_all_visible_cb(CALLBACK_ARGS)
 
 void view_applybgmesh_cb(CALLBACK_ARGS)
 {
-  Post_View *v = *(Post_View **) List_Pointer(CTX.post.list, (int)(long)data);
-  if(!v->ScalarOnly || v->TextOnly) {
-    Msg(GERROR, "Background mesh generation impossible with non-scalar view");
-    return;
+  int index =  (int)(long)data;
+  if(index >= 0 && index < PView::list.size()){
+    Field *field = new PostViewField(PView::list[index]);
+    BGMReset();
+    BGMAddField(field);
+    fields.insert(field);
   }
-  Field *field = new PostViewField(v);
-  BGMReset();
-  BGMAddField(field);
-  fields.insert(field);
 }
 
 void view_plugin_cb(CALLBACK_ARGS)
@@ -4589,11 +4544,12 @@ void view_plugin_run_cb(CALLBACK_ARGS)
   for(int i = 1; i <= WID->plugin_view_browser->size(); i++) {
     if(WID->plugin_view_browser->selected(i)) {
       try {
-	Post_View **vv = (Post_View **) List_Pointer_Test(CTX.post.list, i - 1);
-	if(!vv)
-	  p->execute(0);
+	if(i - 1 >= 0 && i - 1 < PView::list.size()){
+	  Msg(FATAL, "need to reinterface plugin execute with pview");
+	  //p->execute(PView::list[i - 1]);
+	}
 	else
-	  p->execute(*vv);
+	  p->execute(0);
       }
       catch(GMSH_Plugin * err) {
 	char tmp[256];
diff --git a/Fltk/Colorbar_Window.cpp b/Fltk/Colorbar_Window.cpp
index 20167e25cef77bd767c725ea7a023aa5f87fcf43..37e54ae6487fcf66d947579edc467f08a58b93ef 100644
--- a/Fltk/Colorbar_Window.cpp
+++ b/Fltk/Colorbar_Window.cpp
@@ -1,4 +1,4 @@
-// $Id: Colorbar_Window.cpp,v 1.58 2007-06-12 07:04:08 geuzaine Exp $
+// $Id: Colorbar_Window.cpp,v 1.59 2007-09-10 04:47:02 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -329,7 +329,7 @@ void Colorbar_Window::draw()
 // Update
 
 void Colorbar_Window::update(char *name, double min, double max,
-                             GmshColorTable * table, int *changed)
+                             GmshColorTable *table, bool *changed)
 {
   label = name;
   ct = table;
@@ -453,7 +453,7 @@ int Colorbar_Window::handle(int event)
     else if(Fl::test_shortcut(FL_CTRL + 'v')) {
       ColorTable_Paste(ct);
       redraw();
-      *viewchanged = 1;
+      *viewchanged = true;
     }
     else if(Fl::test_shortcut('h')) {
       help_flag = !help_flag;
@@ -545,7 +545,7 @@ int Colorbar_Window::handle(int event)
     if(compute) {
       ColorTable_Recompute(ct);
       redraw();
-      *viewchanged = 1;
+      *viewchanged = true;
       do_callback();
     }
     return 1;
@@ -659,7 +659,7 @@ int Colorbar_Window::handle(int event)
       else
         redraw_range(entry - 1, pentry + 1);
       pentry = entry;
-      *viewchanged = 1;
+      *viewchanged = true;
     }
     return 1;
   }
diff --git a/Fltk/Colorbar_Window.h b/Fltk/Colorbar_Window.h
index 1d8af5dfd2199e60d1a9a73696b9c8d5b1c7ac28..e4d07280adef85e5b2ed2989d2064c9783eee70c 100644
--- a/Fltk/Colorbar_Window.h
+++ b/Fltk/Colorbar_Window.h
@@ -48,14 +48,12 @@ class Colorbar_Window : public Fl_Window {
   int marker_pos;  // position of marker as index into table
   
   GmshColorTable *ct; // pointer to the color table (allocated in Post_View)
-  int *viewchanged;   // pointer to changed bit in view
+  bool *viewchanged;   // pointer to changed bit in view
   Fl_Color color_bg;
 
 public:
-
-  Colorbar_Window(int x,int y,int w,int h,const char *l=0);
-  void update(char *name, double min, double max, GmshColorTable *ct, int *changed);
-
+  Colorbar_Window(int x, int y, int w, int h, const char *l=0);
+  void update(char *name, double min, double max, GmshColorTable *ct, bool *changed);
 };
 
 #endif
diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp
index 3b7aa3e95eb50a977591c3e19651912871c7d7fd..af5d476205eceade5b25afd780024cbfa5b688a9 100644
--- a/Fltk/GUI.cpp
+++ b/Fltk/GUI.cpp
@@ -1,4 +1,4 @@
-// $Id: GUI.cpp,v 1.635 2007-09-04 13:47:01 remacle Exp $
+// $Id: GUI.cpp,v 1.636 2007-09-10 04:47:02 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -35,6 +35,7 @@
 #include "Solvers.h"
 #include "PluginManager.h"
 #include "Shortcut_Window.h"
+#include "PView.h"
 
 #define NB_BUTT_SCROLL 25
 #define NB_HISTORY_MAX 1000
@@ -347,7 +348,7 @@ static Fl_Menu_Item menu_point_display[] = {
 static Fl_Menu_Item menu_point_display_post[] = {
   {"Color dot",      0, 0, 0},
   {"3D sphere",      0, 0, 0},
-  {"Growing sphere", 0, 0, 0},
+  {"Scaled sphere", 0, 0, 0},
   {0}
 };
 
@@ -488,8 +489,6 @@ int GetFontSize()
 
 int GUI::global_shortcuts(int event)
 {
-  int i, j;
-
   // we only handle shortcuts here
   if(event != FL_SHORTCUT)
     return 0;
@@ -603,16 +602,16 @@ int GUI::global_shortcuts(int event)
     return 1;
   }
   else if(Fl::test_shortcut(FL_SHIFT + 'w')) {
-    if(List_Nbr(CTX.post.list))
-      if(view_number >= 0 && view_number < List_Nbr(CTX.post.list))
+    if(PView::list.size())
+      if(view_number >= 0 && view_number < PView::list.size())
 	create_view_options_window(view_number);
       else
 	create_view_options_window(0);
     return 1;
   }
   else if(Fl::test_shortcut(FL_SHIFT + 'u')) {
-    if(List_Nbr(CTX.post.list))
-      if(view_number >= 0 && view_number < List_Nbr(CTX.post.list))
+    if(PView::list.size())
+      if(view_number >= 0 && view_number < PView::list.size())
 	create_plugin_window(view_number);
       else
 	create_plugin_window(0);
@@ -631,7 +630,7 @@ int GUI::global_shortcuts(int event)
     return 1;
   }
   else if(Fl::test_shortcut(FL_ALT + 'i')) {
-    for(i = 0; i < List_Nbr(CTX.post.list); i++)
+    for(unsigned int i = 0; i < PView::list.size(); i++)
       if(opt_view_visible(i, GMSH_GET, 0))
 	opt_view_show_scale(i, GMSH_SET | GMSH_GUI,
 			    !opt_view_show_scale(i, GMSH_GET, 0));
@@ -649,7 +648,7 @@ int GUI::global_shortcuts(int event)
 		       !opt_geometry_light(0, GMSH_GET, 0));
     opt_mesh_light(0, GMSH_SET | GMSH_GUI,
 		   !opt_mesh_light(0, GMSH_GET, 0));
-    for(i = 0; i < List_Nbr(CTX.post.list); i++)
+    for(unsigned int i = 0; i < PView::list.size(); i++)
       if(opt_view_visible(i, GMSH_GET, 0))
 	opt_view_light(i, GMSH_SET | GMSH_GUI,
 		       !opt_view_light(i, GMSH_GET, 0));
@@ -685,7 +684,7 @@ int GUI::global_shortcuts(int event)
   else if(Fl::test_shortcut(FL_ALT + 'a')) {
     opt_general_axes(0, GMSH_SET | GMSH_GUI, 
 		     opt_general_axes(0, GMSH_GET, 0) + 1);
-    for(i = 0; i < List_Nbr(CTX.post.list); i++)
+    for(unsigned int i = 0; i < PView::list.size(); i++)
       if(opt_view_visible(i, GMSH_GET, 0))
         opt_view_axes(i, GMSH_SET | GMSH_GUI, opt_view_axes(i, GMSH_GET, 0)+1);
     redraw_opengl();
@@ -777,33 +776,23 @@ int GUI::global_shortcuts(int event)
     return 1;
   }
   else if(Fl::test_shortcut(FL_ALT + 't')) {
-    for(i = 0; i < List_Nbr(CTX.post.list); i++) {
-      if(opt_view_visible(i, GMSH_GET, 0)) {
-        j = (int)opt_view_intervals_type(i, GMSH_GET, 0);
+    for(unsigned int i = 0; i < PView::list.size(); i++)
+      if(opt_view_visible(i, GMSH_GET, 0))
         opt_view_intervals_type(i, GMSH_SET | GMSH_GUI,
-                                (j == DRAW_POST_ISO) ? DRAW_POST_DISCRETE :
-                                (j == DRAW_POST_DISCRETE) ? DRAW_POST_CONTINUOUS :
-                                DRAW_POST_ISO);
-      }
-    }
+				opt_view_intervals_type(i, GMSH_GET, 0) + 1);
     redraw_opengl();
     return 1;
   }
   else if(Fl::test_shortcut(FL_ALT + 'r')) {
-    for(i = 0; i < List_Nbr(CTX.post.list); i++) {
-      if(opt_view_visible(i, GMSH_GET, 0)) {
-        j = (int)opt_view_range_type(i, GMSH_GET, 0);
+    for(unsigned int i = 0; i < PView::list.size(); i++)
+      if(opt_view_visible(i, GMSH_GET, 0))
         opt_view_range_type(i, GMSH_SET | GMSH_GUI,
-			    (j == DRAW_POST_RANGE_DEFAULT) ? DRAW_POST_RANGE_PER_STEP :
-			    (j == DRAW_POST_RANGE_PER_STEP) ? DRAW_POST_RANGE_CUSTOM :
-			    DRAW_POST_RANGE_DEFAULT);
-      }
-    }
+			    opt_view_range_type(i, GMSH_GET, 0) + 1);
     redraw_opengl();
     return 1;
   }
   else if(Fl::test_shortcut(FL_ALT + 'n')) {
-    for(i = 0; i < List_Nbr(CTX.post.list); i++)
+    for(unsigned int i = 0; i < PView::list.size(); i++)
       if(opt_view_visible(i, GMSH_GET, 0))
         opt_view_draw_strings(i, GMSH_SET | GMSH_GUI,
                               !opt_view_draw_strings(i, GMSH_GET, 0));
@@ -811,7 +800,7 @@ int GUI::global_shortcuts(int event)
     return 1;
   }
   else if(Fl::test_shortcut(FL_ALT + 'e')) {
-    for(i = 0; i < List_Nbr(CTX.post.list); i++)
+    for(unsigned int i = 0; i < PView::list.size(); i++)
       if(opt_view_visible(i, GMSH_GET, 0))
         opt_view_show_element(i, GMSH_SET | GMSH_GUI,
                               !opt_view_show_element(i, GMSH_GET, 0));
@@ -820,7 +809,7 @@ int GUI::global_shortcuts(int event)
   }
   else if(Fl::test_shortcut(FL_ALT + 'h')) {
     static int show = 0;
-    for(i = 0; i < List_Nbr(CTX.post.list); i++)
+    for(unsigned int i = 0; i < PView::list.size(); i++)
       opt_view_visible(i, GMSH_SET | GMSH_GUI, show);
     redraw_opengl();
     show = !show;
@@ -1233,15 +1222,16 @@ void GUI::set_context(Context_Item * menu_asked, int flag)
   // construct the dynamic menu
   int nb = 0;
   if(m_module_butt->value() == 3){ // post-processing context
-    for(nb = 0; nb < List_Nbr(CTX.post.list); nb++) {
-      Post_View *v = *(Post_View **) List_Pointer(CTX.post.list, nb);
+    for(nb = 0; nb < (int)PView::list.size(); nb++) {
+      PViewData *data = PView::list[nb]->getData();
+      PViewOptions *opt = PView::list[nb]->getOptions();
       
       Fl_Light_Button *b1 = new Fl_Light_Button(0, MH + nb * BH, width - popw, BH);
       b1->callback(view_toggle_cb, (void *)nb);
       b1->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE | FL_ALIGN_CLIP);
-      b1->value(v->Visible);
-      b1->label(v->Name);
-      b1->tooltip(v->FileName);
+      b1->value(opt->Visible);
+      b1->label(data->getName().c_str());
+      b1->tooltip(data->getFileName().c_str());
       
       char *tmp = new char[32];
       sprintf(tmp, "[%d]@#-1>", nb);
@@ -1570,30 +1560,30 @@ void GUI::set_anim_buttons(int mode)
 
 void GUI::check_anim_buttons()
 {
-  int i, play = 0;
-  if(CTX.post.anim_cycle) {
-    play = 1;
+  bool play = false;
+  if(CTX.post.anim_cycle){
+    play = true;
   }
-  else {
-    for(i = 0; i < List_Nbr(CTX.post.list); i++) {
-      if((*(Post_View **) List_Pointer(CTX.post.list, i))->NbTimeStep > 1) {
-        play = 1;
+  else{
+    for(unsigned int i = 0; i < PView::list.size(); i++){
+      if(PView::list[i]->getData()->getNumTimeSteps() > 1){
+        play = true;
         break;
       }
     }
   }
-  if(!play) {
-    g_status_butt[6]->deactivate();
-    g_status_butt[7]->deactivate();
-    g_status_butt[10]->deactivate();
-    g_status_butt[11]->deactivate();
-  }
-  else {
+  if(play){
     g_status_butt[6]->activate();
     g_status_butt[7]->activate();
     g_status_butt[10]->activate();
     g_status_butt[11]->activate();
   }
+  else{
+    g_status_butt[6]->deactivate();
+    g_status_butt[7]->deactivate();
+    g_status_butt[10]->deactivate();
+    g_status_butt[11]->deactivate();
+  }
 }
 
 // Set the status messages
@@ -1736,7 +1726,7 @@ void GUI::reset_option_browser()
   opt_browser->add("Mesh");
   opt_browser->add("Solver");
   opt_browser->add("Post-processing");
-  for(int i = 0; i < List_Nbr(CTX.post.list); i++) {
+  for(unsigned int i = 0; i < PView::list.size(); i++) {
     sprintf(str, "View [%d]", i);
     opt_browser->add(str);
   }
@@ -1761,7 +1751,7 @@ void GUI::reset_external_view_list()
   view_choice[11]->clear();
   view_choice[10]->add("Self");
   view_choice[11]->add("Self");
-  for(int i = 0; i < List_Nbr(CTX.post.list); i++) {
+  for(unsigned int i = 0; i < PView::list.size(); i++) {
     sprintf(str, "View [%d]", i);
     view_choice[10]->add(str, 0, NULL);
     view_choice[11]->add(str, 0, NULL);
@@ -2897,8 +2887,8 @@ void GUI::create_option_window()
       
       static Fl_Menu_Item menu_iso[] = {
         {"Iso-values", 0, 0, 0},
-        {"Filled iso-values", 0, 0, 0},
         {"Continuous map", 0, 0, 0},
+        {"Filled iso-values", 0, 0, 0},
         {"Numeric values", 0, 0, 0},
         {0}
       };
@@ -2910,8 +2900,8 @@ void GUI::create_option_window()
 
       static Fl_Menu_Item menu_range[] = {
         {"Default", 0, 0, 0},
-        {"Per time step", 0, 0, 0},
         {"Custom", 0, 0, 0},
+        {"Per time step", 0, 0, 0},
         {0}
       };
       view_choice[7] = new Fl_Choice(L + 2 * WB, 2 * WB + 6 * BH, IW, BH, "Range mode");
@@ -3323,16 +3313,6 @@ void GUI::create_option_window()
       
       static Fl_Menu_Item menu_tensor[] = {
 	{"Von-Mises", 0, 0, 0},
-	{"LMGC90", 0, 0, 0}, 
-	{"LMGC90 Type", 0, 0, 0}, 
-	{"LMGC90 Coordinance", 0, 0, 0}, 
-	{"LMGC90 Pression", 0, 0, 0}, 
-	{"LMGC90 Normal stress", 0, 0, 0}, 
-	{"LMGC90 X displacement", 0, 0, 0}, 
-	{"LMGC90 Y displacement", 0, 0, 0}, 
-	{"LMGC90 Z displacement", 0, 0, 0}, 
-	{"LMGC90 Average displacement", 0, 0, 0}, 
-	{"LMGC90 Norm of displacement", 0, 0, 0}, 
 	{0}
       };
       view_choice[4] = new Fl_Choice(L + 2 * WB, 2 * WB + 11 * BH, IW, BH, "Tensor display");
@@ -3416,13 +3396,15 @@ void GUI::create_option_window()
 
 void GUI::update_view_window(int num)
 {
-  if(num < 0 || num >= List_Nbr(CTX.post.list))
-    return;
+  if(num < 0 || num >= PView::list.size()) return;
 
   view_number = num;
-  Post_View *v = *(Post_View **) List_Pointer(CTX.post.list, num);
 
-  double maxval = MAX(fabs(v->Min), fabs(v->Max));
+  PView *view = PView::list[num];
+  PViewData *data = view->getData();
+  PViewOptions *opt = view->getOptions();
+
+  double maxval = MAX(fabs(data->getMin()), fabs(data->getMax()));
   if(!maxval) maxval = 1.;
   double val1 = 10. * CTX.lc;
   double val2 = 2. * CTX.lc / maxval;
@@ -3435,7 +3417,7 @@ void GUI::update_view_window(int num)
 
   opt_view_max_recursion_level (num, GMSH_GUI, 0);
   opt_view_target_error (num, GMSH_GUI, 0);
-  if(v->adaptive){
+  if(data->isAdaptive()){
     view_value[33]->activate();
     view_value[34]->activate();
   }
@@ -3444,7 +3426,8 @@ void GUI::update_view_window(int num)
     view_value[34]->deactivate();
   }
 
-  if(v->NbSP) {
+  if(data->getNumElements(PViewData::Point) ||
+     data->getNumElements(PViewData::Line)){
     ((Fl_Menu_Item*)view_choice[13]->menu())[1].activate();
     ((Fl_Menu_Item*)view_choice[13]->menu())[2].activate();
   }
@@ -3482,14 +3465,14 @@ void GUI::update_view_window(int num)
     view_value[i]->maximum(CTX.lc);
   }
 
-  if(v->TextOnly) {
-    view_range->deactivate();
-    ((Fl_Menu_Item*)view_choice[13]->menu())[0].deactivate();
-  }
-  else {
+  if(data->getNumElements()) {
     view_range->activate();
     ((Fl_Menu_Item*)view_choice[13]->menu())[0].activate();
   }
+  else {
+    view_range->deactivate();
+    ((Fl_Menu_Item*)view_choice[13]->menu())[0].deactivate();
+  }
   opt_view_show_element(num, GMSH_GUI, 0);
   opt_view_light(num, GMSH_GUI, 0);
   opt_view_light_two_side(num, GMSH_GUI, 0);
@@ -3555,7 +3538,7 @@ void GUI::update_view_window(int num)
   view_value[2]->minimum(-val2);
   view_value[2]->maximum(val2);
 
-  if(v->NbTimeStep == 1) {
+  if(data->getNumTimeSteps() == 1) {
     view_value[50]->deactivate();
     view_butt_rep[0]->deactivate();
     view_butt_rep[1]->deactivate();
@@ -3565,14 +3548,15 @@ void GUI::update_view_window(int num)
     view_butt_rep[0]->activate();
     view_butt_rep[1]->activate();
   }
-  view_value[50]->maximum(v->NbTimeStep - 1);
+  view_value[50]->maximum(data->getNumTimeSteps() - 1);
   opt_view_timestep(num, GMSH_GUI, 0);
   opt_view_show_time(num, GMSH_GUI, 0);
 
-  if(v->ScalarOnly)
-    view_vector->deactivate();
-  else
+  if(data->getNumVectors() || data->getNumTensors())
     view_vector->activate();
+  else
+    view_vector->deactivate();
+
   opt_view_point_size(num, GMSH_GUI, 0);
   opt_view_point_type(num, GMSH_GUI, 0);
   opt_view_line_width(num, GMSH_GUI, 0);
@@ -3606,7 +3590,8 @@ void GUI::update_view_window(int num)
   opt_view_color_text3d(num, GMSH_GUI, 0);
   opt_view_color_axes(num, GMSH_GUI, 0);
 
-  view_colorbar_window->update(v->Name, v->Min, v->Max, &v->CT, &v->Changed);
+  view_colorbar_window->update((char*)data->getName().c_str(), data->getMin(), 
+			       data->getMax(), &opt->CT, &view->getChanged());
 }
 
 // Create the plugin manager window
@@ -3689,9 +3674,9 @@ void GUI::reset_plugin_view_browser()
   char str[128];
   plugin_view_browser->clear();
 
-  if(List_Nbr(CTX.post.list)){
+  if(PView::list.size()){
     plugin_view_browser->activate();
-    for(int i = 0; i < List_Nbr(CTX.post.list); i++) {
+    for(unsigned int i = 0; i < PView::list.size(); i++) {
       sprintf(str, "View [%d]", i);
       plugin_view_browser->add(str);
     }
@@ -3718,7 +3703,7 @@ void GUI::create_plugin_window(int numview)
 
   if(plugin_window) {
     reset_plugin_view_browser();
-    if(numview >= 0 && numview < List_Nbr(CTX.post.list)){
+    if(numview >= 0 && numview < PView::list.size()){
       plugin_view_browser->deselect();
       plugin_view_browser->select(numview + 1);
       view_plugin_browser_cb(NULL, NULL);
@@ -3845,15 +3830,15 @@ void GUI::create_statistics_window()
     {
       g[2] = new Fl_Group(WB, WB + BH, width - 2 * WB, height - 3 * WB - 2 * BH, "Post-processing");
       stat_value[num++] = new Fl_Output(2 * WB, 2 * WB + 1 * BH, IW, BH, "Views");
-      stat_value[num++] = new Fl_Output(2 * WB, 2 * WB + 2 * BH, IW, BH, "Visible points");
-      stat_value[num++] = new Fl_Output(2 * WB, 2 * WB + 3 * BH, IW, BH, "Visible lines");
-      stat_value[num++] = new Fl_Output(2 * WB, 2 * WB + 4 * BH, IW, BH, "Visible triangles");
-      stat_value[num++] = new Fl_Output(2 * WB, 2 * WB + 5 * BH, IW, BH, "Visible quadrangles");
-      stat_value[num++] = new Fl_Output(2 * WB, 2 * WB + 6 * BH, IW, BH, "Visible tetrahedra");
-      stat_value[num++] = new Fl_Output(2 * WB, 2 * WB + 7 * BH, IW, BH, "Visible hexahedra");
-      stat_value[num++] = new Fl_Output(2 * WB, 2 * WB + 8 * BH, IW, BH, "Visible prisms");
-      stat_value[num++] = new Fl_Output(2 * WB, 2 * WB + 9 * BH, IW, BH, "Visible pyramids");
-      stat_value[num++] = new Fl_Output(2 * WB, 2 * WB + 10 * BH, IW, BH, "Visible strings");
+      stat_value[num++] = new Fl_Output(2 * WB, 2 * WB + 2 * BH, IW, BH, "Points");
+      stat_value[num++] = new Fl_Output(2 * WB, 2 * WB + 3 * BH, IW, BH, "Lines");
+      stat_value[num++] = new Fl_Output(2 * WB, 2 * WB + 4 * BH, IW, BH, "Triangles");
+      stat_value[num++] = new Fl_Output(2 * WB, 2 * WB + 5 * BH, IW, BH, "Quadrangles");
+      stat_value[num++] = new Fl_Output(2 * WB, 2 * WB + 6 * BH, IW, BH, "Tetrahedra");
+      stat_value[num++] = new Fl_Output(2 * WB, 2 * WB + 7 * BH, IW, BH, "Hexahedra");
+      stat_value[num++] = new Fl_Output(2 * WB, 2 * WB + 8 * BH, IW, BH, "Prisms");
+      stat_value[num++] = new Fl_Output(2 * WB, 2 * WB + 9 * BH, IW, BH, "Pyramids");
+      stat_value[num++] = new Fl_Output(2 * WB, 2 * WB + 10 * BH, IW, BH, "Strings");
       g[2]->end();
     }
     o->end();
@@ -3937,15 +3922,15 @@ void GUI::set_statistics(bool compute_quality)
 
   // post
   sprintf(label[num], "%g", s[26]); stat_value[num]->value(label[num]); num++;
-  sprintf(label[num], "%g/%g", s[36], s[27]); stat_value[num]->value(label[num]); num++;
-  sprintf(label[num], "%g/%g", s[37], s[28]); stat_value[num]->value(label[num]); num++;
-  sprintf(label[num], "%g/%g", s[38], s[29]); stat_value[num]->value(label[num]); num++;
-  sprintf(label[num], "%g/%g", s[39], s[30]); stat_value[num]->value(label[num]); num++;
-  sprintf(label[num], "%g/%g", s[40], s[31]); stat_value[num]->value(label[num]); num++;
-  sprintf(label[num], "%g/%g", s[41], s[32]); stat_value[num]->value(label[num]); num++;
-  sprintf(label[num], "%g/%g", s[42], s[33]); stat_value[num]->value(label[num]); num++;
-  sprintf(label[num], "%g/%g", s[43], s[34]); stat_value[num]->value(label[num]); num++;
-  sprintf(label[num], "%g/%g", s[44], s[35]); stat_value[num]->value(label[num]); num++;
+  sprintf(label[num], "%g", s[27]); stat_value[num]->value(label[num]); num++;
+  sprintf(label[num], "%g", s[28]); stat_value[num]->value(label[num]); num++;
+  sprintf(label[num], "%g", s[29]); stat_value[num]->value(label[num]); num++;
+  sprintf(label[num], "%g", s[30]); stat_value[num]->value(label[num]); num++;
+  sprintf(label[num], "%g", s[31]); stat_value[num]->value(label[num]); num++;
+  sprintf(label[num], "%g", s[32]); stat_value[num]->value(label[num]); num++;
+  sprintf(label[num], "%g", s[33]); stat_value[num]->value(label[num]); num++;
+  sprintf(label[num], "%g", s[34]); stat_value[num]->value(label[num]); num++;
+  sprintf(label[num], "%g", s[35]); stat_value[num]->value(label[num]); num++;
 }
 
 
@@ -4249,7 +4234,7 @@ void GUI::reset_clip_browser()
   clip_browser->clear();
   clip_browser->add("Geometry");
   clip_browser->add("Mesh");
-  for(int i = 0; i < List_Nbr(CTX.post.list); i++) {
+  for(unsigned int i = 0; i < PView::list.size(); i++) {
     sprintf(str, "View [%d]", i);
     clip_browser->add(str);
   }
diff --git a/Fltk/Main.cpp b/Fltk/Main.cpp
index b21983dbbb2355432ec0da74cb10a65206122d1a..a7654be1c44d034987f4160162c55669da6255ae 100644
--- a/Fltk/Main.cpp
+++ b/Fltk/Main.cpp
@@ -1,4 +1,4 @@
-// $Id: Main.cpp,v 1.108 2007-08-21 19:05:39 geuzaine Exp $
+// $Id: Main.cpp,v 1.109 2007-09-10 04:47:02 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -53,7 +53,6 @@ int main(int argc, char *argv[])
   time_t now;
 
   // Log some info
-  
   time(&now);
   strcpy(currtime, ctime(&now));
   currtime[strlen(currtime) - 1] = '\0';
@@ -74,15 +73,12 @@ int main(int argc, char *argv[])
   THEM = new Mesh;
 
   // Initialize the symbol tree that will hold variable names
-  
   InitSymbols();
 
-  // Gmsh default options
-
+  // Load default options
   Init_Options(0);
 
   // Generate automatic documentation (before getting user-defined options)
-  
   if(argc == 2 && !strcmp(argv[1], "-doc")){
     // force all plugins for the doc
     GMSH_PluginManager::instance()->registerDefaultPlugins();
@@ -91,16 +87,13 @@ int main(int argc, char *argv[])
   }
 
   // Read configuration files and command line options
-
   Get_Options(argc, argv);
 
   // Always print info on terminal for non-interactive execution
-
   if(CTX.batch)
     CTX.terminal = 1;
 
-  // Signal handling
-
+  // Signal handling 
   // FIXME: could not make this work on IRIX
 #if !defined(__sgi__) 
   signal(SIGINT, Signal);
@@ -111,11 +104,9 @@ int main(int argc, char *argv[])
   CheckResources();
   
   // Initialize the default plugins
-
   GMSH_PluginManager::instance()->registerDefaultPlugins();
 
   // Non-interactive Gmsh
-
   if(CTX.batch) {
     check_gsl();
     Msg(INFO, "'%s' started on %s", cmdline, currtime);
@@ -126,13 +117,11 @@ int main(int argc, char *argv[])
       for(int i = 1; i < List_Nbr(CTX.files); i++)
         MergeFile(*(char**)List_Pointer(CTX.files, i));
       if(CTX.post.combine_time)
-	CombineViews(1, 2, CTX.post.combine_remove_orig);
+	PView::combine(true, 2, CTX.post.combine_remove_orig);
       if(CTX.bgm_filename) {
         MergeFile(CTX.bgm_filename);
-        if(List_Nbr(CTX.post.list)){
-	  Post_View *v;
-	  List_Read(CTX.post.list, List_Nbr(CTX.post.list) - 1, &v);
-	  Field *field = new PostViewField(v);
+        if(PView::list.size()){
+	  Field *field = new PostViewField(PView::list.back());
 	  BGMAddField(field);
 	  fields.insert(field);
         }
@@ -153,28 +142,22 @@ int main(int argc, char *argv[])
 
 
   // Interactive Gmsh
-
-  CTX.batch = -1;       // The GUI is not ready yet for interactivity
+  CTX.batch = -1; // The GUI is not ready yet for interactivity
 
   // Create the GUI
-
   WID = new GUI(argc, argv);
 
   // Set all previously defined options in the GUI
-
   Init_Options_GUI(0);
 
   // The GUI is ready
-
   CTX.batch = 0;
 
   // Say welcome!
-
   Msg(STATUS1N, "Geometry");
   Msg(STATUS2N, "Gmsh %s", Get_GmshVersion());
 
   // Log the following for bug reports
-
   Msg(INFO, "-------------------------------------------------------");
   Msg(INFO, "Gmsh version   : %s", Get_GmshVersion());
   Msg(INFO, gmsh_os);
@@ -190,23 +173,19 @@ int main(int argc, char *argv[])
   Free(cmdline);
 
   // Check for buggy obsolete GSL versions
-
   check_gsl();
 
   // Display the GUI immediately to have a quick "a la Windows" launch time
-
   WID->check();
 
   // Open project file and merge all other input files
-
   OpenProject(CTX.filename);
   for(int i = 1; i < List_Nbr(CTX.files); i++)
     MergeFile(*(char**)List_Pointer(CTX.files, i));
   if(CTX.post.combine_time)
-    CombineViews(1, 2, CTX.post.combine_remove_orig);
+    PView::combine(true, 2, CTX.post.combine_remove_orig);
   
   // Init first context
-
   switch (CTX.initial_context) {
   case 1:
     WID->set_context(menu_geometry, 0);
@@ -220,8 +199,8 @@ int main(int argc, char *argv[])
   case 4:
     WID->set_context(menu_post, 0);
     break;
-  default:     // automatic
-    if(List_Nbr(CTX.post.list))
+  default: // automatic
+    if(PView::list.size())
       WID->set_context(menu_post, 0);
     else
       WID->set_context(menu_geometry, 0);
@@ -229,13 +208,10 @@ int main(int argc, char *argv[])
   }
 
   // Read background mesh on disk
-
   if(CTX.bgm_filename) {
     MergeFile(CTX.bgm_filename);
-    if(List_Nbr(CTX.post.list)){
-      Post_View *v;
-      List_Read(CTX.post.list, List_Nbr(CTX.post.list) - 1, &v);
-      Field *field = new PostViewField(v);
+    if(PView::list.size()){
+      Field *field = new PostViewField(PView::list.back());
       BGMAddField(field);
       fields.insert(field);
     }
diff --git a/Fltk/Makefile b/Fltk/Makefile
index f24e49fdd80f870b4dce01ef35a7350c59a30c7e..beb495a569b0785ddddc84fd2227ed021be80a0f 100644
--- a/Fltk/Makefile
+++ b/Fltk/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.147 2007-09-08 21:26:04 geuzaine Exp $
+# $Id: Makefile,v 1.148 2007-09-10 04:47:02 geuzaine Exp $
 #
 # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 #
@@ -90,35 +90,36 @@ Main.o: Main.cpp GUI.h Opengl_Window.h Colorbar_Window.h \
   ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/ExtrudeParams.h \
   ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/MElement.h \
   ../Geo/ExtrudeParams.h ../Geo/SBoundingBox3d.h ../Mesh/Field.h \
-  ../Post/OctreePost.h ../Common/Octree.h ../Common/OctreeInternals.h \
-  ../Mesh/BackgroundMesh.h ../Post/PView.h ../Post/PViewData.h \
-  ../Post/PViewOptions.h ../Post/ColorTable.h
+  ../Post/PView.h ../Post/PViewData.h ../Post/PViewOptions.h \
+  ../Post/ColorTable.h ../Post/OctreePost.h ../Common/Octree.h \
+  ../Common/OctreeInternals.h ../Mesh/BackgroundMesh.h
 Message.o: Message.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
   ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \
-  ../Common/GmshUI.h ../Common/Context.h ../Common/Options.h GUI.h \
-  Opengl_Window.h Colorbar_Window.h ../Post/ColorTable.h Popup_Button.h \
-  SpherePosition_Widget.h GUI_Extras.h ../Common/OS.h
+  ../Common/GmshUI.h ../Common/Context.h ../Common/Options.h \
+  ../Post/ColorTable.h GUI.h Opengl_Window.h Colorbar_Window.h \
+  Popup_Button.h SpherePosition_Widget.h GUI_Extras.h ../Common/OS.h
 GUI.o: GUI.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \
   ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \
   ../DataStr/List.h ../DataStr/Tree.h ../Common/GmshUI.h \
   ../Common/GmshDefines.h ../Numeric/Numeric.h ../Common/Context.h \
-  ../Common/Options.h ../Graphics/Draw.h ../Geo/SBoundingBox3d.h \
-  ../Geo/SPoint3.h GUI.h Opengl_Window.h Colorbar_Window.h \
-  ../Post/ColorTable.h Popup_Button.h SpherePosition_Widget.h Callbacks.h \
+  ../Common/Options.h ../Post/ColorTable.h ../Graphics/Draw.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h GUI.h Opengl_Window.h \
+  Colorbar_Window.h Popup_Button.h SpherePosition_Widget.h Callbacks.h \
   Win32Icon.h ../Parser/OpenFile.h ../Common/CommandLine.h \
   ../Mesh/Generator.h Solvers.h ../Plugin/PluginManager.h \
   ../Plugin/Plugin.h ../Post/Views.h ../Post/ColorTable.h \
   ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \
   ../Common/SmoothData.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \
-  Shortcut_Window.h
+  Shortcut_Window.h ../Post/PView.h ../Post/PViewData.h \
+  ../Post/PViewOptions.h ../Post/ColorTable.h
 GUI_Extras.o: GUI_Extras.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
   ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \
   ../Common/GmshUI.h ../Common/GmshDefines.h File_Picker.h \
-  ../Parser/CreateFile.h ../Common/Options.h ../Common/Context.h \
-  ../Graphics/Draw.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h GUI.h \
-  Opengl_Window.h Colorbar_Window.h ../Post/ColorTable.h Popup_Button.h \
+  ../Parser/CreateFile.h ../Common/Options.h ../Post/ColorTable.h \
+  ../Common/Context.h ../Graphics/Draw.h ../Geo/SBoundingBox3d.h \
+  ../Geo/SPoint3.h GUI.h Opengl_Window.h Colorbar_Window.h Popup_Button.h \
   SpherePosition_Widget.h Shortcut_Window.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 \
@@ -134,10 +135,10 @@ GUI_Projection.o: GUI_Projection.cpp ../Geo/GModelIO_F.h ../Geo/GModel.h \
   ../Geo/MElement.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
   ../Geo/ExtrudeParams.h ../Geo/GRegion.h ../Geo/GEntity.h \
   ../Geo/MElement.h ../Geo/ExtrudeParams.h ../Geo/SBoundingBox3d.h \
-  ../Graphics/Draw.h ../Common/Options.h ../Parser/OpenFile.h \
-  ../Graphics/SelectBuffer.h GUI_Projection.h ../Common/GmshUI.h \
-  ../Geo/FProjectionFace.h ../Geo/GModel.h ../Geo/Range.h GUI.h \
-  Opengl_Window.h Colorbar_Window.h ../Post/ColorTable.h Popup_Button.h \
+  ../Graphics/Draw.h ../Common/Options.h ../Post/ColorTable.h \
+  ../Parser/OpenFile.h ../Graphics/SelectBuffer.h GUI_Projection.h \
+  ../Common/GmshUI.h ../Geo/FProjectionFace.h ../Geo/GModel.h \
+  ../Geo/Range.h GUI.h Opengl_Window.h Colorbar_Window.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 \
@@ -191,15 +192,17 @@ Callbacks.o: Callbacks.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../Geo/GEdge.h ../Geo/MElement.h ../Geo/SPoint2.h ../Geo/SVector3.h \
   ../Geo/Pair.h ../Geo/ExtrudeParams.h ../Geo/GRegion.h ../Geo/GEntity.h \
   ../Geo/MElement.h ../Geo/ExtrudeParams.h ../Geo/SBoundingBox3d.h \
-  ../Graphics/Draw.h ../Graphics/SelectBuffer.h ../Post/Views.h \
-  ../Post/ColorTable.h ../Common/VertexArray.h ../Post/AdaptiveViews.h \
-  ../Common/GmshMatrix.h ../Parser/CreateFile.h ../Parser/OpenFile.h \
+  ../Graphics/Draw.h ../Graphics/SelectBuffer.h ../Post/PView.h \
+  ../Common/VertexArray.h ../Post/PViewData.h ../Post/PViewOptions.h \
+  ../Post/ColorTable.h ../Parser/CreateFile.h ../Parser/OpenFile.h \
   ../Common/CommandLine.h ../Common/Options.h GUI.h Opengl_Window.h \
   Colorbar_Window.h Popup_Button.h SpherePosition_Widget.h GUI_Extras.h \
-  Callbacks.h ../Plugin/Plugin.h ../Plugin/PluginManager.h \
-  ../Plugin/Plugin.h ../Common/Visibility.h ../Common/GmshDefines.h \
-  Solvers.h ../Common/OS.h ../Mesh/Field.h ../Post/OctreePost.h \
-  ../Common/Octree.h ../Common/OctreeInternals.h ../Mesh/BackgroundMesh.h
+  Callbacks.h ../Plugin/Plugin.h ../Post/Views.h ../Post/ColorTable.h \
+  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \
+  ../Plugin/PluginManager.h ../Plugin/Plugin.h ../Common/Visibility.h \
+  ../Common/GmshDefines.h Solvers.h ../Common/OS.h ../Mesh/Field.h \
+  ../Post/OctreePost.h ../Common/Octree.h ../Common/OctreeInternals.h \
+  ../Mesh/BackgroundMesh.h
 Opengl.o: Opengl.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
   ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \
@@ -251,5 +254,8 @@ Solvers.o: Solvers.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \
   Solvers.h GmshServer.h ../Parser/OpenFile.h ../Common/GmshUI.h GUI.h \
   Opengl_Window.h Colorbar_Window.h ../Post/ColorTable.h Popup_Button.h \
-  SpherePosition_Widget.h ../Graphics/Draw.h ../Geo/SBoundingBox3d.h \
-  ../Geo/SPoint3.h ../Common/Context.h
+  SpherePosition_Widget.h ../Post/PView.h ../Common/VertexArray.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
+  ../Numeric/Numeric.h ../Post/PViewData.h ../Geo/SBoundingBox3d.h \
+  ../Geo/SPoint3.h ../Post/PViewOptions.h ../Post/ColorTable.h \
+  ../Graphics/Draw.h ../Common/Context.h
diff --git a/Fltk/Solvers.cpp b/Fltk/Solvers.cpp
index 1c8fb2366aada8d930cbdbbd2e26584443e59dd6..0a0e5385c0634d9913584e7188c2af354467770c 100644
--- a/Fltk/Solvers.cpp
+++ b/Fltk/Solvers.cpp
@@ -1,4 +1,4 @@
-// $Id: Solvers.cpp,v 1.55 2006-12-16 15:44:28 geuzaine Exp $
+// $Id: Solvers.cpp,v 1.56 2007-09-10 04:47:02 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -25,6 +25,7 @@
 #include "OpenFile.h"
 #include "GmshUI.h"
 #include "GUI.h"
+#include "PView.h"
 #include "Draw.h"
 #include "Context.h"
 
@@ -227,10 +228,10 @@ int Solver(int num, char *args)
 	  break;
 	case GmshServer::CLIENT_MERGE_FILE:
 	  if(num < 0 || (num >= 0 && SINFO[num].merge_views)) {
-	    int n = List_Nbr(CTX.post.list);
+	    int n = PView::list.size();
 	    MergeFile(message);
 	    Draw();
-	    if(n != List_Nbr(CTX.post.list))
+	    if(n != PView::list.size()) 
 	      WID->set_context(menu_post, 0);
 	  }
 	  break;
diff --git a/Geo/Makefile b/Geo/Makefile
index e79975215c7dfc45a9ca85c71cbba0b22c52e2ef..b5b408047bf2174bc2c677fad283a8652949c3dc 100644
--- a/Geo/Makefile
+++ b/Geo/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.161 2007-09-04 15:19:24 geuzaine Exp $
+# $Id: Makefile,v 1.162 2007-09-10 04:47:02 geuzaine Exp $
 #
 # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 #
@@ -187,10 +187,10 @@ GModel.o: GModel.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
   GEdge.h SVector3.h MElement.h MEdge.h ../Common/Hash.h MFace.h \
   ../Numeric/Numeric.h ../Common/Context.h ../DataStr/List.h \
   ExtrudeParams.h ../Common/SmoothData.h GFace.h GEdgeLoop.h Pair.h \
-  GRegion.h gmshSurface.h ../Mesh/Field.h ../Post/Views.h \
-  ../Post/ColorTable.h ../Common/VertexArray.h ../Geo/SVector3.h \
-  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h ../Geo/Geo.h \
-  ../Geo/gmshSurface.h ../DataStr/Tree.h ../DataStr/avl.h \
+  GRegion.h gmshSurface.h ../Mesh/Field.h ../Post/PView.h \
+  ../Common/VertexArray.h ../Geo/SVector3.h ../Post/PViewData.h \
+  ../Geo/SBoundingBox3d.h ../Post/PViewOptions.h ../Post/ColorTable.h \
+  ../Geo/Geo.h ../Geo/gmshSurface.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 \
   MRep.h ../Common/Message.h ../Common/OS.h ../Mesh/BackgroundMesh.h
diff --git a/Graphics/Draw.cpp b/Graphics/Draw.cpp
index 2d983fa1ed70747e616cd2b52fb781bfd54aaa71..98a31949a5e3a2a4ca4061a654baa882250ad8f0 100644
--- a/Graphics/Draw.cpp
+++ b/Graphics/Draw.cpp
@@ -1,4 +1,4 @@
-// $Id: Draw.cpp,v 1.114 2007-08-31 17:29:45 geuzaine Exp $
+// $Id: Draw.cpp,v 1.115 2007-09-10 04:47:02 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -26,7 +26,7 @@
 #include "Context.h"
 #include "Numeric.h"
 #include "GModel.h"
-#include "Views.h"
+#include "PView.h"
 
 extern Context_T CTX;
 
@@ -39,14 +39,9 @@ int NeedPolygonOffset()
   if(m->getMeshStatus() == 3 && 
      (CTX.mesh.surfaces_edges || CTX.mesh.volumes_edges))
     return 1;
-  for(int i = 0; i < List_Nbr(CTX.post.list); i++){
-    Post_View *v = *(Post_View**)List_Pointer(CTX.post.list, i);
-    if(v->Visible){
-      if(v->ShowElement)
-	return 1;
-      if((v->NbST || v->NbSQ) && (v->Axes || v->IntervalsType == DRAW_POST_ISO))
-	return 1;
-    }
+  for(unsigned int i = 0; i < PView::list.size(); i++){
+    PViewOptions *opt = PView::list[i]->getOptions();
+    if(opt->Visible && opt->ShowElement) return 1;
   }
   return 0;
 }
@@ -77,7 +72,6 @@ void Draw3d()
   InitPosition();
   Draw_Geom();
   Draw_Mesh();
-  Draw_Post_Old();
   Draw_Post();
 }
 
@@ -96,10 +90,6 @@ void Draw2d()
   glMatrixMode(GL_MODELVIEW);
   glLoadIdentity();
 
-  Draw_Graph2D_Old();
-  Draw_Text2D_Old();
-  if(CTX.post.draw) Draw_Scales_Old();
-
   Draw_Graph2D();
   Draw_Text2D();
   Draw_OnScreenMessages();
diff --git a/Graphics/Draw.h b/Graphics/Draw.h
index 3bb830128d2978d5be0d985b20e570a0f25697d6..ba6c7cf7bdd521b10d000ad7b967ecf4bfb4d064 100644
--- a/Graphics/Draw.h
+++ b/Graphics/Draw.h
@@ -20,8 +20,6 @@
 // 
 // Please report all bugs and problems to <gmsh@geuz.org>.
 
-#include <vector>
-#include "List.h"
 #include "SBoundingBox3d.h"
 
 #define GMSH_RENDER    1
@@ -71,83 +69,11 @@ void Draw_Box(double xmin, double ymin, double zmin,
 void Draw_PlaneInBoundingBox(double xmin, double ymin, double zmin,
 			     double xmax, double ymax, double zmax,
 			     double a, double b, double c, double d, int shade=0);
-void Draw_SmallAxes(void);
+void Draw_SmallAxes();
 void Draw_Axes(int mode, int tics[3], char format[3][256], char label[3][256],
 	       double bbox[6]);
 void Draw_Axes(int mode, int tics[3], char format[3][256], char label[3][256],
 	       SBoundingBox3d &bbox);
 
-
-
-
-
-// //////////////// FIXME remove everything below ////////////////////
-
-
-void Draw_Scales_Old();
-void Draw_Post_Old(void);
-
-void Draw_Graph2D_Old();
-void Draw_Text2D_Old();
-
-void Draw_Text2D3D(int dim, int timestep, int nb, List_T *td, List_T *tc);
-
-void Draw_Point(int type, double size, double *x, double *y, double *z, 
-		int light);
-void Draw_Line(int type, double width, double *x, double *y, double *z,
-	       int light);
-
-
-class Post_View;
-
-unsigned int PaletteContinuous(Post_View * View, double min, double max, double val);
-unsigned int PaletteContinuousLinear(Post_View * v, double min, double max, double val);
-unsigned int PaletteDiscrete(Post_View * View, int nbi, int i);
-
-
-#define ARGS Post_View *View, int preproNormals, \
-             double ValMin, double ValMax, 	 \
-             double *X, double *Y, double *Z, double *V
-
-void Draw_ScalarPoint(ARGS);
-void Draw_VectorPoint(ARGS);
-void Draw_TensorPoint(ARGS);
-void Draw_ScalarLine(ARGS);
-void Draw_VectorLine(ARGS);
-void Draw_TensorLine(ARGS);
-void Draw_ScalarTriangle(ARGS);
-void Draw_VectorTriangle(ARGS);
-void Draw_TensorTriangle(ARGS);
-void Draw_ScalarTetrahedron(ARGS);
-void Draw_VectorTetrahedron(ARGS);
-void Draw_TensorTetrahedron(ARGS);
-void Draw_ScalarQuadrangle(ARGS);
-void Draw_VectorQuadrangle(ARGS);
-void Draw_TensorQuadrangle(ARGS);
-void Draw_ScalarHexahedron(ARGS);
-void Draw_VectorHexahedron(ARGS);
-void Draw_TensorHexahedron(ARGS);
-void Draw_ScalarPrism(ARGS);
-void Draw_VectorPrism(ARGS);
-void Draw_TensorPrism(ARGS);
-void Draw_ScalarPyramid(ARGS);
-void Draw_VectorPyramid(ARGS);
-void Draw_TensorPyramid(ARGS);
-
-void Draw_ScalarElement(int type, ARGS);
-void Draw_VectorElement(int type, ARGS);
-void Draw_TensorElement(int type, ARGS);
-
-#undef ARGS
-
-double GiveValueFromIndex_Lin(double ValMin, double ValMax, int NbIso, int Iso);
-double GiveValueFromIndex_Log(double ValMin, double ValMax, int NbIso, int Iso);
-double GiveValueFromIndex_DoubleLog(double ValMin, double ValMax, int NbIso, int Iso);
-int GiveIndexFromValue_Lin(double ValMin, double ValMax, int NbIso, double Val);
-int GiveIndexFromValue_Log(double ValMin, double ValMax, int NbIso, double Val);
-int GiveIndexFromValue_DoubleLog(double ValMin, double ValMax, int NbIso, double Val);
-
-int GetValuesFromExternalView(Post_View *v, int type, int refcomp, 
-			      int *nbcomp, double **vals, int viewIndex);
-
 #endif
+
diff --git a/Graphics/Entity.cpp b/Graphics/Entity.cpp
index ade14f6452f227f83cd006320210ee268b2deffc..8e14ff24c4374a9e45e376f7da79d150ea243f06 100644
--- a/Graphics/Entity.cpp
+++ b/Graphics/Entity.cpp
@@ -1,4 +1,4 @@
-// $Id: Entity.cpp,v 1.76 2007-08-29 18:41:06 geuzaine Exp $
+// $Id: Entity.cpp,v 1.77 2007-09-10 04:47:03 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -23,7 +23,6 @@
 #include "GmshUI.h"
 #include "Numeric.h"
 #include "Draw.h"
-#include "Views.h"
 #include "Context.h"
 #include "gl2ps.h"
 
@@ -387,31 +386,29 @@ void Draw_Vector(int Type, int Fill,
 {
   double length = sqrt(dx * dx + dy * dy + dz * dz);
 
-  if(length == 0.0)
-    return;
+  if(length == 0.0) return;
 
   switch(Type){
-  case DRAW_POST_SEGMENT:
+  case 1:
     glBegin(GL_LINES);
     glVertex3d(x, y, z);
     glVertex3d(x + dx, y + dy, z + dz);
     glEnd();
     break;
-  case DRAW_POST_ARROW:
+  case 2:
     Draw_SimpleVector(1, Fill, relHeadRadius, relStemLength, relStemRadius,
 		      x, y, z, dx, dy, dz, length, light);
     break;
-  case DRAW_POST_PYRAMID:
+  case 3:
     Draw_SimpleVector(0, Fill, relHeadRadius, relStemLength, relStemRadius,
 		      x, y, z, dx, dy, dz, length, light);
     break;
-  case DRAW_POST_ARROW3D:
+  case 4:
   default:
     Draw_3DArrow(relHeadRadius, relStemLength, relStemRadius,
 		 x, y, z, dx, dy, dz, length, light);
     break;
   }
-
 }
 
 class point{
diff --git a/Graphics/Graph2D.cpp b/Graphics/Graph2D.cpp
index c4e8b2114b8bb50de83e2e5dce4c11bfd1f67d91..d64f933effdb2a9e2a79c7dc4587af053f9e30da 100644
--- a/Graphics/Graph2D.cpp
+++ b/Graphics/Graph2D.cpp
@@ -1,4 +1,4 @@
-// $Id: Graph2D.cpp,v 1.64 2007-09-02 21:05:20 geuzaine Exp $
+// $Id: Graph2D.cpp,v 1.65 2007-09-10 04:47:03 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -27,6 +27,24 @@
 
 extern Context_T CTX;
 
+int Fix2DCoordinates(double *x, double *y)
+{
+  int ret = (*x > 99999 && *y > 99999) ? 3 : (*y > 99999) ? 2 : (*x > 99999) ? 1 : 0;
+
+  if(*x < 0) // measure from right border
+    *x = CTX.viewport[2] + *x;
+  else if(*x > 99999) // by convention, x-centered
+    *x = CTX.viewport[2]/2;
+
+  if(*y < 0) // measure from bottom border
+    *y = -(*y);
+  else if(*y > 99999) // by convention, y-centered
+    *y = CTX.viewport[3]/2.;
+  else
+    *y = CTX.viewport[3] - *y;
+  return ret;
+}
+
 void Draw_Text2D()
 {
   for(unsigned int i = 0; i < PView::list.size(); i++){
diff --git a/Graphics/Graph2D_Old.cpp b/Graphics/Graph2D_Old.cpp
deleted file mode 100644
index 5939a6670906b4d169941f581d586a2b65266ded..0000000000000000000000000000000000000000
--- a/Graphics/Graph2D_Old.cpp
+++ /dev/null
@@ -1,540 +0,0 @@
-// $Id: Graph2D_Old.cpp,v 1.2 2007-09-08 21:26:04 geuzaine Exp $
-//
-// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-// USA.
-// 
-// Please report all bugs and problems to <gmsh@geuz.org>.
-
-#include "Gmsh.h"
-#include "GmshUI.h"
-#include "Context.h"
-#include "Numeric.h"
-#include "Draw.h"
-#include "Views.h"
-#include "gl2ps.h"
-
-extern Context_T CTX;
-
-// 2D graphics (gnuplot style)
-
-static void getval(Post_View * v, int i, int j, double *p1, double *p2,
-                   double *Abs, double *Val)
-{
-  int k;
-  if(v->Type == DRAW_POST_2D_SPACE) {
-    for(k = 0; k < 3; k++) {
-      List_Read(v->SP, j + k, &p2[k]);
-      if(j)
-        p1[k] = p2[k] - p1[k];
-    }
-    *Abs += sqrt(p1[0] * p1[0] + p1[1] * p1[1] + p1[2] * p1[2]);
-    for(k = 0; k < 3; k++) {
-      p1[k] = p2[k];
-    }
-    *Val = ((double *)List_Pointer_Fast(v->SP, j + 3))[v->TimeStep];
-  }
-  else {
-    *Abs = *(double *)List_Pointer_Fast(v->Time, j);
-    *Val = ((double *)List_Pointer_Fast(v->SP, i + 3))[j];
-  }
-}
-
-static void addval(Post_View * v, double Abs, double Val,
-                   double AbsMin, double AbsMax, double ValMin, double ValMax,
-                   double xtop, double width, double ybot, double height,
-                   int numeric)
-{
-  char label[256];
-  double x, y;
-
-  if(AbsMax == AbsMin)
-    x = xtop;
-  else
-    x = xtop + (Abs - AbsMin) / (AbsMax - AbsMin) * width;
-
-  if(v->SaturateValues) {
-    if(Val > ValMax)
-      Val = ValMax;
-    else if(Val < ValMin)
-      Val = ValMin;
-  }
-
-  if(ValMax == ValMin)
-    y = ybot;
-  else
-    y = ybot + (Val - ValMin) / (ValMax - ValMin) * height;
-
-  if(Val >= ValMin && Val <= ValMax) {
-    PaletteContinuousLinear(v, ValMin, ValMax, Val);
-    if(numeric) {
-      glRasterPos2d(x + 3, y + 3);
-      sprintf(label, v->Format, Val);
-      Draw_String(label);
-    }
-    else
-      glVertex2d(x, y);
-  }
-}
-
-
-static void Draw_Graph2D(Post_View * v, double xtop, double ytop, 
-			 double width, double height, double tic)
-{
-  char label[1024];
-  float font_h, font_a;
-  int i, i_inc, i_max, j, j_inc, j_max, k, nb;
-  double dx, dy, dv;
-  double ybot = ytop - height;
-  double Abs, Val, ValMin = 0., ValMax = 0., AbsMin, AbsMax;
-  double p1[3], p2[3];
-
-  glColor4ubv((GLubyte *) & v->color.axes);
-
-  gl_font(CTX.gl_font_enum, CTX.gl_fontsize);
-  font_h = gl_height(); // total font height
-  font_a = gl_height() - gl_descent();  // height above ref pt
-
-  // compute min/max
-
-  switch (v->RangeType) {
-  case DRAW_POST_RANGE_DEFAULT:
-    ValMin = v->Min;
-    ValMax = v->Max;
-    break;
-  case DRAW_POST_RANGE_CUSTOM:
-    ValMin = v->CustomMin;
-    ValMax = v->CustomMax;
-    break;
-  case DRAW_POST_RANGE_PER_STEP:
-    if(v->TimeStepMin && v->TimeStepMax){
-      ValMin = v->TimeStepMin[v->TimeStep];
-      ValMax = v->TimeStepMax[v->TimeStep];
-    }
-    else{ // possible if the view is empty
-      ValMin = v->Min;
-      ValMax = v->Max;
-    }
-    break;
-  }
-
-  if(v->Type == DRAW_POST_2D_SPACE) {
-    AbsMin = AbsMax = 0.;
-    double p1[3] = { 0., 0., 0. }, p2[3];
-    for(i = 0; i < List_Nbr(v->SP); i += List_Nbr(v->SP) / v->NbSP) {
-      for(k = 0; k < 3; k++) {
-        List_Read(v->SP, i + k, &p2[k]);
-        if(i)
-          p1[k] = p2[k] - p1[k];
-      }
-      AbsMax += sqrt(p1[0] * p1[0] + p1[1] * p1[1] + p1[2] * p1[2]);
-      for(k = 0; k < 3; k++) {
-        p1[k] = p2[k];
-      }
-    }
-  }
-  else {
-    AbsMin = *(double *)List_Pointer(v->Time, 0);
-    AbsMax = *(double *)List_Pointer(v->Time, List_Nbr(v->Time) - 1);
-  }
-
-  glPointSize(CTX.point_size);
-  gl2psPointSize(CTX.point_size * CTX.print.eps_point_size_factor);
-
-  glLineWidth(CTX.line_width);
-  gl2psLineWidth(CTX.line_width * CTX.print.eps_line_width_factor);
-
-  // axes + labels
-
-  if(v->Axes) {
-    glBegin(GL_LINE_STRIP);
-    glVertex2d(xtop, ytop);
-    glVertex2d(xtop, ytop - height);
-    glVertex2d(xtop + width, ybot);
-    if(v->Axes > 1) {
-      glVertex2d(xtop + width, ytop);
-      glVertex2d(xtop, ytop);
-    }
-    glEnd();
-    
-    // y
-    if(v->Type == DRAW_POST_2D_SPACE &&
-       ((v->ShowTime == 1 && List_Nbr(v->Time) > 1) ||
-	(v->ShowTime == 2 && List_Nbr(v->Time) > 0))){
-      char tmp[256];
-      sprintf(tmp, v->Format, *(double *)List_Pointer(v->Time, v->TimeStep));
-      sprintf(label, "%s (%s)", v->Name, tmp);
-    }
-    else if(v->Type == DRAW_POST_2D_SPACE &&
-       ((v->ShowTime == 3 && List_Nbr(v->Time) > 1) ||
-	(v->ShowTime == 4 && List_Nbr(v->Time) > 0))){
-      sprintf(label, "%s (%d)", v->Name, v->TimeStep);
-    }
-    else
-      sprintf(label, "%s", v->Name);
-    glRasterPos2d(xtop, ytop + font_h + tic);
-    Draw_String_Center(label);
-
-    // x
-    sprintf(label, "%s", v->AxesLabel[0]);
-    glRasterPos2d(xtop + width / 2, ybot - 2 * font_h - 2 * tic);
-    Draw_String_Center(label);
-  }
-
-  // y tics + horizontal grid
-
-  if(v->NbIso > 0){
-    nb = v->NbIso;
-    if(v->ShowScale && (v->NbIso * font_h > height))
-      nb = (int)floor(height / font_h);
-    dy = height / (double)nb;
-    dv = (ValMax - ValMin) / (double)nb;
-    for(i = 0; i < nb + 1; i++) {
-      if(v->Axes > 0) {
-	glBegin(GL_LINES);
-	glVertex2d(xtop, ytop - i * dy);
-	glVertex2d(xtop + tic, ytop - i * dy);
-	if(v->Axes > 1) {
-	  glVertex2d(xtop + width - tic, ytop - i * dy);
-	  glVertex2d(xtop + width, ytop - i * dy);
-	}
-	glEnd();
-	if(v->Axes > 2 && i != 0 && i != nb) {
-	  glEnable(GL_LINE_STIPPLE);
-	  glLineStipple(1, 0x1111);
-	  gl2psEnable(GL2PS_LINE_STIPPLE);
-	  gl2psLineWidth(1. * CTX.print.eps_line_width_factor);
-	  glBegin(GL_LINES);
-	  glVertex2d(xtop, ytop - i * dy);
-	  glVertex2d(xtop + width, ytop - i * dy);
-	  glEnd();
-	  glDisable(GL_LINE_STIPPLE);
-	  gl2psDisable(GL2PS_LINE_STIPPLE);
-	  gl2psLineWidth(CTX.line_width * CTX.print.eps_line_width_factor);
-	}
-      }
-      if(v->ShowScale) {
-	sprintf(label, v->Format, (i == nb) ? ValMin : (ValMax - i * dv));
-	glRasterPos2d(xtop - 2 * tic, ytop - i * dy - font_a / 3.);
-	Draw_String_Right(label);
-      }
-    }
-  }
-
-  // x tics + vertical grid
-
-  if(v->AxesTics[0] > 0){
-    nb = v->AxesTics[0];
-    if(v->Axes) {
-      sprintf(label, v->AxesFormat[0], -M_PI/1.e4);
-      if((nb-1) * gl_width(label) > width)
-	nb = (int)(width / gl_width(label)) + 1;
-    }
-    if(nb == 1) nb++;
-    
-    dx = width / (double)(nb - 1);
-    
-    for(i = 0; i < nb; i++) {
-      if(v->Axes) {
-	glBegin(GL_LINES);
-	glVertex2d(xtop + i * dx, ybot);
-	glVertex2d(xtop + i * dx, ybot + tic);
-	if(v->Axes > 1) {
-	  glVertex2d(xtop + i * dx, ytop);
-	  glVertex2d(xtop + i * dx, ytop - tic);
-	}
-	glEnd();
-	if(v->Axes > 2 && i != 0 && i != nb - 1) {
-	  glEnable(GL_LINE_STIPPLE);
-	  glLineStipple(1, 0x1111);
-	  gl2psEnable(GL2PS_LINE_STIPPLE);
-	  gl2psLineWidth(1. * CTX.print.eps_line_width_factor);
-	  glBegin(GL_LINES);
-	  glVertex2d(xtop + i * dx, ytop);
-	  glVertex2d(xtop + i * dx, ybot);
-	  glEnd();
-	  glDisable(GL_LINE_STIPPLE);
-	  gl2psDisable(GL2PS_LINE_STIPPLE);
-	  gl2psLineWidth(CTX.line_width * CTX.print.eps_line_width_factor);
-	}
-	
-	if(nb == 1)
-	  sprintf(label, v->AxesFormat[0], AbsMin);
-	else
-	  sprintf(label, v->AxesFormat[0],
-		  AbsMin + i * (AbsMax - AbsMin) / (double)(nb - 1));
-	glRasterPos2d(xtop + i * dx, ybot - font_h - tic);
-	Draw_String_Center(label);
-      }
-    }
-  }
-
-  // the curve(s)
-
-  glPointSize(v->PointSize);
-  gl2psPointSize(v->PointSize * CTX.print.eps_point_size_factor);
-
-  glLineWidth(v->LineWidth);
-  gl2psLineWidth(v->LineWidth * CTX.print.eps_line_width_factor);
-
-  if(v->Type == DRAW_POST_2D_SPACE) {
-    i_inc = 1;
-    i_max = 1;
-    j_inc = List_Nbr(v->SP) / v->NbSP;
-    j_max = List_Nbr(v->SP);
-  }
-  else {
-    i_inc = List_Nbr(v->SP) / v->NbSP;
-    i_max = List_Nbr(v->SP);
-    j_inc = 1;
-    j_max = v->TimeStep + 1;
-  }
-
-  for(i = 0; i < i_max; i += i_inc) {
-    if(v->IntervalsType == DRAW_POST_ISO ||
-       v->IntervalsType == DRAW_POST_DISCRETE ||
-       v->IntervalsType == DRAW_POST_NUMERIC) {
-      glBegin(GL_POINTS);
-      Abs = Val = p1[0] = p1[1] = p1[2] = 0.;
-      for(j = 0; j < j_max; j += j_inc) {
-        getval(v, i, j, p1, p2, &Abs, &Val);
-        addval(v, Abs, Val, AbsMin, AbsMax, ValMin, ValMax, xtop, width, ybot,
-               height, 0);
-      }
-      glEnd();
-    }
-    if(v->IntervalsType == DRAW_POST_NUMERIC) {
-      Abs = Val = p1[0] = p1[1] = p1[2] = 0.;
-      for(j = 0; j < j_max; j += j_inc) {
-        getval(v, i, j, p1, p2, &Abs, &Val);
-        addval(v, Abs, Val, AbsMin, AbsMax, ValMin, ValMax, xtop, width, ybot,
-               height, 1);
-      }
-    }
-    if(v->IntervalsType == DRAW_POST_DISCRETE ||
-       v->IntervalsType == DRAW_POST_CONTINUOUS) {
-      if(v->UseStipple){
-	glEnable(GL_LINE_STIPPLE);
-	glLineStipple(v->Stipple[(i/i_inc)%10][0], v->Stipple[(i/i_inc)%10][1]);
-	gl2psEnable(GL2PS_LINE_STIPPLE);
-      }
-      glBegin(GL_LINE_STRIP);
-      Abs = Val = p1[0] = p1[1] = p1[2] = 0.;
-      for(j = 0; j < j_max; j += j_inc) {
-        getval(v, i, j, p1, p2, &Abs, &Val);
-        addval(v, Abs, Val, AbsMin, AbsMax, ValMin, ValMax, xtop, width, ybot,
-               height, 0);
-      }
-      glEnd();
-      if(v->UseStipple){
-	glDisable(GL_LINE_STIPPLE);
-	gl2psDisable(GL2PS_LINE_STIPPLE);
-      }
-    }
-  }
-
-}
-
-void Draw_Graph2D_Old()
-{
-  static List_T *todraw = NULL;
-
-  if(!CTX.post.list)
-    return;
-
-  // 2d graphs to draw?
-
-  if(!todraw)
-    todraw = List_Create(5, 5, sizeof(Post_View *));
-  else
-    List_Reset(todraw);
-
-  gl_font(CTX.gl_font_enum, CTX.gl_fontsize);
-  char label[1024];
-  double largest_number = 0.;
-
-  for(int i = 0; i < List_Nbr(CTX.post.list); i++) {
-    Post_View *v = *(Post_View **) List_Pointer(CTX.post.list, i);
-    if(v->Visible && !v->Dirty && v->NbSP && v->Type != DRAW_POST_3D){
-      List_Add(todraw, &v);
-      sprintf(label, v->Format, -M_PI/1.e4);
-      if(largest_number < gl_width(label))
-	largest_number = gl_width(label);
-    }
-  }
-  
-  if(!List_Nbr(todraw))
-    return;
-
-  const double tic = 5;
-  double xsep = largest_number;
-  double ysep = 5 * gl_height();
-  
-  int num = 0;
-
-  for(int i = 0; i < List_Nbr(todraw); i++) {
-    Post_View *v = *(Post_View **) List_Pointer(todraw, i);
-
-    if(!v->AutoPosition) {
-      double x = v->Position[0], y = v->Position[1];
-      int center = Fix2DCoordinates(&x, &y);
-      Draw_Graph2D(v, 
-		   x - (center & 1 ? v->Size[0]/2. : 0), 
-		   y + (center & 2 ? v->Size[1]/2. : 0), 
-		   v->Size[0], v->Size[1], tic);
-    }
-    else{
-      double winw = CTX.viewport[2] - CTX.viewport[0];
-      double winh = CTX.viewport[3] - CTX.viewport[1];
-      if(List_Nbr(todraw) == 1){
-	double fracw = 0.75, frach = 0.75;
-	double w = fracw * winw - xsep;
-	double h = frach * winh - ysep;
-	double xmin = CTX.viewport[0] + (1-fracw)/2. * winw;
-	double ymin = CTX.viewport[1] + (1-frach)/2. * winh;
-	Draw_Graph2D(v, xmin + 0.95*xsep, CTX.viewport[3] - (ymin + 0.4*ysep), w, h, tic);
-      }
-      else if(List_Nbr(todraw) == 2){
-	double fracw = 0.75, frach = 0.85;
-	double w = fracw * winw - xsep;
-	double h = frach * winh / 2. - ysep;
-	double xmin = CTX.viewport[0] + (1-fracw)/2. * winw;
-	double ymin = CTX.viewport[1] + (1-frach)/3. * winh;
-	if(num == 1) ymin += (h + ysep + (1-frach)/3. * winh);
-	Draw_Graph2D(v, xmin + 0.95*xsep, CTX.viewport[3] - (ymin + 0.4*ysep), w, h, tic);
-	num++;
-      }
-      else{
-	double fracw = 0.85, frach = 0.85;
-	double w = fracw * winw / 2. - xsep;
-	double h = frach * winh / 2. - ysep;
-	double xmin = CTX.viewport[0] + (1-fracw)/3. * winw;
-	if(num == 1 || num == 3) xmin += (w + xsep + (1-fracw)/3. * winw);
-	double ymin = CTX.viewport[1] + (1-frach)/3. * winh;
-	if(num == 2 || num == 3) ymin += (h + ysep + (1-frach)/3. * winh);
-	Draw_Graph2D(v, xmin + 0.95*xsep, CTX.viewport[3] - (ymin + 0.4*ysep), w, h, tic);
-	num++;
-      }
-    }
-  }
-}
-
-// Text strings
-
-int Fix2DCoordinates(double *x, double *y)
-{
-  int ret = (*x > 99999 && *y > 99999) ? 3 : (*y > 99999) ? 2 : (*x > 99999) ? 1 : 0;
-
-  if(*x < 0) // measure from right border
-    *x = CTX.viewport[2] + *x;
-  else if(*x > 99999) // by convention, x-centered
-    *x = CTX.viewport[2]/2;
-
-  if(*y < 0) // measure from bottom border
-    *y = -(*y);
-  else if(*y > 99999) // by convention, y-centered
-    *y = CTX.viewport[3]/2.;
-  else
-    *y = CTX.viewport[3] - *y;
-  return ret;
-}
-
-// Parser format: T2(x,y,style){"str","str",...};
-// T2D list of double : x,y,style,index,x,y,style,index,...
-// T2C list of chars  : string\0,string\0,string\0,string\0,...
-
-// Parser format: T3(x,y,z,style){"str","str",...};
-// T3D list of double: x,y,z,style,index,x,y,z,style,index,...
-// T3C list of chars: string\0,string\0,string\0,string\0,...
-
-void Draw_Text2D3D(int dim, int timestep, int nb, List_T * td, List_T * tc)
-{
-  int j, k, l, nbd, index, nbchar;
-  char *c;
-  double *d1, *d2, style, x, y, z;
-
-  if(dim == 2)
-    nbd = 4;
-  else if(dim == 3)
-    nbd = 5;
-  else
-    return;
-
-#if 0   //debug
-  if(nb) {
-    for(j = 0; j < List_Nbr(tc); j++) {
-      c = (char *)List_Pointer(tc, j);
-      if(*c == '\0')
-        printf("|");
-      else
-        printf("%c", *c);
-    }
-    printf("\n");
-  }
-#endif
-
-  for(j = 0; j < nb; j++) {
-    d1 = (double *)List_Pointer(td, j * nbd);
-    d2 = (double *)List_Pointer_Test(td, (j + 1) * nbd);
-    if(dim == 2) {
-      x = d1[0];
-      y = d1[1];
-      z = 0.;
-      Fix2DCoordinates(&x, &y);
-      style = d1[2];
-      index = (int)d1[3];
-      if(d2)
-        nbchar = (int)d2[3] - index;
-      else
-        nbchar = List_Nbr(tc) - index;
-    }
-    else {
-      x = d1[0];
-      y = d1[1];
-      z = d1[2];
-      style = d1[3];
-      index = (int)d1[4];
-      if(d2)
-        nbchar = (int)d2[4] - index;
-      else
-        nbchar = List_Nbr(tc) - index;
-    }
-    glRasterPos3d(x, y, z);
-    c = (char *)List_Pointer(tc, index);
-    k = l = 0;
-    while(k < nbchar && l != timestep) {
-      if(c[k++] == '\0')
-        l++;
-    }
-    if(k < nbchar && l == timestep)
-      Draw_String(&c[k], style);
-    else
-      Draw_String(c, style);
-  }
-}
-
-void Draw_Text2D_Old()
-{
-  if(!CTX.post.list)
-    return;
-  for(int i = 0; i < List_Nbr(CTX.post.list); i++) {
-    Post_View *v = *(Post_View **) List_Pointer(CTX.post.list, i);
-    if(v->Visible && !v->Dirty && v->DrawStrings){
-      glColor4ubv((GLubyte *) & v->color.text2d);
-      Draw_Text2D3D(2, v->TimeStep, v->NbT2, v->T2D, v->T2C);
-    }
-  }
-}
diff --git a/Graphics/Iso.cpp b/Graphics/Iso.cpp
index 0a35036faee76fdf005fe0b2228bcc28cd43f6b4..3a67df8f73167be4aaf2f686a4c45cb0995123ed 100644
--- a/Graphics/Iso.cpp
+++ b/Graphics/Iso.cpp
@@ -1,4 +1,4 @@
-// $Id: Iso.cpp,v 1.41 2007-09-02 21:05:20 geuzaine Exp $
+// $Id: Iso.cpp,v 1.42 2007-09-10 04:47:03 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -19,15 +19,8 @@
 // 
 // Please report all bugs and problems to <gmsh@geuz.org>.
 
-#include "Gmsh.h"
-#include "GmshUI.h"
-#include "Draw.h"
-#include "Context.h"
-#include "Views.h"
 #include "Numeric.h"
 
-extern Context_T CTX;
-
 static void affect(double *xi, double *yi, double *zi, int i,
 		   double *xp, double *yp, double *zp, int j)
 {
@@ -395,271 +388,3 @@ int CutTriangle(double *X, double *Y, double *Z, double *Val,
 
   return Np2;
 }
-
-
-
-
-
-
-
-
-// ****************** FIXME: REMOVE EVERYTHING BELOW THIS LINE ****************
-
-
-
-
-
-
-
-// Draw an iso-line inside a triangle
-
-void IsoTriangle_Old(Post_View * View, double *X, double *Y, double *Z,
-		     double *Val, double V, unsigned int color)
-{
-  // don't draw anything if the value is constant
-  if(Val[0] == Val[1] && Val[0] == Val[2])
-    return;
-
-  double Xp[3], Yp[3], Zp[3];
-  int nb = 0;
-  if((Val[0] >= V && Val[1] <= V) || (Val[1] >= V && Val[0] <= V)) {
-    InterpolateIso(X, Y, Z, Val, V, 0, 1, &Xp[nb], &Yp[nb], &Zp[nb]);
-    nb++;
-  }
-  if((Val[0] >= V && Val[2] <= V) || (Val[2] >= V && Val[0] <= V)) {
-    InterpolateIso(X, Y, Z, Val, V, 0, 2, &Xp[nb], &Yp[nb], &Zp[nb]);
-    nb++;
-  }
-  if((Val[1] >= V && Val[2] <= V) || (Val[2] >= V && Val[1] <= V)) {
-    InterpolateIso(X, Y, Z, Val, V, 1, 2, &Xp[nb], &Yp[nb], &Zp[nb]);
-    nb++;
-  }
-  
-  if(nb == 2){
-    if(View->LinVertexArray && View->LinVertexArray->fill && !View->LineType){
-      View->LinVertexArray->add(Xp[0], Yp[0], Zp[0], color);
-      View->LinVertexArray->add(Xp[1], Yp[1], Zp[1], color);
-    }
-    else{
-      glColor4ubv((GLubyte *) & color);
-      Draw_Line(View->LineType, View->LineWidth, Xp, Yp, Zp, View->Light);
-    }
-  }
-}
-
-// Draw an iso-point in a line
-
-void IsoLine_Old(Post_View *View, double *X, double *Y, double *Z, 
-		 double *Val, double V)
-{
-  double Xp[2], Yp[2], Zp[2];
-
-  // don't draw anything if the value is constant
-  if(Val[0] == Val[1])
-    return;
-
-  if((Val[0] >= V && Val[1] <= V) || (Val[1] >= V && Val[0] <= V)) {
-    InterpolateIso(X, Y, Z, Val, V, 0, 1, Xp, Yp, Zp);
-    Draw_Point(View->PointType, View->PointSize, Xp, Yp, Zp, View->Light);
-  }
-}
-
-// Compute the gradient of a linear interpolation in a tetrahedron
-
-void EnhanceSimplexPolygon(Post_View * View, int nb,    // nb of points in polygon 
-                           double *Xp,  // x positions
-                           double *Yp,  // y positions
-                           double *Zp,  // z positions
-                           double *Valp,        // values at points
-                           double *X,   // x positions of the simplex
-                           double *Y,   // y positions of the simplex
-                           double *Z,   // z posistions of the simplex
-                           double *Val, // values at simplex points
-                           double *norms,       // output : normals at points
-                           int preproNormals    // do we compute normals or do we get them
-  )
-{
-  /*
-     3 possibilities for quads
-     -) 0,2,5,3
-     -) 0,1,5,4
-     -) 1,2,4,3
-     in all cases, simply invert the 2 last ones
-     for having the quads ordered      
-   */
-  int i;
-  double Xpi[6], Ypi[6], Zpi[6];
-
-  if(nb == 4) {
-    double xx = Xp[3];
-    double yy = Yp[3];
-    double zz = Zp[3];
-    Xp[3] = Xp[2];
-    Yp[3] = Yp[2];
-    Zp[3] = Zp[2];
-    Xp[2] = xx;
-    Yp[2] = yy;
-    Zp[2] = zz;
-  }
-
-  /*
-     for having a nice isosurface, we should have n . grad v > 0
-     n = normal to the polygon
-     v = unknown field we wanna draw
-   */
-
-  double v1[3] = { Xp[2] - Xp[0], Yp[2] - Yp[0], Zp[2] - Zp[0] };
-  double v2[3] = { Xp[1] - Xp[0], Yp[1] - Yp[0], Zp[1] - Zp[0] };
-  double gr[3];
-  double n[3], xx;
-  prodve(v1, v2, n);
-  norme(n);
-  gradSimplex(X, Y, Z, Val, gr);
-  prosca(gr, n, &xx);
-
-  if(xx > 0) {
-    for(i = 0; i < nb; i++) {
-      Xpi[i] = Xp[i];
-      Ypi[i] = Yp[i];
-      Zpi[i] = Zp[i];
-    }
-    for(i = 0; i < nb; i++) {
-      Xp[i] = Xpi[nb - i - 1];
-      Yp[i] = Ypi[nb - i - 1];
-      Zp[i] = Zpi[nb - i - 1];
-    }
-  }
-  else {
-    n[0] = -n[0];
-    n[1] = -n[1];
-    n[2] = -n[2];
-  }
-
-  if(View->SmoothNormals) {
-    if(preproNormals) {
-      for(i = 0; i < nb; i++) {
-        View->normals->add(Xp[i], Yp[i], Zp[i], n[0], n[1], n[2]);
-      }
-      return;
-    }
-    else {
-      for(i = 0; i < nb; i++) {
-        norms[3 * i] = n[0];
-        norms[3 * i + 1] = n[1];
-        norms[3 * i + 2] = n[2];
-        View->normals->get(Xp[i], Yp[i], Zp[i], 
-			   norms[3 * i], norms[3 * i + 1], norms[3 * i + 2]);
-      }
-    }
-  }
-  else {
-    for(i = 0; i < nb; i++) {
-      norms[3 * i] = n[0];
-      norms[3 * i + 1] = n[1];
-      norms[3 * i + 2] = n[2];
-    }
-  }
-}
-
-// Draw an iso-surface inside a tetrahedron
-
-void IsoSimplex_Old(Post_View * View, int preproNormals,
-		    double *X, double *Y, double *Z, double *Val,
-		    double V, unsigned int color)
-{
-  int nb;
-  double Xp[6], Yp[6], Zp[6], PVals[6];
-  double norms[12];
-
-  // don't draw anything if the value is constant
-  if(Val[0] == Val[1] && Val[0] == Val[2] && Val[0] == Val[3])
-    return;
-
-  nb = 0;
-  if((Val[0] >= V && Val[1] <= V) || (Val[1] >= V && Val[0] <= V)) {
-    InterpolateIso(X, Y, Z, Val, V, 0, 1, &Xp[nb], &Yp[nb], &Zp[nb]);
-    nb++;
-  }
-  if((Val[0] >= V && Val[2] <= V) || (Val[2] >= V && Val[0] <= V)) {
-    InterpolateIso(X, Y, Z, Val, V, 0, 2, &Xp[nb], &Yp[nb], &Zp[nb]);
-    nb++;
-  }
-  if((Val[0] >= V && Val[3] <= V) || (Val[3] >= V && Val[0] <= V)) {
-    InterpolateIso(X, Y, Z, Val, V, 0, 3, &Xp[nb], &Yp[nb], &Zp[nb]);
-    nb++;
-  }
-  if((Val[1] >= V && Val[2] <= V) || (Val[2] >= V && Val[1] <= V)) {
-    InterpolateIso(X, Y, Z, Val, V, 1, 2, &Xp[nb], &Yp[nb], &Zp[nb]);
-    nb++;
-  }
-  if((Val[1] >= V && Val[3] <= V) || (Val[3] >= V && Val[1] <= V)) {
-    InterpolateIso(X, Y, Z, Val, V, 1, 3, &Xp[nb], &Yp[nb], &Zp[nb]);
-    nb++;
-  }
-  if((Val[2] >= V && Val[3] <= V) || (Val[3] >= V && Val[2] <= V)) {
-    InterpolateIso(X, Y, Z, Val, V, 2, 3, &Xp[nb], &Yp[nb], &Zp[nb]);
-    nb++;
-  }
-
-  // Remove identical nodes (this can happen if an edge actually
-  // belongs to the zero levelset). We should be doing this even for
-  // nb < 4, but it would slow us down even more... (And we don't
-  // really care if some nodes in a postprocessing element are
-  // identical.)
-  if(nb > 4) {
-    double xi[6], yi[6], zi[6];
-    affect(xi, yi, zi, 0, Xp, Yp, Zp, 0);
-    int ni = 1;
-    for(int j = 1; j < nb; j++) {
-      for(int i = 0; i < ni; i++) {
-	if(fabs(Xp[j] - xi[i]) < 1.e-12 &&
-	   fabs(Yp[j] - yi[i]) < 1.e-12 &&
-	   fabs(Zp[j] - zi[i]) < 1.e-12) {
-	  break;
-	}
-	if(i == ni-1) {
-	  affect(xi, yi, zi, i+1, Xp, Yp, Zp, j);
-	  ni++;
-	}
-      }
-    }
-    for(int i = 0; i < ni; i++)
-      affect(Xp, Yp, Zp, i, xi, yi, zi, i);
-    nb = ni;
-  }
-
-  if(nb < 3 || nb > 4)
-    return;
-
-  EnhanceSimplexPolygon(View, nb, Xp, Yp, Zp, PVals, X, Y, Z, Val, norms,
-                        preproNormals);
-
-  if(preproNormals)
-    return;
-
-  if(View->TriVertexArray && View->TriVertexArray->fill){
-    for(int i = 2; i < nb; i++){
-      View->TriVertexArray->add(Xp[0], Yp[0], Zp[0],
-				norms[0], norms[1], norms[2], color);
-      View->TriVertexArray->add(Xp[i-1], Yp[i-1], Zp[i-1],
-				norms[3*(i-1)], norms[3*(i-1)+1], norms[3*(i-1)+2], color);
-      View->TriVertexArray->add(Xp[i], Yp[i], Zp[i],
-				norms[3*i], norms[3*i+1], norms[3*i+2], color);
-    }
-  }
-  else{
-    if(View->Light) glEnable(GL_LIGHTING);
-    glColor4ubv((GLubyte *) & color);
-    glBegin(GL_TRIANGLES);
-    for(int i = 2; i < nb; i++){
-      if(View->Light) glNormal3dv(&norms[0]);
-      glVertex3d(Xp[0], Yp[0], Zp[0]);
-      if(View->Light) glNormal3dv(&norms[3*(i-1)]);
-      glVertex3d(Xp[i-1], Yp[i-1], Zp[i-1]);
-      if(View->Light) glNormal3dv(&norms[3*i]);
-      glVertex3d(Xp[i], Yp[i], Zp[i]);
-    }
-    glEnd();
-    glDisable(GL_LIGHTING);
-  }
-}
diff --git a/Graphics/Iso.h b/Graphics/Iso.h
index ded5a8552e75a7215ad58868f89e073c3acdf238..6f71f29d08af92db5537029eb6ffed2e53cf010c 100644
--- a/Graphics/Iso.h
+++ b/Graphics/Iso.h
@@ -37,20 +37,4 @@ int CutTriangle(double *x, double *y, double *z, double *v,
 		double min, double max, 
 		double *xp, double *yp, double *zp, double *vp);
 
-
-// ******** FIXME: REMOVE EVERYTHING BELOW THIS LINE ***************
-
-#include "Views.h"
-
-void IsoLine_Old(Post_View *View, double *X, double *Y, double *Z, 
-		 double *Val, double V);
-
-void IsoTriangle_Old(Post_View *View, 
-		     double *X, double *Y, double *Z, double *Val, double V,
-		     unsigned int color);
-
-void IsoSimplex_Old(Post_View *View, int preproNormals, 
-		    double *X, double *Y, double *Z, double *Val, double V,
-		    unsigned int color);
-  
 #endif
diff --git a/Graphics/Makefile b/Graphics/Makefile
index c983d970af4f6406ebddd805d8d1bd2f64cd0b54..dc4d349039782d6c75503fba46d74ca057aa9e14 100644
--- a/Graphics/Makefile
+++ b/Graphics/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.127 2007-09-08 21:26:04 geuzaine Exp $
+# $Id: Makefile,v 1.128 2007-09-10 04:47:03 geuzaine Exp $
 #
 # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 #
@@ -30,14 +30,13 @@ CFLAGS  = ${OPTIM} ${FLAGS} ${INCLUDE}
 SRC = Draw.cpp \
       Mesh.cpp \
       Geom.cpp \
-      Post_Old.cpp Post.cpp \
-      PostElement.cpp \
+      Post.cpp \
       SelectBuffer.cpp \
       Iso.cpp \
       Entity.cpp \
       ReadImg.cpp \
-      Scale_Old.cpp Scale.cpp \
-      Graph2D_Old.cpp Graph2D.cpp \
+      Scale.cpp \
+      Graph2D.cpp \
       gl2ps.cpp\
       gl2gif.cpp\
       gl2jpeg.cpp\
@@ -84,8 +83,8 @@ Draw.o: Draw.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \
   ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/MElement.h ../Geo/SPoint2.h \
   ../Geo/SVector3.h ../Geo/Pair.h ../Geo/ExtrudeParams.h ../Geo/GRegion.h \
   ../Geo/GEntity.h ../Geo/MElement.h ../Geo/ExtrudeParams.h \
-  ../Geo/SBoundingBox3d.h ../Post/Views.h ../Post/ColorTable.h \
-  ../Common/VertexArray.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h
+  ../Geo/SBoundingBox3d.h ../Post/PView.h ../Common/VertexArray.h \
+  ../Post/PViewData.h ../Post/PViewOptions.h ../Post/ColorTable.h
 Mesh.o: Mesh.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \
   ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \
   ../DataStr/List.h ../DataStr/Tree.h ../Common/GmshUI.h ../Geo/GModel.h \
@@ -120,31 +119,13 @@ Geom.o: Geom.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \
   ../Geo/GEdge.h ../Geo/MElement.h ../Geo/SPoint2.h ../Geo/SVector3.h \
   ../Geo/Pair.h ../Geo/ExtrudeParams.h ../Geo/GRegion.h ../Geo/GEntity.h \
   ../Geo/MElement.h ../Geo/ExtrudeParams.h ../Geo/SBoundingBox3d.h
-Post_Old.o: Post_Old.cpp ../Common/Gmsh.h ../Common/Message.h \
-  ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
-  ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \
-  ../Common/GmshUI.h ../Numeric/Numeric.h Draw.h ../Geo/SBoundingBox3d.h \
-  ../Geo/SPoint3.h ../Post/Views.h ../Post/ColorTable.h \
-  ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Common/SmoothData.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \
-  ../Common/Context.h gl2ps.h
 Post.o: Post.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \
   ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \
   ../DataStr/List.h ../DataStr/Tree.h ../Common/GmshUI.h \
   ../Numeric/Numeric.h Draw.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
-  Iso.h ../Post/Views.h ../Post/ColorTable.h ../Common/VertexArray.h \
-  ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
-  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h ../Post/PView.h \
-  ../Post/PViewData.h ../Post/PViewOptions.h ../Post/ColorTable.h \
-  ../Common/Context.h gl2ps.h
-PostElement.o: PostElement.cpp ../Common/Gmsh.h ../Common/Message.h \
-  ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
-  ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \
-  ../Common/GmshUI.h Draw.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
-  Iso.h ../Post/Views.h ../Post/ColorTable.h ../Common/VertexArray.h \
-  ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
-  ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \
-  ../Common/Context.h
+  Iso.h ../Post/PView.h ../Common/VertexArray.h ../Geo/SVector3.h \
+  ../Geo/SPoint3.h ../Common/SmoothData.h ../Post/PViewData.h \
+  ../Post/PViewOptions.h ../Post/ColorTable.h ../Common/Context.h gl2ps.h
 SelectBuffer.o: SelectBuffer.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
   ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \
@@ -166,54 +147,31 @@ SelectBuffer.o: SelectBuffer.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../Geo/SBoundingBox3d.h ../Geo/MRep.h ../Geo/GEdge.h ../Geo/GFace.h \
   ../Geo/GRegion.h ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MElement.h \
   ../Common/VertexArray.h ../Common/OS.h
-Iso.o: Iso.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \
-  ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \
-  ../DataStr/List.h ../DataStr/Tree.h ../Common/GmshUI.h Draw.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/Context.h \
-  ../Post/Views.h ../Post/ColorTable.h ../Common/VertexArray.h \
-  ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
-  ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h
+Iso.o: Iso.cpp ../Numeric/Numeric.h
 Entity.o: Entity.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
   ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \
   ../Common/GmshUI.h ../Numeric/Numeric.h Draw.h ../Geo/SBoundingBox3d.h \
-  ../Geo/SPoint3.h ../Post/Views.h ../Post/ColorTable.h \
-  ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Common/SmoothData.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \
-  ../Common/Context.h gl2ps.h
+  ../Geo/SPoint3.h ../Common/Context.h gl2ps.h
 ReadImg.o: ReadImg.cpp ReadImg.h ../Common/Gmsh.h ../Common/Message.h \
   ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
   ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \
-  ../Common/GmshUI.h ../Post/Views.h ../Post/ColorTable.h \
-  ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \
+  ../Common/GmshUI.h ../Post/PView.h ../Common/VertexArray.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
+  ../Numeric/Numeric.h ../Post/PViewData.h ../Geo/SBoundingBox3d.h \
+  ../Geo/SPoint3.h ../Post/PViewOptions.h ../Post/ColorTable.h \
+  ../Post/PViewDataList.h ../Post/PViewData.h ../Post/AdaptiveViews.h \
   ../Common/GmshMatrix.h
-Scale_Old.o: Scale_Old.cpp ../Common/Gmsh.h ../Common/Message.h \
-  ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
-  ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \
-  ../Common/GmshUI.h ../Numeric/Numeric.h Draw.h ../Geo/SBoundingBox3d.h \
-  ../Geo/SPoint3.h ../Common/Context.h ../Post/Views.h \
-  ../Post/ColorTable.h ../Common/VertexArray.h ../Geo/SVector3.h \
-  ../Geo/SPoint3.h ../Common/SmoothData.h ../Post/AdaptiveViews.h \
-  ../Common/GmshMatrix.h gl2ps.h
-Scale.o: Scale.cpp ../Common/GmshUI.h Draw.h ../DataStr/List.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Post/PView.h \
-  ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/PViewData.h \
-  ../Post/PViewOptions.h ../Post/ColorTable.h ../Common/Context.h gl2ps.h
-Graph2D_Old.o: Graph2D_Old.cpp ../Common/Gmsh.h ../Common/Message.h \
-  ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
-  ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \
-  ../Common/GmshUI.h ../Common/Context.h ../Numeric/Numeric.h Draw.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Post/Views.h \
-  ../Post/ColorTable.h ../Common/VertexArray.h ../Geo/SVector3.h \
-  ../Geo/SPoint3.h ../Common/SmoothData.h ../Post/AdaptiveViews.h \
-  ../Common/GmshMatrix.h gl2ps.h
-Graph2D.o: Graph2D.cpp ../Common/GmshUI.h Draw.h ../DataStr/List.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Post/PView.h \
-  ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/PViewData.h \
-  ../Post/PViewOptions.h ../Post/ColorTable.h gl2ps.h ../Common/Context.h
+Scale.o: Scale.cpp ../Common/GmshUI.h Draw.h ../Geo/SBoundingBox3d.h \
+  ../Geo/SPoint3.h ../Post/PView.h ../Common/VertexArray.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
+  ../Numeric/Numeric.h ../Post/PViewData.h ../Post/PViewOptions.h \
+  ../Post/ColorTable.h ../Common/Context.h ../DataStr/List.h gl2ps.h
+Graph2D.o: Graph2D.cpp ../Common/GmshUI.h Draw.h ../Geo/SBoundingBox3d.h \
+  ../Geo/SPoint3.h ../Post/PView.h ../Common/VertexArray.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
+  ../Numeric/Numeric.h ../Post/PViewData.h ../Post/PViewOptions.h \
+  ../Post/ColorTable.h gl2ps.h ../Common/Context.h ../DataStr/List.h
 gl2ps.o: gl2ps.cpp gl2ps.h
 gl2gif.o: gl2gif.cpp gl2gif.h PixelBuffer.h ../Common/Gmsh.h \
   ../Common/Message.h ../DataStr/Malloc.h ../DataStr/List.h \
diff --git a/Graphics/Post.cpp b/Graphics/Post.cpp
index f5446d70c858eca203a33d4063f54110f075477a..c10c8226d29d9eaf27d4c4ce8394e2c39d099045 100644
--- a/Graphics/Post.cpp
+++ b/Graphics/Post.cpp
@@ -1,4 +1,4 @@
-// $Id: Post.cpp,v 1.127 2007-09-08 21:26:04 geuzaine Exp $
+// $Id: Post.cpp,v 1.128 2007-09-10 04:47:03 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -256,8 +256,10 @@ void addScalarPoint(PView *p, double xyz[NMAX][3], double val[NMAX][9],
   if(pre) return;
 
   PViewOptions *opt = p->getOptions();
+
   double vmin = opt->TmpMin, vmax = opt->TmpMax;
   if(opt->SaturateValues) saturate(1, val, vmin, vmax, i0);
+
   if(val[i0][0] >= vmin && val[i0][0] <= vmax){
     unsigned int col = opt->getColor(val[i0][0], vmin, vmax);
     SVector3 n = getPointNormal(p, val[i0][0]);
@@ -297,6 +299,9 @@ void addScalarLine(PView *p, double xyz[NMAX][3], double val[NMAX][9],
     return;
   }
 
+  double vmin = opt->TmpMin, vmax = opt->TmpMax;
+  if(opt->SaturateValues) saturate(2, val, vmin, vmax, i0, i1);
+
   double x[2] = {xyz[i0][0], xyz[i1][0]};
   double y[2] = {xyz[i0][1], xyz[i1][1]};
   double z[2] = {xyz[i0][2], xyz[i1][2]};
@@ -304,9 +309,6 @@ void addScalarLine(PView *p, double xyz[NMAX][3], double val[NMAX][9],
 
   SVector3 n[2];
   getLineNormal(p, x, y, z, v, n, true);
-  double vmin = opt->TmpMin, vmax = opt->TmpMax;
-
-  if(opt->SaturateValues) saturate(2, val, vmin, vmax, i0, i1);
 
   if(opt->IntervalsType == PViewOptions::Continuous){
     if(val[i0][0] >= vmin && val[i0][0] <= vmax &&
@@ -402,15 +404,15 @@ void addScalarTriangle(PView *p, double xyz[NMAX][3], double val[NMAX][9],
     return;
   }
 
+  double vmin = opt->TmpMin, vmax = opt->TmpMax;
+  if(opt->SaturateValues) saturate(3, val, vmin, vmax, i0, i1, i2);
+
   double x[3] = {xyz[i0][0], xyz[i1][0], xyz[i2][0]};
   double y[3] = {xyz[i0][1], xyz[i1][1], xyz[i2][1]};
   double z[3] = {xyz[i0][2], xyz[i1][2], xyz[i2][2]};
   double v[3] = {val[i0][0], val[i1][0], val[i2][0]};
 
   SVector3 nfac = normal3(xyz, i0, i1, i2);
-  double vmin = opt->TmpMin, vmax = opt->TmpMax;
-
-  if(opt->SaturateValues) saturate(3, val, vmin, vmax, i0, i1, i2);
 
   if(opt->IntervalsType == PViewOptions::Continuous){
     if(val[i0][0] >= vmin && val[i0][0] <= vmax &&
@@ -576,15 +578,14 @@ void addScalarTetrahedron(PView *p, double xyz[NMAX][3], double val[NMAX][9],
     return;
   }
 
+  double vmin = opt->TmpMin, vmax = opt->TmpMax;
+  if(opt->SaturateValues) saturate(4, val, vmin, vmax, i0, i1, i2, i3);
+
   double x[4] = {xyz[i0][0], xyz[i1][0], xyz[i2][0], xyz[i3][0]};
   double y[4] = {xyz[i0][1], xyz[i1][1], xyz[i2][1], xyz[i3][1]};
   double z[4] = {xyz[i0][2], xyz[i1][2], xyz[i2][2], xyz[i3][2]};
   double v[4] = {val[i0][0], val[i1][0], val[i2][0], val[i3][0]};
 
-  double vmin = opt->TmpMin, vmax = opt->TmpMax;
-
-  if(opt->SaturateValues) saturate(4, val, vmin, vmax, i0, i1, i2, i3);
-
   if(opt->IntervalsType == PViewOptions::Iso){
     for(int k = 0; k < opt->NbIso; k++) {
       if(vmin == vmax) k = opt->NbIso / 2;
diff --git a/Graphics/PostElement.cpp b/Graphics/PostElement.cpp
deleted file mode 100644
index c4248d135eacf00a702a05079d3c9e5a35f9d74c..0000000000000000000000000000000000000000
--- a/Graphics/PostElement.cpp
+++ /dev/null
@@ -1,1628 +0,0 @@
-// $Id: PostElement.cpp,v 1.81 2007-08-27 13:46:22 geuzaine Exp $
-//
-// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-// USA.
-// 
-// Please report all bugs and problems to <gmsh@geuz.org>.
-//
-// Contributor(s):
-//   Laurent Stainier
-//   Jean-Luc Flejou
-
-#include "Gmsh.h"
-#include "GmshUI.h"
-#include "Draw.h"
-#include "Iso.h"
-#include "Context.h"
-#include "Numeric.h"
-
-extern Context_T CTX;
-
-void Draw_ElementBoundary(int type, Post_View * View, 
-			  double *X, double *Y, double *Z, double *n = 0)
-{
-  if(n && View->Light && View->LightLines){
-    glEnable(GL_LIGHTING);
-    glNormal3dv(n);
-  }
-
-  switch (type) {
-  case POST_POINT:
-    glColor4ubv((GLubyte *) & View->color.point);
-    Draw_Point(View->PointType, View->PointSize, X, Y, Z, View->Light);
-    break;
-  case POST_LINE:
-    glColor4ubv((GLubyte *) & View->color.line);
-    Draw_Line(0, View->LineWidth, X, Y, Z, View->Light);
-    break;
-  case POST_TRIANGLE:
-    glColor4ubv((GLubyte *) & View->color.triangle);
-    glBegin(GL_LINE_LOOP);
-    for(int k = 0; k < 3; k++)
-      glVertex3d(X[k], Y[k], Z[k]);
-    glEnd();
-    break;
-  case POST_TETRAHEDRON:
-    glColor4ubv((GLubyte *) & View->color.tetrahedron);
-    glBegin(GL_LINES);
-    glVertex3d(X[0], Y[0], Z[0]);
-    glVertex3d(X[1], Y[1], Z[1]);
-    glVertex3d(X[0], Y[0], Z[0]);
-    glVertex3d(X[2], Y[2], Z[2]);
-    glVertex3d(X[0], Y[0], Z[0]);
-    glVertex3d(X[3], Y[3], Z[3]);
-    glVertex3d(X[1], Y[1], Z[1]);
-    glVertex3d(X[2], Y[2], Z[2]);
-    glVertex3d(X[1], Y[1], Z[1]);
-    glVertex3d(X[3], Y[3], Z[3]);
-    glVertex3d(X[2], Y[2], Z[2]);
-    glVertex3d(X[3], Y[3], Z[3]);
-    glEnd();
-    break;
-  case POST_QUADRANGLE:
-    glColor4ubv((GLubyte *) & View->color.quadrangle);
-    glBegin(GL_LINE_LOOP);
-    for(int k = 0; k < 4; k++)
-      glVertex3d(X[k], Y[k], Z[k]);
-    glEnd();
-    break;
-  case POST_HEXAHEDRON:
-    glColor4ubv((GLubyte *) & View->color.hexahedron);
-    glBegin(GL_LINES);
-    glVertex3d(X[0], Y[0], Z[0]);
-    glVertex3d(X[1], Y[1], Z[1]);
-    glVertex3d(X[0], Y[0], Z[0]);
-    glVertex3d(X[3], Y[3], Z[3]);
-    glVertex3d(X[0], Y[0], Z[0]);
-    glVertex3d(X[4], Y[4], Z[4]);
-    glVertex3d(X[1], Y[1], Z[1]);
-    glVertex3d(X[2], Y[2], Z[2]);
-    glVertex3d(X[1], Y[1], Z[1]);
-    glVertex3d(X[5], Y[5], Z[5]);
-    glVertex3d(X[2], Y[2], Z[2]);
-    glVertex3d(X[3], Y[3], Z[3]);
-    glVertex3d(X[2], Y[2], Z[2]);
-    glVertex3d(X[6], Y[6], Z[6]);
-    glVertex3d(X[3], Y[3], Z[3]);
-    glVertex3d(X[7], Y[7], Z[7]);
-    glVertex3d(X[4], Y[4], Z[4]);
-    glVertex3d(X[5], Y[5], Z[5]);
-    glVertex3d(X[4], Y[4], Z[4]);
-    glVertex3d(X[7], Y[7], Z[7]);
-    glVertex3d(X[5], Y[5], Z[5]);
-    glVertex3d(X[6], Y[6], Z[6]);
-    glVertex3d(X[6], Y[6], Z[6]);
-    glVertex3d(X[7], Y[7], Z[7]);
-    glEnd();
-    break;
-  case POST_PRISM:
-    glColor4ubv((GLubyte *) & View->color.prism);
-    glBegin(GL_LINES);
-    glVertex3d(X[0], Y[0], Z[0]);
-    glVertex3d(X[1], Y[1], Z[1]);
-    glVertex3d(X[0], Y[0], Z[0]);
-    glVertex3d(X[2], Y[2], Z[2]);
-    glVertex3d(X[0], Y[0], Z[0]);
-    glVertex3d(X[3], Y[3], Z[3]);
-    glVertex3d(X[1], Y[1], Z[1]);
-    glVertex3d(X[2], Y[2], Z[2]);
-    glVertex3d(X[1], Y[1], Z[1]);
-    glVertex3d(X[4], Y[4], Z[4]);
-    glVertex3d(X[2], Y[2], Z[2]);
-    glVertex3d(X[5], Y[5], Z[5]);
-    glVertex3d(X[3], Y[3], Z[3]);
-    glVertex3d(X[4], Y[4], Z[4]);
-    glVertex3d(X[3], Y[3], Z[3]);
-    glVertex3d(X[5], Y[5], Z[5]);
-    glVertex3d(X[4], Y[4], Z[4]);
-    glVertex3d(X[5], Y[5], Z[5]);
-    glEnd();
-    break;
-  case POST_PYRAMID:
-    glColor4ubv((GLubyte *) & View->color.pyramid);
-    glBegin(GL_LINES);
-    glVertex3d(X[0], Y[0], Z[0]);
-    glVertex3d(X[1], Y[1], Z[1]);
-    glVertex3d(X[1], Y[1], Z[1]);
-    glVertex3d(X[2], Y[2], Z[2]);
-    glVertex3d(X[3], Y[3], Z[3]);
-    glVertex3d(X[2], Y[2], Z[2]);
-    glVertex3d(X[0], Y[0], Z[0]);
-    glVertex3d(X[3], Y[3], Z[3]);
-    glVertex3d(X[0], Y[0], Z[0]);
-    glVertex3d(X[4], Y[4], Z[4]);
-    glVertex3d(X[1], Y[1], Z[1]);
-    glVertex3d(X[4], Y[4], Z[4]);
-    glVertex3d(X[3], Y[3], Z[3]);
-    glVertex3d(X[4], Y[4], Z[4]);
-    glVertex3d(X[2], Y[2], Z[2]);
-    glVertex3d(X[4], Y[4], Z[4]);
-    glEnd();
-    break;
-  }
-
-  glDisable(GL_LIGHTING);
-}
-
-void SaturateValues(int saturate, double min, double max,
-                    double *v1, double *v2, int nbnod)
-{
-  if(saturate) {
-    for(int i = 0; i < nbnod; i++) {
-      if(v1[i] > max)
-        v2[i] = max;
-      else if(v1[i] < min)
-        v2[i] = min;
-      else
-        v2[i] = v1[i];
-    }
-  }
-  else {
-    for(int i = 0; i < nbnod; i++) {
-      v2[i] = v1[i];
-    }
-  }
-}
-
-#define REORDER2(e,f)	                			\
-    Xp[0] = X[e]; Yp[0] = Y[e]; Zp[0] = Z[e]; Val[0] = vv[e];	\
-    Xp[1] = X[f]; Yp[1] = Y[f]; Zp[1] = Z[f]; Val[1] = vv[f]
-
-#define REORDER3(e,f,g)  	        			\
-    Xp[0] = X[e]; Yp[0] = Y[e]; Zp[0] = Z[e]; Val[0] = vv[e];	\
-    Xp[1] = X[f]; Yp[1] = Y[f]; Zp[1] = Z[f]; Val[1] = vv[f];	\
-    Xp[2] = X[g]; Yp[2] = Y[g]; Zp[2] = Z[g]; Val[2] = vv[g]
-
-#define REORDER4(e,f,g,h)	        			\
-    Xp[0] = X[e]; Yp[0] = Y[e]; Zp[0] = Z[e]; Val[0] = vv[e];	\
-    Xp[1] = X[f]; Yp[1] = Y[f]; Zp[1] = Z[f]; Val[1] = vv[f];	\
-    Xp[2] = X[g]; Yp[2] = Y[g]; Zp[2] = Z[g]; Val[2] = vv[g];	\
-    Xp[3] = X[h]; Yp[3] = Y[h]; Zp[3] = Z[h]; Val[3] = vv[h]
-
-#define REORDER6(e,f,g,h,i,j)	        			\
-    Xp[0] = X[e]; Yp[0] = Y[e]; Zp[0] = Z[e]; Val[0] = vv[e];	\
-    Xp[1] = X[f]; Yp[1] = Y[f]; Zp[1] = Z[f]; Val[1] = vv[f];	\
-    Xp[2] = X[g]; Yp[2] = Y[g]; Zp[2] = Z[g]; Val[2] = vv[g];	\
-    Xp[3] = X[h]; Yp[3] = Y[h]; Zp[3] = Z[h]; Val[3] = vv[h];   \
-    Xp[4] = X[i]; Yp[4] = Y[i]; Zp[4] = Z[i]; Val[4] = vv[i];   \
-    Xp[5] = X[j]; Yp[5] = Y[j]; Zp[5] = Z[j]; Val[5] = vv[j]
-
-// Scalar Elements
-
-void Draw_ScalarPoint(Post_View * View, int preproNormals,
-                      double ValMin, double ValMax,
-                      double *X, double *Y, double *Z, double *V)
-{
-  double d;
-  char Num[100];
-
-  if(View->Boundary > 0 || preproNormals)
-    return;
-
-  d = V[View->TimeStep];
-
-  if(View->SaturateValues) {
-    if(d > ValMax)
-      d = ValMax;
-    else if(d < ValMin)
-      d = ValMin;
-  }
-
-  if(View->ShowElement)
-    Draw_ElementBoundary(POST_POINT, View, X, Y, Z);
-
-  if(d >= ValMin && d <= ValMax) {
-    PaletteContinuous(View, ValMin, ValMax, d);
-    if(View->IntervalsType == DRAW_POST_NUMERIC) {
-      glRasterPos3d(X[0], Y[0], Z[0]);
-      sprintf(Num, View->Format, d);
-      Draw_String(Num);
-    }
-    else
-      Draw_Point(View->PointType, View->PointSize, X, Y, Z, View->Light);
-  }
-}
-
-void Draw_ScalarLine(Post_View * View, int preproNormals,
-                     double ValMin, double ValMax,
-                     double *X, double *Y, double *Z, double *V)
-{
-  int nb = 0;
-  double d;
-  double Xp[5], Yp[5], Zp[5], Vp[5], Val[5];
-  char Num[100];
-
-  if(preproNormals)
-    return;
-
-  double *vv = &V[2 * View->TimeStep];
-
-  if(View->Boundary > 0) {
-    View->Boundary--;
-    int ts = View->TimeStep;
-    View->TimeStep = 0;
-    Draw_ScalarPoint(View, 0, ValMin, ValMax, &X[0], &Y[0], &Z[0], &vv[0]); // 0
-    Draw_ScalarPoint(View, 0, ValMin, ValMax, &X[1], &Y[1], &Z[1], &vv[1]); // 1
-    View->TimeStep = ts;
-    View->Boundary++;
-    return;
-  }
-
-  SaturateValues(View->SaturateValues, ValMin, ValMax, vv, Val, 2);
-
-  if(View->ShowElement)
-    Draw_ElementBoundary(POST_LINE, View, X, Y, Z);
-
-  if(View->Tangents){
-    double t[3] = { X[1] - X[0], Y[1] - Y[0], Z[1] - Z[0] };
-    norme(t);
-    t[0] *= View->Tangents * CTX.pixel_equiv_x / CTX.s[0];
-    t[1] *= View->Tangents * CTX.pixel_equiv_x / CTX.s[1];
-    t[2] *= View->Tangents * CTX.pixel_equiv_x / CTX.s[2];
-    glColor4ubv((GLubyte *) & View->color.tangents);
-    Draw_Vector(CTX.vector_type, 0, CTX.arrow_rel_head_radius, 
-		CTX.arrow_rel_stem_length, CTX.arrow_rel_stem_radius, 
-		(X[0] + X[1]) / 2., (Y[0] + Y[1]) / 2.,	(Z[0] + Z[1]) / 2.,
-		t[0], t[1], t[2], View->Light);
-  }
-  
-  if(View->IntervalsType == DRAW_POST_NUMERIC) {
-    if(View->GlyphLocation == DRAW_POST_LOCATE_COG){
-      d = (Val[0] + Val[1]) / 2.;
-      if(d >= ValMin && d <= ValMax) {
-	PaletteContinuous(View, ValMin, ValMax, d);
-	sprintf(Num, View->Format, d);
-	glRasterPos3d((X[0] + X[1]) / 2., (Y[0] + Y[1]) / 2., (Z[0] + Z[1]) / 2.);
-	Draw_String(Num);
-      }
-    }
-    else{
-      for(int i = 0; i < 2; i++){
-	if(Val[i] >= ValMin && Val[i] <= ValMax) {
-	  PaletteContinuous(View, ValMin, ValMax, Val[i]);
-	  sprintf(Num, View->Format, Val[i]);
-	  glRasterPos3d(X[i], Y[i], Z[i]);
-	  Draw_String(Num);
-	}
-      }
-    }
-  }
-
-  if(View->IntervalsType == DRAW_POST_CONTINUOUS) {
-    if(Val[0] >= ValMin && Val[0] <= ValMax &&
-       Val[1] >= ValMin && Val[1] <= ValMax) {
-      if(View->LineType == 1) {
-	// not perfect...
-	PaletteContinuous(View, ValMin, ValMax, Val[0]);
-	Draw_Line(View->LineType, View->LineWidth, X, Y, Z, View->Light);
-      }
-      else if (View->LineType == 2) {
-	PaletteContinuous(View, ValMin, ValMax, Val[0]);
-	//Draw_Line(View->LineType, View->LineWidth, X, Y, Z, View->Light);
-	Draw_TapCylinder(View->LineWidth, Val[0], Val[1], ValMin, ValMax, X, Y, Z, View->Light);
-      }
-      else {
-	glBegin(GL_LINES);
-	PaletteContinuous(View, ValMin, ValMax, Val[0]);
-	glVertex3d(X[0], Y[0], Z[0]);
-	PaletteContinuous(View, ValMin, ValMax, Val[1]);
-	glVertex3d(X[1], Y[1], Z[1]);
-	glEnd();
-      }
-    }
-    else {
-      // FIXME: todo
-    }
-  }
-
-  if(View->IntervalsType == DRAW_POST_DISCRETE) {
-    for(int k = 0; k < View->NbIso; k++) {
-      if(ValMin == ValMax)
-	k = View->NbIso / 2;
-      PaletteDiscrete(View, View->NbIso, k);
-      nb = CutLine(X, Y, Z, &Val[0],
-		   View->GVFI(ValMin, ValMax, View->NbIso + 1, k),
-		   View->GVFI(ValMin, ValMax, View->NbIso + 1, k + 1),
-		   Xp, Yp, Zp, Vp);
-      if(nb == 2)
-	Draw_Line(View->LineType, View->LineWidth, Xp, Yp, Zp, View->Light);
-      if(ValMin == ValMax)
-	break;
-    }
-  }
-
-  if(View->IntervalsType == DRAW_POST_ISO) {
-    for(int k = 0; k < View->NbIso; k++) {
-      if(ValMin == ValMax)
-	k = View->NbIso / 2;
-      PaletteDiscrete(View, View->NbIso, k);
-      IsoLine_Old(View, X, Y, Z, &Val[0],
-		  View->GVFI(ValMin, ValMax, View->NbIso, k));
-      if(ValMin == ValMax)
-	break;
-    }
-  }
-
-}
-
-void Draw_ScalarTriangle(Post_View * View, int preproNormals,
-                         double ValMin, double ValMax,
-                         double *X, double *Y, double *Z, double *V)
-{
-  int nb = 0;
-  double d;
-  double nn[3], norms[30];
-  double Xp[10], Yp[10], Zp[10], Vp[10], Val[3];
-  char Num[100];
-
-  double *vv = &V[3 * View->TimeStep];
-
-  if(!preproNormals && View->Boundary > 0) {
-    View->Boundary--;
-    int ts = View->TimeStep;
-    View->TimeStep = 0;
-    Draw_ScalarLine(View, 0, ValMin, ValMax, &X[0], &Y[0], &Z[0], &vv[0]); // 01
-    Draw_ScalarLine(View, 0, ValMin, ValMax, &X[1], &Y[1], &Z[1], &vv[1]); // 12
-    REORDER2(0, 2);
-    Draw_ScalarLine(View, 0, ValMin, ValMax, Xp, Yp, Zp, Val); // 02
-    View->TimeStep = ts;
-    View->Boundary++;
-    return;
-  }
-
-  SaturateValues(View->SaturateValues, ValMin, ValMax, vv, Val, 3);
-
-  if(preproNormals || View->Normals ||
-     (View->Light && 
-      (!View->TriVertexArray || (View->TriVertexArray && View->TriVertexArray->fill)))) {
-    normal3points(X[0], Y[0], Z[0], X[1], Y[1], Z[1], X[2], Y[2], Z[2], nn);
-  }
-
-  if(!preproNormals && View->ShowElement){
-    if(View->Light && View->LightLines){
-      // FIXME: very crude (not smooth) and inefficient
-      double n[3];
-      normal3points(X[0], Y[0], Z[0], X[1], Y[1], Z[1], X[2], Y[2], Z[2], n);
-      Draw_ElementBoundary(POST_TRIANGLE, View, X, Y, Z, n);
-    }
-    else
-      Draw_ElementBoundary(POST_TRIANGLE, View, X, Y, Z);
-  }
-
-  if(!preproNormals && View->Normals){
-    double t[3] = { nn[0], nn[1], nn[2] };
-    t[0] *= View->Normals * CTX.pixel_equiv_x / CTX.s[0];
-    t[1] *= View->Normals * CTX.pixel_equiv_x / CTX.s[1];
-    t[2] *= View->Normals * CTX.pixel_equiv_x / CTX.s[2];
-    glColor4ubv((GLubyte *) & View->color.normals);
-    Draw_Vector(CTX.vector_type, 0, CTX.arrow_rel_head_radius, 
-		CTX.arrow_rel_stem_length, CTX.arrow_rel_stem_radius, 
-		(X[0] + X[1] + X[2]) / 3.,
-		(Y[0] + Y[1] + Y[2]) / 3.,
-		(Z[0] + Z[1] + Z[2]) / 3.,
-		t[0], t[1], t[2], View->Light);
-  }
-  
-  if(!preproNormals && View->IntervalsType == DRAW_POST_NUMERIC) {
-    if(View->GlyphLocation == DRAW_POST_LOCATE_COG){
-      d = (Val[0] + Val[1] + Val[2]) / 3.;
-      if(d >= ValMin && d <= ValMax) {
-	PaletteContinuous(View, ValMin, ValMax, d);
-	sprintf(Num, View->Format, d);
-	glRasterPos3d((X[0] + X[1] + X[2]) / 3.,
-		      (Y[0] + Y[1] + Y[2]) / 3.,
-		      (Z[0] + Z[1] + Z[2]) / 3.);
-	Draw_String(Num);
-      }
-    }
-    else{
-      for(int i = 0; i < 3; i++){
-	if(Val[i] >= ValMin && Val[i] <= ValMax) {
-	  PaletteContinuous(View, ValMin, ValMax, Val[i]);
-	  sprintf(Num, View->Format, Val[i]);
-	  glRasterPos3d(X[i], Y[i], Z[i]);
-	  Draw_String(Num);
-	}
-      }
-    }
-  }
-
-  if(View->IntervalsType == DRAW_POST_CONTINUOUS &&
-     (preproNormals || !View->TriVertexArray ||
-      (View->TriVertexArray && View->TriVertexArray->fill))) {
-
-    if(Val[0] >= ValMin && Val[0] <= ValMax &&
-       Val[1] >= ValMin && Val[1] <= ValMax &&
-       Val[2] >= ValMin && Val[2] <= ValMax) {
-      if(preproNormals){
-	for(int i = 0; i < 3; i++)
-	  View->normals->add(X[i], Y[i], Z[i], nn[0], nn[1], nn[2]);
-	return;
-      }
-      for(int i = 0; i < 3; i++) {
-	norms[3 * i] = nn[0];
-	norms[3 * i + 1] = nn[1];
-	norms[3 * i + 2] = nn[2];
-      }
-      if(View->SmoothNormals)
-	for(int i = 0; i < 3; i++)
-	  View->normals->get(X[i], Y[i], Z[i], norms[3*i], norms[3*i+1], norms[3*i+2]);
-     
-      if(View->TriVertexArray && View->TriVertexArray->fill){
-	unsigned int col;
-	for(int i = 0; i < 3; i++){
-	  col = PaletteContinuous(View, ValMin, ValMax, Val[i]);
-	  View->TriVertexArray->add(X[i], Y[i], Z[i], 
-				    norms[3*i], norms[3*i+1], norms[3*i+2], col);
-	}
-      }
-      else{
-	if(View->Light) glEnable(GL_LIGHTING);
-	if(CTX.polygon_offset)
-	glBegin(GL_TRIANGLES);
-	for(int i = 0; i < 3; i++){
-	  PaletteContinuous(View, ValMin, ValMax, Val[i]);
-	  if(View->Light) glNormal3dv(&norms[3*i]);
-	  glVertex3d(X[i], Y[i], Z[i]);
-	}
-	glEnd();
-	glDisable(GL_POLYGON_OFFSET_FILL);
-	glDisable(GL_LIGHTING);
-      }
-    }
-    else {
-      nb = CutTriangle(X, Y, Z, Val, ValMin, ValMax, Xp, Yp, Zp, Vp);
-      if(nb >= 3) {
-	if(preproNormals){
-	  for(int i = 0; i < nb; i++)
-	    View->normals->add(Xp[i], Yp[i], Zp[i], nn[0], nn[1], nn[2]);
-	  return;
-	}
-	for(int i = 0; i < nb; i++) {
-	  norms[3 * i] = nn[0];
-	  norms[3 * i + 1] = nn[1];
-	  norms[3 * i + 2] = nn[2];
-	}
-	if(View->SmoothNormals)
-	  for(int i = 0; i < nb; i++)
-	    View->normals->get(Xp[i], Yp[i], Zp[i], norms[3*i], norms[3*i+1], norms[3*i+2]);
-	
-	if(View->TriVertexArray && View->TriVertexArray->fill){
-	  for(int i = 2; i < nb; i++) {
-	    unsigned int col;
-	    col = PaletteContinuous(View, ValMin, ValMax, Vp[0]);
-	    View->TriVertexArray->add(Xp[0], Yp[0], Zp[0], 
-				      norms[0], norms[1], norms[2], col);
-	    col = PaletteContinuous(View, ValMin, ValMax, Vp[i-1]);
-	    View->TriVertexArray->add(Xp[i-1], Yp[i-1], Zp[i-1],
-				      norms[3*(i-1)], norms[3*(i-1)+1], norms[3*(i-1)+2], col);
-	    col = PaletteContinuous(View, ValMin, ValMax, Vp[i]);
-	    View->TriVertexArray->add(Xp[i], Yp[i], Zp[i], 
-				      norms[3*i], norms[3*i+1], norms[3*i+2], col);
-	  }
-	}
-	else{
-	  if(View->Light) glEnable(GL_LIGHTING);
-	  if(CTX.polygon_offset) glEnable(GL_POLYGON_OFFSET_FILL);
-	  glBegin(GL_POLYGON);
-	  for(int i = 0; i < nb; i++) {
-	    PaletteContinuous(View, ValMin, ValMax, Vp[i]);
-	    if(View->Light) glNormal3dv(&norms[3*i]);
-	    glVertex3d(Xp[i], Yp[i], Zp[i]);
-	  }
-	  glEnd();
-	  glDisable(GL_POLYGON_OFFSET_FILL);
-	  glDisable(GL_LIGHTING);
-	}
-      }
-    }
-  }
-
-  if(View->IntervalsType == DRAW_POST_DISCRETE &&
-     (preproNormals || !View->TriVertexArray || 
-      (View->TriVertexArray && View->TriVertexArray->fill))) {
-    for(int k = 0; k < View->NbIso; k++) {
-      if(ValMin == ValMax)
-	k = View->NbIso / 2;
-      unsigned int col = PaletteDiscrete(View, View->NbIso, k);
-      nb = CutTriangle(X, Y, Z, Val,
-		       View->GVFI(ValMin, ValMax, View->NbIso + 1, k),
-		       View->GVFI(ValMin, ValMax, View->NbIso + 1, k + 1),
-		       Xp, Yp, Zp, Vp);
-      if(nb >= 3) {
-	if(preproNormals){
-	  for(int i = 0; i < nb; i++)
-	    View->normals->add(Xp[i], Yp[i], Zp[i], nn[0], nn[1], nn[2]);
-	}
-	else{
-	  for(int i = 0; i < nb; i++) {
-	    norms[3 * i] = nn[0];
-	    norms[3 * i + 1] = nn[1];
-	    norms[3 * i + 2] = nn[2];
-	  }
-	  if(View->SmoothNormals)
-	    for(int i = 0; i < nb; i++)
-	      View->normals->get(Xp[i], Yp[i], Zp[i], norms[3*i], norms[3*i+1], norms[3*i+2]);
-
-	  if(View->TriVertexArray && View->TriVertexArray->fill){
-	    for(int i = 2; i < nb; i++) {
-	      View->TriVertexArray->add(Xp[0], Yp[0], Zp[0], 
-					norms[0], norms[1], norms[2], col);
-	      View->TriVertexArray->add(Xp[i-1], Yp[i-1], Zp[i-1],
-					norms[3*(i-1)], norms[3*(i-1)+1], norms[3*(i-1)+2], col);
-	      View->TriVertexArray->add(Xp[i], Yp[i], Zp[i],
-					norms[3*i], norms[3*i+1], norms[3*i+2], col);
-	    }
-	  }
-	  else{
-	    if(View->Light) glEnable(GL_LIGHTING);
-	    if(CTX.polygon_offset) glEnable(GL_POLYGON_OFFSET_FILL);
-	    glBegin(GL_POLYGON);
-	    for(int i = 0; i < nb; i++){
-	      if(View->Light) glNormal3dv(&norms[3*i]);
-	      glVertex3d(Xp[i], Yp[i], Zp[i]);
-	    }
-	    glEnd();
-	    glDisable(GL_POLYGON_OFFSET_FILL);
-	    glDisable(GL_LIGHTING);
-	  }
-	}
-      }
-      if(ValMin == ValMax) 
-	break;
-    }
-  }
-  
-  if(!preproNormals && View->IntervalsType == DRAW_POST_ISO &&
-     (!View->LinVertexArray || (View->LinVertexArray && View->LinVertexArray->fill) ||
-      View->LineType)){
-    for(int k = 0; k < View->NbIso; k++) {
-      if(ValMin == ValMax)
-	k = View->NbIso / 2;
-      unsigned int col = PaletteDiscrete(View, View->NbIso, k);
-      IsoTriangle_Old(View, X, Y, Z, Val,
-		      View->GVFI(ValMin, ValMax, View->NbIso, k), col);
-      if(ValMin == ValMax) 
-	break;
-    }
-  }
-  
-}
-
-void Draw_ScalarTetrahedron(Post_View * View, int preproNormals,
-                            double ValMin, double ValMax,
-                            double *X, double *Y, double *Z, double *V)
-{
-  double d, Xp[4], Yp[4], Zp[4];
-  char Num[100];
-  double Val[4];
-
-  double *vv = &V[4 * View->TimeStep];
-
-  // To draw filled iso-values or continuous maps, we should ideally
-  // do volume rendering. Until we can do that, we just draw the
-  // solution on the boundary of the elements
-  if((View->Boundary > 0) ||
-     (View->IntervalsType == DRAW_POST_DISCRETE ||
-      View->IntervalsType == DRAW_POST_CONTINUOUS)) {
-    View->Boundary--;
-    int ts = View->TimeStep;
-    View->TimeStep = 0;
-    REORDER3(0, 2, 1);
-    Draw_ScalarTriangle(View, preproNormals, ValMin, ValMax, Xp, Yp, Zp, Val); // 021
-    REORDER3(0, 1, 3);
-    Draw_ScalarTriangle(View, preproNormals, ValMin, ValMax, Xp, Yp, Zp, Val); // 013
-    REORDER3(0, 3, 2);
-    Draw_ScalarTriangle(View, preproNormals, ValMin, ValMax, Xp, Yp, Zp, Val); // 032
-    REORDER3(3, 1, 2);
-    Draw_ScalarTriangle(View, preproNormals, ValMin, ValMax, Xp, Yp, Zp, Val); // 312
-    View->TimeStep = ts;
-    View->Boundary++;
-    return;
-  }
-
-  SaturateValues(View->SaturateValues, ValMin, ValMax, vv, Val, 4);
-
-  if(!preproNormals && View->ShowElement)
-    Draw_ElementBoundary(POST_TETRAHEDRON, View, X, Y, Z);
-
-  if(!preproNormals && View->IntervalsType == DRAW_POST_NUMERIC) {
-    if(View->GlyphLocation == DRAW_POST_LOCATE_COG){
-      d = 0.25 * (Val[0] + Val[1] + Val[2] + Val[3]);
-      if(d >= ValMin && d <= ValMax) {
-	PaletteContinuous(View, ValMin, ValMax, d);
-	sprintf(Num, View->Format, d);
-	glRasterPos3d(0.25 * (X[0] + X[1] + X[2] + X[3]),
-		      0.25 * (Y[0] + Y[1] + Y[2] + Y[3]),
-		      0.25 * (Z[0] + Z[1] + Z[2] + Z[3]));
-	Draw_String(Num);
-      }
-    }
-    else{
-      for(int i = 0; i < 4; i++){
-	if(Val[i] >= ValMin && Val[i] <= ValMax) {
-	  PaletteContinuous(View, ValMin, ValMax, Val[i]);
-	  sprintf(Num, View->Format, Val[i]);
-	  glRasterPos3d(X[i], Y[i], Z[i]);
-	  Draw_String(Num);
-	}
-      }
-    }
-  }
-  else if(!View->TriVertexArray || (View->TriVertexArray && View->TriVertexArray->fill)){
-    for(int k = 0; k < View->NbIso; k++) {
-      if(ValMin == ValMax)
-	k = View->NbIso / 2;
-      unsigned int col = PaletteDiscrete(View, View->NbIso, k);
-      IsoSimplex_Old(View, preproNormals, X, Y, Z, Val,
-		     View->GVFI(ValMin, ValMax, View->NbIso, k), col);
-      if(ValMin == ValMax)
-	break;
-    }
-  }
-}
-
-void Draw_ScalarQuadrangle(Post_View * View, int preproNormals,
-                           double ValMin, double ValMax,
-                           double *X, double *Y, double *Z, double *V)
-{
-  int ts, show = 0;
-  double Val[4], Xp[4], Yp[4], Zp[4];
-  double *vv = &V[4 * View->TimeStep];
-
-  ts = View->TimeStep;
-  View->TimeStep = 0;
-
-  if(!preproNormals && View->Boundary > 0) {
-    View->Boundary--;
-    Draw_ScalarLine(View, 0, ValMin, ValMax, &X[0], &Y[0], &Z[0], &vv[0]); // 01
-    Draw_ScalarLine(View, 0, ValMin, ValMax, &X[1], &Y[1], &Z[1], &vv[1]); // 12
-    Draw_ScalarLine(View, 0, ValMin, ValMax, &X[2], &Y[2], &Z[2], &vv[2]); // 23
-    REORDER2(0, 3);
-    Draw_ScalarLine(View, 0, ValMin, ValMax, Xp, Yp, Zp, Val); // 03
-    View->TimeStep = ts;
-    View->Boundary++;
-    return;
-  }
-
-  show = View->ShowElement;
-  View->ShowElement = 0;
-
-  if(!preproNormals && show) {
-    SaturateValues(View->SaturateValues, ValMin, ValMax, vv, Val, 4);
-    if(View->Light && View->LightLines){
-      // FIXME: very crude (not smooth) and inefficient
-      double n[3];
-      normal3points(X[0], Y[0], Z[0], X[1], Y[1], Z[1], X[2], Y[2], Z[2], n);
-      Draw_ElementBoundary(POST_QUADRANGLE, View, X, Y, Z, n);
-    }
-    else
-      Draw_ElementBoundary(POST_QUADRANGLE, View, X, Y, Z);
-  }
-
-  Draw_ScalarTriangle(View, preproNormals, ValMin, ValMax, X, Y, Z, vv); // 012
-  REORDER3(0, 2, 3);
-  Draw_ScalarTriangle(View, preproNormals, ValMin, ValMax, Xp, Yp, Zp, Val); // 023
-
-  View->TimeStep = ts;
-  View->ShowElement = show;
-}
-
-void Draw_ScalarHexahedron(Post_View * View, int preproNormals,
-                           double ValMin, double ValMax,
-                           double *X, double *Y, double *Z, double *V)
-{
-  int ts, show = 0;
-  double Val[8], Xp[8], Yp[8], Zp[8];
-  double *vv = &V[8 * View->TimeStep];
-
-  ts = View->TimeStep;
-  View->TimeStep = 0;
-
-  // To draw filled iso-values or continuous maps, we should ideally
-  // do volume rendering. Until we can do that, we just draw the
-  // solution on the boundary of the elements
-  if((View->Boundary > 0) ||
-     (View->IntervalsType == DRAW_POST_DISCRETE ||
-      View->IntervalsType == DRAW_POST_CONTINUOUS)) {
-    View->Boundary--;
-    REORDER4(0, 1, 5, 4);
-    Draw_ScalarQuadrangle(View, 0, ValMin, ValMax, Xp, Yp, Zp, Val); // 0154
-    REORDER4(0, 3, 2, 1);
-    Draw_ScalarQuadrangle(View, 0, ValMin, ValMax, Xp, Yp, Zp, Val); // 0321
-    REORDER4(0, 4, 7, 3);
-    Draw_ScalarQuadrangle(View, 0, ValMin, ValMax, Xp, Yp, Zp, Val); // 0473
-    REORDER4(1, 2, 6, 5);
-    Draw_ScalarQuadrangle(View, 0, ValMin, ValMax, Xp, Yp, Zp, Val); // 1265
-    REORDER4(2, 3, 7, 6);
-    Draw_ScalarQuadrangle(View, 0, ValMin, ValMax, Xp, Yp, Zp, Val); // 2376
-    Draw_ScalarQuadrangle(View, 0, ValMin, ValMax, &X[4], &Y[4], &Z[4], &vv[4]); // 4567
-    View->TimeStep = ts;
-    View->Boundary++;
-    return;
-  }
-
-  show = View->ShowElement;
-  View->ShowElement = 0;
-
-  if(!preproNormals && show) {
-    SaturateValues(View->SaturateValues, ValMin, ValMax, vv, Val, 8);
-    Draw_ElementBoundary(POST_HEXAHEDRON, View, X, Y, Z);
-  }
-
-  // 6-tet subdivision whose edges match on each pair of opposite faces
-  REORDER4(0, 1, 3, 7);
-  Draw_ScalarTetrahedron(View, preproNormals, ValMin, ValMax, Xp, Yp, Zp, Val);
-  REORDER4(0, 4, 1, 7);
-  Draw_ScalarTetrahedron(View, preproNormals, ValMin, ValMax, Xp, Yp, Zp, Val);
-  REORDER4(1, 4, 5, 7);
-  Draw_ScalarTetrahedron(View, preproNormals, ValMin, ValMax, Xp, Yp, Zp, Val);
-
-  REORDER4(1, 2, 3, 7);
-  Draw_ScalarTetrahedron(View, preproNormals, ValMin, ValMax, Xp, Yp, Zp, Val);
-  REORDER4(1, 6, 2, 7);
-  Draw_ScalarTetrahedron(View, preproNormals, ValMin, ValMax, Xp, Yp, Zp, Val);
-  REORDER4(1, 5, 6, 7);
-  Draw_ScalarTetrahedron(View, preproNormals, ValMin, ValMax, Xp, Yp, Zp, Val);
-
-  View->TimeStep = ts;
-  View->ShowElement = show;
-}
-
-void Draw_ScalarPrism(Post_View * View, int preproNormals,
-                      double ValMin, double ValMax,
-                      double *X, double *Y, double *Z, double *V)
-{
-  int ts, show = 0;
-  double Val[6], Xp[6], Yp[6], Zp[6];
-  double *vv = &V[6 * View->TimeStep];
-
-  ts = View->TimeStep;
-  View->TimeStep = 0;
-
-  // To draw filled iso-values or continuous maps, we should ideally
-  // do volume rendering. Until we can do that, we just draw the
-  // solution on the boundary of the elements
-  if((View->Boundary > 0) ||
-     (View->IntervalsType == DRAW_POST_DISCRETE ||
-      View->IntervalsType == DRAW_POST_CONTINUOUS)) {
-    View->Boundary--;
-    REORDER4(0, 1, 4, 3);
-    Draw_ScalarQuadrangle(View, 0, ValMin, ValMax, Xp, Yp, Zp, Val);
-    REORDER3(0, 2, 1);
-    Draw_ScalarTriangle(View, 0, ValMin, ValMax, Xp, Yp, Zp, Val);
-    REORDER4(0, 3, 5, 2);
-    Draw_ScalarQuadrangle(View, 0, ValMin, ValMax, Xp, Yp, Zp, Val);
-    REORDER4(1, 2, 5, 4);
-    Draw_ScalarQuadrangle(View, 0, ValMin, ValMax, Xp, Yp, Zp, Val);
-    Draw_ScalarTriangle(View, 0, ValMin, ValMax, &X[3], &Y[3], &Z[3], &vv[3]);
-    View->TimeStep = ts;
-    View->Boundary++;
-    return;
-  }
-
-  show = View->ShowElement;
-  View->ShowElement = 0;
-
-  if(!preproNormals && show) {
-    SaturateValues(View->SaturateValues, ValMin, ValMax, vv, Val, 6);
-    Draw_ElementBoundary(POST_PRISM, View, X, Y, Z);
-  }
-
-  Draw_ScalarTetrahedron(View, preproNormals, ValMin, ValMax, X, Y, Z, vv); // 0123
-  REORDER4(3, 4, 5, 2);
-  Draw_ScalarTetrahedron(View, preproNormals, ValMin, ValMax, Xp, Yp, Zp, Val); // 3452
-  REORDER4(1, 2, 4, 3);
-  Draw_ScalarTetrahedron(View, preproNormals, ValMin, ValMax, Xp, Yp, Zp, Val); // 1243
-
-  View->TimeStep = ts;
-  View->ShowElement = show;
-}
-
-void Draw_ScalarPyramid(Post_View * View, int preproNormals,
-                        double ValMin, double ValMax,
-                        double *X, double *Y, double *Z, double *V)
-{
-  int ts, show = 0;
-  double Val[5], Xp[5], Yp[5], Zp[5];
-  double *vv = &V[5 * View->TimeStep];
-
-  ts = View->TimeStep;
-  View->TimeStep = 0;
-
-  // To draw filled iso-values or continuous maps, we should ideally
-  // do volume rendering. Until we can do that, we just draw the
-  // solution on the boundary of the elements
-  if((View->Boundary > 0) ||
-     (View->IntervalsType == DRAW_POST_DISCRETE ||
-      View->IntervalsType == DRAW_POST_CONTINUOUS)) {
-    View->Boundary--;
-    REORDER4(0, 3, 2, 1);
-    Draw_ScalarQuadrangle(View, 0, ValMin, ValMax, Xp, Yp, Zp, Val);
-    REORDER3(0, 1, 4);
-    Draw_ScalarTriangle(View, 0, ValMin, ValMax, Xp, Yp, Zp, Val);
-    REORDER3(1, 2, 4);
-    Draw_ScalarTriangle(View, 0, ValMin, ValMax, Xp, Yp, Zp, Val);
-    REORDER3(2, 3, 4);
-    Draw_ScalarTriangle(View, 0, ValMin, ValMax, Xp, Yp, Zp, Val);
-    REORDER3(3, 0, 4);
-    Draw_ScalarTriangle(View, 0, ValMin, ValMax, Xp, Yp, Zp, Val);
-    View->TimeStep = ts;
-    View->Boundary++;
-    return;
-  }
-
-  show = View->ShowElement;
-  View->ShowElement = 0;
-
-  if(!preproNormals && show) {
-    SaturateValues(View->SaturateValues, ValMin, ValMax, vv, Val, 6);
-    Draw_ElementBoundary(POST_PYRAMID, View, X, Y, Z);
-  }
-
-  REORDER4(0, 1, 2, 4);
-  Draw_ScalarTetrahedron(View, preproNormals, ValMin, ValMax, Xp, Yp, Zp, Val);
-  REORDER4(2, 3, 0, 4);
-  Draw_ScalarTetrahedron(View, preproNormals, ValMin, ValMax, Xp, Yp, Zp, Val);
-
-  View->TimeStep = ts;
-  View->ShowElement = show;
-}
-
-void Draw_ScalarElement(int type, Post_View * View, int preproNormals,
-                        double ValMin, double ValMax, 
-                        double *X, double *Y, double *Z, double *V)
-{
-  switch(type){
-  case POST_POINT:
-    Draw_ScalarPoint(View, preproNormals, ValMin, ValMax, X, Y, Z, V);
-    break;
-  case POST_LINE:
-    Draw_ScalarLine(View, preproNormals, ValMin, ValMax, X, Y, Z, V);
-    break;
-  case POST_TRIANGLE:
-    Draw_ScalarTriangle(View, preproNormals, ValMin, ValMax, X, Y, Z, V);
-    break;
-  case POST_QUADRANGLE:
-    Draw_ScalarQuadrangle(View, preproNormals, ValMin, ValMax, X, Y, Z, V);
-    break;
-  case POST_TETRAHEDRON:
-    Draw_ScalarTetrahedron(View, preproNormals, ValMin, ValMax, X, Y, Z, V);
-    break;
-  case POST_HEXAHEDRON:
-    Draw_ScalarHexahedron(View, preproNormals, ValMin, ValMax, X, Y, Z, V);
-    break;
-  case POST_PRISM:
-    Draw_ScalarPrism(View, preproNormals, ValMin, ValMax, X, Y, Z, V);
-    break;
-  case POST_PYRAMID:
-    Draw_ScalarPyramid(View, preproNormals, ValMin, ValMax, X, Y, Z, V);
-    break;
-  }
-}
-
-// Vector Elements
-
-void Draw_VectorElement(int type, Post_View * View, int preproNormals,
-                        double ValMin, double ValMax, 
-                        double *X, double *Y, double *Z, double *V)
-{
-  int nbnod = 0;
-  switch (type) {
-  case POST_POINT: nbnod = 1; break;
-  case POST_LINE: nbnod = 2; break;
-  case POST_TRIANGLE: nbnod = 3; break;
-  case POST_QUADRANGLE: nbnod = 4; break;
-  case POST_TETRAHEDRON: nbnod = 4; break;
-  case POST_HEXAHEDRON: nbnod = 8; break;
-  case POST_PRISM: nbnod = 6; break;
-  case POST_PYRAMID: nbnod = 5; break;
-  }
-
-  double Val[8][3], norm[8];
-  for(int k = 0; k < nbnod; k++) {
-    Val[k][0] = V[3 * nbnod * View->TimeStep + 3 * k];
-    Val[k][1] = V[3 * nbnod * View->TimeStep + 3 * k + 1];
-    Val[k][2] = V[3 * nbnod * View->TimeStep + 3 * k + 2];
-    norm[k] = sqrt(Val[k][0] * Val[k][0] + Val[k][1] * Val[k][1] + Val[k][2] * Val[k][2]);
-  }
-
-  int ext_nbcomp = 1, ext_vectype = DRAW_POST_ARROW3D;
-  double *ext_vals = &V[3 * nbnod * View->TimeStep];
-  double ext_min = ValMin, ext_max = ValMax, ext_norm[8];
-  for(int k = 0; k < nbnod; k++)
-    ext_norm[k] = norm[k];
-
-  if(View->ExternalViewIndex >= 0 &&
-     GetValuesFromExternalView(View, type, 3, &ext_nbcomp, &ext_vals, 
-			       View->ExternalViewIndex)){
-    for(int k = 0; k < nbnod; k++){
-      if(ext_nbcomp == 1)
-	ext_norm[k] = ext_vals[k];
-      else if(ext_nbcomp == 3)
-	ext_norm[k] = sqrt(ext_vals[3*k] * ext_vals[3*k] + 
-			   ext_vals[3*k+1] * ext_vals[3*k+1] + 
-			   ext_vals[3*k+2] * ext_vals[3*k+2]);
-      else if(ext_nbcomp == 9)
-	ext_norm[k] = ComputeVonMises(ext_vals + 9*k);
-    }
-    Post_View *v2 = *(Post_View**)List_Pointer_Fast(CTX.post.list, 
-						    View->ExternalViewIndex);
-    switch (View->RangeType) {
-    case DRAW_POST_RANGE_DEFAULT:
-      View->ExternalMin = v2->Min;
-      View->ExternalMax = v2->Max;
-      break;
-    case DRAW_POST_RANGE_CUSTOM: // yes, take the values from View!
-      View->ExternalMin = View->CustomMin;
-      View->ExternalMax = View->CustomMax;
-      break;
-    case DRAW_POST_RANGE_PER_STEP:
-      if(View->TimeStepMin && View->TimeStepMax){
-	View->ExternalMin = v2->TimeStepMin[View->TimeStep];
-	View->ExternalMax = v2->TimeStepMax[View->TimeStep];
-      }
-      else{
-	View->ExternalMin = v2->Min;
-	View->ExternalMax = v2->Max;
-      }
-      break;
-    }
-    ext_min = View->ExternalMin;
-    ext_max = View->ExternalMax;
-    if(v2->VectorType == DRAW_POST_DISPLACEMENT)
-      ext_vectype = DRAW_POST_ARROW3D; // avoid recursion
-    else
-      ext_vectype = v2->VectorType;
-  }
-
-  if(View->VectorType == DRAW_POST_DISPLACEMENT){
-
-    double fact = View->DisplacementFactor;
-    double xx[8], yy[8], zz[8];
-    for(int k = 0; k < nbnod; k++) {
-      xx[k] = X[k] + fact * Val[k][0];
-      yy[k] = Y[k] + fact * Val[k][1];
-      zz[k] = Z[k] + fact * Val[k][2];
-      // update the dynamic bounding box
-      if(xx[k] < View->TmpBBox[0]) View->TmpBBox[0] = xx[k];
-      if(xx[k] > View->TmpBBox[1]) View->TmpBBox[1] = xx[k];
-      if(yy[k] < View->TmpBBox[2]) View->TmpBBox[2] = yy[k];
-      if(yy[k] > View->TmpBBox[3]) View->TmpBBox[3] = yy[k];
-      if(zz[k] < View->TmpBBox[4]) View->TmpBBox[4] = zz[k];
-      if(zz[k] > View->TmpBBox[5]) View->TmpBBox[5] = zz[k];
-    }
-    
-    int ts = View->TimeStep;
-    View->TimeStep = 0;
-    int vt = View->VectorType;
-    View->VectorType = ext_vectype;
-    
-    if(ext_nbcomp == 1){
-      Draw_ScalarElement(type, View, preproNormals, ext_min, ext_max, xx, yy, zz, ext_norm);
-      if(type == POST_POINT && ts > 0 && View->LineWidth) {  // draw point "trajectory"
-	if(View->LineType) {
-	  double dx, dy, dz, dx2, dy2, dz2, XX[2], YY[2], ZZ[2];
-	  for(int j = 0; j < ts; j++) {
-	    dx = V[3 * (ts - j)];
-	    dy = V[3 * (ts - j) + 1];
-	    dz = V[3 * (ts - j) + 2];
-	    dx2 = V[3 * (ts - j - 1)];
-	    dy2 = V[3 * (ts - j - 1) + 1];
-	    dz2 = V[3 * (ts - j - 1) + 2];
-	    double dd = sqrt(dx * dx + dy * dy + dz * dz);
-	    // not perfect...
-	    PaletteContinuous(View, ValMin, ValMax, dd);
-	    XX[0] = X[0] + fact * dx;
-	    XX[1] = X[0] + fact * dx2;
-	    YY[0] = Y[0] + fact * dy;
-	    YY[1] = Y[0] + fact * dy2;
-	    ZZ[0] = Z[0] + fact * dz;
-	    ZZ[1] = Z[0] + fact * dz2;
-	    Draw_Line(View->LineType, View->LineWidth, XX, YY, ZZ, View->Light);
-	  }
-	}
-	else {
-	  glBegin(GL_LINE_STRIP);
-	  for(int j = 0; j < ts + 1; j++) {
-	    double dx = V[3 * (ts - j)];
-	    double dy = V[3 * (ts - j) + 1];
-	    double dz = V[3 * (ts - j) + 2];
-	    double dd = sqrt(dx * dx + dy * dy + dz * dz);
-	    PaletteContinuous(View, ValMin, ValMax, dd);
-	    glVertex3d(X[0] + fact * dx,
-		       Y[0] + fact * dy,
-		       Z[0] + fact * dz);
-	  }
-	  glEnd();
-	}
-      }
-    }
-    else if(ext_nbcomp == 3){
-      Draw_VectorElement(type, View, preproNormals, ext_min, ext_max, xx, yy, zz, ext_vals);
-    }
-    else if(ext_nbcomp == 9){
-      Draw_TensorElement(type, View, preproNormals, ext_min, ext_max, xx, yy, zz, ext_vals);
-    }
-
-    View->TimeStep = ts;
-    View->VectorType = vt;
-    return;
-  }
-
-  if(preproNormals)
-    return;
-
-  if(View->ShowElement)
-    Draw_ElementBoundary(type, View, X, Y, Z);
-
-  double xc = 0., yc = 0., zc = 0.;
-  if(View->Normals || View->Tangents || View->GlyphLocation == DRAW_POST_LOCATE_COG){
-    for(int k = 0; k < nbnod; k++) {
-      xc += X[k];
-      yc += Y[k];
-      zc += Z[k];
-    }
-    xc /= (double)nbnod;
-    yc /= (double)nbnod;
-    zc /= (double)nbnod;
-  }
-
-  if(View->Normals && (type == POST_TRIANGLE || type == POST_QUADRANGLE)){
-    double nn[3];
-    normal3points(X[0], Y[0], Z[0], X[1], Y[1], Z[1], X[2], Y[2], Z[2], nn);
-    nn[0] *= View->Normals * CTX.pixel_equiv_x / CTX.s[0];
-    nn[1] *= View->Normals * CTX.pixel_equiv_x / CTX.s[1];
-    nn[2] *= View->Normals * CTX.pixel_equiv_x / CTX.s[2];
-    glColor4ubv((GLubyte *) & View->color.normals);
-    Draw_Vector(CTX.vector_type, 0, CTX.arrow_rel_head_radius, 
-		CTX.arrow_rel_stem_length, CTX.arrow_rel_stem_radius, 
-		xc, yc, zc, nn[0], nn[1], nn[2], View->Light);
-  }
-
-  if(View->Tangents && (type == POST_LINE)){
-    double t[3] = { X[1] - X[0], Y[1] - Y[0], Z[1] - Z[0] };
-    norme(t);
-    t[0] *= View->Tangents * CTX.pixel_equiv_x / CTX.s[0];
-    t[1] *= View->Tangents * CTX.pixel_equiv_x / CTX.s[1];
-    t[2] *= View->Tangents * CTX.pixel_equiv_x / CTX.s[2];
-    glColor4ubv((GLubyte *) & View->color.tangents);
-    Draw_Vector(CTX.vector_type, 0, CTX.arrow_rel_head_radius, 
-		CTX.arrow_rel_stem_length, CTX.arrow_rel_stem_radius, 
-		xc, yc, zc, t[0], t[1], t[2], View->Light);
-  }
-
-  if(View->GlyphLocation == DRAW_POST_LOCATE_COG) {
-    double dd = 0., ext_dd = 0., dx = 0., dy = 0., dz = 0.;
-    for(int k = 0; k < nbnod; k++) {
-      dx += Val[k][0];
-      dy += Val[k][1];
-      dz += Val[k][2];
-      // Warning: in the case of a vector view, ext_dd represents the
-      // average of the magnitudes of the vectors at the nodes, NOT
-      // the magnitude of the vector average.
-      ext_dd += ext_norm[k];
-    }
-    dx /= (double)nbnod;
-    dy /= (double)nbnod;
-    dz /= (double)nbnod;
-    ext_dd /= (double)nbnod;
-    dd = sqrt(dx*dx + dy*dy + dz*dz);
-    // allow for some roundoff error due to the computation at the barycenter
-    if(dd != 0.0 && ext_dd != 0.0 && 
-       ext_dd >= ext_min * (1. - 1.e-15) && 
-       ext_dd <= ext_max * (1. + 1.e-15)) {
-      if(View->IntervalsType == DRAW_POST_CONTINUOUS)
-	PaletteContinuous(View, ext_min, ext_max, ext_dd);
-      else
-	PaletteDiscrete(View, View->NbIso,
-			View->GIFV(ext_min, ext_max, View->NbIso, ext_dd));
-      if(View->IntervalsType == DRAW_POST_NUMERIC) {
-	char Num[100], Numx[100], Numy[100], Numz[100];
-        glRasterPos3d(xc, yc, zc);
-        sprintf(Numx, View->Format, dx);
-        sprintf(Numy, View->Format, dy);
-        sprintf(Numz, View->Format, dz);
-        sprintf(Num, "(%s,%s,%s)", Numx, Numy, Numz);
-        Draw_String(Num);
-      }
-      else {
-        double fact = CTX.pixel_equiv_x / CTX.s[0] * View->ArrowSize / 
-	  (View->ArrowSizeProportional ? ValMax : dd);
-        if(View->ScaleType == DRAW_POST_LOGARITHMIC && ValMin > 0) {
-          dx /= dd;
-          dy /= dd;
-          dz /= dd;
-          dd = log10(dd / ValMin);
-          dx *= dd;
-          dy *= dd;
-          dz *= dd;
-        }
-        Draw_Vector(View->VectorType, View->IntervalsType != DRAW_POST_ISO,
-		    View->ArrowRelHeadRadius, View->ArrowRelStemLength,
-		    View->ArrowRelStemRadius, xc, yc, zc, 
-		    fact * dx, fact * dy, fact * dz, View->Light);
-      }
-    }
-  }
-  else {
-    for(int k = 0; k < nbnod; k++) {
-      if(ext_norm[k] != 0.0 && ext_norm[k] >= ext_min && ext_norm[k] <= ext_max) {
-	if(View->IntervalsType == DRAW_POST_CONTINUOUS)
-	  PaletteContinuous(View, ext_min, ext_max, ext_norm[k]);
-	else
-	  PaletteDiscrete(View, View->NbIso,
-			  View->GIFV(ext_min, ext_max, View->NbIso, ext_norm[k]));
-	if(View->IntervalsType == DRAW_POST_NUMERIC) {
-	  char Num[100], Numx[100], Numy[100], Numz[100];
-	  glRasterPos3d(X[k], Y[k], Z[k]);
-	  sprintf(Numx, View->Format, Val[k][0]);
-	  sprintf(Numy, View->Format, Val[k][1]);
-	  sprintf(Numz, View->Format, Val[k][2]);
-	  sprintf(Num, "(%s,%s,%s)", Numx, Numy, Numz);
-	  Draw_String(Num);
-	}
-	else{
-	  double fact = CTX.pixel_equiv_x / CTX.s[0] * View->ArrowSize /
-	    (View->ArrowSizeProportional ? ValMax : norm[k]);
-	  if(View->ScaleType == DRAW_POST_LOGARITHMIC && ValMin > 0) {
-	    Val[k][0] /= norm[k];
-	    Val[k][1] /= norm[k];
-	    Val[k][2] /= norm[k];
-	    norm[k] = log10(norm[k] / ValMin);
-	    Val[k][0] *= norm[k];
-	    Val[k][1] *= norm[k];
-	    Val[k][2] *= norm[k];
-	  }
-	  Draw_Vector(View->VectorType, View->IntervalsType != DRAW_POST_ISO,
-		      View->ArrowRelHeadRadius, View->ArrowRelStemLength,
-		      View->ArrowRelStemRadius, X[k], Y[k], Z[k], 
-		      fact * Val[k][0], fact * Val[k][1], fact * Val[k][2], 
-		      View->Light);
-	}
-      }
-    }
-  }
-}
-
-#define ARGS Post_View *View, int preproNormals, \
-             double ValMin, double ValMax, 	 \
-             double *X, double *Y, double *Z, double *V
-
-void Draw_VectorPoint(ARGS)
-{
-  Draw_VectorElement(POST_POINT, View, preproNormals, ValMin, ValMax, X, Y, Z, V);
-}
-void Draw_VectorLine(ARGS)
-{
-  Draw_VectorElement(POST_LINE, View, preproNormals, ValMin, ValMax, X, Y, Z, V);
-}
-
-void Draw_VectorTriangle(ARGS)
-{
-  Draw_VectorElement(POST_TRIANGLE, View, preproNormals, ValMin, ValMax, X, Y, Z, V);
-}
-
-void Draw_VectorTetrahedron(ARGS)
-{
-  Draw_VectorElement(POST_TETRAHEDRON, View, preproNormals, ValMin, ValMax, X, Y, Z, V);
-}
-
-void Draw_VectorQuadrangle(ARGS)
-{
-  Draw_VectorElement(POST_QUADRANGLE, View, preproNormals, ValMin, ValMax, X, Y, Z, V);
-}
-
-void Draw_VectorHexahedron(ARGS)
-{
-  Draw_VectorElement(POST_HEXAHEDRON, View, preproNormals, ValMin, ValMax, X, Y, Z, V);
-}
-
-void Draw_VectorPrism(ARGS)
-{
-  Draw_VectorElement(POST_PRISM, View, preproNormals, ValMin, ValMax, X, Y, Z, V);
-}
-
-void Draw_VectorPyramid(ARGS)
-{
-  Draw_VectorElement(POST_PYRAMID, View, preproNormals, ValMin, ValMax, X, Y, Z, V);
-}
-
-#undef ARGS
-
-// Tensor Elements
-
-static int state = -1; // WTF? This is completely wrong when you have multiple view --CG
-
-void Draw_TensorElement(int type, Post_View * View, int preproNormals,
-                        double ValMin, double ValMax,
-                        double *iX, double *iY, double *iZ, double *V)
-{
-  int nbnod = 0;
-
-
-  switch (type) {
-  case POST_POINT: nbnod = 1; break;
-  case POST_LINE: nbnod = 2; break;
-  case POST_TRIANGLE: nbnod = 3; break;
-  case POST_QUADRANGLE: nbnod = 4; break;
-  case POST_TETRAHEDRON: nbnod = 4; break;
-  case POST_HEXAHEDRON: nbnod = 8; break;
-  case POST_PRISM: nbnod = 6; break;
-  case POST_PYRAMID: nbnod = 5; break;
-  }
-
-  int ts = View->TimeStep;
-
-  if(View->TensorType == DRAW_POST_VONMISES || !View->NbTP){
-
-    View->TimeStep = 0;
-    double V_VonMises[8];
-    for(int i = 0; i < nbnod; i++)
-      V_VonMises[i] = ComputeVonMises(V + 9*(i + nbnod * ts));
-    Draw_ScalarElement(type, View, preproNormals, ValMin, ValMax, 
-		       iX, iY, iZ, V_VonMises);
-
-  }
-  else if(View->TensorType == DRAW_POST_LMGC90 || 
-	  View->TensorType == DRAW_POST_LMGC90_TYPE || 
-	  View->TensorType == DRAW_POST_LMGC90_COORD || 
-	  View->TensorType == DRAW_POST_LMGC90_PRES || 
-	  View->TensorType == DRAW_POST_LMGC90_SN || 
-	  View->TensorType == DRAW_POST_LMGC90_DEPX || 
-	  View->TensorType == DRAW_POST_LMGC90_DEPY|| 
-	  View->TensorType == DRAW_POST_LMGC90_DEPZ || 
-	  View->TensorType == DRAW_POST_LMGC90_DEPAV || 
-	  View->TensorType == DRAW_POST_LMGC90_DEPNORM){
-    
-    // FIXME: need to clean up this mess! --CG
-    
-    static double zmin[3], zmax[3];
-    int it;
-    double DEP[3];	// déplacement relatif cdf % a config de référence
-    double CDG[3];	// coordonnées du centre de gravité au tps t0
-    double ROT[3]; 	// angles de rotation du cdg % au repère absolu
-    double VAR[3];	// valeur des 3 variables supplémentaires
-    double X[3],Y[3],Z[3];
-    double ztmp[3];
-    
-    View->TimeStep = 0;
-    
-    List_T * list = (*(View->Grains))[(int)V[6]];
-    // Liste contenant toutes les info sur les lignes TP : (x,x,x) et {x,x,x,x,x,x,x,x,x, ...}
-    // info rangé à la suite
-    List_T * listt = View->TP;
-    
-    CDG[0] = iX[0];
-    CDG[1] = iY[0];
-    CDG[2] = iZ[0];
-
-    // Lecture des coordonnées du cdg dans le repère absolu
-    //    List_Read(listt,0+it,&CDG[0]);
-    //    List_Read(listt,1+it,&CDG[1]);
-    //    List_Read(listt,2+it,&CDG[2]);
-    
-    // Lecture des déplacements par rapport au cdg initital
-
-    double *VV = V + 9* nbnod * ts ;
-
-    DEP[0] = VV[0];
-    DEP[1] = VV[1];
-    DEP[2] = VV[2];
-
-    //    List_Read(listt,3+ts*9+it,&DEP[0]);
-    //    List_Read(listt,4+ts*9+it,&DEP[1]);
-    //    List_Read(listt,5+ts*9+it,&DEP[2]);
-    
-    // Lecture des rotations du centre de gravité
-
-    ROT[0] = VV[3];
-    ROT[1] = VV[4];
-    ROT[2] = VV[5];
-
-    ///    List_Read(listt,6+ts*9+it,&ROT[0]);
-    //    List_Read(listt,7+ts*9+it,&ROT[1]);
-    //    List_Read(listt,8+ts*9+it,&ROT[2]);
-    
-    VAR[0] = VV[6];
-    VAR[1] = VV[7];
-    VAR[2] = VV[8];
-
-    // Lecture des valeurs des variables supplémentaires
-    //    List_Read(listt,9+ts*9+it,&VAR[0]);
-    //    List_Read(listt,10+ts*9+it,&VAR[1]);
-    //    List_Read(listt,11+ts*9+it,&VAR[2]);
-
-    // calcule les valeurs min et max d'une info 1 seule fois
-    if(state != View->TensorType)
-      {
-	printf("coucouc\n");
-	state = View->TensorType;
-	switch (View->TensorType) {
-	case DRAW_POST_LMGC90: 
-	  // couleur uniforme
-	  zmin[0]=1;
-	  zmax[0]=1;
-	  break;
-	case DRAW_POST_LMGC90_TYPE: 
-	  // couleur en fonction du type de grain
-	  it = List_Nbr(listt)/View->NbTP;
-	  List_Read(listt,9,&zmin[0]);
-	  List_Read(listt,9,&zmax[0]);
-	  for(int i = 0; i < View->NbTP; i++){
-	    List_Read(listt,i*it+9,&ztmp[0]);
-	    if(ztmp[0]<zmin[0]){zmin[0] = ztmp[0];}
-	    if(ztmp[0]>zmax[0]){zmax[0] = ztmp[0];}
-	  }
-	break;
-	case DRAW_POST_LMGC90_COORD: 
-	  it = List_Nbr(listt)/View->NbTP;
-	  List_Read(listt,9,&zmin[0]);
-	  List_Read(listt,9,&zmax[0]);
-	  for(int i = 0; i < View->NbTP; i++){
-	    for(int j = 0; j< ((List_Nbr(listt)/View->NbTP)-3)/9-1; j++){
-	      List_Read(listt,i*it+18+j*9,&ztmp[0]); // on part pas du premier
-	      if(ztmp[0]<zmin[0]){zmin[0] = ztmp[0];}
-	      if(ztmp[0]>zmax[0]){zmax[0] = ztmp[0];}
-	    }
-	  }
-	break;
-	case DRAW_POST_LMGC90_PRES: 
-	  it = List_Nbr(listt)/View->NbTP;
-	  List_Read(listt,10,&zmin[0]);
-	  List_Read(listt,10,&zmax[0]);
-	  for(int i = 0; i < View->NbTP; i++){
-	    for(int j = 0; j< ((List_Nbr(listt)/View->NbTP)-3)/9; j++){
-	      List_Read(listt,i*it+10+j*9,&ztmp[0]);
-	      if(ztmp[0]<zmin[0]){zmin[0] = ztmp[0];}
-	      if(ztmp[0]>zmax[0]){zmax[0] = ztmp[0];}
-	    }
-	  }
-	  break;
-	case DRAW_POST_LMGC90_SN: 
-	  it = List_Nbr(listt)/View->NbTP;
-	  List_Read(listt,11,&zmin[0]);
-	  List_Read(listt,11,&zmax[0]);
-	  for(int i = 0; i < View->NbTP; i++){
-	    for(int j = 0; j< ((List_Nbr(listt)/View->NbTP)-3)/9; j++){
-	      List_Read(listt,i*it+11+j*9,&ztmp[0]);
-	      if(ztmp[0]<zmin[0]){zmin[0] = ztmp[0];}
-	      if(ztmp[0]>zmax[0]){zmax[0] = ztmp[0];}
-	    }
-	  }
-	break;
-	case DRAW_POST_LMGC90_DEPX: 
-	  it = List_Nbr(listt)/View->NbTP;
-	  List_Read(listt,3,&zmin[0]);
-	  List_Read(listt,3,&zmax[0]);
-	  for(int i = 0; i < View->NbTP; i++){
-	    for(int j = 0; j< ((List_Nbr(listt)/View->NbTP)-3)/9; j++){
-	      List_Read(listt,i*it+3+j*9,&ztmp[0]);
-	      if(ztmp[0]<zmin[0]){zmin[0] = ztmp[0];}
-	      if(ztmp[0]>zmax[0]){zmax[0] = ztmp[0];}
-	    }
-	  }
-	  break;
-	case DRAW_POST_LMGC90_DEPY: 
-	  it = List_Nbr(listt)/View->NbTP;
-	  List_Read(listt,4,&zmin[0]);
-	  List_Read(listt,4,&zmax[0]);
-	  for(int i = 0; i < View->NbTP; i++){
-	    for(int j = 0; j< ((List_Nbr(listt)/View->NbTP)-3)/9; j++){
-	      List_Read(listt,i*it+4+j*9,&ztmp[0]);
-	      if(ztmp[0]<zmin[0]){zmin[0] = ztmp[0];}
-	      if(ztmp[0]>zmax[0]){zmax[0] = ztmp[0];}
-	    }
-	  }
-	break;
-	case DRAW_POST_LMGC90_DEPZ:
-	  it = List_Nbr(listt)/View->NbTP;
-	  List_Read(listt,5,&zmin[0]);
-	  List_Read(listt,5,&zmax[0]);
-	  for(int i = 0; i < View->NbTP; i++){
-	    for(int j = 0; j< ((List_Nbr(listt)/View->NbTP)-3)/9; j++){
-	      List_Read(listt,i*it+5+j*9,&ztmp[0]);
-	      if(ztmp[0]<zmin[0]){zmin[0] = ztmp[0];}
-	      if(ztmp[0]>zmax[0]){zmax[0] = ztmp[0];}
-	    }
-	  }
-	break;
-	case DRAW_POST_LMGC90_DEPAV:
-	  it = List_Nbr(listt)/View->NbTP;
-	  List_Read(listt,3,&ztmp[0]);
-	  List_Read(listt,4,&ztmp[1]);
-	  List_Read(listt,5,&ztmp[2]);
-	  zmin[0]=(ztmp[0]+ztmp[1]+ztmp[2])/3;
-	  List_Read(listt,3,&ztmp[0]);
-	  List_Read(listt,4,&ztmp[1]);
-	  List_Read(listt,5,&ztmp[2]);
-	  zmax[0]=(ztmp[0]+ztmp[1]+ztmp[2])/3;
-	  for(int i = 0; i < View->NbTP; i++){
-	    for(int j = 0; j< ((List_Nbr(listt)/View->NbTP)-3)/9; j++){
-	      List_Read(listt,i*it+3+j*9,&ztmp[0]);
-	      List_Read(listt,i*it+4+j*9,&ztmp[1]);
-	      List_Read(listt,i*it+5+j*9,&ztmp[2]);
-	      ztmp[0]=(ztmp[0]+ztmp[1]+ztmp[2])/3;
-	      if(ztmp[0]<zmin[0]){zmin[0] = ztmp[0];}
-	      if(ztmp[0]>zmax[0]){zmax[0] = ztmp[0];}
-	    }
-	  }
-	break;
-	case DRAW_POST_LMGC90_DEPNORM:
-	  it = List_Nbr(listt)/View->NbTP;
-	  List_Read(listt,3,&ztmp[0]);
-	  List_Read(listt,4,&ztmp[1]);
-	  List_Read(listt,5,&ztmp[2]);
-	  zmin[0]=sqrt(ztmp[0]*ztmp[0]+ztmp[1]*ztmp[1]+ztmp[2]*ztmp[2]);
-	  List_Read(listt,3,&ztmp[0]);
-	  List_Read(listt,4,&ztmp[1]);
-	  List_Read(listt,5,&ztmp[2]);
-	  zmax[0]=sqrt(ztmp[0]*ztmp[0]+ztmp[1]*ztmp[1]+ztmp[2]*ztmp[2]);
-	  for(int i = 0; i < View->NbTP; i++){
-	    for(int j = 0; j< ((List_Nbr(listt)/View->NbTP)-3)/9; j++){
-	      List_Read(listt,i*it+3+j*9,&ztmp[0]);
-	      List_Read(listt,i*it+4+j*9,&ztmp[1]);
-	      List_Read(listt,i*it+5+j*9,&ztmp[2]);
-	      ztmp[0]=sqrt(ztmp[0]*ztmp[0]+ztmp[1]*ztmp[1]+ztmp[2]*ztmp[2]);
-	      if(ztmp[0]<zmin[0]){zmin[0] = ztmp[0];}
-	      if(ztmp[0]>zmax[0]){zmax[0] = ztmp[0];}
-	    }
-	  }
-	  break;
-	}
-      }
-    // matrice de changement de base, pour la rotation
-//     a11 = cos(ROT[0])*cos(ROT[1]); a12 = -sin(ROT[0])*cos(ROT[1]); 	a13 = -sin(ROT[1]);
-//     a21 = sin(ROT[0])*cos(ROT[2])-cos(ROT[0])*sin(ROT[1])*sin(ROT[2]);
-//     a22 = cos(ROT[0])*cos(ROT[2])+sin(ROT[0])*sin(ROT[1])*sin(ROT[2]);
-//     a23 = -cos(ROT[1])*sin(ROT[2]);
-//     a31 = sin(ROT[0])*sin(ROT[2])+cos(ROT[0])*sin(ROT[1])*cos(ROT[2]);
-//     a32 = cos(ROT[0])*sin(ROT[2])-sin(ROT[0])*sin(ROT[1])*cos(ROT[2]);
-//     a33 = cos(ROT[1])*cos(ROT[2]);	
-    
-
-    switch (View->TensorType) {
-    case DRAW_POST_LMGC90: 
-      PaletteContinuous(View,zmin[0],zmax[0],1);
-      break;
-    case DRAW_POST_LMGC90_TYPE:
-      //	it = List_Nbr(listt)/View->NbTP;
-      //	List_Read(listt,V[6],&ztmp[0]);
-      //	PaletteContinuous(View,zmin[0],zmax[0],ztmp[0]); 
-      break;
-    case DRAW_POST_LMGC90_COORD:
-      // 	if(ts!=0){
-      // 	  PaletteContinuous(View,zmin[0],zmax[0],VAR[0]);} 
-      // 	else{
-      // 	  it = List_Nbr(listt)/View->NbTP;
-      // 	  List_Read(listt,V[6],&ztmp[0]);
-      // 	  PaletteContinuous(View,zmin[0],zmax[0],ztmp[0]); 
-      //	}
-      break;
-    case DRAW_POST_LMGC90_PRES:
-      PaletteContinuous(View,zmin[0],zmax[0],VAR[1]); 
-      break;
-    case DRAW_POST_LMGC90_SN:
-      PaletteContinuous(View,zmin[0],zmax[0],VAR[2]); 
-      break;
-    case DRAW_POST_LMGC90_DEPX:
-      PaletteContinuous(View,zmin[0],zmax[0],DEP[0]); 
-      break;
-    case DRAW_POST_LMGC90_DEPY:
-      PaletteContinuous(View,zmin[0],zmax[0],DEP[1]); 
-      break;
-    case DRAW_POST_LMGC90_DEPZ: 
-      PaletteContinuous(View,zmin[0],zmax[0],DEP[2]);
-      break;
-    case DRAW_POST_LMGC90_DEPAV:
-      PaletteContinuous(View,zmin[0],zmax[0],(DEP[0]+DEP[1]+DEP[2])/3);
-      break;
-    case DRAW_POST_LMGC90_DEPNORM:
-      PaletteContinuous(View,zmin[0],zmax[0],sqrt(DEP[0]*DEP[0]+DEP[1]*DEP[1]+DEP[2]*DEP[2]));
-      break;      
-    }
-
-    std::map<int,int> :: iterator iter = View->DisplayListsOfGrains->find ( (int)V[6] );
-    
-    glEnable(GL_LIGHTING);
-    if (iter == View->DisplayListsOfGrains->end() )
-    {
-      int listnum = glGenLists(1);
-      printf("new DL grain generated %d listnum %d \n",(int)V[6],listnum );
-      glNewList(listnum, GL_COMPILE);
-      (* View->DisplayListsOfGrains )[(int)V[6]] = listnum;
-      for(int i = 0; i < List_Nbr(list) ; i = i+9){
-	List_Read(list,i  ,&X[0]);	//X
-	List_Read(list,i+1,&Y[0]);	//Y
-	List_Read(list,i+2,&Z[0]);	//Z
-	List_Read(list,i+3,&X[1]);
-	List_Read(list,i+4,&Y[1]);
-	List_Read(list,i+5,&Z[1]);
-	List_Read(list,i+6,&X[2]);
-	List_Read(list,i+7,&Y[2]);
-	List_Read(list,i+8,&Z[2]);
-	double n[3];
-	normal3points(X[0], Y[0], Z[0], X[1], Y[1], Z[1], X[2], Y[2], Z[2], n);
-	glBegin(GL_TRIANGLES);
-	glNormal3dv(n);			
-	glVertex3d(X[0], Y[0], Z[0]);
-	glVertex3d(X[1], Y[1], Z[1]);
-	glVertex3d(X[2], Y[2], Z[2]);
-	glEnd();
-      } 
-      glEndList();
-    }
-    glPushMatrix(); 
-    //    glRotated (1,0,0, ROT[0] *180/M_PI);
-    //    glRotated (0,1,0, ROT[1] *180/M_PI);
-    glTranslated(CDG[0] + DEP[0], CDG[1] + DEP[1], CDG[2] + DEP [2]);
-    glRotated ( ROT[0] *180/M_PI, 0,0,1);
-    glRotated ( ROT[1] *180/M_PI, 1,0,0);
-    glRotated ( ROT[2] *180/M_PI, 0,1,0);
-    glCallList((* View->DisplayListsOfGrains )[(int)V[6]]);
-    glPopMatrix();    
-    glDisable(GL_LIGHTING);
-  }
-
-  View->TimeStep = ts;
-}
-
-#define ARGS Post_View *View, int preproNormals, \
-             double ValMin, double ValMax, 	 \
-             double *X, double *Y, double *Z, double *V
-
-void Draw_TensorPoint(ARGS)
-{
-  Draw_TensorElement(POST_POINT, View, preproNormals, ValMin, ValMax, X, Y, Z, V);
-}
-
-void Draw_TensorLine(ARGS)
-{
-  Draw_TensorElement(POST_LINE, View, preproNormals, ValMin, ValMax, X, Y, Z, V);
-}
-
-void Draw_TensorTriangle(ARGS)
-{
-  Draw_TensorElement(POST_TRIANGLE, View, preproNormals, ValMin, ValMax, X, Y, Z, V);
-}
-
-void Draw_TensorTetrahedron(ARGS)
-{
-  Draw_TensorElement(POST_TETRAHEDRON, View, preproNormals, ValMin, ValMax, X, Y, Z, V);
-}
-
-void Draw_TensorQuadrangle(ARGS)
-{
-  Draw_TensorElement(POST_QUADRANGLE, View, preproNormals, ValMin, ValMax, X, Y, Z, V);
-}
-
-void Draw_TensorHexahedron(ARGS)
-{
-  Draw_TensorElement(POST_HEXAHEDRON, View, preproNormals, ValMin, ValMax, X, Y, Z, V);
-}
-
-void Draw_TensorPrism(ARGS)
-{
-  Draw_TensorElement(POST_PRISM, View, preproNormals, ValMin, ValMax, X, Y, Z, V);
-}
-
-void Draw_TensorPyramid(ARGS)
-{
-  Draw_TensorElement(POST_PYRAMID, View, preproNormals, ValMin, ValMax, X, Y, Z, V);
-}
-
-#undef ARGS
diff --git a/Graphics/Post_Old.cpp b/Graphics/Post_Old.cpp
deleted file mode 100644
index 8612a14f949ba396d24cc3afdb138a7e8fb38bdd..0000000000000000000000000000000000000000
--- a/Graphics/Post_Old.cpp
+++ /dev/null
@@ -1,839 +0,0 @@
-// $Id: Post_Old.cpp,v 1.2 2007-08-27 13:46:22 geuzaine Exp $
-//
-// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-// USA.
-// 
-// Please report all bugs and problems to <gmsh@geuz.org>.
-
-#include "Gmsh.h"
-#include "GmshUI.h"
-#include "Numeric.h"
-#include "Draw.h"
-#include "Views.h"
-#include "Context.h"
-#include "gl2ps.h"
-
-extern Context_T CTX;
-
-// Give Value from Index
-
-double GiveValueFromIndex_Lin(double ValMin, double ValMax, int NbIso, int Iso)
-{
-  if(NbIso == 1)
-    return (ValMax + ValMin) / 2.;
-  return ValMin + Iso * (ValMax - ValMin) / (NbIso - 1.);
-}
-
-double GiveValueFromIndex_Log(double ValMin, double ValMax, int NbIso, int Iso)
-{
-  if(NbIso == 1)
-    return (ValMax + ValMin) / 2.;
-  if(ValMin <= 0.)
-    return 0.;
-  return pow(10., log10(ValMin)
-	     + Iso * (log10(ValMax) - log10(ValMin)) / (NbIso - 1.));
-}
-
-double GiveValueFromIndex_DoubleLog(double ValMin, double ValMax, int NbIso,
-                                    int Iso)
-{
-  if(NbIso == 1)
-    return (ValMax + ValMin) / 2.;
-  if(ValMin <= 0.)
-    return 0.;
-
-  double Iso2 = Iso / 2.;
-  double NbIso2 = NbIso / 2.;
-
-  return pow(10., log10(ValMin) 
-	     + Iso2 * (log10(ValMax) - log10(ValMin)) / (NbIso2 - 1.));
-}
-
-// Give Index From Value
-
-int GiveIndexFromValue_Lin(double ValMin, double ValMax, int NbIso,
-                           double Val)
-{
-  if(ValMin == ValMax)
-    return NbIso / 2;
-  return (int)((Val - ValMin) * (NbIso - 1) / (ValMax - ValMin));
-}
-
-int GiveIndexFromValue_Log(double ValMin, double ValMax, int NbIso,
-                           double Val)
-{
-  if(ValMin == ValMax)
-    return NbIso / 2;
-  if(ValMin <= 0.)
-    return 0;
-  return (int)((log10(Val) - log10(ValMin)) * (NbIso - 1) / 
-	       (log10(ValMax) - log10(ValMin)));
-}
-
-int GiveIndexFromValue_DoubleLog(double ValMin, double ValMax, int NbIso,
-                                 double Val)
-{
-  // JF: this is obviously wrong...
-  if(ValMin == ValMax)
-    return NbIso / 2;
-  if(ValMin <= 0.)
-    return 0;
-  return (int)((log10(Val) - log10(ValMin)) * (NbIso - 1) / 
-	       (log10(ValMax) - log10(ValMin)));
-}
-
-
-// Color Palette
-
-unsigned int PaletteContinuous(Post_View * v, double min, double max, double val)
-{       /* val in [min,max] */
-  int index = v->GIFV(min, max, v->CT.size, val);
-  glColor4ubv((GLubyte *) & v->CT.table[index]);
-  return v->CT.table[index];
-}
-
-unsigned int PaletteContinuousLinear(Post_View * v, double min, double max, double val)
-{       /* val in [min,max] */
-  int index = GiveIndexFromValue_Lin(min, max, v->CT.size, val);
-  glColor4ubv((GLubyte *) & v->CT.table[index]);
-  return v->CT.table[index];
-}
-
-unsigned int PaletteDiscrete(Post_View * v, int nbi, int i)
-{       /* i in [0,nbi-1] */
-  int index;
-
-  index = (nbi == 1) ?
-    v->CT.size / 2 : (int)(i / (double)(nbi - 1) * (v->CT.size - 1) + 0.5);
-
-  glColor4ubv((GLubyte *) & v->CT.table[index]);
-  return v->CT.table[index];
-}
-
-// Get values from a compatible external view (i.e., a view that has
-// the same number of elements as the {type,refcomp} list in the
-// reference view, and the same number of time steps)
-
-int GetValuesFromExternalView(Post_View *v, int type, int refcomp, 
-			      int *nbcomp, double **vals, int viewIndex)
-{
-  Post_View **vv = (Post_View **) List_Pointer_Test(CTX.post.list, viewIndex);  
-
-  if(!vv){
-    if(!v->ExternalElementIndex)
-      Msg(GERROR, "Nonexistent external view: drawing self instead");
-    return 0;
-  }
-
-  Post_View *v2 = *vv;
-  int nbelm = 0, comp = 0, nbnod = 0, ref;
-  List_T *l = NULL;
-
-  switch(type){
-  case POST_POINT:
-    nbnod = 1;
-    ref = (refcomp == 1) ? v->NbSP : ((refcomp == 3) ? v->NbVP : v->NbTP);
-    if(ref == v2->NbSP){ nbelm = v2->NbSP; l = v2->SP; comp = 1; }
-    else if(ref == v2->NbVP){ nbelm = v2->NbVP; l = v2->VP; comp = 3; }
-    else if(ref == v2->NbTP){ nbelm = v2->NbTP; l = v2->TP; comp = 9; }
-    break;
-  case POST_LINE:
-    nbnod = 2;
-    ref = (refcomp == 1) ? v->NbSL : ((refcomp == 3) ? v->NbVL : v->NbTL);
-    if(ref == v2->NbSL){ nbelm = v2->NbSL; l = v2->SL; comp = 1; } 
-    else if(ref == v2->NbVL){ nbelm = v2->NbVL; l = v2->VL; comp = 3; } 
-    else if(ref == v2->NbTL){ nbelm = v2->NbTL; l = v2->TL; comp = 9; } 
-    break;
-  case POST_TRIANGLE:
-    nbnod = 3;
-    ref = (refcomp == 1) ? v->NbST : ((refcomp == 3) ? v->NbVT : v->NbTT);
-    if(ref == v2->NbST){ nbelm = v2->NbST; l = v2->ST; comp = 1;  } 
-    else if(ref == v2->NbVT){ nbelm = v2->NbVT; l = v2->VT; comp = 3;  } 
-    else if(ref == v2->NbTT){ nbelm = v2->NbTT; l = v2->TT; comp = 9;  } 
-    break;
-  case POST_QUADRANGLE:
-    nbnod = 4;
-    ref = (refcomp == 1) ? v->NbSQ : ((refcomp == 3) ? v->NbVQ : v->NbTQ);
-    if(ref == v2->NbSQ){ nbelm = v2->NbSQ; l = v2->SQ; comp = 1;  } 
-    else if(ref == v2->NbVQ){ nbelm = v2->NbVQ; l = v2->VQ; comp = 3;  } 
-    else if(ref == v2->NbTQ){ nbelm = v2->NbTQ; l = v2->TQ; comp = 9;  } 
-    break;
-  case POST_TETRAHEDRON:
-    nbnod = 4;
-    ref = (refcomp == 1) ? v->NbSS : ((refcomp == 3) ? v->NbVS : v->NbTS);
-    if(ref == v2->NbSS){ nbelm = v2->NbSS; l = v2->SS; comp = 1;  } 
-    else if(ref == v2->NbVS){ nbelm = v2->NbVS; l = v2->VS; comp = 3;  } 
-    else if(ref == v2->NbTS){ nbelm = v2->NbTS; l = v2->TS; comp = 9;  } 
-    break;
-  case POST_HEXAHEDRON:
-    nbnod = 8;
-    ref = (refcomp == 1) ? v->NbSH : ((refcomp == 3) ? v->NbVH : v->NbTH);
-    if(ref == v2->NbSH){ nbelm = v2->NbSH; l = v2->SH; comp = 1;  }
-    else if(ref == v2->NbVH){ nbelm = v2->NbVH; l = v2->VH; comp = 3;  }
-    else if(ref == v2->NbTH){ nbelm = v2->NbTH; l = v2->TH; comp = 9;  }
-    break;
-  case POST_PRISM:
-    nbnod = 6;
-    ref = (refcomp == 1) ? v->NbSI : ((refcomp == 3) ? v->NbVI : v->NbTI);
-    if(ref == v2->NbSI){ nbelm = v2->NbSI; l = v2->SI; comp = 1;  }
-    else if(ref == v2->NbVI){ nbelm = v2->NbVI; l = v2->VI; comp = 3;  }
-    else if(ref == v2->NbTI){ nbelm = v2->NbTI; l = v2->TI; comp = 9;  }
-    break;
-  case POST_PYRAMID:
-    nbnod = 5;
-    ref = (refcomp == 1) ? v->NbSY : ((refcomp == 3) ? v->NbVY : v->NbTY);
-    if(ref == v2->NbSY){ nbelm = v2->NbSY; l = v2->SY; comp = 1;  } 
-    else if(ref == v2->NbVY){ nbelm = v2->NbVY; l = v2->VY; comp = 3;  } 
-    else if(ref == v2->NbTY){ nbelm = v2->NbTY; l = v2->TY; comp = 9;  } 
-    break;
-  }
-
-  if(!l || !nbelm || v2->NbTimeStep != v->NbTimeStep ||
-     v->ExternalElementIndex < 0 || v->ExternalElementIndex >= nbelm){
-    if(!v->ExternalElementIndex)
-      Msg(GERROR, "Incompatible external view: drawing self instead");
-    return 0;
-  }
-
-  int nb = List_Nbr(l) / nbelm;
-  *nbcomp = comp;
-  *vals = (double *)List_Pointer(l, v->ExternalElementIndex * nb + 
-				 3 * nbnod + comp * nbnod * v->TimeStep);
-  return 1;
-}
-
-// Compute node coordinates taking Offset, Raise and Explode into account
-
-void Get_Coords(Post_View *v, int type, int nbnod, int nbcomp,
-                double *x1, double *y1, double *z1, double *vals,
-                double *x2, double *y2, double *z2,
-		int offset, int raise, int transform)
-{
-  if(v->Explode == 1.) {
-    for(int i = 0; i < nbnod; i++) {
-      x2[i] = x1[i];
-      y2[i] = y1[i];
-      z2[i] = z1[i];
-    }
-  }
-  else {
-    double xc = 0., yc = 0., zc = 0.;
-    for(int i = 0; i < nbnod; i++) {
-      xc += x1[i];
-      yc += y1[i];
-      zc += z1[i];
-    }
-    xc /= (double)nbnod;
-    yc /= (double)nbnod;
-    zc /= (double)nbnod;
-    for(int i = 0; i < nbnod; i++) {
-      x2[i] = xc + v->Explode * (x1[i] - xc);
-      y2[i] = yc + v->Explode * (y1[i] - yc);
-      z2[i] = zc + v->Explode * (z1[i] - zc);
-    }
-  }
-
-  if(transform){
-    for(int i = 0; i < nbnod; i++) {
-      double x = x2[i], y = y2[i], z = z2[i];
-      x2[i] = v->Transform[0][0] * x + v->Transform[0][1] * y + v->Transform[0][2] * z;
-      y2[i] = v->Transform[1][0] * x + v->Transform[1][1] * y + v->Transform[1][2] * z;
-      z2[i] = v->Transform[2][0] * x + v->Transform[2][1] * y + v->Transform[2][2] * z;
-    }
-  }
-  
-  if(offset){
-    for(int i = 0; i < nbnod; i++) {
-      x2[i] += v->Offset[0];
-      y2[i] += v->Offset[1];
-      z2[i] += v->Offset[2];
-    }
-  }
-
-  if(raise){
-    for(int i = 0; i < nbnod; i++){
-      double norm = 0.;
-      if(nbcomp == 1)
-	norm = vals[i];
-      else if(nbcomp == 3)
-	norm = sqrt(vals[3*i] * vals[3*i] + 
-		    vals[3*i+1] * vals[3*i+1] + 
-		    vals[3*i+2] * vals[3*i+2]);
-      else if(nbcomp == 9)
-	norm = ComputeVonMises(vals + 9*i);
-      x2[i] += v->Raise[0] * norm;
-      y2[i] += v->Raise[1] * norm;
-      z2[i] += v->Raise[2] * norm;
-    }
-  }
-
-  if(v->UseGenRaise){
-    int ext_nbcomp = nbcomp;
-    double *ext_vals = vals;
-    if(v->ViewIndexForGenRaise >= 0)
-      GetValuesFromExternalView(v, type, nbcomp, &ext_nbcomp, &ext_vals, 
-				v->ViewIndexForGenRaise);
-    ApplyGeneralizedRaise(v, nbnod, ext_nbcomp, ext_vals, x2, y2, z2);
-  }
-
-  for(int i = 0; i < nbnod; i++){
-    if(x2[i] < v->TmpBBox[0]) v->TmpBBox[0] = x2[i];
-    if(x2[i] > v->TmpBBox[1]) v->TmpBBox[1] = x2[i];
-    if(y2[i] < v->TmpBBox[2]) v->TmpBBox[2] = y2[i];
-    if(y2[i] > v->TmpBBox[3]) v->TmpBBox[3] = y2[i];
-    if(z2[i] < v->TmpBBox[4]) v->TmpBBox[4] = z2[i];
-    if(z2[i] > v->TmpBBox[5]) v->TmpBBox[5] = z2[i];
-  }
-}
-
-// Compare barycenters with viewpoint (eye)
-
-static double storedEye[3] = { 0., 0., 0. };
-
-int changedEye()
-{
-  double zeye = 100 * CTX.lc, tmp[3];
-  tmp[0] = CTX.rot[2] * zeye;
-  tmp[1] = CTX.rot[6] * zeye;
-  tmp[2] = CTX.rot[10] * zeye;
-  if(fabs(tmp[0] - storedEye[0]) > 1.e-3 ||
-     fabs(tmp[1] - storedEye[1]) > 1.e-3 ||
-     fabs(tmp[2] - storedEye[2]) > 1.e-3) {
-    storedEye[0] = tmp[0];
-    storedEye[1] = tmp[1];
-    storedEye[2] = tmp[2];
-    Msg(DEBUG, "New eye = (%g %g %g)", tmp[0], tmp[1], tmp[2]);
-    return 1;
-  }
-  return 0;
-}
-
-int compareEye(double *q, double *w, int nbnodes)
-{
-  double d, dq, dw, cgq[3] = { 0., 0., 0. }, cgw[3] = { 0., 0., 0.};
-  for(int i = 0; i < nbnodes; i++) {
-    cgq[0] += q[i];
-    cgq[1] += q[i + nbnodes];
-    cgq[2] += q[i + 2 * nbnodes];
-    cgw[0] += w[i];
-    cgw[1] += w[i + nbnodes];
-    cgw[2] += w[i + 2 * nbnodes];
-  }
-  prosca(storedEye, cgq, &dq);
-  prosca(storedEye, cgw, &dw);
-  d = dq - dw;
-  if(d > 0)
-    return 1;
-  if(d < 0)
-    return -1;
-  return 0;
-}
-
-int compareEye3Nodes(const void *a, const void *b)
-{
-  return compareEye((double *)a, (double *)b, 3);
-}
-
-int compareEye4Nodes(const void *a, const void *b)
-{
-  return compareEye((double *)a, (double *)b, 4);
-}
-
-int compareEye5Nodes(const void *a, const void *b)
-{
-  return compareEye((double *)a, (double *)b, 5);
-}
-
-int compareEye6Nodes(const void *a, const void *b)
-{
-  return compareEye((double *)a, (double *)b, 6);
-}
-
-int compareEye8Nodes(const void *a, const void *b)
-{
-  return compareEye((double *)a, (double *)b, 8);
-}
-
-// Draw_Post
-
-void Draw_List(Post_View * v, double ValMin, double ValMax, int type,
-	       List_T * list, int nbelm, int nbnod, int nbcomp,
-	       void (*draw) (Post_View *, int, double, double, double *, 
-			     double *, double *, double *))
-{
-  int i, nb, offset = 0, raise = 0, transform = 0;
-  double X[8], Y[8], Z[8];
-
-  // do we need to apply an offset?
-  if(v->Offset[0] || v->Offset[1] || v->Offset[2])
-    offset = 1;
-
-  // do we need to apply a simple raise?
-  if(v->Raise[0] || v->Raise[1] || v->Raise[2])
-    raise = 1;
-
-  // do we need to apply a general transformation?
-  if(v->Transform[0][0] != 1. || v->Transform[0][1] != 0. || v->Transform[0][2] != 0. ||
-     v->Transform[1][0] != 0. || v->Transform[1][1] != 1. || v->Transform[1][2] != 0. ||
-     v->Transform[2][0] != 0. || v->Transform[2][1] != 0. || v->Transform[2][2] != 1.)
-    transform = 1;
-
-  if(nbelm) {
-    nb = List_Nbr(list) / nbelm;
-
-    if(v->Light && v->SmoothNormals && v->Changed) {
-      Msg(DEBUG, "Preprocessing of normals in View[%d]", v->Index);
-      v->ExternalElementIndex = 0;
-      for(i = 0; i < List_Nbr(list); i += nb) {
-        Get_Coords(v, type, nbnod, nbcomp,
-                   (double *)List_Pointer_Fast(list, i),
-                   (double *)List_Pointer_Fast(list, i + nbnod),
-                   (double *)List_Pointer_Fast(list, i + 2 * nbnod), 
-		   (double *)List_Pointer_Fast(list, i + 3 * nbnod +
-					       v->TimeStep * nbnod * nbcomp),
-		   X, Y, Z, offset, raise, transform);
-        draw(v, 1, ValMin, ValMax, X, Y, Z,
-             (double *)List_Pointer_Fast(list, i + 3 * nbnod));
-	v->ExternalElementIndex++;
-      }
-    }
-
-    v->ExternalElementIndex = 0;
-    for(i = 0; i < List_Nbr(list); i += nb) {
-      Get_Coords(v, type, nbnod, nbcomp,
-                 (double *)List_Pointer_Fast(list, i),
-                 (double *)List_Pointer_Fast(list, i + nbnod),
-                 (double *)List_Pointer_Fast(list, i + 2 * nbnod),
-		 (double *)List_Pointer_Fast(list, i + 3 * nbnod +
-					     v->TimeStep * nbnod * nbcomp),
-		 X, Y, Z, offset, raise, transform);
-      draw(v, 0, ValMin, ValMax, X, Y, Z,
-           (double *)List_Pointer_Fast(list, i + 3 * nbnod));
-      v->ExternalElementIndex++;
-    }
-  }
-}
-
-// We try to estimate how many primitives will end up in the vertex
-// arrays, since reallocating the arrays takes a HUGE amount of time
-// on Windows/Cygwin. A better way would be to slightly redesign the
-// drawing routines so we can have different pre-processing steps
-// (like the one we have for smooth normals right now), in order to
-// count how many primitives we will have.
-
-int EstimateNumTri(Post_View *v)
-{
-  int tris = v->NbST + v->NbVT + v->NbTT;
-  int quads = v->NbSQ + v->NbVQ + v->NbTQ;
-  int tets = v->NbSS + v->NbVS + v->NbTS;
-  int prisms = v->NbSI + v->NbVI + v->NbTI;
-  int pyrs = v->NbSY + v->NbVY + v->NbTY;
-  int hexas = v->NbSH + v->NbVH + v->NbTH;
-  
-  int heuristic = 0;
-  if(v->IntervalsType == DRAW_POST_ISO)
-    heuristic = (tets + prisms + pyrs + hexas) / 10;
-  else if(v->IntervalsType == DRAW_POST_CONTINUOUS)
-    heuristic = (tris + 2 * quads + 6 * tets + 
-      8 * prisms + 6 * pyrs + 12 * hexas);
-  else if(v->IntervalsType == DRAW_POST_DISCRETE)
-    heuristic = (tris + 2 * quads + 6 * tets + 
-      8 * prisms + 6 * pyrs + 12 * hexas) * 2;
-
-  return heuristic + 10000;
-}
-
-int EstimateNumLin(Post_View *v)
-{
-  return 10000;
-}
-
-void Draw_Post_Old(void)
-{
-  int nb;
-  double ValMin = 0., ValMax = 0.;
-  Post_View *v;
-
-  // draw any plugin-specific stuff
-  if(CTX.post.plugin_draw_function)
-    (*CTX.post.plugin_draw_function)();
-
-  if(!CTX.post.list)
-    return;
-
-  if(CTX.draw_bbox || !CTX.post.draw) {
-    for(int iView = 0; iView < List_Nbr(CTX.post.list); iView++) {
-      v = *(Post_View **) List_Pointer(CTX.post.list, iView);
-      // draw only the bbox of visible 3D views
-      if(v->Visible && v->Type == DRAW_POST_3D) {
-        glColor4ubv((GLubyte *) & CTX.color.fg);
-	glLineWidth(CTX.line_width);
-	gl2psLineWidth(CTX.line_width * CTX.print.eps_line_width_factor);
-	Draw_Box(v->BBox[0], v->BBox[2], v->BBox[4],
-		 v->BBox[1], v->BBox[3], v->BBox[5]);
-	glColor3d(1.,0.,0.);
-	for(int i = 0; i < 6; i++)
-	  if(CTX.clip[i] & (1<<(2+iView)))
-	    Draw_PlaneInBoundingBox(v->BBox[0], v->BBox[2], v->BBox[4],
-				    v->BBox[1], v->BBox[3], v->BBox[5],
-				    CTX.clip_plane[i][0], CTX.clip_plane[i][1], 
-				    CTX.clip_plane[i][2], CTX.clip_plane[i][3]);
-      }
-    }
-  }
-
-  if(!CTX.post.draw)
-    return;
-
-  for(int iView = 0; iView < List_Nbr(CTX.post.list); iView++) {
-
-    v = *(Post_View **) List_Pointer(CTX.post.list, iView);
-
-    if(v->Visible && !v->Dirty) {
-
-      glPointSize(v->PointSize);
-      gl2psPointSize(v->PointSize * CTX.print.eps_point_size_factor);
-      
-      glLineWidth(v->LineWidth);
-      gl2psLineWidth(v->LineWidth * CTX.print.eps_line_width_factor);
-
-      if(v->LightTwoSide)
-	glLightModelf(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
-      else
-	glLightModelf(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE);
-
-      for(int i = 0; i < 6; i++)
-	if(CTX.clip[i] & (1<<(2+iView))) 
-	  glEnable((GLenum)(GL_CLIP_PLANE0 + i));
-	else
-	  glDisable((GLenum)(GL_CLIP_PLANE0 + i));
-      
-      switch (v->RangeType) {
-      case DRAW_POST_RANGE_DEFAULT:
-	ValMin = v->Min;
-	ValMax = v->Max;
-	break;
-      case DRAW_POST_RANGE_CUSTOM:
-	ValMin = v->CustomMin;
-	ValMax = v->CustomMax;
-	break;
-      case DRAW_POST_RANGE_PER_STEP:
-	if(v->TimeStepMin && v->TimeStepMax){
-	  ValMin = v->TimeStepMin[v->TimeStep];
-	  ValMax = v->TimeStepMax[v->TimeStep];
-	}
-	else{ // possible if the view is empty
-	  ValMin = v->Min;
-	  ValMax = v->Max;
-	}
-	break;
-      }
-      v->ExternalMin = ValMin;
-      v->ExternalMax = ValMax;
-      
-      switch (v->ScaleType) {
-      case DRAW_POST_LINEAR:
-	v->GIFV = GiveIndexFromValue_Lin;
-	v->GVFI = GiveValueFromIndex_Lin;
-	break;
-      case DRAW_POST_LOGARITHMIC:
-	v->GIFV = GiveIndexFromValue_Log;
-	v->GVFI = GiveValueFromIndex_Log;
-	break;
-      case DRAW_POST_DOUBLELOGARITHMIC:
-	v->GIFV = GiveIndexFromValue_DoubleLog;
-	v->GVFI = GiveValueFromIndex_DoubleLog;
-	break;
-      }
-
-      if(v->Light && v->SmoothNormals && v->Changed)
-	v->reset_normals();
-
-      if(v->UseGenRaise)
-	InitGeneralizedRaise(v);
-
-      if(v->Changed){
-	for(int i = 0; i < 3; i++) {
-	  v->TmpBBox[2 * i] = VAL_INF;
-	  v->TmpBBox[2 * i + 1] = -VAL_INF;
-	}
-      }
-
-      // initialize alpha blending for transparency
-      if(CTX.alpha && ColorTable_IsAlpha(&v->CT)){
-	if(v->FakeTransparency){
-	  // simple additive blending "a la xpost":
-	  glBlendFunc(GL_SRC_ALPHA, GL_ONE); // glBlendEquation(GL_FUNC_ADD);
-	  // maximum intensity projection "a la volsuite":
-	  // glBlendFunc(GL_ONE, GL_ONE); // glBlendEquation(GL_MAX);
-	  glEnable(GL_BLEND);
-	  glDisable(GL_DEPTH_TEST);
-	}
-	else{
-	  // real translucent blending (requires back-to-front traversal)
-	  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // glBlendEquation(GL_FUNC_ADD);
-	  glEnable(GL_BLEND);
-	  // if we don't use vertex arrays, do the sorting here - it's
-	  // incorrect for hybrid views (use Plugin(DecomposeInSimplex)
-	  // for that)
-	  if(!CTX.post.vertex_arrays && v->DrawScalars && 
-	     (changedEye() || v->Changed)) {
-	    Msg(DEBUG, "Sorting View[%d] for transparency (NO vertex array)", v->Index);
-	    if(v->NbST && v->DrawTriangles) {
-	      nb = List_Nbr(v->ST) / v->NbST;
-	      qsort(v->ST->array, v->NbST, nb * sizeof(double), compareEye3Nodes);
-	    }
-	    if(v->NbSQ && v->DrawQuadrangles) {
-	      nb = List_Nbr(v->SQ) / v->NbSQ;
-	      qsort(v->SQ->array, v->NbSQ, nb * sizeof(double), compareEye4Nodes);
-	    }
-	    if(v->NbSS && v->DrawTetrahedra) {
-	      nb = List_Nbr(v->SS) / v->NbSS;
-	      qsort(v->SS->array, v->NbSS, nb * sizeof(double), compareEye4Nodes);
-	    }
-	    if(v->NbSH && v->DrawHexahedra) {
-	      nb = List_Nbr(v->SH) / v->NbSH;
-	      qsort(v->SH->array, v->NbSH, nb * sizeof(double), compareEye8Nodes);
-	    }
-	    if(v->NbSI && v->DrawPrisms) {
-	      nb = List_Nbr(v->SI) / v->NbSI;
-	      qsort(v->SI->array, v->NbSI, nb * sizeof(double), compareEye6Nodes);
-	    }
-	    if(v->NbSY && v->DrawPyramids) {
-	      nb = List_Nbr(v->SY) / v->NbSY;
-	      qsort(v->SY->array, v->NbSY, nb * sizeof(double), compareEye5Nodes);
-	    }
-	  }
-	}
-      }
-
-      if(v->DrawPoints) {
-	if(v->Type == DRAW_POST_3D && v->DrawScalars)
-	  Draw_List(v, ValMin, ValMax, POST_POINT, v->SP, v->NbSP, 1, 1, 
-		    Draw_ScalarPoint);
-	if(v->DrawVectors)
-	  Draw_List(v, ValMin, ValMax, POST_POINT, v->VP, v->NbVP, 1, 3, 
-		    Draw_VectorPoint);
-	if(v->DrawTensors)
-	  Draw_List(v, ValMin, ValMax, POST_POINT, v->TP, v->NbTP, 1, 9, 
-		    Draw_TensorPoint);
-      }
-      if(v->DrawLines) {
-	if(v->DrawScalars)
-	  Draw_List(v, ValMin, ValMax, POST_LINE, v->SL, v->NbSL, 2, 1,
-		    Draw_ScalarLine);
-	if(v->DrawVectors)
-	  Draw_List(v, ValMin, ValMax, POST_LINE, v->VL, v->NbVL, 2, 3, 
-		    Draw_VectorLine);
-	if(v->DrawTensors)
-	  Draw_List(v, ValMin, ValMax, POST_LINE, v->TL, v->NbTL, 2, 9, 
-		    Draw_TensorLine);
-      }
-
-      for(int pass = 0; pass < 2; pass++){
-	int skip_2d = 0, skip_3d = 0;
-	if(pass == 0){
-	  if(CTX.post.vertex_arrays){
-	    if(v->Changed){
-	      Msg(DEBUG, "regenerate View[%d] vertex array", v->Index);
-	      if(v->TriVertexArray) delete v->TriVertexArray;
-	      v->TriVertexArray = new VertexArray(3, EstimateNumTri(v));
-	      v->TriVertexArray->fill = 1;
-	      if(v->LinVertexArray) delete v->LinVertexArray;
-	      v->LinVertexArray = new VertexArray(2, EstimateNumLin(v));
-	      v->LinVertexArray->fill = 1;
-	      goto pass_0;
-	    }
-	  }
-	  goto pass_1;
-	}
-	else{
-	  // don't even enter the classic data path if we don't have to
-	  if(v->TriVertexArray || v->LinVertexArray){
-	    if(v->Boundary < 1 && !v->ShowElement && !v->Normals && 
-	       (!v->LineType || (v->LineType && v->IntervalsType != DRAW_POST_ISO)) &&
-	       v->IntervalsType != DRAW_POST_NUMERIC){
-	      Msg(DEBUG, "View[%d]: skiping 2D scalar pass alltogether", v->Index);
-	      skip_2d = 1;
-	    }
-	    if(v->Boundary < 2 && !v->ShowElement &&
-	       (!v->LineType || (v->LineType && v->IntervalsType != DRAW_POST_ISO)) &&
-	       v->IntervalsType != DRAW_POST_NUMERIC){
-	      Msg(DEBUG, "View[%d]: skiping 3D scalar pass alltogether", v->Index);
-	      skip_3d = 1;
-	    }
-	  }
-	}
-
-      pass_0:
-	if(v->DrawTriangles) {
-	  if(!skip_2d && v->DrawScalars)
-	    Draw_List(v, ValMin, ValMax, POST_TRIANGLE, v->ST, v->NbST, 3, 1,
-		      Draw_ScalarTriangle);
-	  if(v->DrawVectors)
-	    Draw_List(v, ValMin, ValMax, POST_TRIANGLE, v->VT, v->NbVT, 3, 3,
-		      Draw_VectorTriangle);
-	  if(v->DrawTensors)
-	    Draw_List(v, ValMin, ValMax, POST_TRIANGLE, v->TT, v->NbTT, 3, 9,
-		      Draw_TensorTriangle);
-	}
-	if(v->DrawQuadrangles) {
-	  if(!skip_2d && v->DrawScalars)
-	    Draw_List(v, ValMin, ValMax, POST_QUADRANGLE, v->SQ, v->NbSQ, 4, 1,
-		      Draw_ScalarQuadrangle);
-	  if(v->DrawVectors)
-	    Draw_List(v, ValMin, ValMax, POST_QUADRANGLE, v->VQ, v->NbVQ, 4, 3,
-		      Draw_VectorQuadrangle);
-	  if(v->DrawTensors)
-	    Draw_List(v, ValMin, ValMax, POST_QUADRANGLE, v->TQ, v->NbTQ, 4, 9,
-		      Draw_TensorQuadrangle);
-	}
-	if(v->DrawTetrahedra) {
-	  if(!skip_3d && v->DrawScalars)
-	    Draw_List(v, ValMin, ValMax, POST_TETRAHEDRON, v->SS, v->NbSS, 4, 1,
-		      Draw_ScalarTetrahedron);
-	  if(v->DrawVectors)
-	    Draw_List(v, ValMin, ValMax, POST_TETRAHEDRON, v->VS, v->NbVS, 4, 3,
-		      Draw_VectorTetrahedron);
-	  if(v->DrawTensors)
-	    Draw_List(v, ValMin, ValMax, POST_TETRAHEDRON, v->TS, v->NbTS, 4, 9,
-		      Draw_TensorTetrahedron);
-	}
-	if(v->DrawHexahedra) {
-	  if(!skip_3d && v->DrawScalars)
-	    Draw_List(v, ValMin, ValMax, POST_HEXAHEDRON, v->SH, v->NbSH, 8, 1,
-		      Draw_ScalarHexahedron);
-	  if(v->DrawVectors)
-	    Draw_List(v, ValMin, ValMax, POST_HEXAHEDRON, v->VH, v->NbVH, 8, 3,
-		      Draw_VectorHexahedron);
-	  if(v->DrawTensors)
-	    Draw_List(v, ValMin, ValMax, POST_HEXAHEDRON, v->TH, v->NbTH, 8, 9,
-		      Draw_TensorHexahedron);
-	}
-	if(v->DrawPrisms) {
-	  if(!skip_3d && v->DrawScalars)
-	    Draw_List(v, ValMin, ValMax, POST_PRISM, v->SI, v->NbSI, 6, 1,
-		      Draw_ScalarPrism);
-	  if(v->DrawVectors)
-	    Draw_List(v, ValMin, ValMax, POST_PRISM, v->VI, v->NbVI, 6, 3,
-		      Draw_VectorPrism);
-	  if(v->DrawTensors)
-	    Draw_List(v, ValMin, ValMax, POST_PRISM, v->TI, v->NbTI, 6, 9,
-		      Draw_TensorPrism);
-	}
-	if(v->DrawPyramids) {
-	  if(!skip_3d && v->DrawScalars)
-	    Draw_List(v, ValMin, ValMax, POST_PYRAMID, v->SY, v->NbSY, 5, 1,
-		      Draw_ScalarPyramid);
-	  if(v->DrawVectors)
-	    Draw_List(v, ValMin, ValMax, POST_PYRAMID, v->VY, v->NbVY, 5, 3,
-		      Draw_VectorPyramid);
-	  if(v->DrawTensors)
-	    Draw_List(v, ValMin, ValMax, POST_PYRAMID, v->TY, v->NbTY, 5, 9,
-		      Draw_TensorPyramid);
-	}
-
-      pass_1:
-	if(v->TriVertexArray && v->TriVertexArray->fill){
-	  Msg(DEBUG, "View[%d]; %d tris in vertex array", 
-	      v->Index, v->TriVertexArray->getNumVertices()/3);
-	  v->TriVertexArray->fill = 0;
-	}
-	if(v->LinVertexArray && v->LinVertexArray->fill){
-	  Msg(DEBUG, "View[%d]; %d segs in vertex array",
-	      v->Index, v->LinVertexArray->getNumVertices()/2);
-	  v->LinVertexArray->fill = 0;
-	}
-      }
-
-      if(v->TriVertexArray && v->TriVertexArray->getNumVertices()){
-	if(CTX.alpha && ColorTable_IsAlpha(&v->CT) && !v->FakeTransparency &&
-	   (changedEye() || v->Changed)){
-	  Msg(DEBUG, "Sorting View[%d] for transparency (WITH vertex array)", v->Index);
-	  v->TriVertexArray->sort(storedEye[0], storedEye[1], storedEye[2]);
-	}
-
-	glVertexPointer(3, GL_FLOAT, 0, v->TriVertexArray->getVertexArray());
-	glNormalPointer(GL_BYTE, 0, v->TriVertexArray->getNormalArray());
-	glColorPointer(4, GL_UNSIGNED_BYTE, 0, v->TriVertexArray->getColorArray());
-
-	glEnableClientState(GL_VERTEX_ARRAY);
-	glEnableClientState(GL_COLOR_ARRAY);
-	glEnableClientState(GL_NORMAL_ARRAY);
-
-	if(v->Light)
-	  glEnable(GL_LIGHTING);
-	else
-	  glDisableClientState(GL_NORMAL_ARRAY);
-	if(CTX.polygon_offset) glEnable(GL_POLYGON_OFFSET_FILL);
-	glDrawArrays(GL_TRIANGLES, 0, v->TriVertexArray->getNumVertices());
-	glDisable(GL_POLYGON_OFFSET_FILL);
-	glDisable(GL_LIGHTING);
-      
-	glDisableClientState(GL_VERTEX_ARRAY);
-	glDisableClientState(GL_NORMAL_ARRAY);
-	glDisableClientState(GL_COLOR_ARRAY);
-      }
-
-      if(v->LinVertexArray && v->LinVertexArray->getNumVertices()){
-	glVertexPointer(3, GL_FLOAT, 0, v->LinVertexArray->getVertexArray());
-	glColorPointer(4, GL_UNSIGNED_BYTE, 0, v->LinVertexArray->getColorArray());
-	glEnableClientState(GL_VERTEX_ARRAY);
-	glEnableClientState(GL_COLOR_ARRAY);
-	glDrawArrays(GL_LINES, 0, v->LinVertexArray->getNumVertices());
-	glDisableClientState(GL_VERTEX_ARRAY);
-	glDisableClientState(GL_COLOR_ARRAY);
-      }
-
-      if(v->DrawStrings) {
-	glColor4ubv((GLubyte *) & v->color.text3d);
-	Draw_Text2D3D(3, v->TimeStep, v->NbT3, v->T3D, v->T3C);
-      }
-
-      for(int i = 0; i < 6; i++)
-	glDisable((GLenum)(GL_CLIP_PLANE0 + i));
-
-      if(v->Axes && v->Type == DRAW_POST_3D){
-	glColor4ubv((GLubyte *) & v->color.axes);
-	glLineWidth(CTX.line_width);
-	gl2psLineWidth(CTX.line_width * CTX.print.eps_line_width_factor);
-	if(!v->AxesAutoPosition){
-	  Draw_Axes(v->Axes, v->AxesTics, v->AxesFormat, v->AxesLabel, v->AxesPosition);
-	}
-	else{
-	  int ok = 1;
-	  for(int i = 0; i < 6; i++) {
-	    if(fabs(v->TmpBBox[i]) == VAL_INF){
-	      ok = 0;
-	      break;
-	    }
-	  }
-	  if(ok)
-	    Draw_Axes(v->Axes, v->AxesTics, v->AxesFormat, v->AxesLabel, v->TmpBBox);
-	}
-      }
-      
-      // reset alpha blending
-      if(CTX.alpha){
-	glDisable(GL_BLEND);
-	glEnable(GL_DEPTH_TEST);
-      }
-
-      v->Changed = 0;
-    }
-  }
-}
diff --git a/Graphics/ReadImg.cpp b/Graphics/ReadImg.cpp
index f0f2f433051e63cdcc59711e990265930e4d3959..8bce1dee6fb9a76bbb7c15caab57b1ed6943c190 100644
--- a/Graphics/ReadImg.cpp
+++ b/Graphics/ReadImg.cpp
@@ -1,4 +1,4 @@
-// $Id: ReadImg.cpp,v 1.18 2007-09-04 13:47:01 remacle Exp $
+// $Id: ReadImg.cpp,v 1.19 2007-09-10 04:47:03 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -22,7 +22,8 @@
 #include "ReadImg.h"
 #include "Gmsh.h"
 #include "GmshUI.h"
-#include "Views.h"
+#include "PView.h"
+#include "PViewDataList.h"
   
 #include <FL/Fl_JPEG_Image.H>
 #include <FL/Fl_PNM_Image.H>
@@ -31,8 +32,8 @@
 
 // from an image, we create a post-procession view
 
-static Post_View *Img2Pos(Fl_RGB_Image & img_init, int quads=1, 
-			  int resizex=0, int resizey=0) 
+static PViewDataList *Img2Data(Fl_RGB_Image &img_init, int quads=1,
+			       int resizex=0, int resizey=0) 
 {
   img_init.desaturate(); // convert to grayscale
 
@@ -50,10 +51,10 @@ static Post_View *Img2Pos(Fl_RGB_Image & img_init, int quads=1,
 
   if(dim != 1) {
     Msg(GERROR, "Unable to obtain one-channel image");
-    return NULL;
+    return 0;
   }
 
-  Post_View * v = BeginView(1);
+  PViewDataList *d = new PViewDataList(true);
 
   double z = 0.;
   for(int i = 0; i < height - 1; i++) {
@@ -69,73 +70,81 @@ static Post_View *Img2Pos(Fl_RGB_Image & img_init, int quads=1,
       double val3 = (double)a1[j + 1]/255.;
       double val4 = (double)a[j + 1]/255.;
       if(quads){ // generate quads
-	List_Add(v->SQ, &x); List_Add(v->SQ, &x); 
-	List_Add(v->SQ, &x1); List_Add(v->SQ, &x1);
-	List_Add(v->SQ, &y); List_Add(v->SQ, &y1);
-	List_Add(v->SQ, &y1); List_Add(v->SQ, &y);
-	List_Add(v->SQ, &z); List_Add(v->SQ, &z);
-	List_Add(v->SQ, &z); List_Add(v->SQ, &z);
-	List_Add(v->SQ, &val1); List_Add(v->SQ, &val2);
-	List_Add(v->SQ, &val3); List_Add(v->SQ, &val4);
-	v->NbSQ++;
+	List_Add(d->SQ, &x); List_Add(d->SQ, &x); 
+	List_Add(d->SQ, &x1); List_Add(d->SQ, &x1);
+	List_Add(d->SQ, &y); List_Add(d->SQ, &y1);
+	List_Add(d->SQ, &y1); List_Add(d->SQ, &y);
+	List_Add(d->SQ, &z); List_Add(d->SQ, &z);
+	List_Add(d->SQ, &z); List_Add(d->SQ, &z);
+	List_Add(d->SQ, &val1); List_Add(d->SQ, &val2);
+	List_Add(d->SQ, &val3); List_Add(d->SQ, &val4);
+	d->NbSQ++;
       }
       else{ // generate triangles
-	List_Add(v->ST, &x); List_Add(v->ST, &x); List_Add(v->ST, &x1);
-	List_Add(v->ST, &y); List_Add(v->ST, &y1); List_Add(v->ST, &y1);
-	List_Add(v->ST, &z); List_Add(v->ST, &z); List_Add(v->ST, &z);
-	List_Add(v->ST, &val1); List_Add(v->ST, &val2); List_Add(v->ST, &val3);
-	v->NbST++;
-	List_Add(v->ST, &x); List_Add(v->ST, &x1); List_Add(v->ST, &x1);
-	List_Add(v->ST, &y); List_Add(v->ST, &y1); List_Add(v->ST, &y);
-	List_Add(v->ST, &z); List_Add(v->ST, &z); List_Add(v->ST, &z);
-	List_Add(v->ST, &val1); List_Add(v->ST, &val3); List_Add(v->ST, &val4);
-	v->NbST++;
+	List_Add(d->ST, &x); List_Add(d->ST, &x); List_Add(d->ST, &x1);
+	List_Add(d->ST, &y); List_Add(d->ST, &y1); List_Add(d->ST, &y1);
+	List_Add(d->ST, &z); List_Add(d->ST, &z); List_Add(d->ST, &z);
+	List_Add(d->ST, &val1); List_Add(d->ST, &val2); List_Add(d->ST, &val3);
+	d->NbST++;
+	List_Add(d->ST, &x); List_Add(d->ST, &x1); List_Add(d->ST, &x1);
+	List_Add(d->ST, &y); List_Add(d->ST, &y1); List_Add(d->ST, &y);
+	List_Add(d->ST, &z); List_Add(d->ST, &z); List_Add(d->ST, &z);
+	List_Add(d->ST, &val1); List_Add(d->ST, &val3); List_Add(d->ST, &val4);
+	d->NbST++;
       }
     }
   }
   delete img;
-  return v;
+  return d;
 }
 
-static int EndPos(char *name, Post_View *v)
+static int EndPos(char *name, PViewData *d)
 {
-  if(!v) return 0;
+  if(!d) return 0;
   char name_pos[256], title[256];
   strcpy(name_pos, name);
   strcat(name_pos, ".pos");
   int i;
-  for(i = strlen(name)-1; i >= 0; i--){
+  for(i = strlen(name) - 1; i >= 0; i--){
     if(name[i] == '/' || name[i] == '\\')
       break;
   }
   if(i <= 0)
     strcpy(title, name);
   else
-    strcpy(title, &name[i+1]);
-  EndView(v, 1, name_pos, title);
-  return 1;
+    strcpy(title, &name[i + 1]);
+  d->setName(title);
+  d->setFileName(name_pos);
+  if(d->finalize()){
+    new PView(d);
+    return 1;
+  }
+  else{
+    delete d;
+    return 0;
+  }
 }
 
 int read_pnm(char *name) 
 {
   Fl_PNM_Image img(name);
-  return EndPos(name, Img2Pos(img));
+  return EndPos(name, Img2Data(img));
 }
 
 int read_jpeg(char *name) 
 {
   Fl_JPEG_Image img(name);
-  return EndPos(name, Img2Pos(img));
+  return EndPos(name, Img2Data(img));
 }
 
 int read_png(char *name) 
 {
   Fl_PNG_Image img(name);
-  return EndPos(name, Img2Pos(img));
+  return EndPos(name, Img2Data(img));
 }
 
 int read_bmp(char *name) 
 {
   Fl_BMP_Image img(name);
-  return EndPos(name, Img2Pos(img));
+  return EndPos(name, Img2Data(img));
 }
diff --git a/Graphics/Scale_Old.cpp b/Graphics/Scale_Old.cpp
deleted file mode 100644
index 1cff04fbd68f6d73a8ef8556e65b74d67662cbe9..0000000000000000000000000000000000000000
--- a/Graphics/Scale_Old.cpp
+++ /dev/null
@@ -1,403 +0,0 @@
-// $Id: Scale_Old.cpp,v 1.1 2007-08-31 17:28:42 geuzaine Exp $
-//
-// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-// USA.
-// 
-// Please report all bugs and problems to <gmsh@geuz.org>.
-
-#include "Gmsh.h"
-#include "GmshUI.h"
-#include "Numeric.h"
-#include "Draw.h"
-#include "Context.h"
-#include "Views.h"
-#include "gl2ps.h"
-
-extern Context_T CTX;
-
-// Even if all computations in these routines are made in window
-// coordinates, double precision is used to work at subpixel accuracy
-
-void draw_scale(Post_View * v,
-                double xmin, double ymin, double width, double height,
-                double tic, int horizontal)
-{
-  gl_font(CTX.gl_font_enum, CTX.gl_fontsize);
-  double font_h = gl_height(); // total font height
-  double font_a = gl_height() - gl_descent();  // height above ref pt
-
-  double box;
-  if(horizontal){
-    box = width / (v->NbIso ? v->NbIso : 1);   // colorscale box width
-  }
-  else{
-    box = height / (v->NbIso ? v->NbIso : 1);   // colorscale box height
-  }
-
-  glPointSize(v->PointSize);
-  gl2psPointSize(v->PointSize * CTX.print.eps_point_size_factor);
-
-  glLineWidth(v->LineWidth);
-  gl2psLineWidth(v->LineWidth * CTX.print.eps_line_width_factor);
-
-  double ValMin, ValMax;
-  if(v->ExternalViewIndex >= 0){
-    ValMin = v->ExternalMin;
-    ValMax = v->ExternalMax;
-  }
-  else{
-    switch(v->RangeType){
-    case DRAW_POST_RANGE_CUSTOM:
-      ValMin = v->CustomMin;
-      ValMax = v->CustomMax;
-      break;
-    case DRAW_POST_RANGE_PER_STEP:
-      if(v->TimeStepMin && v->TimeStepMax){
-	ValMin = v->TimeStepMin[v->TimeStep];
-	ValMax = v->TimeStepMax[v->TimeStep];
-      }
-      else{ // possible of the view is empty
-	ValMin = v->Min;
-	ValMax = v->Max;
-      }
-      break;
-    case DRAW_POST_RANGE_DEFAULT:
-    default:
-      ValMin = v->Min;
-      ValMax = v->Max;
-      break;
-    }
-  }
-
-  switch (v->ScaleType) {
-  case DRAW_POST_LINEAR:
-    v->GIFV = GiveIndexFromValue_Lin;
-    v->GVFI = GiveValueFromIndex_Lin;
-    break;
-  case DRAW_POST_LOGARITHMIC:
-    v->GIFV = GiveIndexFromValue_Log;
-    v->GVFI = GiveValueFromIndex_Log;
-    break;
-  case DRAW_POST_DOUBLELOGARITHMIC:
-    v->GIFV = GiveIndexFromValue_DoubleLog;
-    v->GVFI = GiveValueFromIndex_DoubleLog;
-    break;
-  }
-
-  // colorscale
-
-  for(int i = 0; i < v->NbIso; i++) {
-    if(v->IntervalsType == DRAW_POST_DISCRETE) {
-      PaletteDiscrete(v, v->NbIso, i);
-      glBegin(GL_QUADS);
-      if(horizontal){
-	glVertex2d(xmin + i * box, ymin);
-	glVertex2d(xmin + (i + 1) * box, ymin);
-	glVertex2d(xmin + (i + 1) * box, ymin + height);
-	glVertex2d(xmin + i * box, ymin + height);
-      }
-      else{
-	glVertex2d(xmin, ymin + i * box);
-	glVertex2d(xmin + width, ymin + i * box);
-	glVertex2d(xmin + width, ymin + (i + 1) * box);
-	glVertex2d(xmin, ymin + (i + 1) * box);
-      }
-      glEnd();
-    }
-    else if(v->IntervalsType == DRAW_POST_CONTINUOUS) {
-      glBegin(GL_QUADS);
-      PaletteContinuousLinear(v, ValMin, ValMax,
-			      ValMin + i * (ValMax - ValMin) / 
-			      (v->NbIso ? v->NbIso : 1));
-      if(horizontal){
-	glVertex2d(xmin + i * box, ymin + height);
-	glVertex2d(xmin + i * box, ymin);
-      }
-      else{
-	glVertex2d(xmin, ymin + i * box);
-	glVertex2d(xmin + width, ymin + i * box);
-      }
-      PaletteContinuousLinear(v, ValMin, ValMax,
-			      ValMin + (i + 1) * (ValMax - ValMin) / 
-			      (v->NbIso ? v->NbIso : 1));
-      if(horizontal){
-	glVertex2d(xmin + (i + 1) * box, ymin);
-	glVertex2d(xmin + (i + 1) * box, ymin + height);
-      }
-      else{
-	glVertex2d(xmin + width, ymin + (i + 1) * box);
-	glVertex2d(xmin, ymin + (i + 1) * box);
-      }
-      glEnd();
-    }
-    else {
-      PaletteDiscrete(v, v->NbIso, i);
-      glBegin(GL_LINES);
-      if(horizontal){
-	glVertex2d(xmin + i * box + 0.5 * box, ymin);
-	glVertex2d(xmin + i * box + 0.5 * box, ymin + height);
-      }
-      else{
-	glVertex2d(xmin, ymin + i * box + 0.5 * box);
-	glVertex2d(xmin + width, ymin + i * box + 0.5 * box);
-      }
-      glEnd();
-    }
-  }
-
-  // valuescale
-
-  char label[1024];
-  int nbv;
-  double cv_box;
-  if(horizontal){
-    sprintf(label, v->Format, -M_PI/1.e4);
-    double estim = gl_width(label);
-    nbv = (width/estim > v->NbIso) ? v->NbIso : ((width/estim > 2.) ? -2 : -1);
-    cv_box = width / nbv;
-  }
-  else{
-    nbv = (height/font_h > v->NbIso) ? v->NbIso : ((height/font_h > 3.) ? -2 : -1);
-    cv_box = height / nbv;
-  }
-
-  glColor4ubv((GLubyte *) & CTX.color.text);
-
-  if(nbv < 0) { // only min and max (+ possibly mid value) if not enough room
-    if(v->IntervalsType == DRAW_POST_DISCRETE ||
-       v->IntervalsType == DRAW_POST_CONTINUOUS) {
-      sprintf(label, v->Format, ValMin);
-      if(horizontal){
-	glRasterPos2d(xmin, ymin + height + tic);
-	Draw_String_Center(label);
-      }
-      else{
-	glRasterPos2d(xmin + width + tic, ymin - font_a / 3.);
-	Draw_String(label);
-      }
-      sprintf(label, v->Format, ValMax);
-      if(horizontal){
-	glRasterPos2d(xmin + width, ymin + height + tic);
-	Draw_String_Center(label);
-      }
-      else{
-	glRasterPos2d(xmin + width + tic, ymin + height - font_a / 3.);
-	Draw_String(label);
-      }
-    }
-    else {
-      sprintf(label, v->Format, ValMin);
-      if(horizontal){
-	glRasterPos2d(xmin + (box / 2), ymin + height + tic);
-	Draw_String_Center(label);
-      }
-      else{
-	glRasterPos2d(xmin + width + tic, ymin + (box / 2) - font_a / 3.);
-	Draw_String(label);
-      }
-      sprintf(label, v->Format, ValMax);
-      if(horizontal){
-	glRasterPos2d(xmin + width - (box / 2), ymin + height + tic);
-	Draw_String_Center(label);
-      }
-      else{
-	glRasterPos2d(xmin + width + tic, ymin + height - (box / 2) - font_a / 3.);
-	Draw_String(label);
-      }
-    }
-    if(nbv == -2){
-      double Val = v->GVFI(ValMin, ValMax, v->NbIso, v->NbIso/2);
-      sprintf(label, v->Format, Val);
-      if(horizontal){
-	glRasterPos2d(xmin + width/2., ymin + height + tic);
-	Draw_String_Center(label);
-      }
-      else{
-	glRasterPos2d(xmin + width + tic, ymin + height/2 - font_a / 3.);
-	Draw_String(label);
-      }
-    }
-  }
-  else {
-    if(v->IntervalsType == DRAW_POST_DISCRETE ||
-       v->IntervalsType == DRAW_POST_CONTINUOUS) {
-      for(int i = 0; i < nbv + 1; i++) {
-        double Val = v->GVFI(ValMin, ValMax, nbv + 1, i);
-        sprintf(label, v->Format, Val);
-	if(horizontal){
-	  glRasterPos2d(xmin + i * cv_box, ymin + height + tic);
-	  Draw_String_Center(label);
-	}
-	else{
-	  glRasterPos2d(xmin + width + tic, ymin + i * cv_box - font_a / 3.);
-	  Draw_String(label);
-	}
-      }
-    }
-    else {
-      for(int i = 0; i < nbv; i++) {
-        double Val = v->GVFI(ValMin, ValMax, nbv, i);
-        sprintf(label, v->Format, Val);
-	if(horizontal){
-	  glRasterPos2d(xmin + (2 * i + 1) * (cv_box / 2), ymin + height + tic);
-	  Draw_String_Center(label);
-	}
-	else{
-	  glRasterPos2d(xmin + width + tic, ymin + (2 * i + 1) * (cv_box / 2) - font_a / 3.);
-	  Draw_String(label);
-	}
-      }
-    }
-  }
-
-  // the label
-
-  if((v->ShowTime == 1 && List_Nbr(v->Time) > 1) ||
-     (v->ShowTime == 2 && List_Nbr(v->Time) > 0)){
-    char tmp[256];
-    sprintf(tmp, v->Format, *(double *)List_Pointer(v->Time, v->TimeStep));
-    sprintf(label, "%s (%s)", v->Name, tmp);
-  }
-  else if((v->ShowTime == 3 && List_Nbr(v->Time) > 1) ||
-	  (v->ShowTime == 4 && List_Nbr(v->Time) > 0)){
-    sprintf(label, "%s (%d)", v->Name, v->TimeStep);
-  }
-  else
-    sprintf(label, "%s", v->Name);
-
-  if(horizontal){
-    glRasterPos2d(xmin + width / 2., ymin + height + tic + 1.4*font_h);
-    Draw_String_Center(label);
-  }
-  else{
-    glRasterPos2d(xmin, ymin - 2 * font_h);
-    Draw_String(label);
-  }
-}
-
-void Draw_Scales_Old(void)
-{
-  static List_T *todraw = NULL;
-
-  if(!CTX.post.list)
-    return;
-
-  // scales to draw?
-
-  if(!todraw)
-    todraw = List_Create(5, 5, sizeof(Post_View *));
-  else
-    List_Reset(todraw);
-
-  for(int i = 0; i < List_Nbr(CTX.post.list); i++) {
-    Post_View *v = *(Post_View **) List_Pointer(CTX.post.list, i);
-    if(v->Visible && !v->Dirty && v->ShowScale &&
-       v->Type == DRAW_POST_3D && !v->TextOnly)
-      List_Add(todraw, &v);
-  }
-
-  if(!List_Nbr(todraw)) {
-    return;
-  }
-
-  const double tic = 10., bar_size = 16.;
-  double width = 0., width_prev = 0., width_total = 0.;
-
-  gl_font(CTX.gl_font_enum, CTX.gl_fontsize);
-  char label[1024];
-  double largest_number = 0.;
-  for(int i = 0; i < List_Nbr(todraw); i++) {
-    Post_View *v = *(Post_View **) List_Pointer(todraw, i);
-    sprintf(label, v->Format, -M_PI/1.e4);
-    if(largest_number < gl_width(label))
-      largest_number = gl_width(label);
-  }
-
-  for(int i = 0; i < List_Nbr(todraw); i++) {
-    Post_View *v = *(Post_View **) List_Pointer(todraw, i);
-    
-    if(!v->AutoPosition) {
-      double x = v->Position[0], y = v->Position[1];
-      int center = Fix2DCoordinates(&x, &y);
-      draw_scale(v, 
-		 x - ((center & 1) ? v->Size[0]/2. : 0.), 
-		 y - v->Size[1] + ((center & 2) ? v->Size[1]/2. : 0.),
-		 v->Size[0], v->Size[1], tic, CTX.post.horizontal_scales);
-    }
-    else{
-      if(CTX.post.horizontal_scales){
-	double ysep = 20.;
-	if(List_Nbr(todraw) == 1){
-	  double ww = (CTX.viewport[2] - CTX.viewport[0]) / 2.;
-	  draw_scale(v, 
-		     (CTX.viewport[2] - CTX.viewport[0]) / 2. - ww / 2,
-		     CTX.viewport[1] + ysep, 
-		     ww, bar_size, 
-		     tic, 1);
-	}
-	else{
-	  double xsep = largest_number/4. + (CTX.viewport[2] - CTX.viewport[0])/10.;
-	  double ww = (CTX.viewport[2] - CTX.viewport[0] - 4 * xsep) / 2.;
-	  if(ww < 20) ww = 20;
-	  draw_scale(v, 
-		     (CTX.viewport[2] - CTX.viewport[0])/2. - (i%2 ? -xsep/1.5 : ww+xsep/1.5),
-		     CTX.viewport[1] + ysep + (i/2) * (bar_size+tic+2*gl_height()+ysep), 
-		     ww, bar_size, 
-		     tic, 1);
-	}
-      }
-      else{
-	double xsep = 20.;
-	double dy = 2. * gl_height();
-	if(List_Nbr(todraw) == 1){
-	  double ysep = (CTX.viewport[3] - CTX.viewport[1]) / 6.;
-	  double hh = CTX.viewport[3] - CTX.viewport[1] - 2 * ysep - dy;
-	  draw_scale(v, 
-		     CTX.viewport[0] + xsep, 
-		     CTX.viewport[1] + ysep + dy, 
-		     bar_size, hh, 
-		     tic, 0);
-	}
-	else{
-	  double ysep = (CTX.viewport[3] - CTX.viewport[1]) / 15.;
-	  double hh = (CTX.viewport[3] - CTX.viewport[1] - 3 * ysep - 2.5 * dy) / 2.;
-	  draw_scale(v, 
-		     CTX.viewport[0] + xsep + width_total + (i / 2) * xsep,
-		     CTX.viewport[1] + ysep + dy + (1 - i % 2) * (hh + 1.5 * dy + ysep),
-		     bar_size, hh,
-		     tic, 0);
-	}
-	// compute width
-	width_prev = width;
-	sprintf(label, v->Format, -M_PI/1.e4);
-	width = bar_size + tic + gl_width(label);
-	if(List_Nbr(v->Time) > 1 && v->ShowTime){
-	  char tmp[256];
-	  sprintf(tmp, v->Format, *(double *)List_Pointer(v->Time, v->TimeStep));
-	  sprintf(label, "%s (%s)", v->Name, tmp);
-	}
-	else
-	  sprintf(label, "%s", v->Name);
-	if(gl_width(label) > width)
-	  width = gl_width(label);
-	if(i % 2)
-	  width_total += DMAX(bar_size + width, bar_size + width_prev);
-      }
-    }
-  }
-}
-
diff --git a/Makefile b/Makefile
index 6d2040ec50d987698178338c2ab680c2594155bc..ba0bb3e97729c204198b864667894b9f4379cae2 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.438 2007-08-24 08:38:23 remacle Exp $
+# $Id: Makefile,v 1.439 2007-09-10 04:47:01 geuzaine Exp $
 #
 # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 #
@@ -22,8 +22,8 @@
 include variables
 
 GMSH_MAJOR_VERSION = 2
-GMSH_MINOR_VERSION = 0
-GMSH_PATCH_VERSION = 8
+GMSH_MINOR_VERSION = 1
+GMSH_PATCH_VERSION = 0
 GMSH_EXTRA_VERSION =
 
 GMSH_VERSION = ${GMSH_MAJOR_VERSION}.${GMSH_MINOR_VERSION}.${GMSH_PATCH_VERSION}${GMSH_EXTRA_VERSION}
diff --git a/Mesh/BDS.cpp b/Mesh/BDS.cpp
index e51a7a7c7756390f827bf11e2868e6e7a4e5cee0..df8b3b5a071dee4679561e79bf7eaadb95b75cb2 100644
--- a/Mesh/BDS.cpp
+++ b/Mesh/BDS.cpp
@@ -1,4 +1,4 @@
-// $Id: BDS.cpp,v 1.77 2007-09-04 13:47:02 remacle Exp $
+// $Id: BDS.cpp,v 1.78 2007-09-10 04:47:03 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -469,61 +469,10 @@ void recur_tag(BDS_Face * t, BDS_GeomEntity * g)
 double PointLessThanLexicographic::t = 0;
 double BDS_Vector::t = 0;
 
-bool BDS_Mesh::import_view(Post_View *view, const double tolerance)
+bool BDS_Mesh::import_view(PView *view, const double tolerance)
 {
-  // imports all the tris+quads from a post-processing view
-
-  Min[0] = view->BBox[0]; Max[0] = view->BBox[1];
-  Min[1] = view->BBox[2]; Max[1] = view->BBox[3];
-  Min[2] = view->BBox[4]; Max[2] = view->BBox[5];
-  LC = sqrt((Min[0] - Max[0]) * (Min[0] - Max[0]) +
-	    (Min[1] - Max[1]) * (Min[1] - Max[1]) +
-	    (Min[2] - Max[2]) * (Min[2] - Max[2]));
-  
-  PointLessThanLexicographic::t = tolerance;
-  std::set < BDS_Point *, PointLessThanLexicographic > pts;
-
-  for(int type = 0; type < 6; type++){
-    int nbList=0, nbNod=0;
-    List_T *list=0;
-    switch(type){
-    case 0: list = view->ST; nbList = view->NbST; nbNod = 3; break;
-    case 1: list = view->VT; nbList = view->NbVT; nbNod = 3; break;
-    case 2: list = view->TT; nbList = view->NbTT; nbNod = 3; break;
-    case 3: list = view->SQ; nbList = view->NbSQ; nbNod = 4; break;
-    case 4: list = view->VQ; nbList = view->NbVQ; nbNod = 4; break;
-    case 5: list = view->TQ; nbList = view->NbTQ; nbNod = 4; break;
-    }
-    if(nbList){
-      int nb = List_Nbr(list) / nbList;
-      for(int i = 0; i < List_Nbr(list); i += nb) {
-	double *x = (double *)List_Pointer_Fast(list, i);
-	double *y = (double *)List_Pointer_Fast(list, i + nbNod);
-	double *z = (double *)List_Pointer_Fast(list, i + 2 * nbNod);
-	BDS_Point *p[4];
-	for(int j = 0; j < nbNod; j++){
-	  BDS_Point P(0, x[j], y[j], z[j]);    
-	  std::set < BDS_Point *, PointLessThanLexicographic >::iterator it = pts.find(&P);
-	  if(it != pts.end()) {
-	    p[j] = *it;
-	  }
-	  else {
-	    MAXPOINTNUMBER++;
-	    p[j] = add_point(MAXPOINTNUMBER, P.X, P.Y, P.Z);
-	    pts.insert(p[j]);
-	  }
-	}
-	if(nbNod == 3){
-	  add_triangle(p[0]->iD, p[1]->iD, p[2]->iD);
-	}
-	else{
-	  add_triangle(p[0]->iD, p[1]->iD, p[2]->iD);
-	  add_triangle(p[0]->iD, p[2]->iD, p[3]->iD);
-	}
-      }
-    }
-  }
-  return true;
+  Msg(GERROR, "View import must be reinterfaced");
+  return false;
 }
 
 template < class IT > void DESTROOOY(IT beg, IT end)
diff --git a/Mesh/BDS.h b/Mesh/BDS.h
index a7d1b6d9fda30ac2ab609d6756c6586577f99ea4..7a7c584ddc6d405ce7892a6ed911d6993ca2083f 100644
--- a/Mesh/BDS.h
+++ b/Mesh/BDS.h
@@ -30,7 +30,7 @@
 #include <list>
 #include <math.h>
 #include "GFace.h"
-#include "Views.h"
+#include "PView.h"
 
 class BDS_Edge;
 class BDS_Face;
@@ -462,7 +462,7 @@ public:
   void cleanup();
   void recombineIntoQuads (const double angle, GFace *gf);
   // io's 
-  bool import_view(Post_View *view, const double tolerance);
+  bool import_view(PView *view, const double tolerance);
 };
 
 void outputScalarField(std::list < BDS_Face * >t, const char *fn, int param);
diff --git a/Mesh/BackgroundMesh.cpp b/Mesh/BackgroundMesh.cpp
index 05ac6295d8a582bd6c85a948b07f26e06deea342..826ccb2b16f6403e8533a22d12a52b90051b1ff3 100644
--- a/Mesh/BackgroundMesh.cpp
+++ b/Mesh/BackgroundMesh.cpp
@@ -1,4 +1,4 @@
-// $Id: BackgroundMesh.cpp,v 1.24 2007-09-06 16:04:25 geuzaine Exp $
+// $Id: BackgroundMesh.cpp,v 1.25 2007-09-10 04:47:03 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -20,11 +20,9 @@
 // Please report all bugs and problems to <gmsh@geuz.org>.
 
 #include "Gmsh.h"
-#include "Views.h"
 #include "BackgroundMesh.h"
 #include "Numeric.h"
 #include "Context.h"
-#include "OctreePost.h"
 #include "GVertex.h"
 #include "GEdge.h"
 #include "GFace.h"
diff --git a/Mesh/BoundaryLayer.cpp b/Mesh/BoundaryLayer.cpp
index f50b50eea56c3e01a331e292c9a6119ed99cf233..6bac73c7670a10e712ae298fc4b5faa9d5c216ee 100644
--- a/Mesh/BoundaryLayer.cpp
+++ b/Mesh/BoundaryLayer.cpp
@@ -1,4 +1,4 @@
-// $Id: BoundaryLayer.cpp,v 1.4 2007-09-03 20:09:14 geuzaine Exp $
+// $Id: BoundaryLayer.cpp,v 1.5 2007-09-10 04:47:04 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -24,7 +24,6 @@
 #include "meshGEdge.h"
 #include "meshGFace.h"
 #include "Message.h"
-#include "Views.h"
 
 template<class T>
 static void addExtrudeNormals(std::vector<T*> &elements)
diff --git a/Mesh/Field.cpp b/Mesh/Field.cpp
index b7fa28f50222d39a527e3215206afbeeff5a82ef..cf8f4eecac251dacfb104fe3c4e984b038ea999a 100644
--- a/Mesh/Field.cpp
+++ b/Mesh/Field.cpp
@@ -1,4 +1,4 @@
-// $Id: Field.cpp,v 1.5 2007-09-04 13:47:02 remacle Exp $
+// $Id: Field.cpp,v 1.6 2007-09-10 04:47:04 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -264,8 +264,8 @@ FunctionField::~FunctionField()
 // PostViewField
 double PostViewField::operator()(double x, double y, double z) 
 {
-  // FIXME: temp fix until we manage correctly the removal of post views
-  if(view_index < 0 || view_index >= List_Nbr(CTX.post.list)) return MAX_LC;
+  // FIXME: should test unique view num instead, but that would be slower
+  if(view_index < 0 || view_index >= PView::list.size()) return MAX_LC;
 
   double l = 0.;
   double fact[9] = {0.001, 0.0025, 0.005, 0.0075, 0.01, 0.025, 0.05, 0.075, 0.1};
@@ -293,11 +293,11 @@ double PostViewField::operator()(double x, double y, double z)
   return l;
 }
 
-PostViewField::PostViewField(Post_View *view)
+PostViewField::PostViewField(PView *view)
 {
-  Msg(INFO, "Field from '%s'", view->Name);
+  Msg(INFO, "Field from '%s'", view->getData()->getName().c_str());
   octree = new OctreePost(view);
-  view_index = view->Index;
+  view_index = view->getIndex();
 }
 
 PostViewField::~PostViewField()
diff --git a/Mesh/Field.h b/Mesh/Field.h
index a4c063b9e52048410597933a61951048c1b2a923..9a0ce6bf35ad2f8327a2a47a4abe770d49d71991 100644
--- a/Mesh/Field.h
+++ b/Mesh/Field.h
@@ -23,7 +23,7 @@
 #include <vector>
 #include <map>
 #include <list>
-#include "Views.h"
+#include "PView.h"
 #ifdef HAVE_ANN_
 #include "ANN/ANN.h"
 #endif
@@ -105,7 +105,7 @@ class PostViewField : public Field{
   OctreePost *octree;
   int view_index;
 public:
-  PostViewField(Post_View *view);
+  PostViewField(PView *view);
   double operator()(double x, double y, double z);
   virtual ~PostViewField();
 };
diff --git a/Mesh/Generator.cpp b/Mesh/Generator.cpp
index e22f5a98994f6d3d93b6d799faf4d834a662cc14..85604ef54ba52c025984d4821f1797a899e5ac45 100644
--- a/Mesh/Generator.cpp
+++ b/Mesh/Generator.cpp
@@ -1,4 +1,4 @@
-// $Id: Generator.cpp,v 1.122 2007-09-03 20:09:14 geuzaine Exp $
+// $Id: Generator.cpp,v 1.123 2007-09-10 04:47:04 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -22,7 +22,7 @@
 #include "Gmsh.h"
 #include "Numeric.h"
 #include "Context.h"
-#include "Views.h"
+#include "PView.h"
 #include "OS.h"
 #include "GModel.h"
 #include "meshGEdge.h"
@@ -128,56 +128,19 @@ void GetStatistics(double stat[50], double quality[3][100])
     stat[25] = rhoMax;
   }
 
-  stat[26] = List_Nbr(CTX.post.list);
-  for(int i = 0; i < List_Nbr(CTX.post.list); i++) {
-    Post_View *v = *(Post_View **) List_Pointer(CTX.post.list, i);
-    stat[27] += v->NbSP + v->NbVP + v->NbTP;
-    stat[28] += v->NbSL + v->NbVL + v->NbTL;
-    stat[29] += v->NbST + v->NbVT + v->NbTT;
-    stat[30] += v->NbSQ + v->NbVQ + v->NbTQ;
-    stat[31] += v->NbSS + v->NbVS + v->NbTS;
-    stat[32] += v->NbSH + v->NbVH + v->NbTH;
-    stat[33] += v->NbSI + v->NbVI + v->NbTI;
-    stat[34] += v->NbSY + v->NbVY + v->NbTY;
-    stat[35] += v->NbT2 + v->NbT3;
-    if(v->Visible) {
-      if(v->DrawPoints)
-        stat[36] += 
-	  (v->DrawScalars ? v->NbSP : 0) + (v->DrawVectors ? v->NbVP : 0) + 
-	  (v->DrawTensors ? v->NbTP : 0);
-      if(v->DrawLines)
-        stat[37] += 
-	  (v->DrawScalars ? v->NbSL : 0) + (v->DrawVectors ? v->NbVL : 0) + 
-	  (v->DrawTensors ? v->NbTL : 0);
-      if(v->DrawTriangles)
-        stat[38] += 
-	  (v->DrawScalars ? v->NbST : 0) + (v->DrawVectors ? v->NbVT : 0) + 
-	  (v->DrawTensors ? v->NbTT : 0);
-      if(v->DrawQuadrangles)
-        stat[39] +=
-	  (v->DrawScalars ? v->NbSQ : 0) + (v->DrawVectors ? v->NbVQ : 0) + 
-	  (v->DrawTensors ? v->NbTQ : 0);
-      if(v->DrawTetrahedra)
-        stat[40] += 
-	  (v->DrawScalars ? v->NbSS : 0) + (v->DrawVectors ? v->NbVS : 0) + 
-	  (v->DrawTensors ? v->NbTS : 0);
-      if(v->DrawHexahedra)
-        stat[41] +=
-	  (v->DrawScalars ? v->NbSH : 0) + (v->DrawVectors ? v->NbVH : 0) +
-	  (v->DrawTensors ? v->NbTH : 0);
-      if(v->DrawPrisms)
-        stat[42] += 
-	  (v->DrawScalars ? v->NbSI : 0) + (v->DrawVectors ? v->NbVI : 0) +
-	  (v->DrawTensors ? v->NbTI : 0);
-      if(v->DrawPyramids)
-        stat[43] += 
-	  (v->DrawScalars ? v->NbSY : 0) + (v->DrawVectors ? v->NbVY : 0) + 
-	  (v->DrawTensors ? v->NbTY : 0);
-      if(v->DrawStrings)
-        stat[44] += v->NbT2 + v->NbT3;
-    }
+  stat[26] = PView::list.size();
+  for(unsigned int i = 0; i < PView::list.size(); i++) {
+    PViewData *data = PView::list[i]->getData();
+    stat[27] += data->getNumElements(PViewData::Point);
+    stat[28] += data->getNumElements(PViewData::Line);
+    stat[29] += data->getNumElements(PViewData::Triangle);
+    stat[30] += data->getNumElements(PViewData::Quadrangle);
+    stat[31] += data->getNumElements(PViewData::Tetrahedron);
+    stat[32] += data->getNumElements(PViewData::Hexahedron);
+    stat[33] += data->getNumElements(PViewData::Prism);
+    stat[34] += data->getNumElements(PViewData::Pyramid);
+    stat[35] += data->getNumStrings2D() + data->getNumStrings3D();
   }
-
 }
 
 bool TooManyElements(GModel *m, int dim)
diff --git a/Mesh/Makefile b/Mesh/Makefile
index 53bcdda4a6fed84e94bd63cbbb387a6f4c23beb1..497a21794ac232d7e6f1dac48b2db6c3e8128e98 100644
--- a/Mesh/Makefile
+++ b/Mesh/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.181 2007-09-04 15:19:24 geuzaine Exp $
+# $Id: Makefile,v 1.182 2007-09-10 04:47:04 geuzaine Exp $
 #
 # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 #
@@ -80,23 +80,23 @@ depend:
 Generator.o: Generator.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
   ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \
-  ../Numeric/Numeric.h ../Common/Context.h ../Post/Views.h \
-  ../Post/ColorTable.h ../Common/VertexArray.h ../Geo/SVector3.h \
-  ../Geo/SPoint3.h ../Common/SmoothData.h ../Post/AdaptiveViews.h \
-  ../Common/GmshMatrix.h ../Common/OS.h ../Geo/GModel.h ../Geo/GVertex.h \
-  ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/GmshDefines.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/MElement.h ../Geo/MVertex.h \
-  ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h ../Common/Hash.h \
-  ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
-  ../Geo/ExtrudeParams.h ../Geo/GFace.h ../Geo/GPoint.h ../Geo/GEntity.h \
-  ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/MElement.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/ExtrudeParams.h ../Geo/GRegion.h \
-  ../Geo/GEntity.h ../Geo/MElement.h ../Geo/ExtrudeParams.h \
-  ../Geo/SBoundingBox3d.h meshGEdge.h meshGFace.h meshGRegion.h \
-  BackgroundMesh.h BoundaryLayer.h HighOrder.h
+  ../Numeric/Numeric.h ../Common/Context.h ../Post/PView.h \
+  ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.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 \
+  ../Common/GmshDefines.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/MElement.h ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h \
+  ../Geo/SVector3.h ../Common/Hash.h ../Geo/MFace.h ../Geo/MVertex.h \
+  ../Geo/SVector3.h ../Geo/ExtrudeParams.h ../Geo/GFace.h ../Geo/GPoint.h \
+  ../Geo/GEntity.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/MElement.h \
+  ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/ExtrudeParams.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/MElement.h \
+  ../Geo/ExtrudeParams.h ../Geo/SBoundingBox3d.h meshGEdge.h meshGFace.h \
+  meshGRegion.h BackgroundMesh.h BoundaryLayer.h HighOrder.h
 Field.o: Field.cpp ../Mesh/BDS.h ../Geo/GFace.h ../Geo/GPoint.h \
   ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/GmshDefines.h \
@@ -108,9 +108,9 @@ Field.o: Field.cpp ../Mesh/BDS.h ../Geo/GFace.h ../Geo/GPoint.h \
   ../Geo/MVertex.h ../Geo/SVector3.h ../Numeric/Numeric.h \
   ../Common/Context.h ../DataStr/List.h ../Geo/ExtrudeParams.h \
   ../Common/SmoothData.h ../Geo/MElement.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/ExtrudeParams.h ../Post/Views.h \
-  ../Post/ColorTable.h ../Common/VertexArray.h ../Post/AdaptiveViews.h \
-  ../Common/GmshMatrix.h ../Common/Gmsh.h ../Common/Message.h \
+  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/ExtrudeParams.h ../Post/PView.h \
+  ../Common/VertexArray.h ../Post/PViewData.h ../Post/PViewOptions.h \
+  ../Post/ColorTable.h ../Common/Gmsh.h ../Common/Message.h \
   ../DataStr/Malloc.h ../DataStr/Tree.h ../DataStr/avl.h \
   ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h Field.h \
   ../Geo/Geo.h ../Geo/gmshSurface.h ../Geo/Pair.h ../Geo/Range.h \
@@ -171,8 +171,8 @@ meshGFace.o: meshGFace.cpp meshGFace.h meshGFaceDelaunayInsertion.h \
   ../Geo/GEdge.h ../Geo/GFace.h ../Geo/GRegion.h ../Geo/GEntity.h \
   ../Geo/MElement.h ../Geo/ExtrudeParams.h ../Geo/MVertex.h \
   ../Geo/MEdge.h ../Geo/MElement.h ../Common/VertexArray.h \
-  ../Common/Message.h ../Common/OS.h BDS.h ../Post/Views.h \
-  ../Post/ColorTable.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h
+  ../Common/Message.h ../Common/OS.h BDS.h ../Post/PView.h \
+  ../Post/PViewData.h ../Post/PViewOptions.h ../Post/ColorTable.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 ../Common/GmshDefines.h \
@@ -213,8 +213,8 @@ meshGFaceDelaunayInsertion.o: meshGFaceDelaunayInsertion.cpp BDS.h \
   ../Numeric/Numeric.h ../Common/Context.h ../DataStr/List.h \
   ../Geo/ExtrudeParams.h ../Common/SmoothData.h ../Geo/MElement.h \
   ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/ExtrudeParams.h \
-  ../Post/Views.h ../Post/ColorTable.h ../Common/VertexArray.h \
-  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h BackgroundMesh.h \
+  ../Post/PView.h ../Common/VertexArray.h ../Post/PViewData.h \
+  ../Post/PViewOptions.h ../Post/ColorTable.h BackgroundMesh.h \
   meshGFaceDelaunayInsertion.h meshGFace.h ../Common/Message.h
 meshGFaceOptimize.o: meshGFaceOptimize.cpp meshGFaceOptimize.h \
   ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \
@@ -251,8 +251,8 @@ meshGRegion.o: meshGRegion.cpp meshGRegion.h \
   ../Geo/ExtrudeParams.h ../Geo/GRegion.h ../Geo/MRep.h ../Geo/GEdge.h \
   ../Geo/GFace.h ../Geo/GRegion.h ../Geo/MVertex.h ../Geo/MEdge.h \
   ../Geo/MElement.h ../Common/VertexArray.h ../Common/Message.h \
-  ../Common/OS.h BDS.h ../Post/Views.h ../Post/ColorTable.h \
-  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h
+  ../Common/OS.h BDS.h ../Post/PView.h ../Post/PViewData.h \
+  ../Post/PViewOptions.h ../Post/ColorTable.h
 meshGRegionDelaunayInsertion.o: meshGRegionDelaunayInsertion.cpp \
   BackgroundMesh.h meshGRegionDelaunayInsertion.h ../Geo/MElement.h \
   ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/SPoint3.h \
@@ -320,27 +320,25 @@ DivideAndConquer.o: DivideAndConquer.cpp ../Common/Gmsh.h \
 BackgroundMesh.o: BackgroundMesh.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
   ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \
-  ../Post/Views.h ../Post/ColorTable.h ../Common/VertexArray.h \
-  ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
-  ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \
-  BackgroundMesh.h ../Common/Context.h ../Post/OctreePost.h \
-  ../Common/Octree.h ../Common/OctreeInternals.h ../Geo/GVertex.h \
-  ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
+  BackgroundMesh.h ../Numeric/Numeric.h ../Common/Context.h \
+  ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/GmshDefines.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/MElement.h ../Geo/MVertex.h \
-  ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h ../Common/Hash.h \
-  ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
-  ../Geo/ExtrudeParams.h ../Geo/GFace.h ../Geo/GPoint.h ../Geo/GEntity.h \
-  ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/MElement.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/ExtrudeParams.h ../Geo/GModel.h \
-  ../Geo/GVertex.h ../Geo/GEdge.h ../Geo/GFace.h ../Geo/GRegion.h \
-  ../Geo/GEntity.h ../Geo/MElement.h ../Geo/ExtrudeParams.h \
-  ../Geo/SBoundingBox3d.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 ../Geo/SPoint2.h \
-  ../Geo/ExtrudeParams.h
+  ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/MElement.h \
+  ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
+  ../Common/Hash.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
+  ../Geo/ExtrudeParams.h ../Common/SmoothData.h ../Geo/GFace.h \
+  ../Geo/GPoint.h ../Geo/GEntity.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \
+  ../Geo/MElement.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
+  ../Geo/ExtrudeParams.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEdge.h \
+  ../Geo/GFace.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/MElement.h \
+  ../Geo/ExtrudeParams.h ../Geo/SBoundingBox3d.h Field.h ../Post/PView.h \
+  ../Common/VertexArray.h ../Post/PViewData.h ../Post/PViewOptions.h \
+  ../Post/ColorTable.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 ../Geo/SPoint2.h ../Geo/ExtrudeParams.h \
+  ../Post/OctreePost.h ../Common/Octree.h ../Common/OctreeInternals.h
 BoundaryLayer.o: BoundaryLayer.cpp BoundaryLayer.h ../Geo/GModel.h \
   ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/GmshDefines.h \
@@ -355,9 +353,7 @@ BoundaryLayer.o: BoundaryLayer.cpp BoundaryLayer.h ../Geo/GModel.h \
   ../Geo/MElement.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
   ../Geo/ExtrudeParams.h ../Geo/GRegion.h ../Geo/GEntity.h \
   ../Geo/MElement.h ../Geo/ExtrudeParams.h ../Geo/SBoundingBox3d.h \
-  meshGEdge.h meshGFace.h ../Common/Message.h ../Post/Views.h \
-  ../Post/ColorTable.h ../Common/VertexArray.h ../Post/AdaptiveViews.h \
-  ../Common/GmshMatrix.h
+  meshGEdge.h meshGFace.h ../Common/Message.h
 BDS.o: BDS.cpp ../Numeric/Numeric.h ../Common/GmshMatrix.h BDS.h \
   ../Geo/GFace.h ../Geo/GPoint.h ../Geo/GEntity.h ../Geo/Range.h \
   ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
@@ -369,9 +365,9 @@ BDS.o: BDS.cpp ../Numeric/Numeric.h ../Common/GmshMatrix.h BDS.h \
   ../Common/Hash.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
   ../Common/Context.h ../DataStr/List.h ../Geo/ExtrudeParams.h \
   ../Common/SmoothData.h ../Geo/MElement.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/ExtrudeParams.h ../Post/Views.h \
-  ../Post/ColorTable.h ../Common/VertexArray.h ../Post/AdaptiveViews.h \
-  ../Common/Message.h
+  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/ExtrudeParams.h ../Post/PView.h \
+  ../Common/VertexArray.h ../Post/PViewData.h ../Post/PViewOptions.h \
+  ../Post/ColorTable.h ../Common/Message.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 ../Common/GmshDefines.h \
diff --git a/Parser/Gmsh.l b/Parser/Gmsh.l
index 7d8127d7291378c195df53fcddb1a1a3cbfde8d6..fb899f5ed2a8dae29bf51ef8355793cfc5f20eda 100644
--- a/Parser/Gmsh.l
+++ b/Parser/Gmsh.l
@@ -1,5 +1,5 @@
 %{
-// $Id: Gmsh.l,v 1.91 2007-09-05 10:11:30 geuzaine Exp $
+// $Id: Gmsh.l,v 1.92 2007-09-10 04:47:04 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -33,6 +33,7 @@
 char yyname[256] = "";
 int  yylineno = 1;
 int  yyerrorstate = 0;
+int  yyviewindex = 0;
 
 void   parsestring(char endchar);
 char  *strsave(char *ptr);
@@ -235,13 +236,12 @@ Today                   return tToday;
 Using                   return tUsing;
 
 Volume                  return tVolume;
-PostView			return tPostView;
+PostView                return tPostView;
 
 T2                      return tText2D;
 T3                      return tText3D;
 INTERPOLATION_SCHEME    return tInterpolationScheme;
 TIME                    return tTime;
-GRAIN                   return tGrain;
 
 {digit}+ |
 {digit}+"."{digit}*({exp})? |
diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp
index fa8d069602c6e29b2b66b7a1bafe6b4d003d96f4..72974b379438ee6b9d0d2c20b5028368e214eaf0 100644
--- a/Parser/Gmsh.tab.cpp
+++ b/Parser/Gmsh.tab.cpp
@@ -87,53 +87,52 @@
 #define	tText3D	337
 #define	tInterpolationScheme	338
 #define	tTime	339
-#define	tGrain	340
-#define	tCombine	341
-#define	tBSpline	342
-#define	tBezier	343
-#define	tNurbs	344
-#define	tOrder	345
-#define	tKnots	346
-#define	tColor	347
-#define	tColorTable	348
-#define	tFor	349
-#define	tIn	350
-#define	tEndFor	351
-#define	tIf	352
-#define	tEndIf	353
-#define	tExit	354
-#define	tField	355
-#define	tThreshold	356
-#define	tStructured	357
-#define	tLatLon	358
-#define	tGrad	359
-#define	tPostView	360
-#define	tReturn	361
-#define	tCall	362
-#define	tFunction	363
-#define	tShow	364
-#define	tHide	365
-#define	tGetValue	366
-#define	tGMSH_MAJOR_VERSION	367
-#define	tGMSH_MINOR_VERSION	368
-#define	tGMSH_PATCH_VERSION	369
-#define	tAFFECTPLUS	370
-#define	tAFFECTMINUS	371
-#define	tAFFECTTIMES	372
-#define	tAFFECTDIVIDE	373
-#define	tOR	374
-#define	tAND	375
-#define	tEQUAL	376
-#define	tNOTEQUAL	377
-#define	tLESSOREQUAL	378
-#define	tGREATEROREQUAL	379
-#define	tPLUSPLUS	380
-#define	tMINUSMINUS	381
-#define	UNARYPREC	382
+#define	tCombine	340
+#define	tBSpline	341
+#define	tBezier	342
+#define	tNurbs	343
+#define	tOrder	344
+#define	tKnots	345
+#define	tColor	346
+#define	tColorTable	347
+#define	tFor	348
+#define	tIn	349
+#define	tEndFor	350
+#define	tIf	351
+#define	tEndIf	352
+#define	tExit	353
+#define	tField	354
+#define	tThreshold	355
+#define	tStructured	356
+#define	tLatLon	357
+#define	tGrad	358
+#define	tPostView	359
+#define	tReturn	360
+#define	tCall	361
+#define	tFunction	362
+#define	tShow	363
+#define	tHide	364
+#define	tGetValue	365
+#define	tGMSH_MAJOR_VERSION	366
+#define	tGMSH_MINOR_VERSION	367
+#define	tGMSH_PATCH_VERSION	368
+#define	tAFFECTPLUS	369
+#define	tAFFECTMINUS	370
+#define	tAFFECTTIMES	371
+#define	tAFFECTDIVIDE	372
+#define	tOR	373
+#define	tAND	374
+#define	tEQUAL	375
+#define	tNOTEQUAL	376
+#define	tLESSOREQUAL	377
+#define	tGREATEROREQUAL	378
+#define	tPLUSPLUS	379
+#define	tMINUSMINUS	380
+#define	UNARYPREC	381
 
 #line 1 "Gmsh.y"
 
-// $Id: Gmsh.tab.cpp,v 1.331 2007-09-09 00:18:03 geuzaine Exp $
+// $Id: Gmsh.tab.cpp,v 1.332 2007-09-10 04:47:04 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -166,7 +165,8 @@
 #include "GeoInterpolation.h"
 #include "Generator.h"
 #include "Draw.h"
-#include "Views.h"
+#include "PView.h"
+#include "PViewDataList.h"
 #include "Options.h"
 #include "Colors.h"
 #include "Parser.h"
@@ -187,12 +187,10 @@ extern Mesh *THEM;
 
 static ExtrudeParams extr;
 
-static Post_View *View;
+static PViewDataList *ViewData;
 static List_T *ViewValueList;
 static double ViewCoord[100];
-static int *ViewNumList, ViewNumNodes, ViewNumComp, ViewNumListTmp;
-static int ViewCoordIdx, ViewElementIdx;
-static int ViewErrorFlags[VIEW_NB_ELEMENT_TYPES];
+static int *ViewNumList, ViewCoordIdx;
 
 #define MAX_RECUR_LOOPS 100
 static int ImbricatedLoop = 0;
@@ -206,9 +204,8 @@ void yyerror(char *s);
 void yymsg(int type, char *fmt, ...);
 void skip_until(char *skip, char *until);
 int PrintListOfDouble(char *format, List_T *list, char *buffer);
-int CheckViewErrorFlags(Post_View *v);
 
-#line 78 "Gmsh.y"
+#line 76 "Gmsh.y"
 typedef union {
   char *c;
   int i;
@@ -228,26 +225,26 @@ typedef union {
 
 
 
-#define	YYFINAL		1287
+#define	YYFINAL		1274
 #define	YYFLAG		-32768
-#define	YYNTBASE	149
+#define	YYNTBASE	148
 
-#define YYTRANSLATE(x) ((unsigned)(x) <= 382 ? yytranslate[x] : 217)
+#define YYTRANSLATE(x) ((unsigned)(x) <= 381 ? yytranslate[x] : 215)
 
 static const short yytranslate[] = {     0,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     2,     2,   134,     2,   144,     2,   133,     2,     2,   139,
-   140,   131,   129,   145,   130,   143,   132,     2,     2,     2,
-     2,     2,     2,     2,     2,     2,     2,     2,     2,   125,
-     2,   127,   120,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,   133,     2,   143,     2,   132,     2,     2,   138,
+   139,   130,   128,   144,   129,   142,   131,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,   124,
+     2,   126,   119,     2,     2,     2,     2,     2,     2,     2,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-   141,     2,   142,   138,     2,     2,     2,     2,     2,     2,
+   140,     2,   141,   137,     2,     2,     2,     2,     2,     2,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     2,     2,   146,     2,   147,   148,     2,     2,     2,     2,
+     2,     2,   145,     2,   146,   147,     2,     2,     2,     2,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
@@ -272,304 +269,302 @@ static const short yytranslate[] = {     0,
     87,    88,    89,    90,    91,    92,    93,    94,    95,    96,
     97,    98,    99,   100,   101,   102,   103,   104,   105,   106,
    107,   108,   109,   110,   111,   112,   113,   114,   115,   116,
-   117,   118,   119,   121,   122,   123,   124,   126,   128,   135,
-   136,   137
+   117,   118,   120,   121,   122,   123,   125,   127,   134,   135,
+   136
 };
 
 #if YYDEBUG != 0
 static const short yyprhs[] = {     0,
      0,     2,     5,     6,     9,    11,    13,    15,    17,    19,
     21,    23,    25,    27,    29,    31,    33,    35,    37,    39,
-    42,    48,    56,    64,    74,    81,    90,    97,   104,   105,
-   108,   111,   114,   117,   120,   123,   125,   129,   131,   135,
-   136,   137,   148,   150,   154,   155,   169,   171,   175,   176,
-   192,   201,   216,   217,   224,   231,   233,   235,   237,   239,
-   241,   243,   245,   250,   258,   268,   275,   282,   286,   293,
-   298,   305,   315,   322,   332,   338,   347,   356,   368,   375,
-   385,   395,   405,   407,   409,   417,   426,   436,   445,   454,
-   463,   472,   482,   491,   497,   504,   511,   518,   526,   534,
-   542,   552,   560,   570,   588,   596,   604,   616,   625,   634,
-   643,   652,   656,   661,   672,   680,   688,   697,   706,   715,
-   723,   732,   738,   750,   756,   766,   771,   781,   786,   788,
-   790,   791,   794,   801,   808,   815,   822,   827,   834,   838,
-   843,   849,   853,   857,   862,   867,   871,   879,   887,   891,
-   899,   903,   906,   909,   925,   928,   935,   944,   953,   964,
-   966,   969,   971,   975,   980,   982,   988,  1000,  1014,  1015,
-  1023,  1024,  1038,  1039,  1055,  1056,  1063,  1064,  1075,  1084,
-  1093,  1102,  1115,  1128,  1141,  1156,  1171,  1186,  1187,  1200,
-  1201,  1214,  1215,  1228,  1229,  1246,  1247,  1264,  1265,  1282,
-  1283,  1302,  1303,  1322,  1323,  1342,  1344,  1347,  1353,  1361,
-  1371,  1374,  1384,  1391,  1401,  1411,  1420,  1430,  1439,  1448,
-  1455,  1460,  1471,  1482,  1493,  1504,  1507,  1509,  1513,  1516,
-  1519,  1522,  1526,  1530,  1534,  1538,  1542,  1546,  1550,  1554,
-  1558,  1562,  1566,  1570,  1574,  1578,  1584,  1589,  1594,  1599,
-  1604,  1609,  1614,  1619,  1624,  1629,  1634,  1641,  1646,  1651,
-  1656,  1661,  1666,  1671,  1678,  1685,  1692,  1697,  1702,  1707,
-  1712,  1717,  1722,  1727,  1732,  1737,  1742,  1747,  1754,  1759,
-  1764,  1769,  1774,  1779,  1784,  1791,  1798,  1805,  1810,  1812,
-  1814,  1816,  1818,  1820,  1822,  1824,  1826,  1832,  1837,  1842,
-  1845,  1851,  1855,  1862,  1867,  1875,  1882,  1884,  1887,  1890,
-  1894,  1898,  1910,  1920,  1928,  1936,  1938,  1942,  1944,  1946,
-  1949,  1953,  1958,  1964,  1967,  1971,  1975,  1981,  1986,  1988,
-  1990,  1994,  2001,  2003,  2005,  2009,  2013,  2023,  2031,  2033,
-  2039,  2043,  2050,  2052,  2056,  2058,  2060,  2062,  2064,  2071,
-  2076,  2081,  2086,  2093,  2100
+    42,    48,    56,    64,    74,    81,    88,    95,    96,    99,
+   102,   105,   108,   111,   113,   117,   119,   123,   124,   125,
+   136,   138,   142,   143,   157,   159,   163,   164,   180,   189,
+   204,   205,   212,   214,   216,   218,   220,   222,   224,   226,
+   231,   239,   249,   256,   263,   267,   274,   279,   286,   296,
+   303,   313,   319,   328,   337,   349,   356,   366,   376,   386,
+   388,   390,   398,   407,   417,   426,   435,   444,   453,   463,
+   472,   478,   485,   492,   499,   507,   515,   523,   533,   541,
+   551,   569,   577,   585,   597,   606,   615,   624,   633,   637,
+   642,   653,   661,   669,   678,   687,   696,   704,   713,   719,
+   731,   737,   747,   752,   762,   767,   769,   771,   772,   775,
+   782,   789,   796,   803,   808,   815,   819,   824,   830,   834,
+   838,   843,   848,   852,   860,   868,   872,   880,   884,   887,
+   890,   906,   909,   916,   925,   934,   945,   947,   950,   952,
+   956,   961,   963,   969,   981,   995,   996,  1004,  1005,  1019,
+  1020,  1036,  1037,  1044,  1045,  1056,  1065,  1074,  1083,  1096,
+  1109,  1122,  1137,  1152,  1167,  1168,  1181,  1182,  1195,  1196,
+  1209,  1210,  1227,  1228,  1245,  1246,  1263,  1264,  1283,  1284,
+  1303,  1304,  1323,  1325,  1328,  1334,  1342,  1352,  1355,  1365,
+  1372,  1382,  1392,  1401,  1411,  1420,  1429,  1436,  1441,  1452,
+  1463,  1474,  1485,  1488,  1490,  1494,  1497,  1500,  1503,  1507,
+  1511,  1515,  1519,  1523,  1527,  1531,  1535,  1539,  1543,  1547,
+  1551,  1555,  1559,  1565,  1570,  1575,  1580,  1585,  1590,  1595,
+  1600,  1605,  1610,  1615,  1622,  1627,  1632,  1637,  1642,  1647,
+  1652,  1659,  1666,  1673,  1678,  1683,  1688,  1693,  1698,  1703,
+  1708,  1713,  1718,  1723,  1728,  1735,  1740,  1745,  1750,  1755,
+  1760,  1765,  1772,  1779,  1786,  1791,  1793,  1795,  1797,  1799,
+  1801,  1803,  1805,  1807,  1813,  1818,  1823,  1826,  1832,  1836,
+  1843,  1848,  1856,  1863,  1865,  1868,  1871,  1875,  1879,  1891,
+  1901,  1909,  1917,  1919,  1923,  1925,  1927,  1930,  1934,  1939,
+  1945,  1948,  1952,  1956,  1962,  1967,  1969,  1971,  1975,  1982,
+  1984,  1986,  1990,  1994,  2004,  2012,  2014,  2020,  2024,  2031,
+  2033,  2037,  2039,  2041,  2043,  2045,  2052,  2057,  2062,  2067,
+  2074,  2081
 };
 
-static const short yyrhs[] = {   150,
-     0,     1,     6,     0,     0,   150,   151,     0,   154,     0,
-   153,     0,   173,     0,   175,     0,   176,     0,   179,     0,
-   180,     0,   181,     0,   184,     0,   201,     0,   202,     0,
-   203,     0,   183,     0,   182,     0,   127,     0,   127,   127,
-     0,    35,   139,     5,   140,     6,     0,    35,   139,     5,
-   140,   152,   215,     6,     0,    35,   139,     5,   145,   211,
-   140,     6,     0,    35,   139,     5,   145,   211,   140,   152,
-   215,     6,     0,     4,     5,   146,   155,   147,     6,     0,
-     4,     5,     4,   206,   146,   155,   147,     6,     0,    80,
-     4,   141,   204,   142,     6,     0,    81,     4,   141,   204,
-   142,     6,     0,     0,   155,   158,     0,   155,   162,     0,
-   155,   165,     0,   155,   167,     0,   155,   168,     0,   155,
-   170,     0,   204,     0,   156,   145,   204,     0,   204,     0,
-   157,   145,   204,     0,     0,     0,     4,   159,   139,   156,
-   140,   160,   146,   157,   147,     6,     0,   215,     0,   161,
-   145,   215,     0,     0,    82,   139,   204,   145,   204,   145,
-   204,   140,   163,   146,   161,   147,     6,     0,   215,     0,
-   164,   145,   215,     0,     0,    83,   139,   204,   145,   204,
-   145,   204,   145,   204,   140,   166,   146,   164,   147,     6,
-     0,    84,   146,   208,   147,   146,   208,   147,     6,     0,
-    84,   146,   208,   147,   146,   208,   147,   146,   208,   147,
-   146,   208,   147,     6,     0,     0,    85,   169,   146,   157,
-   147,     6,     0,    86,   139,   204,   140,   209,     6,     0,
-     7,     0,   116,     0,   117,     0,   118,     0,   119,     0,
-   135,     0,   136,     0,     4,   171,   204,     6,     0,     4,
-   141,   204,   142,   171,   204,     6,     0,     4,   141,   146,
-   211,   147,   142,   171,   209,     6,     0,     4,   141,   142,
-     7,   209,     6,     0,     4,   141,   142,   116,   209,     6,
-     0,     4,   172,     6,     0,     4,   141,   204,   142,   172,
-     6,     0,     4,     7,   216,     6,     0,     4,   143,     4,
-     7,   216,     6,     0,     4,   141,   204,   142,   143,     4,
-     7,   216,     6,     0,     4,   143,     4,   171,   204,     6,
-     0,     4,   141,   204,   142,   143,     4,   171,   204,     6,
-     0,     4,   143,     4,   172,     6,     0,     4,   141,   204,
-   142,   143,     4,   172,     6,     0,     4,   143,    93,   143,
-     4,     7,   212,     6,     0,     4,   141,   204,   142,   143,
-    93,   143,     4,     7,   212,     6,     0,     4,   143,    94,
-     7,   213,     6,     0,     4,   141,   204,   142,   143,    94,
-     7,   213,     6,     0,    64,   139,     4,   140,   143,     4,
-     7,   204,     6,     0,    64,   139,     4,   140,   143,     4,
-     7,   216,     6,     0,   204,     0,   216,     0,    43,   139,
-   204,   140,     7,   206,     6,     0,    60,    43,   139,   174,
-   140,     7,   209,     6,     0,    77,    43,   101,   139,   204,
-   140,     7,   209,     6,     0,   104,   101,   139,   204,   140,
-     7,   204,     6,     0,   106,   101,   139,   204,   140,     7,
-   204,     6,     0,   102,   101,   139,   204,   140,     7,   209,
-     6,     0,   109,   101,   139,   204,   140,     7,     5,     6,
-     0,   109,   101,   139,   204,   140,     7,     5,   209,     6,
-     0,   103,   101,   139,   204,   140,     7,     5,     6,     0,
-    52,    53,   101,   209,     6,     0,    77,    43,   209,     7,
-   209,     6,     0,    77,    46,   209,     7,   209,     6,     0,
-    52,    53,   209,     7,   204,     6,     0,    46,   139,   204,
-   140,     7,   209,     6,     0,    50,   139,   204,   140,     7,
-   209,     6,     0,    44,   139,   204,   140,     7,   209,     6,
-     0,    44,   139,   204,   140,     7,   209,    56,   206,     6,
-     0,    45,   139,   204,   140,     7,   209,     6,     0,    45,
-   139,   204,   140,     7,   209,    56,   206,     6,     0,    54,
-   139,   204,   140,     7,   146,   204,   145,   204,   145,     5,
-   145,     5,   145,     5,   147,     6,     0,    88,   139,   204,
-   140,     7,   209,     6,     0,    89,   139,   204,   140,     7,
-   209,     6,     0,    90,   139,   204,   140,     7,   209,    92,
-   209,    91,   204,     6,     0,    46,    71,   139,   204,   140,
-     7,   209,     6,     0,    60,    46,   139,   174,   140,     7,
-   209,     6,     0,    56,    49,   139,   204,   140,     7,   209,
-     6,     0,    57,    49,   139,   204,   140,     7,   209,     6,
-     0,    12,    13,     6,     0,    13,    49,   204,     6,     0,
-    54,    49,   139,   204,   140,     7,     5,     5,     5,     6,
-     0,    47,   139,   204,   140,     7,   209,     6,     0,    48,
-   139,   204,   140,     7,   209,     6,     0,    49,    71,   139,
-   204,   140,     7,   209,     6,     0,    60,    49,   139,   174,
-   140,     7,   209,     6,     0,    59,    51,   139,   204,   140,
-     7,   209,     6,     0,    51,   139,   204,   140,     7,   209,
-     6,     0,    60,    51,   139,   174,   140,     7,   209,     6,
-     0,    66,   206,   146,   177,   147,     0,    65,   146,   206,
-   145,   206,   145,   204,   147,   146,   177,   147,     0,    67,
-   206,   146,   177,   147,     0,    68,   146,   206,   145,   204,
-   147,   146,   177,   147,     0,    70,   146,   177,   147,     0,
-    75,    46,   146,   211,   147,    49,   146,   204,   147,     0,
-    76,   146,   177,   147,     0,   178,     0,   176,     0,     0,
-   178,   175,     0,   178,    43,   146,   211,   147,     6,     0,
-   178,    46,   146,   211,   147,     6,     0,   178,    49,   146,
-   211,   147,     6,     0,   178,    51,   146,   211,   147,     6,
-     0,    73,   146,   178,   147,     0,    73,     4,   141,   204,
-   142,     6,     0,    73,     4,     6,     0,    73,     4,     4,
-     6,     0,    93,   212,   146,   178,   147,     0,   110,   215,
-     6,     0,   111,   215,     6,     0,   110,   146,   178,   147,
-     0,   111,   146,   178,   147,     0,     4,   216,     6,     0,
-     4,     4,   141,   204,   142,   215,     6,     0,     4,     4,
-     4,   141,   204,   142,     6,     0,     4,   204,     6,     0,
-    64,   139,     4,   140,   143,     4,     6,     0,    87,     4,
-     6,     0,   100,     6,     0,    40,     6,     0,    40,   146,
-   204,   145,   204,   145,   204,   145,   204,   145,   204,   145,
-   204,   147,     6,     0,    41,     6,     0,    95,   139,   204,
-     8,   204,   140,     0,    95,   139,   204,     8,   204,     8,
-   204,   140,     0,    95,     4,    96,   146,   204,     8,   204,
-   147,     0,    95,     4,    96,   146,   204,     8,   204,     8,
-   204,   147,     0,    97,     0,   109,     4,     0,   107,     0,
-   108,     4,     6,     0,    98,   139,   204,   140,     0,    99,
-     0,    69,   206,   146,   178,   147,     0,    69,   146,   206,
-   145,   206,   145,   204,   147,   146,   178,   147,     0,    69,
-   146,   206,   145,   206,   145,   206,   145,   204,   147,   146,
-   178,   147,     0,     0,    69,   206,   146,   178,   185,   199,
-   147,     0,     0,    69,   146,   206,   145,   206,   145,   204,
-   147,   146,   178,   186,   199,   147,     0,     0,    69,   146,
-   206,   145,   206,   145,   206,   145,   204,   147,   146,   178,
-   187,   199,   147,     0,     0,    69,   146,   178,   188,   199,
-   147,     0,     0,    69,     4,   141,   204,   142,   146,   178,
-   189,   199,   147,     0,    69,    43,   146,   204,   145,   206,
-   147,     6,     0,    69,    46,   146,   204,   145,   206,   147,
-     6,     0,    69,    49,   146,   204,   145,   206,   147,     6,
-     0,    69,    43,   146,   204,   145,   206,   145,   206,   145,
-   204,   147,     6,     0,    69,    46,   146,   204,   145,   206,
-   145,   206,   145,   204,   147,     6,     0,    69,    49,   146,
-   204,   145,   206,   145,   206,   145,   204,   147,     6,     0,
-    69,    43,   146,   204,   145,   206,   145,   206,   145,   206,
-   145,   204,   147,     6,     0,    69,    46,   146,   204,   145,
-   206,   145,   206,   145,   206,   145,   204,   147,     6,     0,
-    69,    49,   146,   204,   145,   206,   145,   206,   145,   206,
-   145,   204,   147,     6,     0,     0,    69,    43,   146,   204,
-   145,   206,   147,   190,   146,   199,   147,     6,     0,     0,
-    69,    46,   146,   204,   145,   206,   147,   191,   146,   199,
-   147,     6,     0,     0,    69,    49,   146,   204,   145,   206,
-   147,   192,   146,   199,   147,     6,     0,     0,    69,    43,
-   146,   204,   145,   206,   145,   206,   145,   204,   147,   193,
-   146,   199,   147,     6,     0,     0,    69,    46,   146,   204,
-   145,   206,   145,   206,   145,   204,   147,   194,   146,   199,
-   147,     6,     0,     0,    69,    49,   146,   204,   145,   206,
-   145,   206,   145,   204,   147,   195,   146,   199,   147,     6,
-     0,     0,    69,    43,   146,   204,   145,   206,   145,   206,
-   145,   206,   145,   204,   147,   196,   146,   199,   147,     6,
-     0,     0,    69,    46,   146,   204,   145,   206,   145,   206,
-   145,   206,   145,   204,   147,   197,   146,   199,   147,     6,
-     0,     0,    69,    49,   146,   204,   145,   206,   145,   206,
-   145,   206,   145,   204,   147,   198,   146,   199,   147,     6,
-     0,   200,     0,   199,   200,     0,    78,   146,   204,   147,
-     6,     0,    78,   146,   209,   145,   209,   147,     6,     0,
-    78,   146,   209,   145,   209,   145,   209,   147,     6,     0,
-    72,     6,     0,    79,   139,   204,   140,     7,   209,    61,
-   204,     6,     0,    58,    46,   209,     7,   204,     6,     0,
-    58,    46,   209,     7,   204,    61,    63,   204,     6,     0,
-    58,    46,   209,     7,   204,    61,    62,   204,     6,     0,
-    58,    49,   146,   204,   147,     7,   209,     6,     0,    58,
-    49,   146,   204,   147,     7,   209,     4,     6,     0,    55,
-    49,   146,   204,   147,     7,   209,     6,     0,    58,    51,
-   146,   204,   147,     7,   209,     6,     0,    72,    49,   209,
-     7,   204,     6,     0,    72,    49,   209,     6,     0,    43,
-   146,   211,   147,    96,    49,   146,   204,   147,     6,     0,
-    46,   146,   211,   147,    96,    49,   146,   204,   147,     6,
-     0,    46,   146,   211,   147,    96,    51,   146,   204,   147,
-     6,     0,    49,   146,   211,   147,    96,    51,   146,   204,
-   147,     6,     0,    74,     6,     0,   205,     0,   139,   204,
-   140,     0,   130,   204,     0,   129,   204,     0,   134,   204,
-     0,   204,   130,   204,     0,   204,   129,   204,     0,   204,
-   131,   204,     0,   204,   132,   204,     0,   204,   133,   204,
-     0,   204,   138,   204,     0,   204,   125,   204,     0,   204,
-   127,   204,     0,   204,   126,   204,     0,   204,   128,   204,
-     0,   204,   123,   204,     0,   204,   124,   204,     0,   204,
-   122,   204,     0,   204,   121,   204,     0,   204,   120,   204,
-     8,   204,     0,    14,   139,   204,   140,     0,    15,   139,
-   204,   140,     0,    16,   139,   204,   140,     0,    17,   139,
-   204,   140,     0,    18,   139,   204,   140,     0,    19,   139,
-   204,   140,     0,    20,   139,   204,   140,     0,    21,   139,
-   204,   140,     0,    22,   139,   204,   140,     0,    24,   139,
-   204,   140,     0,    25,   139,   204,   145,   204,   140,     0,
-    26,   139,   204,   140,     0,    27,   139,   204,   140,     0,
-    28,   139,   204,   140,     0,    29,   139,   204,   140,     0,
-    30,   139,   204,   140,     0,    31,   139,   204,   140,     0,
-    32,   139,   204,   145,   204,   140,     0,    33,   139,   204,
-   145,   204,   140,     0,    34,   139,   204,   145,   204,   140,
-     0,    23,   139,   204,   140,     0,    14,   141,   204,   142,
-     0,    15,   141,   204,   142,     0,    16,   141,   204,   142,
-     0,    17,   141,   204,   142,     0,    18,   141,   204,   142,
-     0,    19,   141,   204,   142,     0,    20,   141,   204,   142,
-     0,    21,   141,   204,   142,     0,    22,   141,   204,   142,
-     0,    24,   141,   204,   142,     0,    25,   141,   204,   145,
-   204,   142,     0,    26,   141,   204,   142,     0,    27,   141,
-   204,   142,     0,    28,   141,   204,   142,     0,    29,   141,
-   204,   142,     0,    30,   141,   204,   142,     0,    31,   141,
-   204,   142,     0,    32,   141,   204,   145,   204,   142,     0,
-    33,   141,   204,   145,   204,   142,     0,    34,   141,   204,
-   145,   204,   142,     0,    23,   141,   204,   142,     0,     3,
-     0,     9,     0,    10,     0,    11,     0,   113,     0,   114,
-     0,   115,     0,     4,     0,     4,   148,   146,   204,   147,
-     0,     4,   141,   204,   142,     0,   144,     4,   141,   142,
-     0,     4,   172,     0,     4,   141,   204,   142,   172,     0,
-     4,   143,     4,     0,     4,   141,   204,   142,   143,     4,
-     0,     4,   143,     4,   172,     0,     4,   141,   204,   142,
-   143,     4,   172,     0,   112,   139,     5,   145,   204,   140,
-     0,   207,     0,   130,   206,     0,   129,   206,     0,   206,
-   130,   206,     0,   206,   129,   206,     0,   146,   204,   145,
-   204,   145,   204,   145,   204,   145,   204,   147,     0,   146,
-   204,   145,   204,   145,   204,   145,   204,   147,     0,   146,
-   204,   145,   204,   145,   204,   147,     0,   139,   204,   145,
-   204,   145,   204,   140,     0,   209,     0,   208,   145,   209,
-     0,   204,     0,   210,     0,   146,   147,     0,   146,   211,
-   147,     0,   130,   146,   211,   147,     0,   204,   131,   146,
-   211,   147,     0,   130,   210,     0,   204,   131,   210,     0,
-   204,     8,   204,     0,   204,     8,   204,     8,   204,     0,
-    43,   146,   204,   147,     0,   176,     0,   184,     0,     4,
-   141,   142,     0,     4,   141,   146,   211,   147,   142,     0,
-   204,     0,   210,     0,   211,   145,   204,     0,   211,   145,
-   210,     0,   146,   204,   145,   204,   145,   204,   145,   204,
-   147,     0,   146,   204,   145,   204,   145,   204,   147,     0,
-     4,     0,     4,   143,    93,   143,     4,     0,   146,   214,
-   147,     0,     4,   141,   204,   142,   143,    94,     0,   212,
-     0,   214,   145,   212,     0,   216,     0,     4,     0,     5,
-     0,    42,     0,    37,   139,   215,   145,   215,   140,     0,
-    38,   139,   215,   140,     0,    39,   139,   215,   140,     0,
-    36,   139,   215,   140,     0,    36,   139,   215,   145,   211,
-   140,     0,    36,   139,     4,   143,     4,   140,     0,    36,
-   139,     4,   141,   204,   142,   143,     4,   140,     0
+static const short yyrhs[] = {   149,
+     0,     1,     6,     0,     0,   149,   150,     0,   153,     0,
+   152,     0,   171,     0,   173,     0,   174,     0,   177,     0,
+   178,     0,   179,     0,   182,     0,   199,     0,   200,     0,
+   201,     0,   181,     0,   180,     0,   126,     0,   126,   126,
+     0,    35,   138,     5,   139,     6,     0,    35,   138,     5,
+   139,   151,   213,     6,     0,    35,   138,     5,   144,   209,
+   139,     6,     0,    35,   138,     5,   144,   209,   139,   151,
+   213,     6,     0,     4,     5,   145,   154,   146,     6,     0,
+    80,     4,   140,   202,   141,     6,     0,    81,     4,   140,
+   202,   141,     6,     0,     0,   154,   157,     0,   154,   161,
+     0,   154,   164,     0,   154,   166,     0,   154,   167,     0,
+   202,     0,   155,   144,   202,     0,   202,     0,   156,   144,
+   202,     0,     0,     0,     4,   158,   138,   155,   139,   159,
+   145,   156,   146,     6,     0,   213,     0,   160,   144,   213,
+     0,     0,    82,   138,   202,   144,   202,   144,   202,   139,
+   162,   145,   160,   146,     6,     0,   213,     0,   163,   144,
+   213,     0,     0,    83,   138,   202,   144,   202,   144,   202,
+   144,   202,   139,   165,   145,   163,   146,     6,     0,    84,
+   145,   206,   146,   145,   206,   146,     6,     0,    84,   145,
+   206,   146,   145,   206,   146,   145,   206,   146,   145,   206,
+   146,     6,     0,     0,    85,   168,   145,   156,   146,     6,
+     0,     7,     0,   115,     0,   116,     0,   117,     0,   118,
+     0,   134,     0,   135,     0,     4,   169,   202,     6,     0,
+     4,   140,   202,   141,   169,   202,     6,     0,     4,   140,
+   145,   209,   146,   141,   169,   207,     6,     0,     4,   140,
+   141,     7,   207,     6,     0,     4,   140,   141,   115,   207,
+     6,     0,     4,   170,     6,     0,     4,   140,   202,   141,
+   170,     6,     0,     4,     7,   214,     6,     0,     4,   142,
+     4,     7,   214,     6,     0,     4,   140,   202,   141,   142,
+     4,     7,   214,     6,     0,     4,   142,     4,   169,   202,
+     6,     0,     4,   140,   202,   141,   142,     4,   169,   202,
+     6,     0,     4,   142,     4,   170,     6,     0,     4,   140,
+   202,   141,   142,     4,   170,     6,     0,     4,   142,    92,
+   142,     4,     7,   210,     6,     0,     4,   140,   202,   141,
+   142,    92,   142,     4,     7,   210,     6,     0,     4,   142,
+    93,     7,   211,     6,     0,     4,   140,   202,   141,   142,
+    93,     7,   211,     6,     0,    64,   138,     4,   139,   142,
+     4,     7,   202,     6,     0,    64,   138,     4,   139,   142,
+     4,     7,   214,     6,     0,   202,     0,   214,     0,    43,
+   138,   202,   139,     7,   204,     6,     0,    60,    43,   138,
+   172,   139,     7,   207,     6,     0,    77,    43,   100,   138,
+   202,   139,     7,   207,     6,     0,   103,   100,   138,   202,
+   139,     7,   202,     6,     0,   105,   100,   138,   202,   139,
+     7,   202,     6,     0,   101,   100,   138,   202,   139,     7,
+   207,     6,     0,   108,   100,   138,   202,   139,     7,     5,
+     6,     0,   108,   100,   138,   202,   139,     7,     5,   207,
+     6,     0,   102,   100,   138,   202,   139,     7,     5,     6,
+     0,    52,    53,   100,   207,     6,     0,    77,    43,   207,
+     7,   207,     6,     0,    77,    46,   207,     7,   207,     6,
+     0,    52,    53,   207,     7,   202,     6,     0,    46,   138,
+   202,   139,     7,   207,     6,     0,    50,   138,   202,   139,
+     7,   207,     6,     0,    44,   138,   202,   139,     7,   207,
+     6,     0,    44,   138,   202,   139,     7,   207,    56,   204,
+     6,     0,    45,   138,   202,   139,     7,   207,     6,     0,
+    45,   138,   202,   139,     7,   207,    56,   204,     6,     0,
+    54,   138,   202,   139,     7,   145,   202,   144,   202,   144,
+     5,   144,     5,   144,     5,   146,     6,     0,    87,   138,
+   202,   139,     7,   207,     6,     0,    88,   138,   202,   139,
+     7,   207,     6,     0,    89,   138,   202,   139,     7,   207,
+    91,   207,    90,   202,     6,     0,    46,    71,   138,   202,
+   139,     7,   207,     6,     0,    60,    46,   138,   172,   139,
+     7,   207,     6,     0,    56,    49,   138,   202,   139,     7,
+   207,     6,     0,    57,    49,   138,   202,   139,     7,   207,
+     6,     0,    12,    13,     6,     0,    13,    49,   202,     6,
+     0,    54,    49,   138,   202,   139,     7,     5,     5,     5,
+     6,     0,    47,   138,   202,   139,     7,   207,     6,     0,
+    48,   138,   202,   139,     7,   207,     6,     0,    49,    71,
+   138,   202,   139,     7,   207,     6,     0,    60,    49,   138,
+   172,   139,     7,   207,     6,     0,    59,    51,   138,   202,
+   139,     7,   207,     6,     0,    51,   138,   202,   139,     7,
+   207,     6,     0,    60,    51,   138,   172,   139,     7,   207,
+     6,     0,    66,   204,   145,   175,   146,     0,    65,   145,
+   204,   144,   204,   144,   202,   146,   145,   175,   146,     0,
+    67,   204,   145,   175,   146,     0,    68,   145,   204,   144,
+   202,   146,   145,   175,   146,     0,    70,   145,   175,   146,
+     0,    75,    46,   145,   209,   146,    49,   145,   202,   146,
+     0,    76,   145,   175,   146,     0,   176,     0,   174,     0,
+     0,   176,   173,     0,   176,    43,   145,   209,   146,     6,
+     0,   176,    46,   145,   209,   146,     6,     0,   176,    49,
+   145,   209,   146,     6,     0,   176,    51,   145,   209,   146,
+     6,     0,    73,   145,   176,   146,     0,    73,     4,   140,
+   202,   141,     6,     0,    73,     4,     6,     0,    73,     4,
+     4,     6,     0,    92,   210,   145,   176,   146,     0,   109,
+   213,     6,     0,   110,   213,     6,     0,   109,   145,   176,
+   146,     0,   110,   145,   176,   146,     0,     4,   214,     6,
+     0,     4,     4,   140,   202,   141,   213,     6,     0,     4,
+     4,     4,   140,   202,   141,     6,     0,     4,   202,     6,
+     0,    64,   138,     4,   139,   142,     4,     6,     0,    86,
+     4,     6,     0,    99,     6,     0,    40,     6,     0,    40,
+   145,   202,   144,   202,   144,   202,   144,   202,   144,   202,
+   144,   202,   146,     6,     0,    41,     6,     0,    94,   138,
+   202,     8,   202,   139,     0,    94,   138,   202,     8,   202,
+     8,   202,   139,     0,    94,     4,    95,   145,   202,     8,
+   202,   146,     0,    94,     4,    95,   145,   202,     8,   202,
+     8,   202,   146,     0,    96,     0,   108,     4,     0,   106,
+     0,   107,     4,     6,     0,    97,   138,   202,   139,     0,
+    98,     0,    69,   204,   145,   176,   146,     0,    69,   145,
+   204,   144,   204,   144,   202,   146,   145,   176,   146,     0,
+    69,   145,   204,   144,   204,   144,   204,   144,   202,   146,
+   145,   176,   146,     0,     0,    69,   204,   145,   176,   183,
+   197,   146,     0,     0,    69,   145,   204,   144,   204,   144,
+   202,   146,   145,   176,   184,   197,   146,     0,     0,    69,
+   145,   204,   144,   204,   144,   204,   144,   202,   146,   145,
+   176,   185,   197,   146,     0,     0,    69,   145,   176,   186,
+   197,   146,     0,     0,    69,     4,   140,   202,   141,   145,
+   176,   187,   197,   146,     0,    69,    43,   145,   202,   144,
+   204,   146,     6,     0,    69,    46,   145,   202,   144,   204,
+   146,     6,     0,    69,    49,   145,   202,   144,   204,   146,
+     6,     0,    69,    43,   145,   202,   144,   204,   144,   204,
+   144,   202,   146,     6,     0,    69,    46,   145,   202,   144,
+   204,   144,   204,   144,   202,   146,     6,     0,    69,    49,
+   145,   202,   144,   204,   144,   204,   144,   202,   146,     6,
+     0,    69,    43,   145,   202,   144,   204,   144,   204,   144,
+   204,   144,   202,   146,     6,     0,    69,    46,   145,   202,
+   144,   204,   144,   204,   144,   204,   144,   202,   146,     6,
+     0,    69,    49,   145,   202,   144,   204,   144,   204,   144,
+   204,   144,   202,   146,     6,     0,     0,    69,    43,   145,
+   202,   144,   204,   146,   188,   145,   197,   146,     6,     0,
+     0,    69,    46,   145,   202,   144,   204,   146,   189,   145,
+   197,   146,     6,     0,     0,    69,    49,   145,   202,   144,
+   204,   146,   190,   145,   197,   146,     6,     0,     0,    69,
+    43,   145,   202,   144,   204,   144,   204,   144,   202,   146,
+   191,   145,   197,   146,     6,     0,     0,    69,    46,   145,
+   202,   144,   204,   144,   204,   144,   202,   146,   192,   145,
+   197,   146,     6,     0,     0,    69,    49,   145,   202,   144,
+   204,   144,   204,   144,   202,   146,   193,   145,   197,   146,
+     6,     0,     0,    69,    43,   145,   202,   144,   204,   144,
+   204,   144,   204,   144,   202,   146,   194,   145,   197,   146,
+     6,     0,     0,    69,    46,   145,   202,   144,   204,   144,
+   204,   144,   204,   144,   202,   146,   195,   145,   197,   146,
+     6,     0,     0,    69,    49,   145,   202,   144,   204,   144,
+   204,   144,   204,   144,   202,   146,   196,   145,   197,   146,
+     6,     0,   198,     0,   197,   198,     0,    78,   145,   202,
+   146,     6,     0,    78,   145,   207,   144,   207,   146,     6,
+     0,    78,   145,   207,   144,   207,   144,   207,   146,     6,
+     0,    72,     6,     0,    79,   138,   202,   139,     7,   207,
+    61,   202,     6,     0,    58,    46,   207,     7,   202,     6,
+     0,    58,    46,   207,     7,   202,    61,    63,   202,     6,
+     0,    58,    46,   207,     7,   202,    61,    62,   202,     6,
+     0,    58,    49,   145,   202,   146,     7,   207,     6,     0,
+    58,    49,   145,   202,   146,     7,   207,     4,     6,     0,
+    55,    49,   145,   202,   146,     7,   207,     6,     0,    58,
+    51,   145,   202,   146,     7,   207,     6,     0,    72,    49,
+   207,     7,   202,     6,     0,    72,    49,   207,     6,     0,
+    43,   145,   209,   146,    95,    49,   145,   202,   146,     6,
+     0,    46,   145,   209,   146,    95,    49,   145,   202,   146,
+     6,     0,    46,   145,   209,   146,    95,    51,   145,   202,
+   146,     6,     0,    49,   145,   209,   146,    95,    51,   145,
+   202,   146,     6,     0,    74,     6,     0,   203,     0,   138,
+   202,   139,     0,   129,   202,     0,   128,   202,     0,   133,
+   202,     0,   202,   129,   202,     0,   202,   128,   202,     0,
+   202,   130,   202,     0,   202,   131,   202,     0,   202,   132,
+   202,     0,   202,   137,   202,     0,   202,   124,   202,     0,
+   202,   126,   202,     0,   202,   125,   202,     0,   202,   127,
+   202,     0,   202,   122,   202,     0,   202,   123,   202,     0,
+   202,   121,   202,     0,   202,   120,   202,     0,   202,   119,
+   202,     8,   202,     0,    14,   138,   202,   139,     0,    15,
+   138,   202,   139,     0,    16,   138,   202,   139,     0,    17,
+   138,   202,   139,     0,    18,   138,   202,   139,     0,    19,
+   138,   202,   139,     0,    20,   138,   202,   139,     0,    21,
+   138,   202,   139,     0,    22,   138,   202,   139,     0,    24,
+   138,   202,   139,     0,    25,   138,   202,   144,   202,   139,
+     0,    26,   138,   202,   139,     0,    27,   138,   202,   139,
+     0,    28,   138,   202,   139,     0,    29,   138,   202,   139,
+     0,    30,   138,   202,   139,     0,    31,   138,   202,   139,
+     0,    32,   138,   202,   144,   202,   139,     0,    33,   138,
+   202,   144,   202,   139,     0,    34,   138,   202,   144,   202,
+   139,     0,    23,   138,   202,   139,     0,    14,   140,   202,
+   141,     0,    15,   140,   202,   141,     0,    16,   140,   202,
+   141,     0,    17,   140,   202,   141,     0,    18,   140,   202,
+   141,     0,    19,   140,   202,   141,     0,    20,   140,   202,
+   141,     0,    21,   140,   202,   141,     0,    22,   140,   202,
+   141,     0,    24,   140,   202,   141,     0,    25,   140,   202,
+   144,   202,   141,     0,    26,   140,   202,   141,     0,    27,
+   140,   202,   141,     0,    28,   140,   202,   141,     0,    29,
+   140,   202,   141,     0,    30,   140,   202,   141,     0,    31,
+   140,   202,   141,     0,    32,   140,   202,   144,   202,   141,
+     0,    33,   140,   202,   144,   202,   141,     0,    34,   140,
+   202,   144,   202,   141,     0,    23,   140,   202,   141,     0,
+     3,     0,     9,     0,    10,     0,    11,     0,   112,     0,
+   113,     0,   114,     0,     4,     0,     4,   147,   145,   202,
+   146,     0,     4,   140,   202,   141,     0,   143,     4,   140,
+   141,     0,     4,   170,     0,     4,   140,   202,   141,   170,
+     0,     4,   142,     4,     0,     4,   140,   202,   141,   142,
+     4,     0,     4,   142,     4,   170,     0,     4,   140,   202,
+   141,   142,     4,   170,     0,   111,   138,     5,   144,   202,
+   139,     0,   205,     0,   129,   204,     0,   128,   204,     0,
+   204,   129,   204,     0,   204,   128,   204,     0,   145,   202,
+   144,   202,   144,   202,   144,   202,   144,   202,   146,     0,
+   145,   202,   144,   202,   144,   202,   144,   202,   146,     0,
+   145,   202,   144,   202,   144,   202,   146,     0,   138,   202,
+   144,   202,   144,   202,   139,     0,   207,     0,   206,   144,
+   207,     0,   202,     0,   208,     0,   145,   146,     0,   145,
+   209,   146,     0,   129,   145,   209,   146,     0,   202,   130,
+   145,   209,   146,     0,   129,   208,     0,   202,   130,   208,
+     0,   202,     8,   202,     0,   202,     8,   202,     8,   202,
+     0,    43,   145,   202,   146,     0,   174,     0,   182,     0,
+     4,   140,   141,     0,     4,   140,   145,   209,   146,   141,
+     0,   202,     0,   208,     0,   209,   144,   202,     0,   209,
+   144,   208,     0,   145,   202,   144,   202,   144,   202,   144,
+   202,   146,     0,   145,   202,   144,   202,   144,   202,   146,
+     0,     4,     0,     4,   142,    92,   142,     4,     0,   145,
+   212,   146,     0,     4,   140,   202,   141,   142,    93,     0,
+   210,     0,   212,   144,   210,     0,   214,     0,     4,     0,
+     5,     0,    42,     0,    37,   138,   213,   144,   213,   139,
+     0,    38,   138,   213,   139,     0,    39,   138,   213,   139,
+     0,    36,   138,   213,   139,     0,    36,   138,   213,   144,
+   209,   139,     0,    36,   138,     4,   142,     4,   139,     0,
+    36,   138,     4,   140,   202,   141,   142,     4,   139,     0
 };
 
 #endif
 
 #if YYDEBUG != 0
 static const short yyrline[] = { 0,
-   144,   146,   151,   153,   156,   158,   159,   160,   161,   162,
-   163,   164,   165,   166,   167,   168,   169,   170,   173,   178,
-   184,   190,   205,   218,   246,   254,   261,   266,   273,   281,
-   282,   283,   284,   285,   286,   289,   292,   296,   299,   303,
-   494,   508,   518,   524,   531,   539,   545,   551,   558,   566,
-   572,   578,   587,   592,   597,   606,   608,   609,   610,   611,
-   614,   616,   619,   654,   693,   747,   764,   782,   793,   810,
-   817,   831,   848,   874,   901,   915,   932,   946,   963,   983,
-  1006,  1016,  1030,  1035,  1044,  1070,  1086,  1107,  1114,  1125,
-  1140,  1148,  1163,  1170,  1182,  1216,  1252,  1274,  1292,  1310,
-  1328,  1354,  1372,  1398,  1418,  1436,  1454,  1480,  1497,  1516,
-  1534,  1572,  1576,  1580,  1585,  1607,  1629,  1645,  1665,  1682,
-  1699,  1719,  1725,  1730,  1735,  1740,  1751,  1757,  1765,  1767,
-  1770,  1775,  1779,  1802,  1825,  1848,  1875,  1885,  1895,  1911,
-  1929,  1943,  1950,  1956,  1965,  1978,  2029,  2044,  2059,  2079,
-  2089,  2111,  2115,  2120,  2125,  2135,  2152,  2168,  2194,  2221,
-  2253,  2260,  2265,  2271,  2275,  2283,  2292,  2300,  2308,  2312,
-  2320,  2324,  2332,  2336,  2344,  2348,  2355,  2359,  2371,  2378,
-  2385,  2392,  2399,  2406,  2413,  2420,  2427,  2434,  2438,  2445,
-  2449,  2456,  2460,  2467,  2471,  2478,  2482,  2489,  2493,  2500,
-  2504,  2511,  2515,  2522,  2526,  2536,  2540,  2545,  2555,  2577,
-  2601,  2605,  2628,  2647,  2665,  2683,  2712,  2747,  2752,  2779,
-  2793,  2811,  2818,  2824,  2827,  2835,  2845,  2847,  2848,  2849,
-  2850,  2851,  2852,  2853,  2854,  2861,  2862,  2863,  2864,  2865,
-  2866,  2867,  2868,  2869,  2870,  2871,  2872,  2873,  2874,  2875,
-  2876,  2877,  2878,  2879,  2880,  2881,  2882,  2883,  2884,  2885,
-  2886,  2887,  2888,  2889,  2890,  2891,  2892,  2894,  2895,  2896,
-  2897,  2898,  2899,  2900,  2901,  2902,  2903,  2904,  2905,  2906,
-  2907,  2908,  2909,  2910,  2911,  2912,  2913,  2914,  2919,  2924,
-  2925,  2926,  2927,  2928,  2929,  2933,  2949,  2964,  2984,  2998,
-  3011,  3034,  3052,  3070,  3088,  3106,  3113,  3118,  3122,  3126,
-  3130,  3136,  3141,  3145,  3149,  3155,  3161,  3168,  3174,  3178,
-  3183,  3187,  3195,  3205,  3214,  3222,  3228,  3239,  3259,  3269,
-  3279,  3296,  3322,  3328,  3332,  3336,  3348,  3353,  3365,  3372,
-  3393,  3398,  3412,  3418,  3424,  3429,  3435,  3440,  3448,  3456,
-  3470,  3484,  3488,  3507,  3529
+   142,   144,   149,   151,   154,   156,   157,   158,   159,   160,
+   161,   162,   163,   164,   165,   166,   167,   168,   171,   176,
+   182,   188,   203,   216,   244,   257,   266,   277,   282,   283,
+   284,   285,   286,   289,   292,   296,   299,   303,   448,   456,
+   462,   468,   475,   484,   490,   496,   503,   511,   517,   524,
+   534,   539,   546,   548,   549,   550,   551,   554,   556,   559,
+   594,   633,   687,   704,   722,   733,   750,   757,   771,   788,
+   814,   841,   855,   872,   886,   903,   923,   946,   956,   970,
+   975,   984,  1010,  1026,  1047,  1054,  1065,  1080,  1088,  1103,
+  1110,  1122,  1156,  1192,  1214,  1232,  1250,  1268,  1294,  1312,
+  1338,  1358,  1376,  1394,  1420,  1437,  1456,  1474,  1512,  1516,
+  1520,  1525,  1547,  1569,  1585,  1605,  1622,  1639,  1659,  1665,
+  1670,  1675,  1680,  1691,  1697,  1705,  1707,  1710,  1715,  1719,
+  1742,  1765,  1788,  1815,  1825,  1838,  1853,  1867,  1881,  1888,
+  1894,  1903,  1916,  1965,  1981,  1997,  2016,  2026,  2048,  2052,
+  2057,  2062,  2072,  2089,  2105,  2130,  2156,  2187,  2194,  2199,
+  2205,  2209,  2217,  2226,  2234,  2242,  2246,  2254,  2258,  2266,
+  2270,  2278,  2282,  2289,  2293,  2305,  2312,  2319,  2326,  2333,
+  2340,  2347,  2354,  2361,  2368,  2372,  2379,  2383,  2390,  2394,
+  2401,  2405,  2412,  2416,  2423,  2427,  2434,  2438,  2445,  2449,
+  2456,  2460,  2470,  2474,  2479,  2489,  2509,  2532,  2536,  2559,
+  2578,  2596,  2614,  2643,  2678,  2683,  2710,  2724,  2742,  2749,
+  2755,  2758,  2766,  2776,  2778,  2779,  2780,  2781,  2782,  2783,
+  2784,  2785,  2792,  2793,  2794,  2795,  2796,  2797,  2798,  2799,
+  2800,  2801,  2802,  2803,  2804,  2805,  2806,  2807,  2808,  2809,
+  2810,  2811,  2812,  2813,  2814,  2815,  2816,  2817,  2818,  2819,
+  2820,  2821,  2822,  2823,  2825,  2826,  2827,  2828,  2829,  2830,
+  2831,  2832,  2833,  2834,  2835,  2836,  2837,  2838,  2839,  2840,
+  2841,  2842,  2843,  2844,  2845,  2850,  2855,  2856,  2857,  2858,
+  2859,  2860,  2864,  2880,  2895,  2915,  2928,  2941,  2964,  2982,
+  3000,  3018,  3036,  3043,  3048,  3052,  3056,  3060,  3066,  3071,
+  3075,  3079,  3085,  3091,  3098,  3104,  3108,  3113,  3117,  3125,
+  3135,  3144,  3152,  3158,  3169,  3189,  3199,  3209,  3226,  3252,
+  3258,  3262,  3266,  3278,  3283,  3295,  3302,  3322,  3327,  3341,
+  3347,  3353,  3358,  3364,  3369,  3377,  3385,  3399,  3413,  3417,
+  3436,  3458
 };
 #endif
 
@@ -587,103 +582,102 @@ static const char * const yytname[] = {   "$","error","$undefined.","tDOUBLE",
 "tBump","tProgression","tPlugin","tRotate","tTranslate","tSymmetry","tDilate",
 "tExtrude","tDuplicata","tLoop","tRecombine","tDelete","tCoherence","tIntersect",
 "tBoundary","tAttractor","tLayers","tHole","tAlias","tAliasWithOptions","tText2D",
-"tText3D","tInterpolationScheme","tTime","tGrain","tCombine","tBSpline","tBezier",
-"tNurbs","tOrder","tKnots","tColor","tColorTable","tFor","tIn","tEndFor","tIf",
-"tEndIf","tExit","tField","tThreshold","tStructured","tLatLon","tGrad","tPostView",
-"tReturn","tCall","tFunction","tShow","tHide","tGetValue","tGMSH_MAJOR_VERSION",
-"tGMSH_MINOR_VERSION","tGMSH_PATCH_VERSION","tAFFECTPLUS","tAFFECTMINUS","tAFFECTTIMES",
-"tAFFECTDIVIDE","'?'","tOR","tAND","tEQUAL","tNOTEQUAL","'<'","tLESSOREQUAL",
-"'>'","tGREATEROREQUAL","'+'","'-'","'*'","'/'","'%'","'!'","tPLUSPLUS","tMINUSMINUS",
-"UNARYPREC","'^'","'('","')'","'['","']'","'.'","'#'","','","'{'","'}'","'~'",
-"All","GeoFormatItems","GeoFormatItem","SendToFile","Printf","View","Views",
-"ElementCoords","ElementValues","Element","@1","@2","Text2DValues","Text2D",
-"@3","Text3DValues","Text3D","@4","InterpolationMatrix","Time","@5","Grain",
-"NumericAffectation","NumericIncrement","Affectation","PhysicalId","Shape","Transform",
-"MultipleShape","ListOfShapes","Delete","Colorify","Visibility","Command","Loop",
-"Extrude","@6","@7","@8","@9","@10","@11","@12","@13","@14","@15","@16","@17",
-"@18","@19","ExtrudeParameters","ExtrudeParameter","Transfinite","Embedding",
-"Coherence","FExpr","FExpr_Single","VExpr","VExpr_Single","RecursiveListOfListOfDouble",
-"ListOfDouble","FExpr_Multi","RecursiveListOfDouble","ColorExpr","ListOfColor",
-"RecursiveListOfColor","StringExprVar","StringExpr", NULL
+"tText3D","tInterpolationScheme","tTime","tCombine","tBSpline","tBezier","tNurbs",
+"tOrder","tKnots","tColor","tColorTable","tFor","tIn","tEndFor","tIf","tEndIf",
+"tExit","tField","tThreshold","tStructured","tLatLon","tGrad","tPostView","tReturn",
+"tCall","tFunction","tShow","tHide","tGetValue","tGMSH_MAJOR_VERSION","tGMSH_MINOR_VERSION",
+"tGMSH_PATCH_VERSION","tAFFECTPLUS","tAFFECTMINUS","tAFFECTTIMES","tAFFECTDIVIDE",
+"'?'","tOR","tAND","tEQUAL","tNOTEQUAL","'<'","tLESSOREQUAL","'>'","tGREATEROREQUAL",
+"'+'","'-'","'*'","'/'","'%'","'!'","tPLUSPLUS","tMINUSMINUS","UNARYPREC","'^'",
+"'('","')'","'['","']'","'.'","'#'","','","'{'","'}'","'~'","All","GeoFormatItems",
+"GeoFormatItem","SendToFile","Printf","View","Views","ElementCoords","ElementValues",
+"Element","@1","@2","Text2DValues","Text2D","@3","Text3DValues","Text3D","@4",
+"InterpolationMatrix","Time","@5","NumericAffectation","NumericIncrement","Affectation",
+"PhysicalId","Shape","Transform","MultipleShape","ListOfShapes","Delete","Colorify",
+"Visibility","Command","Loop","Extrude","@6","@7","@8","@9","@10","@11","@12",
+"@13","@14","@15","@16","@17","@18","@19","ExtrudeParameters","ExtrudeParameter",
+"Transfinite","Embedding","Coherence","FExpr","FExpr_Single","VExpr","VExpr_Single",
+"RecursiveListOfListOfDouble","ListOfDouble","FExpr_Multi","RecursiveListOfDouble",
+"ColorExpr","ListOfColor","RecursiveListOfColor","StringExprVar","StringExpr", NULL
 };
 #endif
 
 static const short yyr1[] = {     0,
-   149,   149,   150,   150,   151,   151,   151,   151,   151,   151,
-   151,   151,   151,   151,   151,   151,   151,   151,   152,   152,
-   153,   153,   153,   153,   154,   154,   154,   154,   155,   155,
-   155,   155,   155,   155,   155,   156,   156,   157,   157,   159,
-   160,   158,   161,   161,   163,   162,   164,   164,   166,   165,
-   167,   167,   169,   168,   170,   171,   171,   171,   171,   171,
-   172,   172,   173,   173,   173,   173,   173,   173,   173,   173,
+   148,   148,   149,   149,   150,   150,   150,   150,   150,   150,
+   150,   150,   150,   150,   150,   150,   150,   150,   151,   151,
+   152,   152,   152,   152,   153,   153,   153,   154,   154,   154,
+   154,   154,   154,   155,   155,   156,   156,   158,   159,   157,
+   160,   160,   162,   161,   163,   163,   165,   164,   166,   166,
+   168,   167,   169,   169,   169,   169,   169,   170,   170,   171,
+   171,   171,   171,   171,   171,   171,   171,   171,   171,   171,
+   171,   171,   171,   171,   171,   171,   171,   171,   171,   172,
+   172,   173,   173,   173,   173,   173,   173,   173,   173,   173,
    173,   173,   173,   173,   173,   173,   173,   173,   173,   173,
-   173,   173,   174,   174,   175,   175,   175,   175,   175,   175,
-   175,   175,   175,   175,   175,   175,   175,   175,   175,   175,
-   175,   175,   175,   175,   175,   175,   175,   175,   175,   175,
-   175,   175,   175,   175,   175,   175,   175,   175,   175,   175,
-   175,   176,   176,   176,   176,   176,   176,   176,   177,   177,
-   178,   178,   178,   178,   178,   178,   179,   179,   179,   179,
-   180,   181,   181,   181,   181,   182,   182,   182,   182,   182,
-   182,   182,   182,   182,   182,   183,   183,   183,   183,   183,
-   183,   183,   183,   183,   183,   184,   184,   184,   185,   184,
-   186,   184,   187,   184,   188,   184,   189,   184,   184,   184,
-   184,   184,   184,   184,   184,   184,   184,   190,   184,   191,
-   184,   192,   184,   193,   184,   194,   184,   195,   184,   196,
-   184,   197,   184,   198,   184,   199,   199,   200,   200,   200,
-   200,   200,   201,   201,   201,   201,   201,   201,   201,   201,
-   201,   202,   202,   202,   202,   203,   204,   204,   204,   204,
-   204,   204,   204,   204,   204,   204,   204,   204,   204,   204,
-   204,   204,   204,   204,   204,   204,   204,   204,   204,   204,
-   204,   204,   204,   204,   204,   204,   204,   204,   204,   204,
-   204,   204,   204,   204,   204,   204,   204,   204,   204,   204,
-   204,   204,   204,   204,   204,   204,   204,   204,   204,   204,
-   204,   204,   204,   204,   204,   204,   204,   204,   205,   205,
-   205,   205,   205,   205,   205,   205,   205,   205,   205,   205,
-   205,   205,   205,   205,   205,   205,   206,   206,   206,   206,
-   206,   207,   207,   207,   207,   208,   208,   209,   209,   209,
-   209,   209,   209,   210,   210,   210,   210,   210,   210,   210,
-   210,   210,   211,   211,   211,   211,   212,   212,   212,   212,
-   213,   213,   214,   214,   215,   215,   216,   216,   216,   216,
-   216,   216,   216,   216,   216
+   173,   173,   173,   173,   173,   173,   173,   173,   173,   173,
+   173,   173,   173,   173,   173,   173,   173,   173,   174,   174,
+   174,   174,   174,   174,   174,   175,   175,   176,   176,   176,
+   176,   176,   176,   177,   177,   177,   177,   178,   179,   179,
+   179,   179,   180,   180,   180,   180,   180,   180,   180,   180,
+   180,   180,   181,   181,   181,   181,   181,   181,   181,   181,
+   181,   181,   182,   182,   182,   183,   182,   184,   182,   185,
+   182,   186,   182,   187,   182,   182,   182,   182,   182,   182,
+   182,   182,   182,   182,   188,   182,   189,   182,   190,   182,
+   191,   182,   192,   182,   193,   182,   194,   182,   195,   182,
+   196,   182,   197,   197,   198,   198,   198,   198,   198,   199,
+   199,   199,   199,   199,   199,   199,   199,   199,   200,   200,
+   200,   200,   201,   202,   202,   202,   202,   202,   202,   202,
+   202,   202,   202,   202,   202,   202,   202,   202,   202,   202,
+   202,   202,   202,   202,   202,   202,   202,   202,   202,   202,
+   202,   202,   202,   202,   202,   202,   202,   202,   202,   202,
+   202,   202,   202,   202,   202,   202,   202,   202,   202,   202,
+   202,   202,   202,   202,   202,   202,   202,   202,   202,   202,
+   202,   202,   202,   202,   202,   203,   203,   203,   203,   203,
+   203,   203,   203,   203,   203,   203,   203,   203,   203,   203,
+   203,   203,   203,   204,   204,   204,   204,   204,   205,   205,
+   205,   205,   206,   206,   207,   207,   207,   207,   207,   207,
+   208,   208,   208,   208,   208,   208,   208,   208,   208,   209,
+   209,   209,   209,   210,   210,   210,   210,   211,   211,   212,
+   212,   213,   213,   214,   214,   214,   214,   214,   214,   214,
+   214,   214
 };
 
 static const short yyr2[] = {     0,
      1,     2,     0,     2,     1,     1,     1,     1,     1,     1,
      1,     1,     1,     1,     1,     1,     1,     1,     1,     2,
-     5,     7,     7,     9,     6,     8,     6,     6,     0,     2,
-     2,     2,     2,     2,     2,     1,     3,     1,     3,     0,
-     0,    10,     1,     3,     0,    13,     1,     3,     0,    15,
-     8,    14,     0,     6,     6,     1,     1,     1,     1,     1,
-     1,     1,     4,     7,     9,     6,     6,     3,     6,     4,
-     6,     9,     6,     9,     5,     8,     8,    11,     6,     9,
-     9,     9,     1,     1,     7,     8,     9,     8,     8,     8,
-     8,     9,     8,     5,     6,     6,     6,     7,     7,     7,
-     9,     7,     9,    17,     7,     7,    11,     8,     8,     8,
-     8,     3,     4,    10,     7,     7,     8,     8,     8,     7,
-     8,     5,    11,     5,     9,     4,     9,     4,     1,     1,
-     0,     2,     6,     6,     6,     6,     4,     6,     3,     4,
-     5,     3,     3,     4,     4,     3,     7,     7,     3,     7,
-     3,     2,     2,    15,     2,     6,     8,     8,    10,     1,
-     2,     1,     3,     4,     1,     5,    11,    13,     0,     7,
-     0,    13,     0,    15,     0,     6,     0,    10,     8,     8,
-     8,    12,    12,    12,    14,    14,    14,     0,    12,     0,
-    12,     0,    12,     0,    16,     0,    16,     0,    16,     0,
-    18,     0,    18,     0,    18,     1,     2,     5,     7,     9,
-     2,     9,     6,     9,     9,     8,     9,     8,     8,     6,
-     4,    10,    10,    10,    10,     2,     1,     3,     2,     2,
-     2,     3,     3,     3,     3,     3,     3,     3,     3,     3,
-     3,     3,     3,     3,     3,     5,     4,     4,     4,     4,
-     4,     4,     4,     4,     4,     4,     6,     4,     4,     4,
-     4,     4,     4,     6,     6,     6,     4,     4,     4,     4,
-     4,     4,     4,     4,     4,     4,     4,     6,     4,     4,
-     4,     4,     4,     4,     6,     6,     6,     4,     1,     1,
-     1,     1,     1,     1,     1,     1,     5,     4,     4,     2,
-     5,     3,     6,     4,     7,     6,     1,     2,     2,     3,
-     3,    11,     9,     7,     7,     1,     3,     1,     1,     2,
-     3,     4,     5,     2,     3,     3,     5,     4,     1,     1,
-     3,     6,     1,     1,     3,     3,     9,     7,     1,     5,
-     3,     6,     1,     3,     1,     1,     1,     1,     6,     4,
-     4,     4,     6,     6,     9
+     5,     7,     7,     9,     6,     6,     6,     0,     2,     2,
+     2,     2,     2,     1,     3,     1,     3,     0,     0,    10,
+     1,     3,     0,    13,     1,     3,     0,    15,     8,    14,
+     0,     6,     1,     1,     1,     1,     1,     1,     1,     4,
+     7,     9,     6,     6,     3,     6,     4,     6,     9,     6,
+     9,     5,     8,     8,    11,     6,     9,     9,     9,     1,
+     1,     7,     8,     9,     8,     8,     8,     8,     9,     8,
+     5,     6,     6,     6,     7,     7,     7,     9,     7,     9,
+    17,     7,     7,    11,     8,     8,     8,     8,     3,     4,
+    10,     7,     7,     8,     8,     8,     7,     8,     5,    11,
+     5,     9,     4,     9,     4,     1,     1,     0,     2,     6,
+     6,     6,     6,     4,     6,     3,     4,     5,     3,     3,
+     4,     4,     3,     7,     7,     3,     7,     3,     2,     2,
+    15,     2,     6,     8,     8,    10,     1,     2,     1,     3,
+     4,     1,     5,    11,    13,     0,     7,     0,    13,     0,
+    15,     0,     6,     0,    10,     8,     8,     8,    12,    12,
+    12,    14,    14,    14,     0,    12,     0,    12,     0,    12,
+     0,    16,     0,    16,     0,    16,     0,    18,     0,    18,
+     0,    18,     1,     2,     5,     7,     9,     2,     9,     6,
+     9,     9,     8,     9,     8,     8,     6,     4,    10,    10,
+    10,    10,     2,     1,     3,     2,     2,     2,     3,     3,
+     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
+     3,     3,     5,     4,     4,     4,     4,     4,     4,     4,
+     4,     4,     4,     6,     4,     4,     4,     4,     4,     4,
+     6,     6,     6,     4,     4,     4,     4,     4,     4,     4,
+     4,     4,     4,     4,     6,     4,     4,     4,     4,     4,
+     4,     6,     6,     6,     4,     1,     1,     1,     1,     1,
+     1,     1,     1,     5,     4,     4,     2,     5,     3,     6,
+     4,     7,     6,     1,     2,     2,     3,     3,    11,     9,
+     7,     7,     1,     3,     1,     1,     2,     3,     4,     5,
+     2,     3,     3,     5,     4,     1,     1,     3,     6,     1,
+     1,     3,     3,     9,     7,     1,     5,     3,     6,     1,
+     3,     1,     1,     1,     1,     6,     4,     4,     4,     6,
+     6,     9
 };
 
 static const short yydefact[] = {     0,
@@ -691,611 +685,616 @@ static const short yydefact[] = {     0,
      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,   160,     0,   165,
-     0,     0,     0,     0,     0,   162,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,   157,     0,   162,
+     0,     0,     0,     0,     0,   159,     0,     0,     0,     0,
      4,     6,     5,     7,     8,     9,    10,    11,    12,    18,
-    17,    13,    14,    15,    16,   289,   296,   347,    56,   290,
-   291,   292,     0,     0,     0,     0,     0,     0,     0,     0,
+    17,    13,    14,    15,    16,   286,   293,   344,    53,   287,
+   288,   289,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,   345,     0,   290,
+   291,   292,    54,    55,    56,    57,     0,     0,     0,    58,
+    59,     0,     0,     0,     0,     0,     0,     0,   224,     0,
+     0,     0,     0,   150,     0,   152,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,   348,     0,   293,
-   294,   295,    57,    58,    59,    60,     0,     0,     0,    61,
-    62,     0,     0,     0,     0,     0,     0,     0,   227,     0,
-     0,     0,     0,   153,     0,   155,     0,     0,     0,     0,
+   304,     0,     0,     0,     0,     0,     0,   128,     0,   128,
+     0,     0,   128,   223,     0,   128,     0,     0,     0,     0,
+     0,     0,     0,     0,   336,     0,     0,     0,     0,     0,
+   149,     0,     0,     0,     0,     0,   158,     0,   343,   344,
+   128,     0,   342,   128,     0,     0,     0,     0,     0,   297,
+    28,     0,     0,     0,     0,     0,     0,     0,     0,     0,
      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-   307,     0,     0,     0,     0,     0,     0,   131,     0,   131,
-     0,     0,   131,   226,     0,   131,     0,     0,     0,     0,
-     0,     0,     0,     0,   339,     0,     0,     0,     0,     0,
-   152,     0,     0,     0,     0,     0,   161,     0,   346,   347,
-   131,     0,   345,   131,     0,     0,     0,     0,     0,   300,
-     0,    29,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,   293,
+   227,   226,   228,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,    65,   146,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,   143,
+   109,     0,     0,     0,     0,   293,     0,     0,   326,   327,
+   330,   331,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,   315,     0,   316,
      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,   306,   305,     0,     0,     0,
+     0,   128,   128,     0,     0,     0,     0,     0,     0,     0,
+     0,   172,     0,   128,   127,     0,   126,     0,     0,   136,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,   148,
+     0,     0,     0,     0,     0,   128,     0,     0,     0,     0,
+     0,     0,     0,   160,     0,     0,   139,     0,   140,     0,
+     0,   299,     0,     0,    67,     0,     0,     0,     0,     0,
      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-   296,   230,   229,   231,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,    68,   149,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,   343,     0,     0,
+     0,     0,     0,     0,   225,     0,     0,     0,     0,    53,
+     0,     0,     0,     0,     0,    60,     0,   242,   241,   239,
+   240,   235,   237,   236,   238,   230,   229,   231,   232,   233,
+   234,   110,     0,     0,     0,     0,     0,     0,   226,   321,
      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-   146,   112,     0,     0,     0,     0,   296,     0,     0,   329,
-   330,   333,   334,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,     0,   318,     0,
-   319,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,     0,   309,   308,     0,     0,
-     0,     0,   131,   131,     0,     0,     0,     0,     0,     0,
-     0,     0,   175,     0,   131,   130,     0,   129,     0,     0,
-   139,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-   151,     0,     0,     0,     0,     0,   131,     0,     0,     0,
-     0,     0,     0,     0,   163,     0,     0,   142,     0,   143,
-     0,     0,   302,     0,     0,     0,    70,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,   317,     0,     0,
      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,    80,    81,     0,     0,     0,     0,     0,     0,     0,
+   308,   307,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,   129,     0,     0,   166,   123,
+   218,     0,   137,     0,   134,     0,   125,     0,     0,     0,
      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+   161,     0,     0,     0,     0,     0,   141,   142,     0,   295,
+   301,     0,    38,     0,     0,     0,    51,     0,    29,    30,
+    31,    32,    33,   244,   265,   245,   266,   246,   267,   247,
+   268,   248,   269,   249,   270,   250,   271,   251,   272,   252,
+   273,   264,   285,   253,   274,     0,     0,   255,   276,   256,
+   277,   257,   278,   258,   279,   259,   280,   260,   281,     0,
+     0,     0,     0,     0,     0,     0,     0,   349,     0,     0,
+   347,   348,     0,     0,     0,     0,     0,    53,     0,     0,
+     0,     0,     0,    72,     0,     0,     0,     0,   296,     0,
+    21,    19,     0,     0,     0,     0,   328,     0,     0,   323,
+   231,   322,   332,   333,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,    91,     0,   318,     0,
      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,     0,     0,   346,
-     0,     0,     0,     0,     0,     0,   228,     0,     0,     0,
-     0,    56,     0,     0,     0,     0,     0,    63,     0,   245,
-   244,   242,   243,   238,   240,   239,   241,   233,   232,   234,
-   235,   236,   237,   113,     0,     0,     0,     0,     0,     0,
-   229,   324,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,     0,     0,   320,
+     0,     0,     0,     0,     0,     0,     0,     0,   119,   121,
      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,    83,    84,     0,     0,     0,     0,     0,
-     0,     0,   311,   310,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,   132,     0,     0,
-   169,   126,   221,     0,   140,     0,   137,     0,   128,     0,
+     0,     0,     0,   203,     0,   163,     0,     0,     0,     0,
      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,   164,     0,     0,     0,     0,     0,   144,   145,
-     0,   298,   304,     0,    29,    40,     0,     0,     0,    53,
-     0,     0,    30,    31,    32,    33,    34,    35,   247,   268,
-   248,   269,   249,   270,   250,   271,   251,   272,   252,   273,
-   253,   274,   254,   275,   255,   276,   267,   288,   256,   277,
-     0,     0,   258,   279,   259,   280,   260,   281,   261,   282,
-   262,   283,   263,   284,     0,     0,     0,     0,     0,     0,
-     0,     0,   352,     0,     0,   350,   351,     0,     0,     0,
-     0,     0,    56,     0,     0,     0,     0,     0,    75,     0,
-     0,     0,     0,   299,     0,    21,    19,     0,     0,     0,
-     0,   331,     0,     0,   326,   234,   325,   335,   336,     0,
+   138,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+   298,     0,   294,     0,     0,     0,     0,     0,    25,     0,
      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,    94,     0,   321,     0,     0,     0,     0,     0,     0,
+     0,     0,   295,    63,    64,     0,     0,     0,     0,     0,
+    66,    68,    70,     0,     0,   340,     0,    76,   243,    20,
+     0,     0,     0,     0,     0,   325,     0,     0,     0,     0,
      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,   122,   124,     0,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,     0,   206,     0,
-   166,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,   141,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,   301,     0,   297,     0,     0,
-     0,     0,     0,     0,     0,    25,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,     0,     0,   298,
-    66,    67,     0,     0,     0,     0,     0,    69,    71,    73,
-     0,     0,   343,     0,    79,   246,    20,     0,     0,     0,
-     0,     0,   328,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,   322,     0,    97,
-     0,     0,     0,     0,     0,   213,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,     0,     0,   131,
-     0,     0,     0,     0,     0,     0,     0,   211,     0,     0,
-   176,   207,     0,     0,   220,   138,     0,     0,    95,    96,
-    27,    28,     0,     0,     0,   340,     0,     0,     0,   156,
-     0,     0,     0,     0,     0,   148,   303,   147,     0,     0,
-     0,     0,     0,   316,     0,     0,   257,   278,   264,   285,
-   265,   286,   266,   287,     0,   354,   353,   349,   306,     0,
-    56,     0,     0,     0,     0,    64,     0,     0,     0,   341,
-    22,    23,     0,     0,    85,     0,   327,     0,   100,     0,
-   102,     0,     0,    98,     0,     0,   115,   116,     0,     0,
-    99,   120,   323,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,   150,     0,     0,
-     0,     0,   131,   177,     0,   188,     0,   190,     0,   192,
-     0,     0,     0,     0,   318,     0,     0,     0,     0,   170,
-     0,     0,   105,   106,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,   305,    26,     0,    36,     0,     0,     0,
-     0,     0,    38,     0,     0,     0,     0,     0,    76,     0,
-     0,    77,     0,   344,     0,     0,   332,     0,     0,     0,
-   108,     0,     0,   117,     0,     0,     0,   218,   110,   111,
-     0,     0,     0,   216,   219,   119,    86,   109,   118,   121,
-     0,     0,     0,   315,     0,   314,     0,     0,     0,   179,
-     0,     0,   180,     0,     0,   181,     0,   133,   134,   135,
-   136,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-   338,     0,   158,   157,    90,    93,    88,    89,    91,     0,
-    41,     0,     0,     0,   317,     0,     0,     0,     0,     0,
-    65,    72,    74,     0,    80,     0,    24,     0,     0,   101,
-   103,     0,     0,     0,     0,     0,   215,   214,   217,    81,
-    82,   131,     0,   125,     0,     0,     0,     0,     0,     0,
-     0,   208,     0,     0,   131,     0,   127,    87,     0,     0,
-     0,    92,     0,    37,     0,     0,     0,    39,    54,    55,
-   355,     0,   342,     0,   222,   223,   224,   225,   114,     0,
-     0,     0,   313,   178,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,     0,   171,     0,     0,   337,
-   159,     0,     0,     0,     0,    78,     0,     0,   123,     0,
-   194,     0,     0,   196,     0,     0,   198,     0,     0,     0,
-   209,     0,   167,     0,   131,   107,     0,    45,     0,    51,
-     0,     0,     0,   312,   182,     0,     0,   189,   183,     0,
-     0,   191,   184,     0,     0,   193,     0,     0,     0,   173,
-     0,     0,     0,     0,     0,     0,     0,   200,     0,   202,
-     0,   204,   210,   212,   172,   168,     0,    42,     0,    49,
-     0,     0,     0,     0,   185,     0,     0,   186,     0,     0,
-   187,     0,     0,     0,    43,     0,     0,   154,     0,     0,
-     0,     0,     0,     0,     0,   174,     0,     0,     0,     0,
-     0,   195,     0,   197,     0,   199,     0,    44,    46,     0,
-    47,     0,   104,     0,     0,     0,     0,     0,    52,   201,
-   203,   205,    48,    50,     0,     0,     0
+   319,     0,    94,     0,     0,     0,     0,     0,   210,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,   128,     0,     0,     0,     0,     0,     0,     0,
+   208,     0,     0,   173,   204,     0,     0,   217,   135,     0,
+     0,    92,    93,    26,    27,     0,     0,     0,   337,     0,
+     0,     0,   153,     0,     0,     0,     0,     0,   145,   300,
+   144,     0,     0,     0,     0,   313,     0,   254,   275,   261,
+   282,   262,   283,   263,   284,     0,   351,   350,   346,   303,
+     0,    53,     0,     0,     0,     0,    61,     0,     0,     0,
+   338,    22,    23,     0,     0,    82,     0,   324,     0,    97,
+     0,    99,     0,     0,    95,     0,     0,   112,   113,     0,
+     0,    96,   117,   320,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,   147,     0,
+     0,     0,     0,   128,   174,     0,   185,     0,   187,     0,
+   189,     0,     0,     0,     0,   315,     0,     0,     0,     0,
+   167,     0,     0,   102,   103,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,   302,     0,    34,     0,     0,     0,
+     0,     0,    36,     0,     0,     0,     0,    73,     0,     0,
+    74,     0,   341,     0,     0,   329,     0,     0,     0,   105,
+     0,     0,   114,     0,     0,     0,   215,   107,   108,     0,
+     0,     0,   213,   216,   116,    83,   106,   115,   118,     0,
+     0,     0,   312,     0,   311,     0,     0,     0,   176,     0,
+     0,   177,     0,     0,   178,     0,   130,   131,   132,   133,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,   335,
+     0,   155,   154,    87,    90,    85,    86,    88,     0,    39,
+     0,     0,     0,   314,     0,     0,     0,     0,    62,    69,
+    71,     0,    77,     0,    24,     0,     0,    98,   100,     0,
+     0,     0,     0,     0,   212,   211,   214,    78,    79,   128,
+     0,   122,     0,     0,     0,     0,     0,     0,     0,   205,
+     0,     0,   128,     0,   124,    84,     0,     0,     0,    89,
+     0,    35,     0,     0,     0,    37,    52,   352,     0,   339,
+     0,   219,   220,   221,   222,   111,     0,     0,     0,   310,
+   175,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,   168,     0,     0,   334,   156,     0,     0,
+     0,     0,    75,     0,     0,   120,     0,   191,     0,     0,
+   193,     0,     0,   195,     0,     0,     0,   206,     0,   164,
+     0,   128,   104,     0,    43,     0,    49,     0,     0,     0,
+   309,   179,     0,     0,   186,   180,     0,     0,   188,   181,
+     0,     0,   190,     0,     0,     0,   170,     0,     0,     0,
+     0,     0,     0,     0,   197,     0,   199,     0,   201,   207,
+   209,   169,   165,     0,    40,     0,    47,     0,     0,     0,
+     0,   182,     0,     0,   183,     0,     0,   184,     0,     0,
+     0,    41,     0,     0,   151,     0,     0,     0,     0,     0,
+     0,     0,   171,     0,     0,     0,     0,     0,   192,     0,
+   194,     0,   196,     0,    42,    44,     0,    45,     0,   101,
+     0,     0,     0,     0,     0,    50,   198,   200,   202,    46,
+    48,     0,     0,     0
 };
 
-static const short yydefgoto[] = {  1285,
-     2,    61,   668,    62,    63,   406,   986,   992,   593,   760,
-  1123,  1244,   594,  1212,  1270,   595,  1246,   596,   597,   764,
-   598,   126,   220,    64,   523,   548,   310,   367,   368,    67,
-    68,    69,    70,    71,   311,   732,  1184,  1227,   549,  1038,
-  1041,  1044,  1047,  1196,  1200,  1204,  1236,  1239,  1242,   728,
-   729,    73,    74,    75,   329,   129,   347,   171,   883,   884,
-   331,   314,   197,   663,   794,   212,   213
+static const short yydefgoto[] = {  1272,
+     2,    61,   663,    62,    63,   404,   976,   982,   589,   754,
+  1111,  1231,   590,  1199,  1257,   591,  1233,   592,   593,   758,
+   126,   220,    64,   521,   546,   309,   366,   367,    67,    68,
+    69,    70,    71,   310,   727,  1171,  1214,   547,  1027,  1030,
+  1033,  1036,  1183,  1187,  1191,  1223,  1226,  1229,   723,   724,
+    73,    74,    75,   328,   129,   346,   171,   875,   876,   330,
+   313,   197,   658,   787,   212,   213
 };
 
-static const short yypact[] = {  3119,
-    23,  3198,-32768,  2348,    36,    61,   -67,     8,   112,  -107,
-   -11,    41,   -55,    56,    81,   -45,   144,   165,   269,   -14,
-    85,   301,   313,    -5,   284,   718,   247,   227,   254,   254,
-   288,    57,   292,   394,     6,   473,   405,   360,    27,   519,
-   550,   564,   412,   439,   454,     9,    43,-32768,   457,-32768,
-   580,   503,   506,   510,   526,-32768,   619,     1,    14,    26,
+static const short yypact[] = {  3190,
+    75,  3268,-32768,  2425,    79,   -21,   -37,    24,   101,   -74,
+    26,    43,   -62,    81,   128,   -51,   136,   140,   105,   -15,
+   145,   250,   257,   273,   258,   697,   174,   178,   416,   416,
+   190,    59,   216,   268,     7,   365,   342,   234,   133,   389,
+   399,   443,   259,   272,   316,    15,    35,-32768,   331,-32768,
+   467,   351,   385,   388,   402,-32768,   503,     9,    12,    20,
 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,    21,    17,   264,-32768,
--32768,-32768,   -82,   -70,    73,   286,   341,   393,   407,   422,
-   443,   450,   464,   476,   483,   523,   527,   536,   540,   547,
-   576,   577,   603,   487,   502,   509,   517,-32768,   530,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,  2573,  2573,  2573,-32768,
--32768,  2573,  2134,    29,   628,  2573,   639,  1127,-32768,   655,
-   659,  2573,   671,-32768,  2573,-32768,  2573,  2404,  2573,  2573,
-   543,  2573,  2404,  2573,  2573,   548,  2404,  2573,  2573,  1349,
-   553,  2573,   578,   602,   615,  1790,   611,   612,   623,   626,
-   629,   636,   642,   792,   254,   254,   254,  2573,  2573,   -17,
--32768,    54,   254,   665,   676,   686,   687,  1211,    59,   864,
-  1790,     3,-32768,-32768,   700,   864,  1513,  1790,   708,   714,
-   806,  2573,  2573,  2573,   721,  2573,   715,   773,  2573,  2573,
--32768,   734,   741,   742,   759,   893,-32768,   766,-32768,-32768,
--32768,   908,-32768,-32768,   916,   785,  2573,   923,   790,-32768,
-   254,-32768,   939,  2573,  2573,  2573,  2573,  2573,  2573,  2573,
-  2573,  2573,  2573,  2573,  2573,  2573,  2573,  2573,  2573,  2573,
-  2573,  2573,  2573,  2573,  2573,  2573,  2573,  2573,  2573,  2573,
-  2573,  2573,  2573,  2573,  2573,  2573,  2573,  2573,  2573,  2573,
-  2573,  2573,  2573,  2573,  2573,   735,   779,   779,   779,   945,
-   537,   815,   815,   815,  5481,    15,  2404,  4768,   378,   819,
-   957,   824,  1177,-32768,-32768,  2573,  2573,  2573,  2573,  2573,
-  2573,  2573,  2573,  2573,  2573,  2573,  2573,  2573,  2573,  2573,
--32768,-32768,  1273,   224,  4014,  5502,   727,   820,  2404,-32768,
--32768,  1715,-32768,   606,  5523,  5544,  2573,  5565,   631,  5586,
-  5607,  2573,   635,  5628,  5649,  1790,  1928,   680,  1853,   960,
--32768,  2573,  5670,  2573,  2573,  2573,   961,  2573,  2573,  2573,
-  2536,  2536,  2536,  2536,   830,   -63,-32768,-32768,  4040,  4066,
-   254,   254,   864,   864,   -31,  2573,  2573,  2573,  2573,  1211,
-  1211,  2573,  3268,   179,-32768,-32768,   841,  3268,   413,   965,
--32768,  2573,  2677,  2404,   842,   853,   984,   986,  2573,  2573,
--32768,  5691,  5712,  5733,   901,  4092,-32768,   849,  1991,  5754,
-  2573,  2573,  2573,  2573,-32768,  2573,  2701,-32768,  2782,-32768,
-  2573,  4791,   364,  2573,   278,     4,-32768,  5775,  4814,  5796,
-  4837,  5817,  4860,  5838,  4883,  5859,  4906,  5880,  4929,  5901,
-  4952,  5922,  4975,  5943,  4998,  5964,  5021,  5985,  5044,  4118,
-  4144,  6006,  5067,  6027,  5090,  6048,  5113,  6069,  5136,  6090,
-  5159,  6111,  5182,  4170,  4196,  4222,  4248,  4274,  4300,   644,
-   231,   851,   857,   858,   855,  2573,-32768,  1790,  1790,   652,
-   312,   264,  2573,   995,   998,    19,   861,-32768,  2488,   763,
-   953,   712,   712,   780,   780,   780,   780,   185,   185,   815,
-   815,   815,   815,-32768,    32,  2404,  2573,   999,  2204,  2573,
-   815,-32768,  2573,  2404,  2404,   909,  1000,  1001,  6132,  1002,
-   914,  1004,  1005,  6153,   918,  1006,  1009,  1011,  2404,-32768,
-   656,  2066,  2573,  6174,  1013,  3342,  6195,  6216,  2573,  3370,
-  3398,  6237,   878,  3020,-32768,   881,   882,   885,   883,   254,
-  2573,  2573,-32768,-32768,   880,   884,  2573,  5205,  4326,  4352,
-  4378,  3209,   -54,   -35,   -37,    -7,   927,-32768,   198,   254,
-  2806,-32768,-32768,  2573,-32768,  5228,-32768,   660,-32768,  2573,
-  1790,  1790,  5251,  5274,  1022,  1023,  1025,   891,  2573,  2887,
-  2573,  2573,-32768,  6258,  6279,  6300,  6321,  6342,-32768,-32768,
-  5297,    38,-32768,  3426,-32768,-32768,   896,   897,   905,-32768,
-   913,  1047,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,    19,   372,   510,-32768,
+-32768,-32768,   129,   141,   211,   269,   279,   280,   324,   340,
+   427,   462,   468,   472,   479,   501,   520,   642,   651,   657,
+   675,   678,   687,   392,   395,   398,   405,-32768,   424,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,  2648,  2648,  2648,-32768,
+-32768,  2648,  2145,    22,   523,  2648,   549,   887,-32768,   565,
+   572,  2648,   578,-32768,  2648,-32768,  2648,  2480,  2648,  2648,
+   452,  2648,  2480,  2648,  2648,   458,  2480,  2648,  2648,  1378,
+   469,  2648,   473,   487,   509,  1803,   507,   512,   526,   530,
+   545,   548,   557,   644,   416,   416,   416,  2648,  2648,   -92,
+-32768,   -54,   416,   521,   575,   576,   579,  2288,   -50,   856,
+  1803,    23,-32768,-32768,   602,   856,  1528,  1803,   561,   616,
+   751,  2648,  2648,  2648,   625,  2648,   632,   690,  2648,  2648,
+-32768,   656,   702,   705,   717,   820,-32768,   720,-32768,-32768,
+-32768,   857,-32768,-32768,   868,   741,  2648,   890,   761,-32768,
+-32768,   901,  2648,  2648,  2648,  2648,  2648,  2648,  2648,  2648,
+  2648,  2648,  2648,  2648,  2648,  2648,  2648,  2648,  2648,  2648,
+  2648,  2648,  2648,  2648,  2648,  2648,  2648,  2648,  2648,  2648,
+  2648,  2648,  2648,  2648,  2648,  2648,  2648,  2648,  2648,  2648,
+  2648,  2648,  2648,  2648,   555,   722,   722,   722,   905,   308,
+   777,   777,   777,  5325,    11,  2480,  4612,   406,   776,   926,
+   788,   906,-32768,-32768,  2648,  2648,  2648,  2648,  2648,  2648,
+  2648,  2648,  2648,  2648,  2648,  2648,  2648,  2648,  2648,-32768,
+-32768,  1068,   -97,  3858,  5346,   636,   792,  2480,-32768,-32768,
+  1729,-32768,   688,  5367,  5388,  2648,  5409,   689,  5430,  5451,
+  2648,   692,  5472,  5493,  1803,  1940,  1229,  1866,   934,-32768,
+  2648,  5514,  2648,  2648,  2648,   935,  2648,  2648,  2648,  2611,
+  2611,  2611,  2611,   823,   219,-32768,-32768,  3884,  3910,   416,
+   416,   856,   856,   353,  2648,  2648,  2648,  2648,  2288,  2288,
+  2648,  3338,   409,-32768,-32768,   799,  3338,    66,   952,-32768,
+  2648,   685,  2480,   833,   842,   980,   981,  2648,  2648,-32768,
+  5535,  5556,  5577,   897,  3936,-32768,   845,  2003,  5598,  2648,
+  2648,  2648,  2648,-32768,  2648,  2751,-32768,  2817,-32768,  2648,
+  4635,   230,  2648,     4,-32768,  5619,  4658,  5640,  4681,  5661,
+  4704,  5682,  4727,  5703,  4750,  5724,  4773,  5745,  4796,  5766,
+  4819,  5787,  4842,  5808,  4865,  5829,  4888,  3962,  3988,  5850,
+  4911,  5871,  4934,  5892,  4957,  5913,  4980,  5934,  5003,  5955,
+  5026,  4014,  4040,  4066,  4092,  4118,  4144,   711,   -84,   847,
+   853,   854,   851,  2648,-32768,  1803,  1803,   708,   359,   510,
+  2648,   990,   993,    17,   858,-32768,  2350,   582,  1223,   759,
+   759,   562,   562,   562,   562,    80,    80,   777,   777,   777,
+   777,-32768,    -2,  2480,  2648,   991,  2214,  2648,   777,-32768,
+  2648,  2480,  2480,   907,   994,   996,  5976,  1013,   927,  1014,
+  1032,  5997,   945,  1034,  1035,  1039,  2480,-32768,   718,  2077,
+  2648,  6018,  1040,  1454,  6039,  6060,  2648,  2695,  2761,  6081,
+   861,  6438,-32768,   910,   912,   913,   904,   416,  2648,  2648,
+-32768,-32768,   908,   909,  2648,  5049,  4170,  4196,  4222,  3832,
+   -45,   -39,   -10,   -42,   953,-32768,    41,   416,  2883,-32768,
+-32768,  2648,-32768,  5072,-32768,   723,-32768,  2648,  1803,  1803,
+  5095,  5118,  1049,  1050,  1051,   917,  2648,  2949,  2648,  2648,
+-32768,  6102,  6123,  6144,  6165,  6186,-32768,-32768,  5141,   266,
+-32768,  2827,-32768,   923,   924,   918,-32768,  1058,-32768,-32768,
 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-  2573,  2573,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,  2573,  2573,  2573,  2573,  2573,  2573,
-  2573,  1052,-32768,  2404,   779,-32768,-32768,  2573,  5320,  1053,
-  1055,   920,-32768,    33,  2573,  1057,  1058,  1380,-32768,  1059,
-   924,     9,  1061,-32768,  2573,-32768,   941,   779,   234,  4404,
-   254,-32768,  2404,  3454,  2514,   815,-32768,  1715,-32768,  1020,
-  1790,  1790,  1064,  1790,   740,  1790,  1790,  1065,  1036,  1790,
-  1790,-32768,   666,-32768,  2404,  1437,  1066,   928,  1081,  1083,
-  1085,   345,  1086,  1087,  1088,  1089,  1090,  1091,  1092,  1096,
-   268,  4430,  4456,-32768,-32768,  3482,   956,   254,   254,   254,
-  2404,  2404,  2404,  2404,  1097,   959,   968,   132,-32768,   373,
--32768,   198,  1470,  1103,  1062,  6363,  1104,  1106,  1107,  1108,
-  1790,  1790,  1790,  1111,  4482,-32768,  2984,   917,  1109,  1112,
-  1113,  1114,  1115,  1119,  1122,-32768,  1121,-32768,    11,   979,
-  2573,  2573,  1790,   982,  2573,-32768,  6384,  5343,  6405,  5366,
-  6426,  5389,  6447,  5412,  5435,   989,   265,   990,  6468,   252,
--32768,-32768,   100,   408,   988,  1128,  1578,-32768,-32768,-32768,
-     9,  2573,-32768,   678,-32768,  3020,-32768,  1130,    34,  2573,
-    48,   681,-32768,  2573,   991,    49,    52,  1790,  1132,   993,
-   996,  1135,  1139,  1790,  1008,  1141,  1144,-32768,   684,-32768,
-  1129,  2573,  1790,  1790,  1790,-32768,   427,  1790,  1790,  1790,
-  1790,  1790,  1790,  1790,   534,  2573,  2573,  2573,  1015,-32768,
-   184,   218,   311,   707,   729,   732,   737,-32768,  1790,  2573,
--32768,-32768,  1211,   202,-32768,-32768,  1016,  1148,-32768,-32768,
--32768,-32768,  1145,  1151,  1067,-32768,  2573,  2573,  2573,-32768,
-  1790,  1158,  2573,  2573,  1159,-32768,   364,-32768,  1160,  2573,
-  4508,  4534,   757,-32768,  2573,  6489,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,  1024,-32768,-32768,-32768,-32768,  1790,
-   264,  2573,  1162,  1161,    19,-32768,  1165,  5458,     9,-32768,
--32768,-32768,   779,  4560,-32768,  1030,  3020,  2573,-32768,   254,
--32768,   254,  1168,-32768,  2573,  2573,-32768,-32768,  1169,  2573,
--32768,-32768,-32768,  1172,  4586,  1173,  1175,  1176,  2573,  2573,
-   902,  1178,  1179,  1180,  1182,  1183,  1186,-32768,  2536,  3510,
-  6510,  3258,   864,  3268,   254,  1188,   254,  1190,   254,  1192,
-  1194,  1195,  1196,  1200,   605,  1033,  6531,  3538,   445,-32768,
-  2573,  1790,-32768,-32768,  1790,  3286,   852,  6552,  1201,  1202,
-  1609,  1630,  1652,-32768,-32768,   276,  3020,  2573,  2573,  1790,
-  1063,   770,  3020,  1790,  1206,  1205,  1207,  1763,-32768,  1209,
-  1212,-32768,  1069,-32768,  1213,  2573,-32768,  3566,    72,   142,
--32768,  3594,  3622,-32768,  3650,  1218,  2573,-32768,-32768,-32768,
-  1891,  2163,  1240,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-  2182,  1255,  1078,-32768,  2573,-32768,  1116,   198,   447,-32768,
-  1118,   465,-32768,  1120,   469,-32768,  1123,-32768,-32768,-32768,
--32768,  1256,  1790,  1260,  1125,  2573,  3678,  1262,  1181,  2573,
--32768,  2573,-32768,-32768,-32768,-32768,-32768,-32768,-32768,  1267,
--32768,  2573,  4612,  4638,-32768,  1790,  2573,  1268,  1269,  1137,
--32768,-32768,-32768,     9,-32768,  1184,-32768,  4664,  1274,-32768,
--32768,  1275,  1276,  1277,  1278,  4690,-32768,-32768,-32768,-32768,
--32768,   864,  3314,-32768,   233,  1211,   198,  1211,   198,  1211,
-   198,-32768,   788,  1790,-32768,  3706,-32768,-32768,  2573,  3734,
-  3762,-32768,  1142,  3020,  2573,  2573,   796,  3020,-32768,-32768,
--32768,  1283,-32768,  2573,-32768,-32768,-32768,-32768,-32768,  1307,
-  1166,  2573,-32768,-32768,  3790,   471,   249,  3818,   522,   289,
-  3846,   525,   303,  1790,  1308,  1257,  2911,  1170,  2271,-32768,
--32768,  2573,  6573,  4716,    22,-32768,  4742,  1174,-32768,  3874,
-  1311,  2573,  1314,  1315,  2573,  1316,  1321,  2573,  1322,  1185,
--32768,  2573,-32768,   198,-32768,-32768,   797,-32768,  2573,-32768,
-  1790,  2573,  1324,-32768,-32768,  1189,  3902,-32768,-32768,  1191,
-  3930,-32768,-32768,  1193,  3958,-32768,  1325,  2377,   339,  2992,
-  1328,  1197,  6594,   801,  3986,  1203,   198,  1330,   198,  1332,
-   198,  1341,-32768,-32768,-32768,-32768,   198,-32768,   779,-32768,
-  1208,  1343,  1346,   354,-32768,  1210,   381,-32768,  1215,   426,
--32768,  1238,   459,   812,-32768,  1239,  1790,-32768,  1241,  1381,
-   198,  1383,   198,  1384,   198,-32768,   779,  1385,   779,   813,
-  1401,-32768,   478,-32768,   481,-32768,   493,-32768,-32768,   816,
--32768,  1402,-32768,  1403,  1404,  1406,   779,  1407,-32768,-32768,
--32768,-32768,-32768,-32768,  1420,  1421,-32768
+-32768,-32768,-32768,-32768,-32768,  2648,  2648,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,  2648,
+  2648,  2648,  2648,  2648,  2648,  2648,  1062,-32768,  2480,   722,
+-32768,-32768,  2648,  5164,  1061,  1063,   929,-32768,    37,  2648,
+  1065,  1066,  1156,-32768,  1071,   928,    15,  1067,-32768,  2648,
+-32768,   949,   722,   -11,  4248,   416,-32768,  2480,  2893,  2452,
+   777,-32768,  1729,-32768,  1031,  1803,  1803,  1076,  1803,   819,
+  1803,  1803,  1077,  1036,  1803,  1803,-32768,   729,-32768,  2480,
+  1196,  1081,   944,  1084,  1085,  1087,   844,  1089,  1091,  1092,
+  1093,  1094,  1095,  1096,  1100,   445,  4274,  4300,-32768,-32768,
+  2959,   960,   416,   416,   416,  2480,  2480,  2480,  2480,  1101,
+   963,   971,   -34,-32768,   492,-32768,    41,  1303,  1104,  1069,
+  6207,  1105,  1108,  1109,  1110,  1803,  1803,  1803,  1113,  4326,
+-32768,  2577,   680,  1112,  1114,  1115,  1116,  1117,  1119,  1122,
+-32768,  1121,-32768,   995,  2648,  2648,  1803,   984,-32768,  6228,
+  5187,  6249,  5210,  6270,  5233,  6291,  5256,  5279,   992,     1,
+  1000,  6312,   -65,-32768,-32768,   265,   528,   998,  1128,  1338,
+-32768,-32768,-32768,    15,  2648,-32768,   733,-32768,  6438,-32768,
+  1135,     6,  2648,    27,   734,-32768,  2648,   997,    29,    34,
+  1803,  1137,   999,  1001,  1139,  1141,  1803,  1004,  1144,  1145,
+-32768,   753,-32768,  1147,  2648,  1803,  1803,  1803,-32768,   313,
+  1803,  1803,  1803,  1803,  1803,  1803,  1803,   378,  2648,  2648,
+  2648,  1008,-32768,    56,   172,   185,   754,   757,   758,   767,
+-32768,  1803,  2648,-32768,-32768,  2288,    32,-32768,-32768,  1009,
+  1148,-32768,-32768,-32768,-32768,  1151,  1153,  1072,-32768,  2648,
+  2648,  2648,-32768,  1803,  1155,  2648,  2648,  1160,-32768,   230,
+-32768,  2648,  4352,  4378,   773,-32768,  2648,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,  1024,-32768,-32768,-32768,-32768,
+  1803,   510,  2648,  1161,  1165,    17,-32768,  1164,  5302,    15,
+-32768,-32768,-32768,   722,  4404,-32768,  1030,  6438,  2648,-32768,
+   416,-32768,   416,  1166,-32768,  2648,  2648,-32768,-32768,  1167,
+  2648,-32768,-32768,-32768,  1169,  4430,  1170,  1171,  1173,  2648,
+  2648,   921,  1174,  1175,  1176,  1177,  1179,  1197,-32768,  2611,
+  3025,  6333,  3328,   856,  3338,   416,  1200,   416,  1202,   416,
+  1203,  1204,  1205,  1206,  1207,   303,  1070,  6354,  3086,   522,
+-32768,  2648,  1803,-32768,-32768,  1803,  3356,   550,  6375,  1209,
+  1213,  1487,  1593,  1666,-32768,    76,  6438,  2648,  2648,  1803,
+  1075,   790,  6438,  1224,  1225,  1228,  1624,-32768,  1222,  1230,
+-32768,  1088,-32768,  1231,  2648,-32768,  3282,    46,    61,-32768,
+  3412,  3440,-32768,  3468,  1236,  2648,-32768,-32768,-32768,  1644,
+  1776,  1259,-32768,-32768,-32768,-32768,-32768,-32768,-32768,  1903,
+  1260,  1090,-32768,  2648,-32768,  1123,    41,   556,-32768,  1125,
+   594,-32768,  1126,   624,-32768,  1129,-32768,-32768,-32768,-32768,
+  1261,  1803,  1266,  1157,  2648,  3496,  1262,  1199,  2648,-32768,
+  2648,-32768,-32768,-32768,-32768,-32768,-32768,-32768,  1284,-32768,
+  2648,  4456,  4482,-32768,  1803,  2648,  1286,  1162,-32768,-32768,
+-32768,    15,-32768,  1210,-32768,  4508,  1294,-32768,-32768,  1300,
+  1301,  1302,  1304,  4534,-32768,-32768,-32768,-32768,-32768,   856,
+  3384,-32768,   204,  2288,    41,  2288,    41,  2288,    41,-32768,
+   794,  1803,-32768,  3524,-32768,-32768,  2648,  3552,  3580,-32768,
+  1168,  6438,  2648,  2648,   802,  6438,-32768,-32768,  1305,-32768,
+  2648,-32768,-32768,-32768,-32768,-32768,  1307,  1183,  2648,-32768,
+-32768,  3608,   637,   249,  3636,   693,   290,  3664,   695,   295,
+  1803,  1308,  1269,  3015,  1186,  2243,-32768,-32768,  2648,  6396,
+  4560,    25,-32768,  4586,  1188,-32768,  3692,  1328,  2648,  1329,
+  1330,  2648,  1331,  1332,  2648,  1333,  1215,-32768,  2648,-32768,
+    41,-32768,-32768,   806,-32768,  2648,-32768,  1803,  2648,  1351,
+-32768,-32768,  1214,  3720,-32768,-32768,  1219,  3748,-32768,-32768,
+  1220,  3776,-32768,  1362,  2266,   333,  3081,  1363,  1226,  6417,
+   807,  3804,  1232,    41,  1364,    41,  1367,    41,  1371,-32768,
+-32768,-32768,-32768,    41,-32768,   722,-32768,  1233,  1373,  1379,
+   367,-32768,  1238,   380,-32768,  1240,   393,-32768,  1241,   417,
+   810,-32768,  1245,  1803,-32768,  1267,  1385,    41,  1408,    41,
+  1409,    41,-32768,   722,  1410,   722,   811,  1411,-32768,   426,
+-32768,   440,-32768,   453,-32768,-32768,   839,-32768,  1412,-32768,
+  1413,  1414,  1430,   722,  1431,-32768,-32768,-32768,-32768,-32768,
+-32768,  1438,  1439,-32768
 };
 
 static const short yypgoto[] = {-32768,
--32768,-32768,   531,-32768,-32768,   837,-32768,   261,-32768,-32768,
+-32768,-32768,   649,-32768,-32768,-32768,-32768,   300,-32768,-32768,
 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,  -268,    20,-32768,   177,  1424,    -1,  -183,  -166,-32768,
--32768,-32768,-32768,-32768,  1425,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,  -672,
-  -701,-32768,-32768,-32768,    -2,-32768,   236,-32768, -1072,   462,
-   135,   -64,  -642,   524,-32768,   -60,     2
+  -277,     2,-32768,    73,  1448,     0,  -181,  -168,-32768,-32768,
+-32768,-32768,-32768,  1449,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,  -629,  -626,
+-32768,-32768,-32768,    -1,-32768,    36,-32768, -1051,   400,   130,
+   -63,  -635,   559,-32768,   -60,     3
 };
 
 
-#define	YYLAST		6734
+#define	YYLAST		6575
 
 
 static const short yytable[] = {   215,
-    66,   128,   375,  1127,   207,   130,   370,   586,   371,   182,
-   463,   363,   195,   134,   586,   141,   373,   209,   210,   793,
-   221,   458,   661,   127,   216,   146,   852,  1190,     3,   209,
-   210,   137,   279,   146,   151,   141,   784,   666,   138,   912,
-   156,   209,   210,   157,   397,   158,   198,   399,   131,   104,
-   105,   106,   107,   915,   919,   108,   224,   921,   225,   854,
-   174,   104,   105,   106,   107,   351,   352,   108,   226,   187,
-   227,   133,   188,   104,   105,   106,   107,  1090,   319,   108,
-   223,   530,   323,   142,   137,   587,   588,   589,   590,   591,
-   143,   721,   587,   588,   589,   590,   591,   351,   352,   175,
-   147,   208,   176,   142,   920,   177,   653,   922,   723,   132,
-   722,   351,   352,   537,   272,   273,   274,   136,  1214,   275,
-   278,   280,   281,   283,   152,   785,   786,   139,   353,   303,
-   459,   149,   305,   153,   306,   312,   315,   316,   724,   318,
-   312,   320,   321,   372,   312,   324,   325,  1091,   907,   333,
-   592,   183,   852,   135,   196,   120,   121,   879,   667,   211,
-   667,   217,   222,   218,   662,   349,   350,  1191,   219,   535,
-   536,   214,   120,   121,  1260,   350,   351,   352,   366,   140,
-   755,   199,   351,   352,   366,   166,   167,   351,   352,   382,
-   383,   384,   655,   386,   144,   168,   389,   390,   551,   354,
-   351,   352,   178,   725,   365,   451,   452,   453,   454,   726,
-   727,   228,   460,   229,   402,   113,   114,   115,   116,   145,
-   570,   408,   409,   410,   411,   412,   413,   414,   415,   416,
-   417,   418,   419,   420,   421,   422,   423,   424,   425,   426,
-   427,   428,   429,   430,   431,   432,   433,   434,   435,   436,
-   437,   438,   439,   440,   441,   442,   443,   444,   445,   446,
-   447,   448,   449,   511,   170,   172,  1004,   179,   210,   725,
-   351,   352,   313,   725,   312,   726,   727,   313,   851,   726,
-   727,   313,   148,   469,   470,   471,   472,   473,   474,   475,
-   476,   477,   478,   479,   480,   481,   482,   483,   464,   104,
-   105,   106,   107,   149,   725,   108,   491,   351,   352,   558,
-   726,   727,   351,   352,   499,   297,   298,   299,   653,   504,
-   725,   150,   300,   550,   491,   312,   726,   727,   955,   514,
-   956,   516,   517,   518,   159,   520,   521,   522,   524,   524,
-   524,   524,   525,   525,   525,   525,   351,   352,   970,   154,
-   826,   366,   366,   538,   539,   540,   541,   272,   273,   542,
-   725,   155,   957,   485,   958,  1105,   726,   727,   486,   556,
-   643,   312,   165,   799,   725,   644,   563,   564,   495,  1144,
-   726,   727,   166,   167,   462,   164,   120,   121,   574,   575,
-   576,   577,   168,   578,   755,  1173,   351,   352,   581,   169,
-   346,   584,   348,   852,   897,   827,   351,   352,   355,   495,
-   725,   313,   836,   364,   901,  1071,   726,   727,   553,   554,
-  1072,   669,   583,   585,   230,   725,   231,   113,   114,   115,
-   116,   726,   727,   173,  1147,  1176,  1150,   180,  1153,   351,
-   352,  1132,   181,   492,   693,   852,   120,   121,   852,  1179,
-   185,   852,   725,   649,   654,   959,   405,   960,   726,   727,
-   658,   492,   313,   657,   286,   287,   288,   289,   290,   291,
-   292,   293,   294,   295,   296,   297,   298,   299,   184,   232,
-   656,   233,   300,   312,   670,  1225,   649,   674,   939,   940,
-   675,   676,   678,   113,   114,   115,   116,   725,   120,   121,
-  1250,   351,   352,   726,   727,   186,   312,   852,   313,   676,
-   696,  1209,   120,   121,   900,   902,   702,   853,   526,   527,
-   528,   757,   189,   113,   114,   115,   116,  1252,   712,   713,
-   725,   234,   852,   235,   716,   852,   726,   727,   852,   948,
-   949,   852,   120,   121,  1234,   236,  1237,   237,  1240,   725,
-   192,   733,   725,   190,  1243,   726,   727,   736,   726,   727,
-   238,   852,   239,   852,   725,   852,   745,   191,   747,   748,
-   726,   727,  1254,   351,   352,   351,   352,   193,  1263,   777,
-  1265,   240,  1267,   241,   778,   201,   533,   534,   242,  1056,
-   243,  1106,   194,   351,   352,   200,   348,   351,   352,   351,
-   352,   756,   244,   202,   245,  1256,   203,   798,   802,  1108,
-   204,   330,   493,  1110,   246,  1172,   247,   337,   767,   768,
-   313,   248,   206,   249,  1274,   266,   205,  1275,   677,   679,
-   819,   282,   769,   770,   771,   772,   773,   774,   775,  1276,
-   267,   312,   369,   313,   284,   779,   677,   268,   377,   378,
-   351,   352,   787,   351,   352,   269,   844,   845,   846,   847,
-   301,   250,   796,   251,   302,   252,  1175,   253,   270,  1178,
-   312,   120,   121,   954,   254,   304,   255,   456,   256,   218,
-   257,   317,    76,   307,   219,   258,   322,   259,    80,    81,
-    82,   332,   312,    83,    84,    85,    86,    87,    88,    89,
-    90,    91,    92,    93,    94,    95,    96,    97,    98,    99,
-   100,   101,   102,   103,   260,   262,   261,   263,   312,   312,
-   312,   312,   308,   334,   286,   287,   288,   289,   290,   291,
-   292,   293,   294,   295,   296,   512,   298,   299,   450,   210,
-   335,   264,   300,   265,    28,    29,    30,    31,    32,    33,
-   495,  1052,   496,   336,    37,    38,   338,   339,   881,   882,
-   160,   340,   886,   161,   341,   711,   162,   342,   163,  1037,
-   104,   105,   106,   107,   343,   495,   108,   501,   313,   495,
-   344,   505,   209,   210,   641,   730,   642,   508,   810,   908,
-   811,   109,   110,   111,   112,   345,   495,   914,   652,   756,
-   495,   917,   694,   903,   495,   356,   735,   313,   117,   309,
-   495,   381,   818,   119,   104,   105,   106,   107,   122,   935,
-   108,   357,   909,   125,   910,   495,   510,   916,   495,   313,
-   933,   358,   359,   950,   951,   952,   291,   292,   293,   294,
-   295,   296,   297,   298,   299,   374,   965,   967,   379,   300,
-   968,   495,  1005,   961,   380,   313,   313,   313,   313,  1062,
-   387,   120,   121,   385,   976,   977,   978,   489,   388,   218,
-   981,   982,   391,   495,   219,   962,   495,   987,   963,   392,
-   393,   495,   993,   964,   288,   289,   290,   291,   292,   293,
-   294,   295,   296,   297,   298,   299,   984,   394,   395,   998,
-   300,   990,   997,   991,   396,  1023,   801,  1024,   295,   296,
-   297,   298,   299,   398,  1077,  1008,  1078,   300,  1141,   650,
-   651,   400,  1012,  1013,   869,   401,   403,  1015,    28,    29,
-    30,    31,  1154,    33,  1155,   404,  1021,  1022,    37,    38,
-   990,  1077,  1165,  1211,   407,   990,  1031,  1231,  1157,   455,
-  1032,   366,   300,   841,   842,   843,  1257,   990,  1258,  1272,
-  1277,   465,  1278,   466,   467,   490,   513,   519,  1057,   529,
-   555,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-   295,   296,   297,   298,   299,  1073,  1074,   552,   559,   300,
-   561,   560,   562,   568,   571,   645,   646,   647,  1063,   648,
-   659,   660,   664,  1088,   680,   671,   681,   682,   684,   685,
-   686,   687,   690,   689,  1096,   691,   692,   706,  1210,   698,
-   707,   708,   737,   738,   709,   710,   714,   208,   741,   742,
-   715,   743,  1103,   744,   761,   762,   286,   287,   288,   289,
-   290,   291,   292,   293,   294,   295,   296,   297,   298,   299,
-   763,   765,   766,  1116,   300,   776,   870,  1120,   781,  1121,
-   782,   783,   788,   789,   792,   791,   795,   797,   805,  1124,
-   808,   814,   821,   822,  1128,   289,   290,   291,   292,   293,
-   294,   295,   296,   297,   298,   299,   815,   823,   969,   824,
-   300,   825,   828,   829,   830,   831,   832,   833,   834,   835,
-   366,   840,   848,  1145,   849,  1148,   850,  1151,   856,   859,
-   857,   860,   861,   862,   866,   871,  1159,   880,   872,   873,
-   874,   875,  1163,  1164,   876,   877,   878,   885,   896,   898,
-   904,  1167,   285,   934,   905,   911,   918,   924,   925,  1170,
-   927,   926,   806,   807,   928,   809,   931,   812,   813,   932,
-   973,   816,   817,   930,   972,  1009,   974,  1010,   975,   993,
-   953,   971,   980,   983,  1000,   985,   995,   999,  1245,  1197,
-  1002,  1007,  1201,  1011,  1014,  1205,  1016,  1053,  1018,  1208,
-  1019,  1020,   468,  1025,  1026,  1027,  1213,  1028,  1029,  1215,
-  1039,  1030,  1042,  1040,  1045,  1043,  1268,  1046,  1271,  1048,
-  1049,  1050,   863,   864,   865,  1051,  1065,  1066,  1076,  1080,
-  1081,  1086,  1082,    76,   271,  1084,  1283,  1085,  1087,    80,
-    81,    82,  1095,  1102,    83,    84,    85,    86,    87,    88,
-    89,    90,    91,    92,    93,    94,    95,    96,    97,    98,
-    99,   100,   101,   102,   103,  1099,   286,   287,   288,   289,
-   290,   291,   292,   293,   294,   295,   296,   297,   298,   299,
-  1101,  1112,  1104,  1107,   300,  1109,  1114,  1118,  1111,   923,
-  1115,  1119,  1122,  1129,  1130,   929,  1131,  1133,   484,  1135,
-  1136,  1137,  1138,  1139,   936,   937,   938,  1162,  1166,   941,
-   942,   943,   944,   945,   946,   947,   286,   287,   288,   289,
-   290,   291,   292,   293,   294,   295,   296,   297,   298,   299,
-   966,  1168,  1169,  1181,   300,  1185,  1195,  1182,  1193,  1198,
-  1199,  1202,   109,   110,   111,   112,  1203,  1206,  1216,   913,
-  1223,  1207,   979,  1228,  1217,  1235,  1219,  1238,  1221,   360,
-   361,  1146,  1229,  1149,   119,  1152,  1241,  1233,  1248,   362,
-  1249,    76,   307,  1247,   125,  1251,   169,    80,    81,    82,
-  1253,   996,    83,    84,    85,    86,    87,    88,    89,    90,
-    91,    92,    93,    94,    95,    96,    97,    98,    99,   100,
-   101,   102,   103,  1255,  1259,   790,  1262,  1261,  1264,  1266,
-  1269,   308,   286,   287,   288,   289,   290,   291,   292,   293,
-   294,   295,   296,   297,   298,   299,  1273,  1279,  1280,  1281,
-   300,  1282,  1284,    28,    29,    30,    31,    32,    33,  1286,
-  1287,   759,  1187,    37,    38,    65,    72,     0,  1001,     0,
-     0,     0,     0,  1058,     0,     0,  1059,     0,     0,     0,
-     0,     0,   820,     0,  1070,     0,     0,     0,     0,   326,
-     0,  1075,     0,     0,     0,  1079,     0,     0,     0,     0,
-   109,   110,   111,   112,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,   855,     0,   117,   327,     0,
-     0,     0,   119,     0,     0,     0,     0,   122,     0,     0,
-     0,     0,   125,     0,   328,     0,     0,     0,     0,   286,
+   461,    66,   128,   661,   374,   127,   130,   583,   141,   362,
+   182,   903,   207,  1115,   372,   209,   210,   456,   195,   146,
+   656,   786,   216,   209,   210,   278,   369,   132,   370,   134,
+  1177,   141,   906,   151,   910,   350,   351,   720,   198,   912,
+   777,   483,   396,   721,   722,   398,   484,   104,   105,   106,
+   107,  1078,   352,   108,   638,   104,   105,   106,   107,   639,
+   146,   108,   174,   137,   170,   172,  1079,   179,   120,   121,
+   138,   551,   552,   350,   351,   142,   750,   350,   351,   318,
+     3,   222,   143,   322,   911,   584,   585,   586,   587,   913,
+   353,   131,   137,   147,   364,   149,   845,   847,   142,   716,
+   133,   175,   719,   720,   176,   717,   136,   177,   208,   721,
+   722,   844,   720,   279,   280,   271,   272,   273,   721,   722,
+   274,   277,   152,   662,   282,   457,  1201,   792,   778,   779,
+   302,   662,   493,   304,   718,   305,   311,   314,   315,   888,
+   317,   311,   319,   320,   493,   311,   323,   324,   898,   588,
+   332,   183,   120,   121,   350,   351,   211,   150,   217,   196,
+   218,   657,   371,   139,   214,   219,   348,   349,   135,  1178,
+   533,   534,   199,   350,   351,   187,   349,   961,   188,   365,
+   140,   650,  1247,   350,   351,   365,   166,   167,   350,   351,
+   381,   382,   383,   153,   385,   549,   168,   388,   389,   946,
+   345,   947,   347,   178,   449,   450,   451,   452,   354,   296,
+   297,   298,   458,   363,  1060,   401,   299,   568,   144,  1061,
+   845,   406,   407,   408,   409,   410,   411,   412,   413,   414,
+   415,   416,   417,   418,   419,   420,   421,   422,   423,   424,
+   425,   426,   427,   428,   429,   430,   431,   432,   433,   434,
+   435,   436,   437,   438,   439,   440,   441,   442,   443,   444,
+   445,   446,   447,   509,   993,   145,   223,   312,   224,   209,
+   210,   648,   312,   148,   311,   720,   312,   149,   225,   462,
+   226,   721,   722,   467,   468,   469,   470,   471,   472,   473,
+   474,   475,   476,   477,   478,   479,   480,   481,   154,   350,
+   351,   104,   105,   106,   107,   155,   489,   108,   159,   556,
+   491,   164,   350,   351,   497,   948,   181,   949,   156,   502,
+   720,   157,   165,   158,   489,   311,   721,   722,   950,   512,
+   951,   514,   515,   516,   173,   518,   519,   520,   522,   522,
+   522,   522,   523,   523,   523,   523,   350,   351,   227,  1131,
+   228,   365,   365,   536,   537,   538,   539,   271,   272,   540,
+   180,   720,   528,   120,   121,   648,   720,   721,   722,   554,
+   184,   311,   721,   722,   930,   931,   561,   562,   186,   113,
+   114,   115,   116,   939,   940,   531,   532,   185,   572,   573,
+   574,   575,   189,   576,  1160,   347,   192,  1093,   579,   120,
+   121,   582,   190,   581,   720,   312,   229,   750,   230,   193,
+   721,   722,   460,   524,   525,   526,   231,   233,   232,   234,
+   664,   285,   286,   287,   288,   289,   290,   291,   292,   293,
+   294,   295,   510,   297,   298,  1163,  1119,   490,   720,   299,
+  1166,   120,   121,   688,   721,   722,   191,   454,  1041,   218,
+   202,   720,   644,   194,   219,   490,   312,   721,   722,   653,
+   651,   235,   652,   236,   720,  1134,   845,  1137,   200,  1140,
+   721,   722,   201,   113,   114,   115,   116,   237,  1212,   238,
+   350,   351,   311,   665,   203,   644,   669,   204,   720,   670,
+   671,   673,   120,   121,   721,   722,   535,   720,   891,   893,
+   649,   205,   312,   721,   722,   311,   206,   845,   671,   691,
+   845,   720,  1237,   845,   210,   697,   221,   721,   722,   752,
+   113,   114,   115,   116,   720,  1239,   281,   707,   708,   265,
+   721,   722,   266,   711,   892,   267,   350,   351,  1241,   120,
+   121,  1196,   268,   166,   167,   104,   105,   106,   107,   329,
+   728,   108,   548,   168,   283,   336,   731,  1051,   448,   210,
+   169,   269,  1243,   706,   239,   740,   240,   742,   743,   845,
+   300,  1261,   350,   351,  1221,   770,  1224,   301,  1227,   771,
+   368,   751,   303,   725,  1230,  1262,   376,   377,   829,   316,
+   104,   105,   106,   107,   845,   321,   108,   845,  1263,   241,
+   845,   242,   791,   845,   795,   243,   331,   244,  1250,   245,
+  1252,   246,  1254,   312,   760,   761,   247,   333,   248,   350,
+   351,   672,   674,   845,   334,   845,   812,   845,   762,   763,
+   764,   765,   766,   767,   768,   846,   312,   311,   249,   672,
+   250,   772,   113,   114,   115,   116,   335,   344,   780,   350,
+   351,   337,   837,   838,   839,   840,   338,   251,   789,   252,
+   355,   120,   121,   339,   945,  1045,   311,   340,   285,   286,
    287,   288,   289,   290,   291,   292,   293,   294,   295,   296,
-   297,   298,   299,     0,  1113,    76,   307,   300,     0,     0,
-     0,    80,    81,    82,     0,     0,    83,    84,    85,    86,
-    87,    88,    89,    90,    91,    92,    93,    94,    95,    96,
-    97,    98,    99,   100,   101,   102,   103,     0,     0,     0,
-     0,     0,     0,     0,     0,   308,   286,   287,   288,   289,
-   290,   291,   292,   293,   294,   295,   296,   297,   298,   299,
-     0,     0,     0,     0,   300,  1156,     0,    28,    29,    30,
-    31,    32,    33,   906,     0,     0,     0,    37,    38,   286,
+   297,   298,   341,   350,   351,   342,   299,   862,   311,   294,
+   295,   296,   297,   298,   343,  1052,     5,     6,   299,  1094,
+   378,   794,   287,   288,   289,   290,   291,   292,   293,   294,
+   295,   296,   297,   298,   311,   311,   311,   311,   299,   356,
+   357,   350,   351,   358,   506,   209,   210,   541,    11,    12,
+   542,    14,    15,   543,    17,   544,    19,  1096,    20,   160,
+    22,    23,   161,    25,    26,   162,   373,   163,   834,   835,
+   836,   350,   351,   873,   874,   379,   380,   104,   105,   106,
+   107,    39,  1026,   108,   350,   351,   384,  1098,   312,   120,
+   121,    43,    44,    45,   751,   487,   386,   218,   894,   253,
+  1159,   254,   219,   899,   387,    52,    53,    54,   255,    55,
+   256,   905,   545,   390,   257,   908,   258,   312,   285,   286,
    287,   288,   289,   290,   291,   292,   293,   294,   295,   296,
-   297,   298,   299,     0,     0,     0,     0,   300,     0,     0,
-     0,     0,     0,   376,  1067,  1180,     0,     0,     0,     0,
-     0,     0,     0,     0,   109,   110,   111,   112,     0,     0,
-     0,     0,     0,     0,     0,  1068,     0,     0,     0,     0,
-     0,   117,   327,     0,     0,     0,   119,     0,     0,     0,
-     0,   122,     0,     0,    76,   307,   125,  1069,   328,     0,
-    80,    81,    82,     0,     0,    83,    84,    85,    86,    87,
-    88,    89,    90,    91,    92,    93,    94,    95,    96,    97,
-    98,    99,   100,   101,   102,   103,     0,     0,     0,     0,
-     0,     0,     0,     0,   308,     0,     0,   286,   287,   288,
+   297,   298,   259,   926,   260,   261,   299,   262,   863,   312,
+   350,   351,   350,   351,   263,   394,   264,   941,   942,   943,
+   555,   493,   493,   494,   499,   493,  1162,   503,  1165,   391,
+   956,   958,   392,   994,   959,   312,   312,   312,   312,   819,
+   636,   493,   637,   647,   393,   645,   646,   395,   967,   968,
+   969,   493,   397,   689,   972,   973,   493,   803,   730,   804,
+   977,   975,   493,   399,   811,   983,   900,   493,   901,   907,
+   400,   960,   290,   291,   292,   293,   294,   295,   296,   297,
+   298,   987,   284,   402,   986,   299,   493,   493,   924,   952,
+   493,   493,   953,   954,   820,   403,   405,   997,  1128,   453,
+   493,   466,   955,   299,  1001,  1002,   980,   463,   981,  1004,
+    28,    29,    30,    31,  1012,    33,  1013,   465,  1010,  1011,
+    37,    38,   464,  1066,  1144,  1067,   488,  1141,  1020,  1142,
+   511,   517,  1021,   365,   550,   980,   998,  1152,   999,  1066,
+   980,  1198,  1218,  1244,   980,  1245,  1259,   553,   732,   733,
+  1046,   527,   285,   286,   287,   288,   289,   290,   291,   292,
+   293,   294,   295,   296,   297,   298,  1062,  1063,   557,   558,
+   299,  1028,  1264,  1031,  1265,  1034,   559,   560,   566,   569,
+   640,   641,   642,  1076,   643,   654,   655,   666,   659,   701,
+   676,   675,   677,  1197,  1084,   285,   286,   287,   288,   289,
+   290,   291,   292,   293,   294,   295,   296,   297,   298,   679,
+   681,   680,  1091,   299,   285,   286,   287,   288,   289,   290,
+   291,   292,   293,   294,   295,   296,   297,   298,   682,   684,
+   685,   686,   299,  1104,   687,   705,   693,  1108,   702,  1109,
+   703,   704,   208,   709,   710,   736,   737,   738,   739,  1112,
+   755,   756,   757,   759,  1116,   769,   774,   785,   775,   776,
+   781,   782,   788,   482,   790,   799,   800,   784,   802,   798,
+   805,   806,   801,   807,   809,   810,   808,   814,   815,   365,
+   816,   817,  1132,   818,  1135,   821,  1138,   822,   823,   824,
+   825,   826,   827,   828,   833,  1146,   841,   842,   843,   849,
+   852,  1150,  1151,   853,   854,   855,   859,   850,   864,  1154,
+   865,   866,   867,   868,   869,   870,   871,  1157,   877,  1133,
+   887,  1136,   872,  1139,   896,   856,   857,   858,   889,   895,
+   902,   909,   915,   916,   918,   917,   919,   983,   921,   922,
+   923,   925,   944,   962,   963,  1232,   964,  1184,   965,   971,
+  1188,   783,   966,  1192,   974,   984,   988,  1195,   989,   991,
+   996,  1000,  1003,  1005,  1200,  1007,  1008,  1202,  1009,  1014,
+  1015,  1016,  1017,  1255,  1018,  1258,   285,   286,   287,   288,
    289,   290,   291,   292,   293,   294,   295,   296,   297,   298,
-   299,     0,     0,     0,     0,   300,    28,    29,    30,    31,
-    32,    33,   493,     0,     0,     0,    37,    38,   286,   287,
-   288,   289,   290,   291,   292,   293,   294,   295,   296,   297,
-   298,   299,     0,     0,     0,     0,   300,     0,     0,   286,
-   287,   288,   289,   290,   291,   292,   293,   294,   295,   296,
-   297,   298,   299,   109,   110,   111,   112,   300,  1083,     0,
+   914,   813,  1019,  1270,   299,  1029,   920,  1032,  1035,  1037,
+  1038,  1039,  1040,  1042,  1054,   927,   928,   929,  1055,  1065,
+   932,   933,   934,   935,   936,   937,   938,  1068,  1072,  1074,
+  1069,    76,   306,  1070,  1090,  1073,  1075,    80,    81,    82,
+  1083,   957,    83,    84,    85,    86,    87,    88,    89,    90,
+    91,    92,    93,    94,    95,    96,    97,    98,    99,   100,
+   101,   102,   103,   970,  1087,  1089,  1100,  1106,  1092,  1095,
+  1097,   307,  1102,  1099,   285,   286,   287,   288,   289,   290,
+   291,   292,   293,   294,   295,   296,   297,   298,  1107,  1110,
+   985,  1117,   299,    28,    29,    30,    31,    32,    33,  1122,
+  1118,  1103,  1120,    37,    38,  1123,  1124,  1125,   848,  1126,
+  1153,  1155,  1149,  1168,   285,   286,   287,   288,   289,   290,
+   291,   292,   293,   294,   295,   296,   297,   298,  1156,  1169,
+  1172,  1180,   299,  1182,  1185,  1186,  1189,  1190,  1193,   109,
+   110,   111,   112,   897,   288,   289,   290,   291,   292,   293,
+   294,   295,   296,   297,   298,  1203,   117,   308,  1204,   299,
+  1194,   119,  1047,  1206,  1208,  1048,   122,  1210,  1215,  1222,
+  1216,   125,  1225,  1059,   508,  1220,  1228,  1234,  1235,  1064,
+    76,   306,  1238,  1236,  1240,  1242,    80,    81,    82,  1246,
+  1249,    83,    84,    85,    86,    87,    88,    89,    90,    91,
+    92,    93,    94,    95,    96,    97,    98,    99,   100,   101,
+   102,   103,  1248,  1251,  1253,  1256,  1260,  1266,  1267,  1268,
+   307,   285,   286,   287,   288,   289,   290,   291,   292,   293,
+   294,   295,   296,   297,   298,  1269,  1271,  1273,  1274,   299,
+   904,  1101,    28,    29,    30,    31,    32,    33,  1174,    65,
+    72,     0,    37,    38,   990,     0,   285,   286,   287,   288,
+   289,   290,   291,   292,   293,   294,   295,   296,   297,   298,
+     0,     0,     0,     0,   299,     0,     0,   325,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,   109,   110,
+   111,   112,  1056,     0,     0,     0,     0,     0,     0,     0,
+     0,  1143,     0,     0,     0,   117,   326,     0,     0,     0,
+   119,     0,     0,     0,     0,   122,     0,     0,     0,     0,
+   125,     0,   327,     0,     0,     0,     0,     0,     0,     0,
+    76,   306,     0,     0,     0,     0,    80,    81,    82,     0,
+  1167,    83,    84,    85,    86,    87,    88,    89,    90,    91,
+    92,    93,    94,    95,    96,    97,    98,    99,   100,   101,
+   102,   103,     0,     0,     0,     0,     0,     0,     0,     0,
+   307,     0,   285,   286,   287,   288,   289,   290,   291,   292,
+   293,   294,   295,   296,   297,   298,     0,     0,     0,     0,
+   299,     0,    28,    29,    30,    31,    32,    33,  1057,   694,
+     0,     0,    37,    38,     0,   285,   286,   287,   288,   289,
+   290,   291,   292,   293,   294,   295,   296,   297,   298,     0,
+     0,     0,     0,   299,     0,     0,     0,   375,     0,  1071,
+     0,     0,     0,     0,     0,     0,     0,     0,   109,   110,
+   111,   112,     0,     0,     0,     0,     0,     0,     0,  1085,
+     0,     0,     0,     0,     0,   117,   326,     0,     0,     0,
+   119,     0,     0,     0,     0,   122,     0,     0,    76,   306,
+   125,  1058,   327,     0,    80,    81,    82,     0,     0,    83,
+    84,    85,    86,    87,    88,    89,    90,    91,    92,    93,
+    94,    95,    96,    97,    98,    99,   100,   101,   102,   103,
+     0,     0,     0,     0,     0,     0,     0,     0,   307,     0,
+     0,   285,   286,   287,   288,   289,   290,   291,   292,   293,
+   294,   295,   296,   297,   298,     0,     0,     0,     0,   299,
+    28,    29,    30,    31,    32,    33,   491,     0,     0,     0,
+    37,    38,   285,   286,   287,   288,   289,   290,   291,   292,
+   293,   294,   295,   296,   297,   298,     0,     0,     0,     0,
+   299,     0,   285,   286,   287,   288,   289,   290,   291,   292,
+   293,   294,   295,   296,   297,   298,   109,   110,   111,   112,
+   299,  1086,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,   117,   326,     0,     0,     0,   119,     0,
+     0,     0,     0,   122,     0,    76,   306,     0,   125,     0,
+   327,    80,    81,    82,     0,     0,    83,    84,    85,    86,
+    87,    88,    89,    90,    91,    92,    93,    94,    95,    96,
+    97,    98,    99,   100,   101,   102,   103,     0,     0,     0,
+     0,     0,     0,     0,     0,   307,     0,   285,   286,   287,
+   288,   289,   290,   291,   292,   293,   294,   295,   492,   297,
+   298,     0,     0,     0,     0,   299,     0,    28,    29,    30,
+    31,    32,    33,   491,     0,     0,     0,    37,    38,     0,
      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-   117,   327,     0,     0,     0,   119,     0,     0,     0,     0,
-   122,     0,    76,   307,     0,   125,     0,   328,    80,    81,
+     0,     0,     0,     0,   285,   286,   287,   288,   289,   290,
+   291,   292,   293,   294,   295,   296,   297,   298,  1088,     0,
+     0,     0,   299,   109,   110,   111,   112,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+   117,   326,     0,     0,     0,   119,     0,     0,     0,     0,
+   122,     0,    76,   306,     0,   125,     0,   327,    80,    81,
     82,     0,     0,    83,    84,    85,    86,    87,    88,    89,
     90,    91,    92,    93,    94,    95,    96,    97,    98,    99,
    100,   101,   102,   103,     0,     0,     0,     0,     0,     0,
-     0,     0,   308,     0,   286,   287,   288,   289,   290,   291,
-   292,   293,   294,   295,   296,   494,   298,   299,     0,     0,
-     0,     0,   300,     0,    28,    29,    30,    31,    32,    33,
-   493,     0,     0,     0,    37,    38,     0,     0,     0,     0,
+     0,     0,   307,     0,   285,   286,   287,   288,   289,   290,
+   291,   292,   293,   294,   295,   510,   297,   298,     0,     0,
+     0,     0,   299,     0,    28,    29,    30,    31,    32,    33,
+   570,     0,     0,     0,    37,    38,     0,     0,     0,     0,
+     0,   285,   286,   287,   288,   289,   290,   291,   292,   293,
+   294,   295,   296,   297,   298,     0,     0,     0,     0,   299,
      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,   286,   287,   288,   289,   290,   291,   292,   293,
-   294,   295,   296,   297,   298,   299,  1097,     0,     0,     0,
-   300,   109,   110,   111,   112,     0,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,     0,   117,   327,
-     0,     0,     0,   119,     0,     0,     0,     0,   122,     0,
-    76,   307,     0,   125,     0,   328,    80,    81,    82,     0,
-     0,    83,    84,    85,    86,    87,    88,    89,    90,    91,
-    92,    93,    94,    95,    96,    97,    98,    99,   100,   101,
-   102,   103,     0,     0,     0,     0,     0,     0,     0,     0,
-   308,     0,   286,   287,   288,   289,   290,   291,   292,   293,
-   294,   295,   296,   512,   298,   299,     0,     0,     0,     0,
-   300,     0,    28,    29,    30,    31,    32,    33,   572,     0,
-     0,     0,    37,    38,     0,     0,     0,     0,     0,     0,
-   286,   287,   288,   289,   290,   291,   292,   293,   294,   295,
-   296,   297,   298,   299,     0,     0,     0,     0,   300,     0,
-     0,     0,     0,     0,     0,     0,     0,     0,     0,   109,
-   110,   111,   112,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,     0,   117,   309,     0,     0,
-     0,   119,     0,     0,     0,     0,   122,     0,    76,   307,
-     0,   125,     0,   509,    80,    81,    82,     0,     0,    83,
-    84,    85,    86,    87,    88,    89,    90,    91,    92,    93,
-    94,    95,    96,    97,    98,    99,   100,   101,   102,   103,
-     0,     0,     0,     0,     0,     0,     0,     0,   308,     0,
-   286,   287,   288,   289,   290,   291,   292,   293,   294,   295,
-   296,   297,   298,   299,     0,     0,     0,     0,   300,     0,
-    28,    29,    30,    31,    32,    33,    76,   271,     0,     0,
-    37,    38,    80,    81,    82,     0,     0,    83,    84,    85,
-    86,    87,    88,    89,    90,    91,    92,    93,    94,    95,
-    96,    97,    98,    99,   100,   101,   102,   103,  1098,     0,
+   109,   110,   111,   112,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,   117,   308,     0,
+     0,     0,   119,     0,     0,     0,     0,   122,     0,    76,
+   306,     0,   125,     0,   507,    80,    81,    82,     0,     0,
+    83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
+    93,    94,    95,    96,    97,    98,    99,   100,   101,   102,
+   103,     0,     0,     0,     0,     0,     0,     0,     0,   307,
+     0,   285,   286,   287,   288,   289,   290,   291,   292,   293,
+   294,   295,   296,   297,   298,     0,     0,     0,     0,   299,
+     0,    28,    29,    30,    31,    32,    33,    76,   270,     0,
+     0,    37,    38,    80,    81,    82,     0,     0,    83,    84,
+    85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
+    95,    96,    97,    98,    99,   100,   101,   102,   103,     0,
      0,     0,     0,     0,     0,     0,     0,   109,   110,   111,
-   112,     0,     0,     0,     0,     0,     0,  1100,     0,     0,
-     0,     0,     0,     0,   117,   309,     0,     0,     0,   119,
-     0,     0,     0,     0,   122,     0,    76,   271,     0,   125,
-     0,   695,    80,    81,    82,     0,     0,    83,    84,    85,
+   112,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,   117,   308,     0,     0,     0,   119,
+     0,     0,     0,     0,   122,     0,    76,   270,     0,   125,
+     0,   690,    80,    81,    82,     0,     0,    83,    84,    85,
     86,    87,    88,    89,    90,    91,    92,    93,    94,    95,
-    96,    97,    98,    99,   100,   101,   102,   103,     0,     0,
+    96,    97,    98,    99,   100,   101,   102,   103,  1173,     0,
      0,     0,     0,     0,     0,   109,   110,   111,   112,     0,
      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,   117,   118,     0,     0,     0,   119,     0,     0,
-     0,     0,   122,     0,     0,   276,  1186,   125,     0,   277,
-     0,     0,   286,   287,   288,   289,   290,   291,   292,   293,
-   294,   295,   296,   297,   298,   299,     0,     0,     0,     0,
-   300,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-   295,   296,   297,   298,   299,   109,   110,   111,   112,   300,
-     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,   117,   118,     0,     0,     0,   119,     0,     0,
-     0,     0,   122,     0,     0,   672,     0,   125,     0,   673,
-    76,    77,    78,     0,    79,     0,    80,    81,    82,     0,
+     0,  1211,   117,   118,     0,     0,     0,   119,     0,     0,
+     0,     0,   122,     0,     0,   275,     0,   125,     0,   276,
+    76,   270,     0,     0,     0,     0,    80,    81,    82,     0,
      0,    83,    84,    85,    86,    87,    88,    89,    90,    91,
     92,    93,    94,    95,    96,    97,    98,    99,   100,   101,
-   102,   103,  1224,   104,   105,   106,   107,     0,     0,   108,
-   286,   287,   288,   289,   290,   291,   292,   293,   294,   295,
-   296,   297,   298,   299,     0,     0,    76,   307,   300,     0,
-     0,     0,    80,    81,    82,     0,     0,    83,    84,    85,
-    86,    87,    88,    89,    90,    91,    92,    93,    94,    95,
-    96,    97,    98,    99,   100,   101,   102,   103,     0,     0,
-     0,     0,     0,     0,     0,     0,   308,     0,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,     0,     0,   109,
-   110,   111,   112,   113,   114,   115,   116,     0,    28,    29,
-    30,    31,    32,    33,     0,     0,   117,   118,    37,    38,
-     0,   119,   120,   121,     0,     0,   122,     0,   123,     0,
-   124,   125,     0,     0,     0,   665,   286,   287,   288,   289,
-   290,   291,   292,   293,   294,   295,   296,   297,   298,   299,
-     0,     0,     0,     0,   300,   109,   110,   111,   112,     0,
-     0,   804,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,   117,   309,     0,     0,     0,   119,    76,   271,
-   210,     0,   122,     0,    80,    81,    82,   125,     0,    83,
-    84,    85,    86,    87,    88,    89,    90,    91,    92,    93,
-    94,    95,    96,    97,    98,    99,   100,   101,   102,   103,
-     0,   104,   105,   106,   107,    76,   271,   108,     0,     0,
-     0,    80,    81,    82,     0,     0,    83,    84,    85,    86,
-    87,    88,    89,    90,    91,    92,    93,    94,    95,    96,
-    97,    98,    99,   100,   101,   102,   103,   286,   287,   288,
-   289,   290,   291,   292,   293,   294,   295,   296,   297,   298,
-   299,     0,     0,     0,     0,   300,     0,     0,     0,     0,
-     0,     0,     0,   286,   287,   288,   289,   290,   291,   292,
-   293,   294,   295,   296,   297,   298,   299,   109,   110,   111,
-   112,   300,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,     0,   117,   118,     0,     0,     0,   119,
-     0,     0,     0,     0,   122,     0,     0,     0,     0,   125,
-     0,     0,     0,     0,   109,   110,   111,   112,     5,     6,
+   102,   103,     0,     0,   109,   110,   111,   112,     0,     0,
      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
      0,   117,   118,     0,     0,     0,   119,     0,     0,     0,
-     0,   122,     5,     6,     0,     0,   125,     0,     0,   543,
-    11,    12,   544,    14,    15,   545,    17,   546,    19,     0,
-    20,     0,    22,    23,     0,    25,    26,     0,     0,     0,
-     0,     0,     0,   543,    11,    12,   544,    14,    15,   545,
-    17,   546,    19,    39,    20,     0,    22,    23,     0,    25,
-    26,     0,     0,     0,    43,    44,    45,     0,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,    39,    52,    53,
-    54,     0,    55,     0,     0,   547,     0,     0,    43,    44,
-    45,     0,     0,     5,     6,     0,     0,     0,     0,     0,
-     0,     0,    52,    53,    54,     0,    55,     0,     0,   547,
-     0,     0,     0,     0,     0,     0,     0,     5,     6,     0,
-     0,     0,     0,   557,   543,    11,    12,   544,    14,    15,
-   545,    17,   546,    19,     0,    20,     0,    22,    23,     0,
-    25,    26,     0,     0,     0,     0,     0,   579,   543,    11,
-    12,   544,    14,    15,   545,    17,   546,    19,    39,    20,
-     0,    22,    23,     0,    25,    26,     0,     0,     0,    43,
-    44,    45,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,    39,    52,    53,    54,     0,    55,     0,     0,
-   547,     0,     0,    43,    44,    45,     0,     0,     5,     6,
+     0,   122,     0,     0,   667,     0,   125,   660,   668,     0,
+     0,   285,   286,   287,   288,   289,   290,   291,   292,   293,
+   294,   295,   296,   297,   298,     0,     0,     0,     0,   299,
+     0,     0,     0,     0,   285,   286,   287,   288,   289,   290,
+   291,   292,   293,   294,   295,   296,   297,   298,   109,   110,
+   111,   112,   299,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,   359,   360,     0,     0,     0,
+   119,     0,     0,     0,     0,   361,     0,    76,    77,    78,
+   125,    79,   169,    80,    81,    82,     0,     0,    83,    84,
+    85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
+    95,    96,    97,    98,    99,   100,   101,   102,   103,   797,
+   104,   105,   106,   107,     0,     0,   108,     0,   285,   286,
+   287,   288,   289,   290,   291,   292,   293,   294,   295,   296,
+   297,   298,    76,   306,     0,     0,   299,     0,    80,    81,
+    82,     0,     0,    83,    84,    85,    86,    87,    88,    89,
+    90,    91,    92,    93,    94,    95,    96,    97,    98,    99,
+   100,   101,   102,   103,     0,     0,     0,     0,     0,     0,
+     0,     0,   307,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,   109,   110,   111,   112,   113,
+   114,   115,   116,     0,    28,    29,    30,    31,    32,    33,
+     0,     0,   117,   118,    37,    38,     0,   119,   120,   121,
+     0,     0,   122,     0,   123,     0,   124,   125,     0,     0,
+   285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
+   295,   296,   297,   298,   861,     0,     0,     0,   299,     0,
+   109,   110,   111,   112,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,   117,   308,     0,
+     0,     0,   119,    76,   270,   210,     0,   122,     0,    80,
+    81,    82,   125,     0,    83,    84,    85,    86,    87,    88,
+    89,    90,    91,    92,    93,    94,    95,    96,    97,    98,
+    99,   100,   101,   102,   103,     0,   104,   105,   106,   107,
+    76,   270,   108,     0,     0,     0,    80,    81,    82,     0,
+     0,    83,    84,    85,    86,    87,    88,    89,    90,    91,
+    92,    93,    94,    95,    96,    97,    98,    99,   100,   101,
+   102,   103,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,   285,   286,   287,   288,   289,
+   290,   291,   292,   293,   294,   295,   296,   297,   298,     0,
+     0,     0,     0,   299,     0,     0,     0,     0,     0,     0,
+     0,   109,   110,   111,   112,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,   117,   118,
+     0,     0,     0,   119,     0,     0,     0,     0,   122,     0,
+     0,     0,     0,   125,     0,     0,     0,     0,   109,   110,
+   111,   112,     5,     6,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,   117,   118,     0,     0,     0,
+   119,     0,     0,     0,     0,   122,     0,     0,     0,     0,
+   125,     0,     0,   541,    11,    12,   542,    14,    15,   543,
+    17,   544,    19,     0,    20,     0,    22,    23,     0,    25,
+    26,     0,     0,   285,   286,   287,   288,   289,   290,   291,
+   292,   293,   294,   295,   296,   297,   298,    39,     5,     6,
+     0,   299,     0,     0,     0,     0,     0,    43,    44,    45,
+   698,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,    52,    53,    54,     0,    55,     0,     0,   545,   541,
+    11,    12,   542,    14,    15,   543,    17,   544,    19,     0,
+    20,     0,    22,    23,     0,    25,    26,     0,     0,   285,
+   286,   287,   288,   289,   290,   291,   292,   293,   294,   295,
+   296,   297,   298,    39,     5,     6,   577,   299,     0,     0,
+     0,     0,     0,    43,    44,    45,   699,     0,     0,     0,
      0,     0,     0,     0,     0,     0,     0,    52,    53,    54,
-     0,    55,     0,     0,   547,     0,     0,     0,     0,     0,
-     0,     0,     5,     6,     0,     0,     0,     0,   580,   543,
-    11,    12,   544,    14,    15,   545,    17,   546,    19,     0,
-    20,     0,    22,    23,     0,    25,    26,     0,     0,     0,
-     0,     0,   731,   543,    11,    12,   544,    14,    15,   545,
-    17,   546,    19,    39,    20,     0,    22,    23,     0,    25,
-    26,     0,     0,     0,    43,    44,    45,     0,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,    39,    52,    53,
-    54,   868,    55,     0,     0,   547,     0,     0,    43,    44,
-    45,     0,     0,     5,     6,     0,     0,     0,     0,     0,
-     0,     0,    52,    53,    54,     0,    55,     0,     0,   547,
-     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,   746,   543,    11,    12,   544,    14,    15,
-   545,    17,   546,    19,     0,    20,     0,    22,    23,     0,
-    25,    26,     0,     0,     0,     0,     0,  1183,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,     0,    39,     0,
-     0,     0,     0,     0,     0,     0,     0,     0,     0,    43,
-    44,    45,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,    55,     0,     0,   545,   541,    11,    12,   542,    14,
+    15,   543,    17,   544,    19,     0,    20,     0,    22,    23,
+     0,    25,    26,     0,     0,   285,   286,   287,   288,   289,
+   290,   291,   292,   293,   294,   295,   296,   297,   298,    39,
+     5,     6,   578,   299,     0,     0,     0,     0,     0,    43,
+    44,    45,   753,     0,     0,     0,     0,     0,     0,     0,
      0,     0,     0,    52,    53,    54,     0,    55,     0,     0,
-   547,     0,     0,   286,   287,   288,   289,   290,   291,   292,
-   293,   294,   295,   296,   297,   298,   299,     0,    -3,     1,
-     0,   300,    -3,     0,     0,     0,     0,     0,     0,     0,
-    -3,    -3,     0,     0,     0,     0,     0,     0,  1226,   286,
-   287,   288,   289,   290,   291,   292,   293,   294,   295,   296,
-   297,   298,   299,    -3,     0,     0,     0,   300,    -3,    -3,
-     0,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    -3,
-    -3,     0,    -3,    -3,    -3,    -3,    -3,    -3,    -3,     0,
-     0,     0,    -3,    -3,    -3,    -3,    -3,    -3,    -3,     0,
-    -3,    -3,    -3,    -3,    -3,    -3,     0,     0,    -3,    -3,
-     0,     4,     0,     0,     0,    -3,    -3,    -3,    -3,     5,
+   545,   541,    11,    12,   542,    14,    15,   543,    17,   544,
+    19,     0,    20,     0,    22,    23,     0,    25,    26,     0,
+     0,   285,   286,   287,   288,   289,   290,   291,   292,   293,
+   294,   295,   296,   297,   298,    39,     5,     6,   726,   299,
+     0,     0,     0,     0,     0,    43,    44,    45,   796,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,    52,
+    53,    54,     0,    55,     0,     0,   545,   541,    11,    12,
+   542,    14,    15,   543,    17,   544,    19,     0,    20,     0,
+    22,    23,     0,    25,    26,     0,     0,   285,   286,   287,
+   288,   289,   290,   291,   292,   293,   294,   295,   296,   297,
+   298,    39,     5,     6,   741,   299,     0,     0,     0,     0,
+     0,    43,    44,    45,   832,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,    52,    53,    54,     0,    55,
+     0,     0,   545,   541,    11,    12,   542,    14,    15,   543,
+    17,   544,    19,     0,    20,     0,    22,    23,     0,    25,
+    26,     0,     0,   285,   286,   287,   288,   289,   290,   291,
+   292,   293,   294,   295,   296,   297,   298,    39,     0,     0,
+  1170,   299,     0,     0,     0,     0,     0,    43,    44,    45,
+  1022,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,    52,    53,    54,     0,    55,     0,     0,   545,    -3,
+     1,     0,     0,    -3,     0,     0,     0,     0,     0,     0,
+     0,    -3,    -3,     0,   285,   286,   287,   288,   289,   290,
+   291,   292,   293,   294,   295,   296,   297,   298,     0,     0,
+     0,     0,   299,     0,    -3,     0,  1213,     0,     0,    -3,
+    -3,  1044,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    -3,
+    -3,    -3,     0,    -3,    -3,    -3,    -3,    -3,    -3,    -3,
+     0,     0,     0,    -3,    -3,    -3,    -3,    -3,    -3,    -3,
+     0,    -3,    -3,    -3,    -3,    -3,    -3,     0,     0,    -3,
+    -3,     4,     0,     0,     0,    -3,    -3,    -3,    -3,     5,
      6,    -3,     0,    -3,     0,    -3,    -3,    -3,    -3,     0,
     -3,    -3,    -3,     0,    -3,    -3,    -3,    -3,    -3,    -3,
      0,     0,     7,     0,     0,     0,     0,     8,     9,     0,
@@ -1303,1029 +1302,990 @@ static const short yytable[] = {   215,
      0,    20,    21,    22,    23,    24,    25,    26,     0,     0,
      0,    27,    28,    29,    30,    31,    32,    33,     0,    34,
     35,    36,    37,    38,    39,     0,     0,    40,    41,     5,
-     6,     0,     0,     0,    42,    43,    44,    45,     0,     0,
-    46,     0,    47,     0,    48,    49,    50,    51,     0,    52,
-    53,    54,     0,    55,    56,    57,    58,    59,    60,     0,
-   543,    11,    12,   544,    14,    15,   545,    17,   546,    19,
-     0,    20,     0,    22,    23,     0,    25,    26,   286,   287,
-   288,   289,   290,   291,   292,   293,   294,   295,   296,   297,
-   298,   299,     0,     0,    39,     0,   300,     0,   457,     0,
-     0,     0,     0,   531,     0,    43,    44,    45,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,     0,     0,    52,
-    53,    54,     0,    55,     0,     0,   547,   286,   287,   288,
-   289,   290,   291,   292,   293,   294,   295,   296,   297,   298,
-   299,     0,     0,     0,     0,   300,     0,     0,     0,     0,
-     0,     0,  1035,     0,  1036,   286,   287,   288,   289,   290,
-   291,   292,   293,   294,   295,   296,   297,   298,   299,     0,
-     0,     0,     0,   300,     0,     0,     0,     0,     0,     0,
-  1060,     0,  1061,   286,   287,   288,   289,   290,   291,   292,
-   293,   294,   295,   296,   297,   298,   299,     0,     0,     0,
-     0,   300,     0,     0,     0,     0,     0,     0,  1142,     0,
-  1143,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-   295,   296,   297,   298,   299,     0,     0,     0,     0,   300,
-     0,     0,     0,     0,     0,     0,     0,     0,   699,   286,
-   287,   288,   289,   290,   291,   292,   293,   294,   295,   296,
-   297,   298,   299,     0,     0,     0,     0,   300,     0,     0,
-     0,     0,     0,     0,     0,     0,   703,   286,   287,   288,
+     6,     0,     0,    42,    43,    44,    45,     0,     0,    46,
+     0,    47,     0,    48,    49,    50,    51,     0,    52,    53,
+    54,     0,    55,    56,    57,    58,    59,    60,     0,     0,
+   541,    11,    12,   542,    14,    15,   543,    17,   544,    19,
+     0,    20,     0,    22,    23,     0,    25,    26,     0,     0,
+   285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
+   295,   296,   297,   298,    39,     0,     0,     0,   299,     0,
+     0,     0,     0,     0,    43,    44,    45,  1077,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,    52,    53,
+    54,     0,    55,     0,     0,   545,   285,   286,   287,   288,
    289,   290,   291,   292,   293,   294,   295,   296,   297,   298,
-   299,     0,     0,     0,     0,   300,     0,     0,     0,     0,
-     0,     0,     0,     0,   704,   286,   287,   288,   289,   290,
-   291,   292,   293,   294,   295,   296,   297,   298,   299,     0,
-     0,     0,     0,   300,     0,     0,     0,     0,     0,     0,
-     0,     0,   758,   286,   287,   288,   289,   290,   291,   292,
-   293,   294,   295,   296,   297,   298,   299,     0,     0,     0,
-     0,   300,     0,     0,     0,     0,     0,     0,     0,     0,
-   803,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-   295,   296,   297,   298,   299,     0,     0,     0,     0,   300,
-     0,     0,     0,     0,     0,     0,     0,     0,   839,   286,
+     0,     0,     0,     0,   299,     0,     0,     0,     0,     0,
+     0,  1024,     0,  1025,   285,   286,   287,   288,   289,   290,
+   291,   292,   293,   294,   295,   296,   297,   298,     0,     0,
+     0,     0,   299,     0,     0,     0,     0,     0,     0,  1049,
+     0,  1050,   285,   286,   287,   288,   289,   290,   291,   292,
+   293,   294,   295,   296,   297,   298,     0,     0,     0,     0,
+   299,     0,     0,     0,     0,     0,     0,  1129,     0,  1130,
+   285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
+   295,   296,   297,   298,     0,     0,     0,     0,   299,     0,
+     0,     0,     0,     0,     0,     0,     0,  1080,   285,   286,
    287,   288,   289,   290,   291,   292,   293,   294,   295,   296,
-   297,   298,   299,     0,     0,     0,     0,   300,     0,     0,
-     0,     0,     0,     0,     0,     0,  1033,   286,   287,   288,
+   297,   298,     0,     0,     0,     0,   299,     0,     0,     0,
+     0,     0,     0,     0,     0,  1081,   285,   286,   287,   288,
    289,   290,   291,   292,   293,   294,   295,   296,   297,   298,
-   299,     0,     0,     0,     0,   300,     0,     0,     0,     0,
-     0,     0,     0,     0,  1055,   286,   287,   288,   289,   290,
-   291,   292,   293,   294,   295,   296,   297,   298,   299,     0,
-     0,     0,     0,   300,     0,     0,     0,     0,     0,     0,
-     0,     0,  1089,   286,   287,   288,   289,   290,   291,   292,
-   293,   294,   295,   296,   297,   298,   299,     0,     0,     0,
-     0,   300,     0,     0,     0,     0,     0,     0,     0,     0,
-  1092,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-   295,   296,   297,   298,   299,     0,     0,     0,     0,   300,
-     0,     0,     0,     0,     0,     0,     0,     0,  1093,   286,
+     0,     0,     0,     0,   299,     0,     0,     0,     0,     0,
+     0,     0,     0,  1082,   285,   286,   287,   288,   289,   290,
+   291,   292,   293,   294,   295,   296,   297,   298,     0,     0,
+     0,     0,   299,     0,     0,     0,     0,     0,     0,     0,
+     0,  1105,   285,   286,   287,   288,   289,   290,   291,   292,
+   293,   294,   295,   296,   297,   298,     0,     0,     0,     0,
+   299,     0,     0,     0,     0,     0,     0,     0,     0,  1145,
+   285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
+   295,   296,   297,   298,     0,     0,     0,     0,   299,     0,
+     0,     0,     0,     0,     0,     0,     0,  1147,   285,   286,
    287,   288,   289,   290,   291,   292,   293,   294,   295,   296,
-   297,   298,   299,     0,     0,     0,     0,   300,     0,     0,
-     0,     0,     0,     0,     0,     0,  1094,   286,   287,   288,
+   297,   298,     0,     0,     0,     0,   299,     0,     0,     0,
+     0,     0,     0,     0,     0,  1148,   285,   286,   287,   288,
    289,   290,   291,   292,   293,   294,   295,   296,   297,   298,
-   299,     0,     0,     0,     0,   300,     0,     0,     0,     0,
-     0,     0,     0,     0,  1117,   286,   287,   288,   289,   290,
-   291,   292,   293,   294,   295,   296,   297,   298,   299,     0,
-     0,     0,     0,   300,     0,     0,     0,     0,     0,     0,
-     0,     0,  1158,   286,   287,   288,   289,   290,   291,   292,
-   293,   294,   295,   296,   297,   298,   299,     0,     0,     0,
-     0,   300,     0,     0,     0,     0,     0,     0,     0,     0,
-  1160,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-   295,   296,   297,   298,   299,     0,     0,     0,     0,   300,
-     0,     0,     0,     0,     0,     0,     0,     0,  1161,   286,
+     0,     0,     0,     0,   299,     0,     0,     0,     0,     0,
+     0,     0,     0,  1158,   285,   286,   287,   288,   289,   290,
+   291,   292,   293,   294,   295,   296,   297,   298,     0,     0,
+     0,     0,   299,     0,     0,     0,     0,     0,     0,     0,
+     0,  1161,   285,   286,   287,   288,   289,   290,   291,   292,
+   293,   294,   295,   296,   297,   298,     0,     0,     0,     0,
+   299,     0,     0,     0,     0,     0,     0,     0,     0,  1164,
+   285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
+   295,   296,   297,   298,     0,     0,     0,     0,   299,     0,
+     0,     0,     0,     0,     0,     0,     0,  1181,   285,   286,
    287,   288,   289,   290,   291,   292,   293,   294,   295,   296,
-   297,   298,   299,     0,     0,     0,     0,   300,     0,     0,
-     0,     0,     0,     0,     0,     0,  1171,   286,   287,   288,
+   297,   298,     0,     0,     0,     0,   299,     0,     0,     0,
+     0,     0,     0,     0,     0,  1205,   285,   286,   287,   288,
    289,   290,   291,   292,   293,   294,   295,   296,   297,   298,
-   299,     0,     0,     0,     0,   300,     0,     0,     0,     0,
-     0,     0,     0,     0,  1174,   286,   287,   288,   289,   290,
-   291,   292,   293,   294,   295,   296,   297,   298,   299,     0,
-     0,     0,     0,   300,     0,     0,     0,     0,     0,     0,
-     0,     0,  1177,   286,   287,   288,   289,   290,   291,   292,
-   293,   294,   295,   296,   297,   298,   299,     0,     0,     0,
-     0,   300,     0,     0,     0,     0,     0,     0,     0,     0,
-  1194,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-   295,   296,   297,   298,   299,     0,     0,     0,     0,   300,
-     0,     0,     0,     0,     0,     0,     0,     0,  1218,   286,
-   287,   288,   289,   290,   291,   292,   293,   294,   295,   296,
-   297,   298,   299,     0,     0,     0,     0,   300,     0,     0,
-     0,     0,     0,     0,     0,     0,  1220,   286,   287,   288,
+     0,     0,     0,     0,   299,     0,     0,     0,     0,     0,
+     0,     0,     0,  1207,   285,   286,   287,   288,   289,   290,
+   291,   292,   293,   294,   295,   296,   297,   298,     0,     0,
+     0,     0,   299,     0,     0,     0,     0,     0,     0,     0,
+     0,  1209,   285,   286,   287,   288,   289,   290,   291,   292,
+   293,   294,   295,   296,   297,   298,     0,     0,     0,     0,
+   299,     0,     0,     0,     0,     0,     0,     0,     0,  1219,
+   285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
+   295,   296,   297,   298,     0,     0,     0,     0,   299,     0,
+   455,     0,     0,     0,     0,   529,   285,   286,   287,   288,
    289,   290,   291,   292,   293,   294,   295,   296,   297,   298,
-   299,     0,     0,     0,     0,   300,     0,     0,     0,     0,
-     0,     0,     0,     0,  1222,   286,   287,   288,   289,   290,
-   291,   292,   293,   294,   295,   296,   297,   298,   299,     0,
-     0,     0,     0,   300,     0,     0,     0,     0,     0,     0,
-     0,     0,  1232,   286,   287,   288,   289,   290,   291,   292,
-   293,   294,   295,   296,   297,   298,   299,     0,     0,     0,
-     0,   300,     0,     0,     0,     0,     0,     0,   487,   286,
+     0,     0,     0,     0,   299,     0,     0,     0,     0,     0,
+     0,   485,   285,   286,   287,   288,   289,   290,   291,   292,
+   293,   294,   295,   296,   297,   298,     0,     0,     0,     0,
+   299,     0,     0,     0,     0,     0,     0,   529,   285,   286,
    287,   288,   289,   290,   291,   292,   293,   294,   295,   296,
-   297,   298,   299,     0,     0,     0,     0,   300,     0,     0,
-     0,     0,     0,     0,   531,   286,   287,   288,   289,   290,
-   291,   292,   293,   294,   295,   296,   297,   298,   299,     0,
-     0,     0,     0,   300,     0,     0,     0,     0,     0,     0,
-   532,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-   295,   296,   297,   298,   299,     0,     0,     0,     0,   300,
-     0,     0,     0,     0,     0,     0,   569,   286,   287,   288,
+   297,   298,     0,     0,     0,     0,   299,     0,     0,     0,
+     0,     0,     0,   530,   285,   286,   287,   288,   289,   290,
+   291,   292,   293,   294,   295,   296,   297,   298,     0,     0,
+     0,     0,   299,     0,     0,     0,     0,     0,     0,   567,
+   285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
+   295,   296,   297,   298,     0,     0,     0,     0,   299,     0,
+     0,     0,     0,     0,     0,   616,   285,   286,   287,   288,
    289,   290,   291,   292,   293,   294,   295,   296,   297,   298,
-   299,     0,     0,     0,     0,   300,     0,     0,     0,     0,
-     0,     0,   621,   286,   287,   288,   289,   290,   291,   292,
-   293,   294,   295,   296,   297,   298,   299,     0,     0,     0,
-     0,   300,     0,     0,     0,     0,     0,     0,   622,   286,
+     0,     0,     0,     0,   299,     0,     0,     0,     0,     0,
+     0,   617,   285,   286,   287,   288,   289,   290,   291,   292,
+   293,   294,   295,   296,   297,   298,     0,     0,     0,     0,
+   299,     0,     0,     0,     0,     0,     0,   630,   285,   286,
    287,   288,   289,   290,   291,   292,   293,   294,   295,   296,
-   297,   298,   299,     0,     0,     0,     0,   300,     0,     0,
-     0,     0,     0,     0,   635,   286,   287,   288,   289,   290,
-   291,   292,   293,   294,   295,   296,   297,   298,   299,     0,
-     0,     0,     0,   300,     0,     0,     0,     0,     0,     0,
-   636,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-   295,   296,   297,   298,   299,     0,     0,     0,     0,   300,
-     0,     0,     0,     0,     0,     0,   637,   286,   287,   288,
+   297,   298,     0,     0,     0,     0,   299,     0,     0,     0,
+     0,     0,     0,   631,   285,   286,   287,   288,   289,   290,
+   291,   292,   293,   294,   295,   296,   297,   298,     0,     0,
+     0,     0,   299,     0,     0,     0,     0,     0,     0,   632,
+   285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
+   295,   296,   297,   298,     0,     0,     0,     0,   299,     0,
+     0,     0,     0,     0,     0,   633,   285,   286,   287,   288,
    289,   290,   291,   292,   293,   294,   295,   296,   297,   298,
-   299,     0,     0,     0,     0,   300,     0,     0,     0,     0,
-     0,     0,   638,   286,   287,   288,   289,   290,   291,   292,
-   293,   294,   295,   296,   297,   298,   299,     0,     0,     0,
-     0,   300,     0,     0,     0,     0,     0,     0,   639,   286,
+     0,     0,     0,     0,   299,     0,     0,     0,     0,     0,
+     0,   634,   285,   286,   287,   288,   289,   290,   291,   292,
+   293,   294,   295,   296,   297,   298,     0,     0,     0,     0,
+   299,     0,     0,     0,     0,     0,     0,   635,   285,   286,
    287,   288,   289,   290,   291,   292,   293,   294,   295,   296,
-   297,   298,   299,     0,     0,     0,     0,   300,     0,     0,
-     0,     0,     0,     0,   640,   286,   287,   288,   289,   290,
-   291,   292,   293,   294,   295,   296,   297,   298,   299,     0,
-     0,     0,     0,   300,     0,     0,     0,     0,     0,     0,
-   718,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-   295,   296,   297,   298,   299,     0,     0,     0,     0,   300,
-     0,     0,     0,     0,     0,     0,   719,   286,   287,   288,
+   297,   298,     0,     0,     0,     0,   299,     0,     0,     0,
+     0,     0,     0,   713,   285,   286,   287,   288,   289,   290,
+   291,   292,   293,   294,   295,   296,   297,   298,     0,     0,
+     0,     0,   299,     0,     0,     0,     0,     0,     0,   714,
+   285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
+   295,   296,   297,   298,     0,     0,     0,     0,   299,     0,
+     0,     0,     0,     0,     0,   715,   285,   286,   287,   288,
    289,   290,   291,   292,   293,   294,   295,   296,   297,   298,
-   299,     0,     0,     0,     0,   300,     0,     0,     0,     0,
-     0,     0,   720,   286,   287,   288,   289,   290,   291,   292,
-   293,   294,   295,   296,   297,   298,   299,     0,     0,     0,
-     0,   300,     0,     0,     0,     0,     0,     0,   800,   286,
+     0,     0,     0,     0,   299,     0,     0,     0,     0,     0,
+     0,   793,   285,   286,   287,   288,   289,   290,   291,   292,
+   293,   294,   295,   296,   297,   298,     0,     0,     0,     0,
+   299,     0,     0,     0,     0,     0,     0,   830,   285,   286,
    287,   288,   289,   290,   291,   292,   293,   294,   295,   296,
-   297,   298,   299,     0,     0,     0,     0,   300,     0,     0,
-     0,     0,     0,     0,   837,   286,   287,   288,   289,   290,
-   291,   292,   293,   294,   295,   296,   297,   298,   299,     0,
-     0,     0,     0,   300,     0,     0,     0,     0,     0,     0,
-   838,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-   295,   296,   297,   298,   299,     0,     0,     0,     0,   300,
-     0,     0,     0,     0,     0,     0,   867,   286,   287,   288,
+   297,   298,     0,     0,     0,     0,   299,     0,     0,     0,
+     0,     0,     0,   831,   285,   286,   287,   288,   289,   290,
+   291,   292,   293,   294,   295,   296,   297,   298,     0,     0,
+     0,     0,   299,     0,     0,     0,     0,     0,     0,   860,
+   285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
+   295,   296,   297,   298,     0,     0,     0,     0,   299,     0,
+     0,     0,     0,     0,     0,   978,   285,   286,   287,   288,
    289,   290,   291,   292,   293,   294,   295,   296,   297,   298,
-   299,     0,     0,     0,     0,   300,     0,     0,     0,     0,
-     0,     0,   988,   286,   287,   288,   289,   290,   291,   292,
-   293,   294,   295,   296,   297,   298,   299,     0,     0,     0,
-     0,   300,     0,     0,     0,     0,     0,     0,   989,   286,
+     0,     0,     0,     0,   299,     0,     0,     0,     0,     0,
+     0,   979,   285,   286,   287,   288,   289,   290,   291,   292,
+   293,   294,   295,   296,   297,   298,     0,     0,     0,     0,
+   299,     0,     0,     0,     0,     0,     0,   995,   285,   286,
    287,   288,   289,   290,   291,   292,   293,   294,   295,   296,
-   297,   298,   299,     0,     0,     0,     0,   300,     0,     0,
-     0,     0,     0,     0,  1006,   286,   287,   288,   289,   290,
-   291,   292,   293,   294,   295,   296,   297,   298,   299,     0,
-     0,     0,     0,   300,     0,     0,     0,     0,     0,     0,
-  1017,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-   295,   296,   297,   298,   299,     0,     0,     0,     0,   300,
-     0,     0,     0,     0,     0,     0,  1125,   286,   287,   288,
+   297,   298,     0,     0,     0,     0,   299,     0,     0,     0,
+     0,     0,     0,  1006,   285,   286,   287,   288,   289,   290,
+   291,   292,   293,   294,   295,   296,   297,   298,     0,     0,
+     0,     0,   299,     0,     0,     0,     0,     0,     0,  1113,
+   285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
+   295,   296,   297,   298,     0,     0,     0,     0,   299,     0,
+     0,     0,     0,     0,     0,  1114,   285,   286,   287,   288,
    289,   290,   291,   292,   293,   294,   295,   296,   297,   298,
-   299,     0,     0,     0,     0,   300,     0,     0,     0,     0,
-     0,     0,  1126,   286,   287,   288,   289,   290,   291,   292,
-   293,   294,   295,   296,   297,   298,   299,     0,     0,     0,
-     0,   300,     0,     0,     0,     0,     0,     0,  1134,   286,
+     0,     0,     0,     0,   299,     0,     0,     0,     0,     0,
+     0,  1121,   285,   286,   287,   288,   289,   290,   291,   292,
+   293,   294,   295,   296,   297,   298,     0,     0,     0,     0,
+   299,     0,     0,     0,     0,     0,     0,  1127,   285,   286,
    287,   288,   289,   290,   291,   292,   293,   294,   295,   296,
-   297,   298,   299,     0,     0,     0,     0,   300,     0,     0,
-     0,     0,     0,     0,  1140,   286,   287,   288,   289,   290,
-   291,   292,   293,   294,   295,   296,   297,   298,   299,     0,
-     0,     0,     0,   300,     0,     0,     0,     0,     0,     0,
-  1189,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-   295,   296,   297,   298,   299,     0,     0,     0,     0,   300,
-     0,     0,     0,     0,     0,     0,  1192,   286,   287,   288,
+   297,   298,     0,     0,     0,     0,   299,     0,     0,     0,
+     0,     0,     0,  1176,   285,   286,   287,   288,   289,   290,
+   291,   292,   293,   294,   295,   296,   297,   298,     0,     0,
+     0,     0,   299,     0,     0,     0,     0,     0,     0,  1179,
+   285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
+   295,   296,   297,   298,     0,     0,     0,     0,   299,     0,
+     0,     0,   459,   285,   286,   287,   288,   289,   290,   291,
+   292,   293,   294,   295,   296,   297,   298,     0,     0,     0,
+     0,   299,     0,     0,     0,   580,   285,   286,   287,   288,
    289,   290,   291,   292,   293,   294,   295,   296,   297,   298,
-   299,     0,     0,     0,     0,   300,     0,     0,     0,   461,
+     0,     0,     0,     0,   299,     0,     0,     0,   595,   285,
    286,   287,   288,   289,   290,   291,   292,   293,   294,   295,
-   296,   297,   298,   299,     0,     0,     0,     0,   300,     0,
-     0,     0,   582,   286,   287,   288,   289,   290,   291,   292,
-   293,   294,   295,   296,   297,   298,   299,     0,     0,     0,
-     0,   300,     0,     0,     0,   600,   286,   287,   288,   289,
-   290,   291,   292,   293,   294,   295,   296,   297,   298,   299,
-     0,     0,     0,     0,   300,     0,     0,     0,   602,   286,
+   296,   297,   298,     0,     0,     0,     0,   299,     0,     0,
+     0,   597,   285,   286,   287,   288,   289,   290,   291,   292,
+   293,   294,   295,   296,   297,   298,     0,     0,     0,     0,
+   299,     0,     0,     0,   599,   285,   286,   287,   288,   289,
+   290,   291,   292,   293,   294,   295,   296,   297,   298,     0,
+     0,     0,     0,   299,     0,     0,     0,   601,   285,   286,
    287,   288,   289,   290,   291,   292,   293,   294,   295,   296,
-   297,   298,   299,     0,     0,     0,     0,   300,     0,     0,
-     0,   604,   286,   287,   288,   289,   290,   291,   292,   293,
-   294,   295,   296,   297,   298,   299,     0,     0,     0,     0,
-   300,     0,     0,     0,   606,   286,   287,   288,   289,   290,
-   291,   292,   293,   294,   295,   296,   297,   298,   299,     0,
-     0,     0,     0,   300,     0,     0,     0,   608,   286,   287,
+   297,   298,     0,     0,     0,     0,   299,     0,     0,     0,
+   603,   285,   286,   287,   288,   289,   290,   291,   292,   293,
+   294,   295,   296,   297,   298,     0,     0,     0,     0,   299,
+     0,     0,     0,   605,   285,   286,   287,   288,   289,   290,
+   291,   292,   293,   294,   295,   296,   297,   298,     0,     0,
+     0,     0,   299,     0,     0,     0,   607,   285,   286,   287,
    288,   289,   290,   291,   292,   293,   294,   295,   296,   297,
-   298,   299,     0,     0,     0,     0,   300,     0,     0,     0,
-   610,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-   295,   296,   297,   298,   299,     0,     0,     0,     0,   300,
-     0,     0,     0,   612,   286,   287,   288,   289,   290,   291,
-   292,   293,   294,   295,   296,   297,   298,   299,     0,     0,
-     0,     0,   300,     0,     0,     0,   614,   286,   287,   288,
+   298,     0,     0,     0,     0,   299,     0,     0,     0,   609,
+   285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
+   295,   296,   297,   298,     0,     0,     0,     0,   299,     0,
+     0,     0,   611,   285,   286,   287,   288,   289,   290,   291,
+   292,   293,   294,   295,   296,   297,   298,     0,     0,     0,
+     0,   299,     0,     0,     0,   613,   285,   286,   287,   288,
    289,   290,   291,   292,   293,   294,   295,   296,   297,   298,
-   299,     0,     0,     0,     0,   300,     0,     0,     0,   616,
+     0,     0,     0,     0,   299,     0,     0,     0,   615,   285,
    286,   287,   288,   289,   290,   291,   292,   293,   294,   295,
-   296,   297,   298,   299,     0,     0,     0,     0,   300,     0,
-     0,     0,   618,   286,   287,   288,   289,   290,   291,   292,
-   293,   294,   295,   296,   297,   298,   299,     0,     0,     0,
-     0,   300,     0,     0,     0,   620,   286,   287,   288,   289,
-   290,   291,   292,   293,   294,   295,   296,   297,   298,   299,
-     0,     0,     0,     0,   300,     0,     0,     0,   624,   286,
+   296,   297,   298,     0,     0,     0,     0,   299,     0,     0,
+     0,   619,   285,   286,   287,   288,   289,   290,   291,   292,
+   293,   294,   295,   296,   297,   298,     0,     0,     0,     0,
+   299,     0,     0,     0,   621,   285,   286,   287,   288,   289,
+   290,   291,   292,   293,   294,   295,   296,   297,   298,     0,
+     0,     0,     0,   299,     0,     0,     0,   623,   285,   286,
    287,   288,   289,   290,   291,   292,   293,   294,   295,   296,
-   297,   298,   299,     0,     0,     0,     0,   300,     0,     0,
-     0,   626,   286,   287,   288,   289,   290,   291,   292,   293,
-   294,   295,   296,   297,   298,   299,     0,     0,     0,     0,
-   300,     0,     0,     0,   628,   286,   287,   288,   289,   290,
-   291,   292,   293,   294,   295,   296,   297,   298,   299,     0,
-     0,     0,     0,   300,     0,     0,     0,   630,   286,   287,
+   297,   298,     0,     0,     0,     0,   299,     0,     0,     0,
+   625,   285,   286,   287,   288,   289,   290,   291,   292,   293,
+   294,   295,   296,   297,   298,     0,     0,     0,     0,   299,
+     0,     0,     0,   627,   285,   286,   287,   288,   289,   290,
+   291,   292,   293,   294,   295,   296,   297,   298,     0,     0,
+     0,     0,   299,     0,     0,     0,   629,   285,   286,   287,
    288,   289,   290,   291,   292,   293,   294,   295,   296,   297,
-   298,   299,     0,     0,     0,     0,   300,     0,     0,     0,
-   632,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-   295,   296,   297,   298,   299,     0,     0,     0,     0,   300,
-     0,     0,     0,   634,   286,   287,   288,   289,   290,   291,
-   292,   293,   294,   295,   296,   297,   298,   299,     0,     0,
-     0,     0,   300,     0,     0,     0,   717,   286,   287,   288,
+   298,     0,     0,     0,     0,   299,     0,     0,     0,   712,
+   285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
+   295,   296,   297,   298,     0,     0,     0,     0,   299,     0,
+     0,     0,   729,   285,   286,   287,   288,   289,   290,   291,
+   292,   293,   294,   295,   296,   297,   298,     0,     0,     0,
+     0,   299,     0,     0,     0,   734,   285,   286,   287,   288,
    289,   290,   291,   292,   293,   294,   295,   296,   297,   298,
-   299,     0,     0,     0,     0,   300,     0,     0,     0,   734,
+     0,     0,     0,     0,   299,     0,     0,     0,   735,   285,
    286,   287,   288,   289,   290,   291,   292,   293,   294,   295,
-   296,   297,   298,   299,     0,     0,     0,     0,   300,     0,
-     0,     0,   739,   286,   287,   288,   289,   290,   291,   292,
-   293,   294,   295,   296,   297,   298,   299,     0,     0,     0,
-     0,   300,     0,     0,     0,   740,   286,   287,   288,   289,
-   290,   291,   292,   293,   294,   295,   296,   297,   298,   299,
-     0,     0,     0,     0,   300,     0,     0,     0,   754,   286,
+   296,   297,   298,     0,     0,     0,     0,   299,     0,     0,
+     0,   749,   285,   286,   287,   288,   289,   290,   291,   292,
+   293,   294,   295,   296,   297,   298,     0,     0,     0,     0,
+   299,     0,     0,     0,   773,   285,   286,   287,   288,   289,
+   290,   291,   292,   293,   294,   295,   296,   297,   298,     0,
+     0,     0,     0,   299,     0,     0,     0,   879,   285,   286,
    287,   288,   289,   290,   291,   292,   293,   294,   295,   296,
-   297,   298,   299,     0,     0,     0,     0,   300,     0,     0,
-     0,   780,   286,   287,   288,   289,   290,   291,   292,   293,
-   294,   295,   296,   297,   298,   299,     0,     0,     0,     0,
-   300,     0,     0,     0,   888,   286,   287,   288,   289,   290,
-   291,   292,   293,   294,   295,   296,   297,   298,   299,     0,
-     0,     0,     0,   300,     0,     0,     0,   890,   286,   287,
+   297,   298,     0,     0,     0,     0,   299,     0,     0,     0,
+   881,   285,   286,   287,   288,   289,   290,   291,   292,   293,
+   294,   295,   296,   297,   298,     0,     0,     0,     0,   299,
+     0,     0,     0,   883,   285,   286,   287,   288,   289,   290,
+   291,   292,   293,   294,   295,   296,   297,   298,     0,     0,
+     0,     0,   299,     0,     0,     0,   885,   285,   286,   287,
    288,   289,   290,   291,   292,   293,   294,   295,   296,   297,
-   298,   299,     0,     0,     0,     0,   300,     0,     0,     0,
-   892,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-   295,   296,   297,   298,   299,     0,     0,     0,     0,   300,
-     0,     0,     0,   894,   286,   287,   288,   289,   290,   291,
-   292,   293,   294,   295,   296,   297,   298,   299,     0,     0,
-     0,     0,   300,     0,     0,     0,   895,   286,   287,   288,
+   298,     0,     0,     0,     0,   299,     0,     0,     0,   886,
+   285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
+   295,   296,   297,   298,     0,     0,     0,     0,   299,     0,
+     0,     0,   992,   285,   286,   287,   288,   289,   290,   291,
+   292,   293,   294,   295,   296,   297,   298,     0,     0,     0,
+     0,   299,     0,   455,   285,   286,   287,   288,   289,   290,
+   291,   292,   293,   294,   295,   296,   297,   298,     0,     0,
+     0,     0,   299,     0,   486,   285,   286,   287,   288,   289,
+   290,   291,   292,   293,   294,   295,   296,   297,   298,     0,
+     0,     0,     0,   299,     0,   495,   285,   286,   287,   288,
    289,   290,   291,   292,   293,   294,   295,   296,   297,   298,
-   299,     0,     0,     0,     0,   300,     0,     0,     0,  1003,
-   286,   287,   288,   289,   290,   291,   292,   293,   294,   295,
-   296,   297,   298,   299,     0,     0,     0,     0,   300,     0,
-   457,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-   295,   296,   297,   298,   299,     0,     0,     0,     0,   300,
-     0,   488,   286,   287,   288,   289,   290,   291,   292,   293,
-   294,   295,   296,   297,   298,   299,     0,     0,     0,     0,
-   300,     0,   497,   286,   287,   288,   289,   290,   291,   292,
-   293,   294,   295,   296,   297,   298,   299,     0,     0,     0,
-     0,   300,     0,   498,   286,   287,   288,   289,   290,   291,
-   292,   293,   294,   295,   296,   297,   298,   299,     0,     0,
-     0,     0,   300,     0,   500,   286,   287,   288,   289,   290,
-   291,   292,   293,   294,   295,   296,   297,   298,   299,     0,
-     0,     0,     0,   300,     0,   502,   286,   287,   288,   289,
-   290,   291,   292,   293,   294,   295,   296,   297,   298,   299,
-     0,     0,     0,     0,   300,     0,   503,   286,   287,   288,
-   289,   290,   291,   292,   293,   294,   295,   296,   297,   298,
-   299,     0,     0,     0,     0,   300,     0,   506,   286,   287,
+     0,     0,     0,     0,   299,     0,   496,   285,   286,   287,
    288,   289,   290,   291,   292,   293,   294,   295,   296,   297,
-   298,   299,     0,     0,     0,     0,   300,     0,   507,   286,
+   298,     0,     0,     0,     0,   299,     0,   498,   285,   286,
    287,   288,   289,   290,   291,   292,   293,   294,   295,   296,
-   297,   298,   299,     0,     0,     0,     0,   300,     0,   515,
+   297,   298,     0,     0,     0,     0,   299,     0,   500,   285,
    286,   287,   288,   289,   290,   291,   292,   293,   294,   295,
-   296,   297,   298,   299,     0,     0,     0,     0,   300,     0,
-   565,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-   295,   296,   297,   298,   299,     0,     0,     0,     0,   300,
-     0,   566,   286,   287,   288,   289,   290,   291,   292,   293,
-   294,   295,   296,   297,   298,   299,     0,     0,     0,     0,
-   300,     0,   567,   286,   287,   288,   289,   290,   291,   292,
-   293,   294,   295,   296,   297,   298,   299,     0,     0,     0,
-     0,   300,     0,   573,   286,   287,   288,   289,   290,   291,
-   292,   293,   294,   295,   296,   297,   298,   299,     0,     0,
-     0,     0,   300,     0,   599,   286,   287,   288,   289,   290,
-   291,   292,   293,   294,   295,   296,   297,   298,   299,     0,
-     0,     0,     0,   300,     0,   601,   286,   287,   288,   289,
-   290,   291,   292,   293,   294,   295,   296,   297,   298,   299,
-     0,     0,     0,     0,   300,     0,   603,   286,   287,   288,
+   296,   297,   298,     0,     0,     0,     0,   299,     0,   501,
+   285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
+   295,   296,   297,   298,     0,     0,     0,     0,   299,     0,
+   504,   285,   286,   287,   288,   289,   290,   291,   292,   293,
+   294,   295,   296,   297,   298,     0,     0,     0,     0,   299,
+     0,   505,   285,   286,   287,   288,   289,   290,   291,   292,
+   293,   294,   295,   296,   297,   298,     0,     0,     0,     0,
+   299,     0,   513,   285,   286,   287,   288,   289,   290,   291,
+   292,   293,   294,   295,   296,   297,   298,     0,     0,     0,
+     0,   299,     0,   563,   285,   286,   287,   288,   289,   290,
+   291,   292,   293,   294,   295,   296,   297,   298,     0,     0,
+     0,     0,   299,     0,   564,   285,   286,   287,   288,   289,
+   290,   291,   292,   293,   294,   295,   296,   297,   298,     0,
+     0,     0,     0,   299,     0,   565,   285,   286,   287,   288,
    289,   290,   291,   292,   293,   294,   295,   296,   297,   298,
-   299,     0,     0,     0,     0,   300,     0,   605,   286,   287,
+     0,     0,     0,     0,   299,     0,   571,   285,   286,   287,
    288,   289,   290,   291,   292,   293,   294,   295,   296,   297,
-   298,   299,     0,     0,     0,     0,   300,     0,   607,   286,
+   298,     0,     0,     0,     0,   299,     0,   594,   285,   286,
    287,   288,   289,   290,   291,   292,   293,   294,   295,   296,
-   297,   298,   299,     0,     0,     0,     0,   300,     0,   609,
+   297,   298,     0,     0,     0,     0,   299,     0,   596,   285,
    286,   287,   288,   289,   290,   291,   292,   293,   294,   295,
-   296,   297,   298,   299,     0,     0,     0,     0,   300,     0,
-   611,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-   295,   296,   297,   298,   299,     0,     0,     0,     0,   300,
-     0,   613,   286,   287,   288,   289,   290,   291,   292,   293,
-   294,   295,   296,   297,   298,   299,     0,     0,     0,     0,
-   300,     0,   615,   286,   287,   288,   289,   290,   291,   292,
-   293,   294,   295,   296,   297,   298,   299,     0,     0,     0,
-     0,   300,     0,   617,   286,   287,   288,   289,   290,   291,
-   292,   293,   294,   295,   296,   297,   298,   299,     0,     0,
-     0,     0,   300,     0,   619,   286,   287,   288,   289,   290,
-   291,   292,   293,   294,   295,   296,   297,   298,   299,     0,
-     0,     0,     0,   300,     0,   623,   286,   287,   288,   289,
-   290,   291,   292,   293,   294,   295,   296,   297,   298,   299,
-     0,     0,     0,     0,   300,     0,   625,   286,   287,   288,
+   296,   297,   298,     0,     0,     0,     0,   299,     0,   598,
+   285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
+   295,   296,   297,   298,     0,     0,     0,     0,   299,     0,
+   600,   285,   286,   287,   288,   289,   290,   291,   292,   293,
+   294,   295,   296,   297,   298,     0,     0,     0,     0,   299,
+     0,   602,   285,   286,   287,   288,   289,   290,   291,   292,
+   293,   294,   295,   296,   297,   298,     0,     0,     0,     0,
+   299,     0,   604,   285,   286,   287,   288,   289,   290,   291,
+   292,   293,   294,   295,   296,   297,   298,     0,     0,     0,
+     0,   299,     0,   606,   285,   286,   287,   288,   289,   290,
+   291,   292,   293,   294,   295,   296,   297,   298,     0,     0,
+     0,     0,   299,     0,   608,   285,   286,   287,   288,   289,
+   290,   291,   292,   293,   294,   295,   296,   297,   298,     0,
+     0,     0,     0,   299,     0,   610,   285,   286,   287,   288,
    289,   290,   291,   292,   293,   294,   295,   296,   297,   298,
-   299,     0,     0,     0,     0,   300,     0,   627,   286,   287,
+     0,     0,     0,     0,   299,     0,   612,   285,   286,   287,
    288,   289,   290,   291,   292,   293,   294,   295,   296,   297,
-   298,   299,     0,     0,     0,     0,   300,     0,   629,   286,
+   298,     0,     0,     0,     0,   299,     0,   614,   285,   286,
    287,   288,   289,   290,   291,   292,   293,   294,   295,   296,
-   297,   298,   299,     0,     0,     0,     0,   300,     0,   631,
+   297,   298,     0,     0,     0,     0,   299,     0,   618,   285,
    286,   287,   288,   289,   290,   291,   292,   293,   294,   295,
-   296,   297,   298,   299,     0,     0,     0,     0,   300,     0,
-   633,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-   295,   296,   297,   298,   299,     0,     0,     0,     0,   300,
-     0,   683,   286,   287,   288,   289,   290,   291,   292,   293,
-   294,   295,   296,   297,   298,   299,     0,     0,     0,     0,
-   300,     0,   688,   286,   287,   288,   289,   290,   291,   292,
-   293,   294,   295,   296,   297,   298,   299,     0,     0,     0,
-     0,   300,     0,   697,   286,   287,   288,   289,   290,   291,
-   292,   293,   294,   295,   296,   297,   298,   299,     0,     0,
-     0,     0,   300,     0,   700,   286,   287,   288,   289,   290,
-   291,   292,   293,   294,   295,   296,   297,   298,   299,     0,
-     0,     0,     0,   300,     0,   701,   286,   287,   288,   289,
-   290,   291,   292,   293,   294,   295,   296,   297,   298,   299,
-     0,     0,     0,     0,   300,     0,   705,   286,   287,   288,
+   296,   297,   298,     0,     0,     0,     0,   299,     0,   620,
+   285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
+   295,   296,   297,   298,     0,     0,     0,     0,   299,     0,
+   622,   285,   286,   287,   288,   289,   290,   291,   292,   293,
+   294,   295,   296,   297,   298,     0,     0,     0,     0,   299,
+     0,   624,   285,   286,   287,   288,   289,   290,   291,   292,
+   293,   294,   295,   296,   297,   298,     0,     0,     0,     0,
+   299,     0,   626,   285,   286,   287,   288,   289,   290,   291,
+   292,   293,   294,   295,   296,   297,   298,     0,     0,     0,
+     0,   299,     0,   628,   285,   286,   287,   288,   289,   290,
+   291,   292,   293,   294,   295,   296,   297,   298,     0,     0,
+     0,     0,   299,     0,   678,   285,   286,   287,   288,   289,
+   290,   291,   292,   293,   294,   295,   296,   297,   298,     0,
+     0,     0,     0,   299,     0,   683,   285,   286,   287,   288,
    289,   290,   291,   292,   293,   294,   295,   296,   297,   298,
-   299,     0,     0,     0,     0,   300,     0,   749,   286,   287,
+     0,     0,     0,     0,   299,     0,   692,   285,   286,   287,
    288,   289,   290,   291,   292,   293,   294,   295,   296,   297,
-   298,   299,     0,     0,     0,     0,   300,     0,   750,   286,
+   298,     0,     0,     0,     0,   299,     0,   695,   285,   286,
    287,   288,   289,   290,   291,   292,   293,   294,   295,   296,
-   297,   298,   299,     0,     0,     0,     0,   300,     0,   751,
+   297,   298,     0,     0,     0,     0,   299,     0,   696,   285,
    286,   287,   288,   289,   290,   291,   292,   293,   294,   295,
-   296,   297,   298,   299,     0,     0,     0,     0,   300,     0,
-   752,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-   295,   296,   297,   298,   299,     0,     0,     0,     0,   300,
-     0,   753,   286,   287,   288,   289,   290,   291,   292,   293,
-   294,   295,   296,   297,   298,   299,     0,     0,     0,     0,
-   300,     0,   858,   286,   287,   288,   289,   290,   291,   292,
-   293,   294,   295,   296,   297,   298,   299,     0,     0,     0,
-     0,   300,     0,   887,   286,   287,   288,   289,   290,   291,
-   292,   293,   294,   295,   296,   297,   298,   299,     0,     0,
-     0,     0,   300,     0,   889,   286,   287,   288,   289,   290,
-   291,   292,   293,   294,   295,   296,   297,   298,   299,     0,
-     0,     0,     0,   300,     0,   891,   286,   287,   288,   289,
-   290,   291,   292,   293,   294,   295,   296,   297,   298,   299,
-     0,     0,     0,     0,   300,     0,   893,   286,   287,   288,
+   296,   297,   298,     0,     0,     0,     0,   299,     0,   700,
+   285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
+   295,   296,   297,   298,     0,     0,     0,     0,   299,     0,
+   744,   285,   286,   287,   288,   289,   290,   291,   292,   293,
+   294,   295,   296,   297,   298,     0,     0,     0,     0,   299,
+     0,   745,   285,   286,   287,   288,   289,   290,   291,   292,
+   293,   294,   295,   296,   297,   298,     0,     0,     0,     0,
+   299,     0,   746,   285,   286,   287,   288,   289,   290,   291,
+   292,   293,   294,   295,   296,   297,   298,     0,     0,     0,
+     0,   299,     0,   747,   285,   286,   287,   288,   289,   290,
+   291,   292,   293,   294,   295,   296,   297,   298,     0,     0,
+     0,     0,   299,     0,   748,   285,   286,   287,   288,   289,
+   290,   291,   292,   293,   294,   295,   296,   297,   298,     0,
+     0,     0,     0,   299,     0,   851,   285,   286,   287,   288,
    289,   290,   291,   292,   293,   294,   295,   296,   297,   298,
-   299,     0,     0,     0,     0,   300,     0,   899,   286,   287,
+     0,     0,     0,     0,   299,     0,   878,   285,   286,   287,
    288,   289,   290,   291,   292,   293,   294,   295,   296,   297,
-   298,   299,     0,     0,     0,     0,   300,     0,   994,   286,
+   298,     0,     0,     0,     0,   299,     0,   880,   285,   286,
    287,   288,   289,   290,   291,   292,   293,   294,   295,   296,
-   297,   298,   299,     0,     0,     0,     0,   300,     0,  1034,
+   297,   298,     0,     0,     0,     0,   299,     0,   882,   285,
    286,   287,   288,   289,   290,   291,   292,   293,   294,   295,
-   296,   297,   298,   299,     0,     0,     0,     0,   300,     0,
-  1054,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-   295,   296,   297,   298,   299,     0,     0,     0,     0,   300,
-     0,  1064,   286,   287,   288,   289,   290,   291,   292,   293,
-   294,   295,   296,   297,   298,   299,     0,     0,     0,     0,
-   300,     0,  1188,   286,   287,   288,   289,   290,   291,   292,
-   293,   294,   295,   296,   297,   298,   299,     0,     0,     0,
-     0,   300,     0,  1230
+   296,   297,   298,     0,     0,     0,     0,   299,     0,   884,
+   285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
+   295,   296,   297,   298,     0,     0,     0,     0,   299,     0,
+   890,   285,   286,   287,   288,   289,   290,   291,   292,   293,
+   294,   295,   296,   297,   298,     0,     0,     0,     0,   299,
+     0,  1023,   285,   286,   287,   288,   289,   290,   291,   292,
+   293,   294,   295,   296,   297,   298,     0,     0,     0,     0,
+   299,     0,  1043,   285,   286,   287,   288,   289,   290,   291,
+   292,   293,   294,   295,   296,   297,   298,     0,     0,     0,
+     0,   299,     0,  1053,   285,   286,   287,   288,   289,   290,
+   291,   292,   293,   294,   295,   296,   297,   298,     0,     0,
+     0,     0,   299,     0,  1175,   285,   286,   287,   288,   289,
+   290,   291,   292,   293,   294,   295,   296,   297,   298,     0,
+     0,     0,     0,   299,     0,  1217,   285,   286,   287,   288,
+   289,   290,   291,   292,   293,   294,   295,   296,   297,   298,
+     0,     0,     0,     0,   299
 };
 
 static const short yycheck[] = {    60,
-     2,     4,   186,  1076,     4,     4,     4,     4,     6,     4,
-   279,   178,     4,     6,     4,    71,   183,     4,     5,   662,
-     4,     7,     4,     4,     4,    71,   728,     6,     6,     4,
-     5,   139,     4,    71,    49,    71,     4,     6,   146,     6,
-    46,     4,     5,    49,   211,    51,     4,   214,    13,    36,
-    37,    38,    39,     6,     6,    42,   139,     6,   141,   732,
-     4,    36,    37,    38,    39,   129,   130,    42,   139,    43,
-   141,   139,    46,    36,    37,    38,    39,     6,   143,    42,
-    79,   145,   147,   139,   139,    82,    83,    84,    85,    86,
-   146,   146,    82,    83,    84,    85,    86,   129,   130,    43,
-   146,   101,    46,   139,    56,    49,     7,    56,   146,    49,
-   146,   129,   130,   145,   117,   118,   119,     6,  1191,   122,
-   123,    93,    94,   126,   139,    93,    94,   139,   146,   132,
-   116,   139,   135,    49,   137,   138,   139,   140,   146,   142,
-   143,   144,   145,   141,   147,   148,   149,     6,   791,   152,
-   147,   146,   854,   146,   146,   135,   136,   147,   127,   146,
-   127,   141,   146,   143,   146,   168,   169,   146,   148,   353,
-   354,   146,   135,   136,  1247,   178,   129,   130,   180,   139,
-   143,   139,   129,   130,   186,   129,   130,   129,   130,   192,
-   193,   194,   461,   196,   139,   139,   199,   200,   365,   146,
-   129,   130,   146,    72,   146,   266,   267,   268,   269,    78,
-    79,   139,   277,   141,   217,   116,   117,   118,   119,   139,
-   387,   224,   225,   226,   227,   228,   229,   230,   231,   232,
-   233,   234,   235,   236,   237,   238,   239,   240,   241,   242,
-   243,   244,   245,   246,   247,   248,   249,   250,   251,   252,
-   253,   254,   255,   256,   257,   258,   259,   260,   261,   262,
-   263,   264,   265,   328,    29,    30,   909,    32,     5,    72,
-   129,   130,   138,    72,   277,    78,    79,   143,   147,    78,
-    79,   147,   139,   286,   287,   288,   289,   290,   291,   292,
-   293,   294,   295,   296,   297,   298,   299,   300,   279,    36,
-    37,    38,    39,   139,    72,    42,   309,   129,   130,   374,
-    78,    79,   129,   130,   317,   131,   132,   133,     7,   322,
-    72,    53,   138,   145,   327,   328,    78,    79,   145,   332,
-   147,   334,   335,   336,    51,   338,   339,   340,   341,   342,
-   343,   344,   341,   342,   343,   344,   129,   130,   147,    49,
-     6,   353,   354,   356,   357,   358,   359,   360,   361,   362,
-    72,    49,   145,   140,   147,  1038,    78,    79,   145,   372,
-   140,   374,   146,   140,    72,   145,   379,   380,   145,   147,
-    78,    79,   129,   130,     7,   139,   135,   136,   391,   392,
-   393,   394,   139,   396,   143,   147,   129,   130,   401,   146,
-   165,   404,   167,  1105,   140,    61,   129,   130,   173,   145,
-    72,   277,   145,   178,     7,   140,    78,    79,     6,     7,
-   145,   486,   403,   146,   139,    72,   141,   116,   117,   118,
-   119,    78,    79,   146,  1107,   147,  1109,   146,  1111,   129,
-   130,  1084,    49,   309,   509,  1147,   135,   136,  1150,   147,
-    46,  1153,    72,   456,   143,   145,   221,   147,    78,    79,
-   463,   327,   328,   462,   120,   121,   122,   123,   124,   125,
-   126,   127,   128,   129,   130,   131,   132,   133,     6,   139,
-   461,   141,   138,   486,   487,   147,   489,   490,    62,    63,
-   493,   494,   495,   116,   117,   118,   119,    72,   135,   136,
-   147,   129,   130,    78,    79,   146,   509,  1209,   374,   512,
-   513,  1184,   135,   136,   783,   784,   519,   145,   342,   343,
-   344,   582,     4,   116,   117,   118,   119,   147,   531,   532,
-    72,   139,  1234,   141,   537,  1237,    78,    79,  1240,     6,
-     7,  1243,   135,   136,  1217,   139,  1219,   141,  1221,    72,
-   139,   554,    72,     4,  1227,    78,    79,   560,    78,    79,
-   139,  1263,   141,  1265,    72,  1267,   569,     4,   571,   572,
-    78,    79,   147,   129,   130,   129,   130,   139,  1251,   644,
-  1253,   139,  1255,   141,   645,     6,   351,   352,   139,   145,
-   141,   145,   139,   129,   130,   139,   361,   129,   130,   129,
-   130,   582,   139,   101,   141,   147,   101,   668,   673,   145,
-   101,   150,     8,   145,   139,   145,   141,   156,   621,   622,
-   486,   139,     4,   141,   147,   139,   101,   147,   494,   495,
-   695,     4,   635,   636,   637,   638,   639,   640,   641,   147,
-   139,   644,   181,   509,     6,   648,   512,   139,   187,   188,
-   129,   130,   655,   129,   130,   139,   721,   722,   723,   724,
-     6,   139,   665,   141,     6,   139,   145,   141,   139,   145,
-   673,   135,   136,   840,   139,     5,   141,   141,   139,   143,
-   141,   139,     3,     4,   148,   139,   139,   141,     9,    10,
-    11,   139,   695,    14,    15,    16,    17,    18,    19,    20,
-    21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
-    31,    32,    33,    34,   139,   139,   141,   141,   721,   722,
-   723,   724,    43,   146,   120,   121,   122,   123,   124,   125,
-   126,   127,   128,   129,   130,   131,   132,   133,     4,     5,
-   139,   139,   138,   141,    65,    66,    67,    68,    69,    70,
-   145,   147,   147,   139,    75,    76,   146,   146,   761,   762,
-    43,   139,   765,    46,   139,   530,    49,   139,    51,   953,
-    36,    37,    38,    39,   139,   145,    42,   147,   644,   145,
-   139,   147,     4,     5,   141,   550,   143,   326,    49,   792,
-    51,   112,   113,   114,   115,     4,   145,   800,   147,   780,
-   145,   804,   147,   784,   145,   141,   147,   673,   129,   130,
-   145,     6,   147,   134,    36,    37,    38,    39,   139,   822,
-    42,   146,   145,   144,   147,   145,   147,   147,   145,   695,
-   147,   146,   146,   836,   837,   838,   125,   126,   127,   128,
-   129,   130,   131,   132,   133,   146,   849,   850,   141,   138,
-   853,   145,   913,   147,   141,   721,   722,   723,   724,     8,
-   146,   135,   136,   143,   867,   868,   869,   141,    96,   143,
-   873,   874,   139,   145,   148,   147,   145,   880,   147,   139,
-   139,   145,   885,   147,   122,   123,   124,   125,   126,   127,
-   128,   129,   130,   131,   132,   133,   877,   139,     6,   902,
-   138,   145,   901,   147,   139,     4,   671,     6,   129,   130,
-   131,   132,   133,     6,   145,   918,   147,   138,  1102,   458,
-   459,     6,   925,   926,     8,   141,     4,   930,    65,    66,
-    67,    68,   145,    70,   147,   146,   939,   940,    75,    76,
-   145,   145,   147,   147,     6,   145,   949,   147,  1115,     5,
-   949,   953,   138,   718,   719,   720,   145,   145,   147,   147,
-   145,   143,   147,     7,   141,   146,     7,     7,   971,   140,
-     6,   120,   121,   122,   123,   124,   125,   126,   127,   128,
-   129,   130,   131,   132,   133,   988,   989,   147,   147,   138,
-     7,   139,     7,    93,   146,   145,   140,   140,   147,   145,
-     6,     4,   142,  1006,    96,     7,     7,     7,     7,    96,
-     7,     7,     7,    96,  1017,     7,     6,   140,  1185,     7,
-   140,   140,   561,   562,   140,   143,   147,   101,     7,     7,
-   147,     7,  1035,   143,   139,   139,   120,   121,   122,   123,
-   124,   125,   126,   127,   128,   129,   130,   131,   132,   133,
-   146,   139,     6,  1056,   138,     4,   140,  1060,     6,  1062,
-     6,   142,     6,     6,   141,     7,     6,   127,    49,  1072,
-     7,     7,     7,   146,  1077,   123,   124,   125,   126,   127,
-   128,   129,   130,   131,   132,   133,    51,     7,   853,     7,
-   138,     7,     7,     7,     7,     7,     7,     7,     7,     4,
-  1102,   146,     6,  1106,   146,  1108,   139,  1110,     6,     6,
-    49,     6,     6,     6,     4,     7,  1119,   139,     7,     7,
-     7,     7,  1125,  1126,     6,     4,     6,   146,   140,   140,
-   143,  1134,     6,     5,     7,     6,   146,     6,   146,  1142,
-     6,   146,   681,   682,     6,   684,     6,   686,   687,     6,
-     6,   690,   691,   146,     7,   920,     6,   922,    92,  1162,
-   146,   146,     5,     5,     4,     6,   143,     6,  1229,  1172,
-     6,   142,  1175,     6,     6,  1178,     5,   145,     6,  1182,
-     6,     6,     6,     6,     6,     6,  1189,     6,     6,  1192,
-   955,     6,   957,     6,   959,     6,  1257,     6,  1259,     6,
-     6,     6,   741,   742,   743,     6,     6,     6,   146,     4,
-     6,   143,     6,     3,     4,     7,  1277,     6,     6,     9,
-    10,    11,     5,   146,    14,    15,    16,    17,    18,    19,
-    20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
-    30,    31,    32,    33,    34,     6,   120,   121,   122,   123,
-   124,   125,   126,   127,   128,   129,   130,   131,   132,   133,
-     6,     6,   147,   146,   138,   146,     7,     6,   146,   808,
-   146,    91,     6,     6,     6,   814,   140,    94,     6,     6,
-     6,     6,     6,     6,   823,   824,   825,   146,     6,   828,
-   829,   830,   831,   832,   833,   834,   120,   121,   122,   123,
-   124,   125,   126,   127,   128,   129,   130,   131,   132,   133,
-   849,     5,   147,     6,   138,   146,     6,    61,   145,     6,
-     6,     6,   112,   113,   114,   115,     6,     6,     5,   799,
-     6,   147,   871,     6,   146,     6,   146,     6,   146,   129,
-   130,  1106,   146,  1108,   134,  1110,     6,   145,     6,   139,
-     5,     3,     4,   146,   144,   146,   146,     9,    10,    11,
-   146,   900,    14,    15,    16,    17,    18,    19,    20,    21,
-    22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
-    32,    33,    34,   146,   146,     6,     6,   147,     6,     6,
-     6,    43,   120,   121,   122,   123,   124,   125,   126,   127,
-   128,   129,   130,   131,   132,   133,     6,     6,     6,     6,
-   138,     6,     6,    65,    66,    67,    68,    69,    70,     0,
-     0,   585,  1162,    75,    76,     2,     2,    -1,   905,    -1,
-    -1,    -1,    -1,   972,    -1,    -1,   975,    -1,    -1,    -1,
-    -1,    -1,     6,    -1,   983,    -1,    -1,    -1,    -1,   101,
-    -1,   990,    -1,    -1,    -1,   994,    -1,    -1,    -1,    -1,
-   112,   113,   114,   115,    -1,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,    -1,    -1,    -1,     6,    -1,   129,   130,    -1,
-    -1,    -1,   134,    -1,    -1,    -1,    -1,   139,    -1,    -1,
-    -1,    -1,   144,    -1,   146,    -1,    -1,    -1,    -1,   120,
+   278,     2,     4,     6,   186,     4,     4,     4,    71,   178,
+     4,     6,     4,  1065,   183,     4,     5,     7,     4,    71,
+     4,   657,     4,     4,     5,     4,     4,    49,     6,     6,
+     6,    71,     6,    49,     6,   128,   129,    72,     4,     6,
+     4,   139,   211,    78,    79,   214,   144,    36,    37,    38,
+    39,     6,   145,    42,   139,    36,    37,    38,    39,   144,
+    71,    42,     4,   138,    29,    30,     6,    32,   134,   135,
+   145,     6,     7,   128,   129,   138,   142,   128,   129,   143,
+     6,    79,   145,   147,    56,    82,    83,    84,    85,    56,
+   145,    13,   138,   145,   145,   138,   723,   727,   138,   145,
+   138,    43,   145,    72,    46,   145,     6,    49,   100,    78,
+    79,   146,    72,    92,    93,   117,   118,   119,    78,    79,
+   122,   123,   138,   126,   126,   115,  1178,   139,    92,    93,
+   132,   126,   144,   135,   145,   137,   138,   139,   140,   139,
+   142,   143,   144,   145,   144,   147,   148,   149,   784,   146,
+   152,   145,   134,   135,   128,   129,   145,    53,   140,   145,
+   142,   145,   140,   138,   145,   147,   168,   169,   145,   145,
+   352,   353,   138,   128,   129,    43,   178,   146,    46,   180,
+   138,   459,  1234,   128,   129,   186,   128,   129,   128,   129,
+   192,   193,   194,    49,   196,   364,   138,   199,   200,   144,
+   165,   146,   167,   145,   265,   266,   267,   268,   173,   130,
+   131,   132,   276,   178,   139,   217,   137,   386,   138,   144,
+   847,   223,   224,   225,   226,   227,   228,   229,   230,   231,
+   232,   233,   234,   235,   236,   237,   238,   239,   240,   241,
+   242,   243,   244,   245,   246,   247,   248,   249,   250,   251,
+   252,   253,   254,   255,   256,   257,   258,   259,   260,   261,
+   262,   263,   264,   327,   900,   138,   138,   138,   140,     4,
+     5,     7,   143,   138,   276,    72,   147,   138,   138,   278,
+   140,    78,    79,   285,   286,   287,   288,   289,   290,   291,
+   292,   293,   294,   295,   296,   297,   298,   299,    49,   128,
+   129,    36,    37,    38,    39,    49,   308,    42,    51,   373,
+     8,   138,   128,   129,   316,   144,    49,   146,    46,   321,
+    72,    49,   145,    51,   326,   327,    78,    79,   144,   331,
+   146,   333,   334,   335,   145,   337,   338,   339,   340,   341,
+   342,   343,   340,   341,   342,   343,   128,   129,   138,   146,
+   140,   352,   353,   355,   356,   357,   358,   359,   360,   361,
+   145,    72,   144,   134,   135,     7,    72,    78,    79,   371,
+     6,   373,    78,    79,    62,    63,   378,   379,   145,   115,
+   116,   117,   118,     6,     7,   350,   351,    46,   390,   391,
+   392,   393,     4,   395,   146,   360,   138,  1027,   400,   134,
+   135,   403,     4,   402,    72,   276,   138,   142,   140,   138,
+    78,    79,     7,   341,   342,   343,   138,   138,   140,   140,
+   484,   119,   120,   121,   122,   123,   124,   125,   126,   127,
+   128,   129,   130,   131,   132,   146,  1072,   308,    72,   137,
+   146,   134,   135,   507,    78,    79,     4,   140,   146,   142,
+   100,    72,   454,   138,   147,   326,   327,    78,    79,   461,
+   459,   138,   460,   140,    72,  1095,  1093,  1097,   138,  1099,
+    78,    79,     6,   115,   116,   117,   118,   138,   146,   140,
+   128,   129,   484,   485,   100,   487,   488,   100,    72,   491,
+   492,   493,   134,   135,    78,    79,   144,    72,   776,   777,
+   142,   100,   373,    78,    79,   507,     4,  1134,   510,   511,
+  1137,    72,   146,  1140,     5,   517,   145,    78,    79,   580,
+   115,   116,   117,   118,    72,   146,     4,   529,   530,   138,
+    78,    79,   138,   535,     7,   138,   128,   129,   146,   134,
+   135,  1171,   138,   128,   129,    36,    37,    38,    39,   150,
+   552,    42,   144,   138,     6,   156,   558,     8,     4,     5,
+   145,   138,   146,   528,   138,   567,   140,   569,   570,  1196,
+     6,   146,   128,   129,  1204,   639,  1206,     6,  1208,   640,
+   181,   580,     5,   548,  1214,   146,   187,   188,   144,   138,
+    36,    37,    38,    39,  1221,   138,    42,  1224,   146,   138,
+  1227,   140,   663,  1230,   668,   138,   138,   140,  1238,   138,
+  1240,   140,  1242,   484,   616,   617,   138,   145,   140,   128,
+   129,   492,   493,  1250,   138,  1252,   690,  1254,   630,   631,
+   632,   633,   634,   635,   636,   144,   507,   639,   138,   510,
+   140,   643,   115,   116,   117,   118,   138,     4,   650,   128,
+   129,   145,   716,   717,   718,   719,   145,   138,   660,   140,
+   140,   134,   135,   138,   833,   144,   668,   138,   119,   120,
    121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
-   131,   132,   133,    -1,  1053,     3,     4,   138,    -1,    -1,
-    -1,     9,    10,    11,    -1,    -1,    14,    15,    16,    17,
-    18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
-    28,    29,    30,    31,    32,    33,    34,    -1,    -1,    -1,
-    -1,    -1,    -1,    -1,    -1,    43,   120,   121,   122,   123,
-   124,   125,   126,   127,   128,   129,   130,   131,   132,   133,
-    -1,    -1,    -1,    -1,   138,  1114,    -1,    65,    66,    67,
-    68,    69,    70,     6,    -1,    -1,    -1,    75,    76,   120,
+   131,   132,   138,   128,   129,   138,   137,     8,   690,   128,
+   129,   130,   131,   132,   138,   146,    12,    13,   137,   144,
+   140,   666,   121,   122,   123,   124,   125,   126,   127,   128,
+   129,   130,   131,   132,   716,   717,   718,   719,   137,   145,
+   145,   128,   129,   145,   325,     4,     5,    43,    44,    45,
+    46,    47,    48,    49,    50,    51,    52,   144,    54,    43,
+    56,    57,    46,    59,    60,    49,   145,    51,   713,   714,
+   715,   128,   129,   755,   756,   140,     6,    36,    37,    38,
+    39,    77,   944,    42,   128,   129,   142,   144,   639,   134,
+   135,    87,    88,    89,   773,   140,   145,   142,   777,   138,
+   144,   140,   147,   785,    95,   101,   102,   103,   138,   105,
+   140,   793,   108,   138,   138,   797,   140,   668,   119,   120,
    121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
-   131,   132,   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,
-    -1,    -1,    -1,   101,     6,  1154,    -1,    -1,    -1,    -1,
-    -1,    -1,    -1,    -1,   112,   113,   114,   115,    -1,    -1,
-    -1,    -1,    -1,    -1,    -1,     6,    -1,    -1,    -1,    -1,
-    -1,   129,   130,    -1,    -1,    -1,   134,    -1,    -1,    -1,
-    -1,   139,    -1,    -1,     3,     4,   144,     6,   146,    -1,
-     9,    10,    11,    -1,    -1,    14,    15,    16,    17,    18,
-    19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
-    29,    30,    31,    32,    33,    34,    -1,    -1,    -1,    -1,
-    -1,    -1,    -1,    -1,    43,    -1,    -1,   120,   121,   122,
+   131,   132,   138,   815,   140,   138,   137,   140,   139,   690,
+   128,   129,   128,   129,   138,     6,   140,   829,   830,   831,
+   146,   144,   144,   146,   146,   144,   144,   146,   144,   138,
+   842,   843,   138,   904,   846,   716,   717,   718,   719,     6,
+   140,   144,   142,   146,   138,   456,   457,   138,   860,   861,
+   862,   144,     6,   146,   866,   867,   144,    49,   146,    51,
+   872,   870,   144,     6,   146,   877,   144,   144,   146,   146,
+   140,   846,   124,   125,   126,   127,   128,   129,   130,   131,
+   132,   893,     6,     4,   892,   137,   144,   144,   146,   146,
+   144,   144,   146,   146,    61,   145,     6,   909,  1090,     5,
+   144,     6,   146,   137,   916,   917,   144,   142,   146,   921,
+    65,    66,    67,    68,     4,    70,     6,   140,   930,   931,
+    75,    76,     7,   144,  1103,   146,   145,   144,   940,   146,
+     7,     7,   940,   944,   146,   144,   911,   146,   913,   144,
+   144,   146,   146,   144,   144,   146,   146,     6,   559,   560,
+   962,   139,   119,   120,   121,   122,   123,   124,   125,   126,
+   127,   128,   129,   130,   131,   132,   978,   979,   146,   138,
+   137,   946,   144,   948,   146,   950,     7,     7,    92,   145,
+   144,   139,   139,   995,   144,     6,     4,     7,   141,   139,
+     7,    95,     7,  1172,  1006,   119,   120,   121,   122,   123,
+   124,   125,   126,   127,   128,   129,   130,   131,   132,     7,
+     7,    95,  1024,   137,   119,   120,   121,   122,   123,   124,
+   125,   126,   127,   128,   129,   130,   131,   132,     7,    95,
+     7,     7,   137,  1045,     6,   142,     7,  1049,   139,  1051,
+   139,   139,   100,   146,   146,     7,     7,     7,   142,  1061,
+   138,   138,   145,     6,  1066,     4,     6,   140,     6,   141,
+     6,     6,     6,     6,   126,   676,   677,     7,   679,    49,
+   681,   682,     7,     7,   685,   686,    51,     7,   145,  1090,
+     7,     7,  1094,     7,  1096,     7,  1098,     7,     7,     7,
+     7,     7,     7,     4,   145,  1107,     6,   145,   138,     6,
+     6,  1113,  1114,     6,     6,     6,     4,    49,     7,  1121,
+     7,     7,     7,     7,     6,     4,     6,  1129,   145,  1094,
+   139,  1096,   138,  1098,     7,   736,   737,   738,   139,   142,
+     6,   145,     6,   145,     6,   145,     6,  1149,   145,     6,
+     6,     5,   145,   145,     7,  1216,     6,  1159,     6,     5,
+  1162,     6,    91,  1165,     5,   142,     6,  1169,     4,     6,
+   141,     6,     6,     5,  1176,     6,     6,  1179,     6,     6,
+     6,     6,     6,  1244,     6,  1246,   119,   120,   121,   122,
    123,   124,   125,   126,   127,   128,   129,   130,   131,   132,
-   133,    -1,    -1,    -1,    -1,   138,    65,    66,    67,    68,
-    69,    70,     8,    -1,    -1,    -1,    75,    76,   120,   121,
+   801,     6,     6,  1264,   137,     6,   807,     6,     6,     6,
+     6,     6,     6,   144,     6,   816,   817,   818,     6,   145,
+   821,   822,   823,   824,   825,   826,   827,     4,     7,   142,
+     6,     3,     4,     6,   145,     6,     6,     9,    10,    11,
+     5,   842,    14,    15,    16,    17,    18,    19,    20,    21,
+    22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
+    32,    33,    34,   864,     6,     6,     6,     6,   146,   145,
+   145,    43,     7,   145,   119,   120,   121,   122,   123,   124,
+   125,   126,   127,   128,   129,   130,   131,   132,    90,     6,
+   891,     6,   137,    65,    66,    67,    68,    69,    70,     6,
+   139,   145,    93,    75,    76,     6,     6,     6,     6,     6,
+     6,     5,   145,     6,   119,   120,   121,   122,   123,   124,
+   125,   126,   127,   128,   129,   130,   131,   132,   146,    61,
+   145,   144,   137,     6,     6,     6,     6,     6,     6,   111,
+   112,   113,   114,     6,   122,   123,   124,   125,   126,   127,
+   128,   129,   130,   131,   132,     5,   128,   129,   145,   137,
+   146,   133,   963,   145,   145,   966,   138,     6,     6,     6,
+   145,   143,     6,   974,   146,   144,     6,   145,     6,   980,
+     3,     4,   145,     5,   145,   145,     9,    10,    11,   145,
+     6,    14,    15,    16,    17,    18,    19,    20,    21,    22,
+    23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
+    33,    34,   146,     6,     6,     6,     6,     6,     6,     6,
+    43,   119,   120,   121,   122,   123,   124,   125,   126,   127,
+   128,   129,   130,   131,   132,     6,     6,     0,     0,   137,
+   792,  1042,    65,    66,    67,    68,    69,    70,  1149,     2,
+     2,    -1,    75,    76,   896,    -1,   119,   120,   121,   122,
+   123,   124,   125,   126,   127,   128,   129,   130,   131,   132,
+    -1,    -1,    -1,    -1,   137,    -1,    -1,   100,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   111,   112,
+   113,   114,     6,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,  1102,    -1,    -1,    -1,   128,   129,    -1,    -1,    -1,
+   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,
+   143,    -1,   145,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     3,     4,    -1,    -1,    -1,    -1,     9,    10,    11,    -1,
+  1141,    14,    15,    16,    17,    18,    19,    20,    21,    22,
+    23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
+    33,    34,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    43,    -1,   119,   120,   121,   122,   123,   124,   125,   126,
+   127,   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,
+   137,    -1,    65,    66,    67,    68,    69,    70,     6,   146,
+    -1,    -1,    75,    76,    -1,   119,   120,   121,   122,   123,
+   124,   125,   126,   127,   128,   129,   130,   131,   132,    -1,
+    -1,    -1,    -1,   137,    -1,    -1,    -1,   100,    -1,     6,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   111,   112,
+   113,   114,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     6,
+    -1,    -1,    -1,    -1,    -1,   128,   129,    -1,    -1,    -1,
+   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,     3,     4,
+   143,     6,   145,    -1,     9,    10,    11,    -1,    -1,    14,
+    15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
+    25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    43,    -1,
+    -1,   119,   120,   121,   122,   123,   124,   125,   126,   127,
+   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,   137,
+    65,    66,    67,    68,    69,    70,     8,    -1,    -1,    -1,
+    75,    76,   119,   120,   121,   122,   123,   124,   125,   126,
+   127,   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,
+   137,    -1,   119,   120,   121,   122,   123,   124,   125,   126,
+   127,   128,   129,   130,   131,   132,   111,   112,   113,   114,
+   137,     6,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,    -1,    -1,   128,   129,    -1,    -1,    -1,   133,    -1,
+    -1,    -1,    -1,   138,    -1,     3,     4,    -1,   143,    -1,
+   145,     9,    10,    11,    -1,    -1,    14,    15,    16,    17,
+    18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
+    28,    29,    30,    31,    32,    33,    34,    -1,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,    43,    -1,   119,   120,   121,
    122,   123,   124,   125,   126,   127,   128,   129,   130,   131,
-   132,   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,   120,
-   121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
-   131,   132,   133,   112,   113,   114,   115,   138,     6,    -1,
+   132,    -1,    -1,    -1,    -1,   137,    -1,    65,    66,    67,
+    68,    69,    70,     8,    -1,    -1,    -1,    75,    76,    -1,
     -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-   129,   130,    -1,    -1,    -1,   134,    -1,    -1,    -1,    -1,
-   139,    -1,     3,     4,    -1,   144,    -1,   146,     9,    10,
+    -1,    -1,    -1,    -1,   119,   120,   121,   122,   123,   124,
+   125,   126,   127,   128,   129,   130,   131,   132,     6,    -1,
+    -1,    -1,   137,   111,   112,   113,   114,    -1,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+   128,   129,    -1,    -1,    -1,   133,    -1,    -1,    -1,    -1,
+   138,    -1,     3,     4,    -1,   143,    -1,   145,     9,    10,
     11,    -1,    -1,    14,    15,    16,    17,    18,    19,    20,
     21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
     31,    32,    33,    34,    -1,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,    43,    -1,   120,   121,   122,   123,   124,   125,
-   126,   127,   128,   129,   130,   131,   132,   133,    -1,    -1,
-    -1,    -1,   138,    -1,    65,    66,    67,    68,    69,    70,
+    -1,    -1,    43,    -1,   119,   120,   121,   122,   123,   124,
+   125,   126,   127,   128,   129,   130,   131,   132,    -1,    -1,
+    -1,    -1,   137,    -1,    65,    66,    67,    68,    69,    70,
      8,    -1,    -1,    -1,    75,    76,    -1,    -1,    -1,    -1,
+    -1,   119,   120,   121,   122,   123,   124,   125,   126,   127,
+   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,   137,
     -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,   120,   121,   122,   123,   124,   125,   126,   127,
-   128,   129,   130,   131,   132,   133,     6,    -1,    -1,    -1,
-   138,   112,   113,   114,   115,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   129,   130,
-    -1,    -1,    -1,   134,    -1,    -1,    -1,    -1,   139,    -1,
-     3,     4,    -1,   144,    -1,   146,     9,    10,    11,    -1,
-    -1,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-    23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
-    33,    34,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-    43,    -1,   120,   121,   122,   123,   124,   125,   126,   127,
-   128,   129,   130,   131,   132,   133,    -1,    -1,    -1,    -1,
-   138,    -1,    65,    66,    67,    68,    69,    70,     8,    -1,
-    -1,    -1,    75,    76,    -1,    -1,    -1,    -1,    -1,    -1,
-   120,   121,   122,   123,   124,   125,   126,   127,   128,   129,
-   130,   131,   132,   133,    -1,    -1,    -1,    -1,   138,    -1,
-    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   112,
-   113,   114,   115,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,    -1,    -1,    -1,    -1,   129,   130,    -1,    -1,
-    -1,   134,    -1,    -1,    -1,    -1,   139,    -1,     3,     4,
-    -1,   144,    -1,   146,     9,    10,    11,    -1,    -1,    14,
-    15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
-    25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
-    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    43,    -1,
-   120,   121,   122,   123,   124,   125,   126,   127,   128,   129,
-   130,   131,   132,   133,    -1,    -1,    -1,    -1,   138,    -1,
-    65,    66,    67,    68,    69,    70,     3,     4,    -1,    -1,
-    75,    76,     9,    10,    11,    -1,    -1,    14,    15,    16,
+   111,   112,   113,   114,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,   128,   129,    -1,
+    -1,    -1,   133,    -1,    -1,    -1,    -1,   138,    -1,     3,
+     4,    -1,   143,    -1,   145,     9,    10,    11,    -1,    -1,
+    14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
+    24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
+    34,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    43,
+    -1,   119,   120,   121,   122,   123,   124,   125,   126,   127,
+   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,   137,
+    -1,    65,    66,    67,    68,    69,    70,     3,     4,    -1,
+    -1,    75,    76,     9,    10,    11,    -1,    -1,    14,    15,
+    16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
+    26,    27,    28,    29,    30,    31,    32,    33,    34,    -1,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,   111,   112,   113,
+   114,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,    -1,    -1,    -1,   128,   129,    -1,    -1,    -1,   133,
+    -1,    -1,    -1,    -1,   138,    -1,     3,     4,    -1,   143,
+    -1,   145,     9,    10,    11,    -1,    -1,    14,    15,    16,
     17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
     27,    28,    29,    30,    31,    32,    33,    34,     6,    -1,
-    -1,    -1,    -1,    -1,    -1,    -1,    -1,   112,   113,   114,
-   115,    -1,    -1,    -1,    -1,    -1,    -1,     6,    -1,    -1,
-    -1,    -1,    -1,    -1,   129,   130,    -1,    -1,    -1,   134,
-    -1,    -1,    -1,    -1,   139,    -1,     3,     4,    -1,   144,
-    -1,   146,     9,    10,    11,    -1,    -1,    14,    15,    16,
-    17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
-    27,    28,    29,    30,    31,    32,    33,    34,    -1,    -1,
-    -1,    -1,    -1,    -1,    -1,   112,   113,   114,   115,    -1,
+    -1,    -1,    -1,    -1,    -1,   111,   112,   113,   114,    -1,
     -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,   129,   130,    -1,    -1,    -1,   134,    -1,    -1,
-    -1,    -1,   139,    -1,    -1,   142,     6,   144,    -1,   146,
-    -1,    -1,   120,   121,   122,   123,   124,   125,   126,   127,
-   128,   129,   130,   131,   132,   133,    -1,    -1,    -1,    -1,
-   138,   120,   121,   122,   123,   124,   125,   126,   127,   128,
-   129,   130,   131,   132,   133,   112,   113,   114,   115,   138,
+    -1,     6,   128,   129,    -1,    -1,    -1,   133,    -1,    -1,
+    -1,    -1,   138,    -1,    -1,   141,    -1,   143,    -1,   145,
+     3,     4,    -1,    -1,    -1,    -1,     9,    10,    11,    -1,
+    -1,    14,    15,    16,    17,    18,    19,    20,    21,    22,
+    23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
+    33,    34,    -1,    -1,   111,   112,   113,   114,    -1,    -1,
     -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,   129,   130,    -1,    -1,    -1,   134,    -1,    -1,
-    -1,    -1,   139,    -1,    -1,   142,    -1,   144,    -1,   146,
-     3,     4,     5,    -1,     7,    -1,     9,    10,    11,    -1,
+    -1,   128,   129,    -1,    -1,    -1,   133,    -1,    -1,    -1,
+    -1,   138,    -1,    -1,   141,    -1,   143,     8,   145,    -1,
+    -1,   119,   120,   121,   122,   123,   124,   125,   126,   127,
+   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,   137,
+    -1,    -1,    -1,    -1,   119,   120,   121,   122,   123,   124,
+   125,   126,   127,   128,   129,   130,   131,   132,   111,   112,
+   113,   114,   137,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,   128,   129,    -1,    -1,    -1,
+   133,    -1,    -1,    -1,    -1,   138,    -1,     3,     4,     5,
+   143,     7,   145,     9,    10,    11,    -1,    -1,    14,    15,
+    16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
+    26,    27,    28,    29,    30,    31,    32,    33,    34,     8,
+    36,    37,    38,    39,    -1,    -1,    42,    -1,   119,   120,
+   121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
+   131,   132,     3,     4,    -1,    -1,   137,    -1,     9,    10,
+    11,    -1,    -1,    14,    15,    16,    17,    18,    19,    20,
+    21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
+    31,    32,    33,    34,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,    -1,    43,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,   111,   112,   113,   114,   115,
+   116,   117,   118,    -1,    65,    66,    67,    68,    69,    70,
+    -1,    -1,   128,   129,    75,    76,    -1,   133,   134,   135,
+    -1,    -1,   138,    -1,   140,    -1,   142,   143,    -1,    -1,
+   119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
+   129,   130,   131,   132,     8,    -1,    -1,    -1,   137,    -1,
+   111,   112,   113,   114,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,   128,   129,    -1,
+    -1,    -1,   133,     3,     4,     5,    -1,   138,    -1,     9,
+    10,    11,   143,    -1,    14,    15,    16,    17,    18,    19,
+    20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
+    30,    31,    32,    33,    34,    -1,    36,    37,    38,    39,
+     3,     4,    42,    -1,    -1,    -1,     9,    10,    11,    -1,
     -1,    14,    15,    16,    17,    18,    19,    20,    21,    22,
     23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
-    33,    34,     6,    36,    37,    38,    39,    -1,    -1,    42,
-   120,   121,   122,   123,   124,   125,   126,   127,   128,   129,
-   130,   131,   132,   133,    -1,    -1,     3,     4,   138,    -1,
-    -1,    -1,     9,    10,    11,    -1,    -1,    14,    15,    16,
-    17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
-    27,    28,    29,    30,    31,    32,    33,    34,    -1,    -1,
-    -1,    -1,    -1,    -1,    -1,    -1,    43,    -1,    -1,    -1,
-    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   112,
-   113,   114,   115,   116,   117,   118,   119,    -1,    65,    66,
-    67,    68,    69,    70,    -1,    -1,   129,   130,    75,    76,
-    -1,   134,   135,   136,    -1,    -1,   139,    -1,   141,    -1,
-   143,   144,    -1,    -1,    -1,     8,   120,   121,   122,   123,
-   124,   125,   126,   127,   128,   129,   130,   131,   132,   133,
-    -1,    -1,    -1,    -1,   138,   112,   113,   114,   115,    -1,
-    -1,     8,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,   129,   130,    -1,    -1,    -1,   134,     3,     4,
-     5,    -1,   139,    -1,     9,    10,    11,   144,    -1,    14,
-    15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
-    25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
-    -1,    36,    37,    38,    39,     3,     4,    42,    -1,    -1,
-    -1,     9,    10,    11,    -1,    -1,    14,    15,    16,    17,
-    18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
-    28,    29,    30,    31,    32,    33,    34,   120,   121,   122,
-   123,   124,   125,   126,   127,   128,   129,   130,   131,   132,
+    33,    34,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,   119,   120,   121,   122,   123,
+   124,   125,   126,   127,   128,   129,   130,   131,   132,    -1,
+    -1,    -1,    -1,   137,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,   111,   112,   113,   114,    -1,    -1,    -1,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   128,   129,
+    -1,    -1,    -1,   133,    -1,    -1,    -1,    -1,   138,    -1,
+    -1,    -1,    -1,   143,    -1,    -1,    -1,    -1,   111,   112,
+   113,   114,    12,    13,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,   128,   129,    -1,    -1,    -1,
    133,    -1,    -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,
-    -1,    -1,    -1,   120,   121,   122,   123,   124,   125,   126,
-   127,   128,   129,   130,   131,   132,   133,   112,   113,   114,
-   115,   138,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,    -1,    -1,   129,   130,    -1,    -1,    -1,   134,
-    -1,    -1,    -1,    -1,   139,    -1,    -1,    -1,    -1,   144,
-    -1,    -1,    -1,    -1,   112,   113,   114,   115,    12,    13,
-    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-    -1,   129,   130,    -1,    -1,    -1,   134,    -1,    -1,    -1,
-    -1,   139,    12,    13,    -1,    -1,   144,    -1,    -1,    43,
-    44,    45,    46,    47,    48,    49,    50,    51,    52,    -1,
-    54,    -1,    56,    57,    -1,    59,    60,    -1,    -1,    -1,
-    -1,    -1,    -1,    43,    44,    45,    46,    47,    48,    49,
-    50,    51,    52,    77,    54,    -1,    56,    57,    -1,    59,
-    60,    -1,    -1,    -1,    88,    89,    90,    -1,    -1,    -1,
-    -1,    -1,    -1,    -1,    -1,    -1,    -1,    77,   102,   103,
-   104,    -1,   106,    -1,    -1,   109,    -1,    -1,    88,    89,
-    90,    -1,    -1,    12,    13,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,   102,   103,   104,    -1,   106,    -1,    -1,   109,
-    -1,    -1,    -1,    -1,    -1,    -1,    -1,    12,    13,    -1,
-    -1,    -1,    -1,   147,    43,    44,    45,    46,    47,    48,
-    49,    50,    51,    52,    -1,    54,    -1,    56,    57,    -1,
-    59,    60,    -1,    -1,    -1,    -1,    -1,   147,    43,    44,
-    45,    46,    47,    48,    49,    50,    51,    52,    77,    54,
-    -1,    56,    57,    -1,    59,    60,    -1,    -1,    -1,    88,
-    89,    90,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,    77,   102,   103,   104,    -1,   106,    -1,    -1,
-   109,    -1,    -1,    88,    89,    90,    -1,    -1,    12,    13,
-    -1,    -1,    -1,    -1,    -1,    -1,    -1,   102,   103,   104,
-    -1,   106,    -1,    -1,   109,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,    12,    13,    -1,    -1,    -1,    -1,   147,    43,
+   143,    -1,    -1,    43,    44,    45,    46,    47,    48,    49,
+    50,    51,    52,    -1,    54,    -1,    56,    57,    -1,    59,
+    60,    -1,    -1,   119,   120,   121,   122,   123,   124,   125,
+   126,   127,   128,   129,   130,   131,   132,    77,    12,    13,
+    -1,   137,    -1,    -1,    -1,    -1,    -1,    87,    88,    89,
+   146,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,   101,   102,   103,    -1,   105,    -1,    -1,   108,    43,
     44,    45,    46,    47,    48,    49,    50,    51,    52,    -1,
-    54,    -1,    56,    57,    -1,    59,    60,    -1,    -1,    -1,
-    -1,    -1,   147,    43,    44,    45,    46,    47,    48,    49,
-    50,    51,    52,    77,    54,    -1,    56,    57,    -1,    59,
-    60,    -1,    -1,    -1,    88,    89,    90,    -1,    -1,    -1,
-    -1,    -1,    -1,    -1,    -1,    -1,    -1,    77,   102,   103,
-   104,     8,   106,    -1,    -1,   109,    -1,    -1,    88,    89,
-    90,    -1,    -1,    12,    13,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,   102,   103,   104,    -1,   106,    -1,    -1,   109,
-    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,    -1,   147,    43,    44,    45,    46,    47,    48,
-    49,    50,    51,    52,    -1,    54,    -1,    56,    57,    -1,
-    59,    60,    -1,    -1,    -1,    -1,    -1,   147,    -1,    -1,
-    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    77,    -1,
-    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    88,
-    89,    90,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,    -1,   102,   103,   104,    -1,   106,    -1,    -1,
-   109,    -1,    -1,   120,   121,   122,   123,   124,   125,   126,
-   127,   128,   129,   130,   131,   132,   133,    -1,     0,     1,
-    -1,   138,     4,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-    12,    13,    -1,    -1,    -1,    -1,    -1,    -1,   147,   120,
-   121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
-   131,   132,   133,    35,    -1,    -1,    -1,   138,    40,    41,
-    -1,    43,    44,    45,    46,    47,    48,    49,    50,    51,
-    52,    -1,    54,    55,    56,    57,    58,    59,    60,    -1,
-    -1,    -1,    64,    65,    66,    67,    68,    69,    70,    -1,
-    72,    73,    74,    75,    76,    77,    -1,    -1,    80,    81,
-    -1,     4,    -1,    -1,    -1,    87,    88,    89,    90,    12,
-    13,    93,    -1,    95,    -1,    97,    98,    99,   100,    -1,
-   102,   103,   104,    -1,   106,   107,   108,   109,   110,   111,
+    54,    -1,    56,    57,    -1,    59,    60,    -1,    -1,   119,
+   120,   121,   122,   123,   124,   125,   126,   127,   128,   129,
+   130,   131,   132,    77,    12,    13,   146,   137,    -1,    -1,
+    -1,    -1,    -1,    87,    88,    89,   146,    -1,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,   101,   102,   103,
+    -1,   105,    -1,    -1,   108,    43,    44,    45,    46,    47,
+    48,    49,    50,    51,    52,    -1,    54,    -1,    56,    57,
+    -1,    59,    60,    -1,    -1,   119,   120,   121,   122,   123,
+   124,   125,   126,   127,   128,   129,   130,   131,   132,    77,
+    12,    13,   146,   137,    -1,    -1,    -1,    -1,    -1,    87,
+    88,    89,   146,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,    -1,    -1,   101,   102,   103,    -1,   105,    -1,    -1,
+   108,    43,    44,    45,    46,    47,    48,    49,    50,    51,
+    52,    -1,    54,    -1,    56,    57,    -1,    59,    60,    -1,
+    -1,   119,   120,   121,   122,   123,   124,   125,   126,   127,
+   128,   129,   130,   131,   132,    77,    12,    13,   146,   137,
+    -1,    -1,    -1,    -1,    -1,    87,    88,    89,   146,    -1,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   101,
+   102,   103,    -1,   105,    -1,    -1,   108,    43,    44,    45,
+    46,    47,    48,    49,    50,    51,    52,    -1,    54,    -1,
+    56,    57,    -1,    59,    60,    -1,    -1,   119,   120,   121,
+   122,   123,   124,   125,   126,   127,   128,   129,   130,   131,
+   132,    77,    12,    13,   146,   137,    -1,    -1,    -1,    -1,
+    -1,    87,    88,    89,   146,    -1,    -1,    -1,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,   101,   102,   103,    -1,   105,
+    -1,    -1,   108,    43,    44,    45,    46,    47,    48,    49,
+    50,    51,    52,    -1,    54,    -1,    56,    57,    -1,    59,
+    60,    -1,    -1,   119,   120,   121,   122,   123,   124,   125,
+   126,   127,   128,   129,   130,   131,   132,    77,    -1,    -1,
+   146,   137,    -1,    -1,    -1,    -1,    -1,    87,    88,    89,
+   146,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,   101,   102,   103,    -1,   105,    -1,    -1,   108,     0,
+     1,    -1,    -1,     4,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,    12,    13,    -1,   119,   120,   121,   122,   123,   124,
+   125,   126,   127,   128,   129,   130,   131,   132,    -1,    -1,
+    -1,    -1,   137,    -1,    35,    -1,   146,    -1,    -1,    40,
+    41,   146,    43,    44,    45,    46,    47,    48,    49,    50,
+    51,    52,    -1,    54,    55,    56,    57,    58,    59,    60,
+    -1,    -1,    -1,    64,    65,    66,    67,    68,    69,    70,
+    -1,    72,    73,    74,    75,    76,    77,    -1,    -1,    80,
+    81,     4,    -1,    -1,    -1,    86,    87,    88,    89,    12,
+    13,    92,    -1,    94,    -1,    96,    97,    98,    99,    -1,
+   101,   102,   103,    -1,   105,   106,   107,   108,   109,   110,
     -1,    -1,    35,    -1,    -1,    -1,    -1,    40,    41,    -1,
     43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
     -1,    54,    55,    56,    57,    58,    59,    60,    -1,    -1,
     -1,    64,    65,    66,    67,    68,    69,    70,    -1,    72,
     73,    74,    75,    76,    77,    -1,    -1,    80,    81,    12,
-    13,    -1,    -1,    -1,    87,    88,    89,    90,    -1,    -1,
-    93,    -1,    95,    -1,    97,    98,    99,   100,    -1,   102,
-   103,   104,    -1,   106,   107,   108,   109,   110,   111,    -1,
+    13,    -1,    -1,    86,    87,    88,    89,    -1,    -1,    92,
+    -1,    94,    -1,    96,    97,    98,    99,    -1,   101,   102,
+   103,    -1,   105,   106,   107,   108,   109,   110,    -1,    -1,
     43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
-    -1,    54,    -1,    56,    57,    -1,    59,    60,   120,   121,
-   122,   123,   124,   125,   126,   127,   128,   129,   130,   131,
-   132,   133,    -1,    -1,    77,    -1,   138,    -1,   140,    -1,
-    -1,    -1,    -1,   145,    -1,    88,    89,    90,    -1,    -1,
-    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   102,
-   103,   104,    -1,   106,    -1,    -1,   109,   120,   121,   122,
-   123,   124,   125,   126,   127,   128,   129,   130,   131,   132,
-   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,
-    -1,    -1,   145,    -1,   147,   120,   121,   122,   123,   124,
-   125,   126,   127,   128,   129,   130,   131,   132,   133,    -1,
-    -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,    -1,    -1,
-   145,    -1,   147,   120,   121,   122,   123,   124,   125,   126,
-   127,   128,   129,   130,   131,   132,   133,    -1,    -1,    -1,
-    -1,   138,    -1,    -1,    -1,    -1,    -1,    -1,   145,    -1,
-   147,   120,   121,   122,   123,   124,   125,   126,   127,   128,
-   129,   130,   131,   132,   133,    -1,    -1,    -1,    -1,   138,
-    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   147,   120,
-   121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
-   131,   132,   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,
-    -1,    -1,    -1,    -1,    -1,    -1,   147,   120,   121,   122,
+    -1,    54,    -1,    56,    57,    -1,    59,    60,    -1,    -1,
+   119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
+   129,   130,   131,   132,    77,    -1,    -1,    -1,   137,    -1,
+    -1,    -1,    -1,    -1,    87,    88,    89,   146,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   101,   102,
+   103,    -1,   105,    -1,    -1,   108,   119,   120,   121,   122,
    123,   124,   125,   126,   127,   128,   129,   130,   131,   132,
-   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,
-    -1,    -1,    -1,    -1,   147,   120,   121,   122,   123,   124,
-   125,   126,   127,   128,   129,   130,   131,   132,   133,    -1,
-    -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,   147,   120,   121,   122,   123,   124,   125,   126,
-   127,   128,   129,   130,   131,   132,   133,    -1,    -1,    -1,
-    -1,   138,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-   147,   120,   121,   122,   123,   124,   125,   126,   127,   128,
-   129,   130,   131,   132,   133,    -1,    -1,    -1,    -1,   138,
-    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   147,   120,
+    -1,    -1,    -1,    -1,   137,    -1,    -1,    -1,    -1,    -1,
+    -1,   144,    -1,   146,   119,   120,   121,   122,   123,   124,
+   125,   126,   127,   128,   129,   130,   131,   132,    -1,    -1,
+    -1,    -1,   137,    -1,    -1,    -1,    -1,    -1,    -1,   144,
+    -1,   146,   119,   120,   121,   122,   123,   124,   125,   126,
+   127,   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,
+   137,    -1,    -1,    -1,    -1,    -1,    -1,   144,    -1,   146,
+   119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
+   129,   130,   131,   132,    -1,    -1,    -1,    -1,   137,    -1,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,   146,   119,   120,
    121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
-   131,   132,   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,
-    -1,    -1,    -1,    -1,    -1,    -1,   147,   120,   121,   122,
+   131,   132,    -1,    -1,    -1,    -1,   137,    -1,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,   146,   119,   120,   121,   122,
    123,   124,   125,   126,   127,   128,   129,   130,   131,   132,
-   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,
-    -1,    -1,    -1,    -1,   147,   120,   121,   122,   123,   124,
-   125,   126,   127,   128,   129,   130,   131,   132,   133,    -1,
-    -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,   147,   120,   121,   122,   123,   124,   125,   126,
-   127,   128,   129,   130,   131,   132,   133,    -1,    -1,    -1,
-    -1,   138,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-   147,   120,   121,   122,   123,   124,   125,   126,   127,   128,
-   129,   130,   131,   132,   133,    -1,    -1,    -1,    -1,   138,
-    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   147,   120,
+    -1,    -1,    -1,    -1,   137,    -1,    -1,    -1,    -1,    -1,
+    -1,    -1,    -1,   146,   119,   120,   121,   122,   123,   124,
+   125,   126,   127,   128,   129,   130,   131,   132,    -1,    -1,
+    -1,    -1,   137,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,   146,   119,   120,   121,   122,   123,   124,   125,   126,
+   127,   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,
+   137,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   146,
+   119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
+   129,   130,   131,   132,    -1,    -1,    -1,    -1,   137,    -1,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,   146,   119,   120,
    121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
-   131,   132,   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,
-    -1,    -1,    -1,    -1,    -1,    -1,   147,   120,   121,   122,
+   131,   132,    -1,    -1,    -1,    -1,   137,    -1,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,   146,   119,   120,   121,   122,
    123,   124,   125,   126,   127,   128,   129,   130,   131,   132,
-   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,
-    -1,    -1,    -1,    -1,   147,   120,   121,   122,   123,   124,
-   125,   126,   127,   128,   129,   130,   131,   132,   133,    -1,
-    -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,   147,   120,   121,   122,   123,   124,   125,   126,
-   127,   128,   129,   130,   131,   132,   133,    -1,    -1,    -1,
-    -1,   138,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-   147,   120,   121,   122,   123,   124,   125,   126,   127,   128,
-   129,   130,   131,   132,   133,    -1,    -1,    -1,    -1,   138,
-    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   147,   120,
+    -1,    -1,    -1,    -1,   137,    -1,    -1,    -1,    -1,    -1,
+    -1,    -1,    -1,   146,   119,   120,   121,   122,   123,   124,
+   125,   126,   127,   128,   129,   130,   131,   132,    -1,    -1,
+    -1,    -1,   137,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,   146,   119,   120,   121,   122,   123,   124,   125,   126,
+   127,   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,
+   137,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   146,
+   119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
+   129,   130,   131,   132,    -1,    -1,    -1,    -1,   137,    -1,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,   146,   119,   120,
    121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
-   131,   132,   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,
-    -1,    -1,    -1,    -1,    -1,    -1,   147,   120,   121,   122,
+   131,   132,    -1,    -1,    -1,    -1,   137,    -1,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,   146,   119,   120,   121,   122,
    123,   124,   125,   126,   127,   128,   129,   130,   131,   132,
-   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,
-    -1,    -1,    -1,    -1,   147,   120,   121,   122,   123,   124,
-   125,   126,   127,   128,   129,   130,   131,   132,   133,    -1,
-    -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,   147,   120,   121,   122,   123,   124,   125,   126,
-   127,   128,   129,   130,   131,   132,   133,    -1,    -1,    -1,
-    -1,   138,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-   147,   120,   121,   122,   123,   124,   125,   126,   127,   128,
-   129,   130,   131,   132,   133,    -1,    -1,    -1,    -1,   138,
-    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   147,   120,
-   121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
-   131,   132,   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,
-    -1,    -1,    -1,    -1,    -1,    -1,   147,   120,   121,   122,
+    -1,    -1,    -1,    -1,   137,    -1,    -1,    -1,    -1,    -1,
+    -1,    -1,    -1,   146,   119,   120,   121,   122,   123,   124,
+   125,   126,   127,   128,   129,   130,   131,   132,    -1,    -1,
+    -1,    -1,   137,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,   146,   119,   120,   121,   122,   123,   124,   125,   126,
+   127,   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,
+   137,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   146,
+   119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
+   129,   130,   131,   132,    -1,    -1,    -1,    -1,   137,    -1,
+   139,    -1,    -1,    -1,    -1,   144,   119,   120,   121,   122,
    123,   124,   125,   126,   127,   128,   129,   130,   131,   132,
-   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,
-    -1,    -1,    -1,    -1,   147,   120,   121,   122,   123,   124,
-   125,   126,   127,   128,   129,   130,   131,   132,   133,    -1,
-    -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,   147,   120,   121,   122,   123,   124,   125,   126,
-   127,   128,   129,   130,   131,   132,   133,    -1,    -1,    -1,
-    -1,   138,    -1,    -1,    -1,    -1,    -1,    -1,   145,   120,
+    -1,    -1,    -1,    -1,   137,    -1,    -1,    -1,    -1,    -1,
+    -1,   144,   119,   120,   121,   122,   123,   124,   125,   126,
+   127,   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,
+   137,    -1,    -1,    -1,    -1,    -1,    -1,   144,   119,   120,
    121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
-   131,   132,   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,
-    -1,    -1,    -1,    -1,   145,   120,   121,   122,   123,   124,
-   125,   126,   127,   128,   129,   130,   131,   132,   133,    -1,
-    -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,    -1,    -1,
-   145,   120,   121,   122,   123,   124,   125,   126,   127,   128,
-   129,   130,   131,   132,   133,    -1,    -1,    -1,    -1,   138,
-    -1,    -1,    -1,    -1,    -1,    -1,   145,   120,   121,   122,
+   131,   132,    -1,    -1,    -1,    -1,   137,    -1,    -1,    -1,
+    -1,    -1,    -1,   144,   119,   120,   121,   122,   123,   124,
+   125,   126,   127,   128,   129,   130,   131,   132,    -1,    -1,
+    -1,    -1,   137,    -1,    -1,    -1,    -1,    -1,    -1,   144,
+   119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
+   129,   130,   131,   132,    -1,    -1,    -1,    -1,   137,    -1,
+    -1,    -1,    -1,    -1,    -1,   144,   119,   120,   121,   122,
    123,   124,   125,   126,   127,   128,   129,   130,   131,   132,
-   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,
-    -1,    -1,   145,   120,   121,   122,   123,   124,   125,   126,
-   127,   128,   129,   130,   131,   132,   133,    -1,    -1,    -1,
-    -1,   138,    -1,    -1,    -1,    -1,    -1,    -1,   145,   120,
+    -1,    -1,    -1,    -1,   137,    -1,    -1,    -1,    -1,    -1,
+    -1,   144,   119,   120,   121,   122,   123,   124,   125,   126,
+   127,   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,
+   137,    -1,    -1,    -1,    -1,    -1,    -1,   144,   119,   120,
    121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
-   131,   132,   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,
-    -1,    -1,    -1,    -1,   145,   120,   121,   122,   123,   124,
-   125,   126,   127,   128,   129,   130,   131,   132,   133,    -1,
-    -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,    -1,    -1,
-   145,   120,   121,   122,   123,   124,   125,   126,   127,   128,
-   129,   130,   131,   132,   133,    -1,    -1,    -1,    -1,   138,
-    -1,    -1,    -1,    -1,    -1,    -1,   145,   120,   121,   122,
+   131,   132,    -1,    -1,    -1,    -1,   137,    -1,    -1,    -1,
+    -1,    -1,    -1,   144,   119,   120,   121,   122,   123,   124,
+   125,   126,   127,   128,   129,   130,   131,   132,    -1,    -1,
+    -1,    -1,   137,    -1,    -1,    -1,    -1,    -1,    -1,   144,
+   119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
+   129,   130,   131,   132,    -1,    -1,    -1,    -1,   137,    -1,
+    -1,    -1,    -1,    -1,    -1,   144,   119,   120,   121,   122,
    123,   124,   125,   126,   127,   128,   129,   130,   131,   132,
-   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,
-    -1,    -1,   145,   120,   121,   122,   123,   124,   125,   126,
-   127,   128,   129,   130,   131,   132,   133,    -1,    -1,    -1,
-    -1,   138,    -1,    -1,    -1,    -1,    -1,    -1,   145,   120,
+    -1,    -1,    -1,    -1,   137,    -1,    -1,    -1,    -1,    -1,
+    -1,   144,   119,   120,   121,   122,   123,   124,   125,   126,
+   127,   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,
+   137,    -1,    -1,    -1,    -1,    -1,    -1,   144,   119,   120,
    121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
-   131,   132,   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,
-    -1,    -1,    -1,    -1,   145,   120,   121,   122,   123,   124,
-   125,   126,   127,   128,   129,   130,   131,   132,   133,    -1,
-    -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,    -1,    -1,
-   145,   120,   121,   122,   123,   124,   125,   126,   127,   128,
-   129,   130,   131,   132,   133,    -1,    -1,    -1,    -1,   138,
-    -1,    -1,    -1,    -1,    -1,    -1,   145,   120,   121,   122,
+   131,   132,    -1,    -1,    -1,    -1,   137,    -1,    -1,    -1,
+    -1,    -1,    -1,   144,   119,   120,   121,   122,   123,   124,
+   125,   126,   127,   128,   129,   130,   131,   132,    -1,    -1,
+    -1,    -1,   137,    -1,    -1,    -1,    -1,    -1,    -1,   144,
+   119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
+   129,   130,   131,   132,    -1,    -1,    -1,    -1,   137,    -1,
+    -1,    -1,    -1,    -1,    -1,   144,   119,   120,   121,   122,
    123,   124,   125,   126,   127,   128,   129,   130,   131,   132,
-   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,
-    -1,    -1,   145,   120,   121,   122,   123,   124,   125,   126,
-   127,   128,   129,   130,   131,   132,   133,    -1,    -1,    -1,
-    -1,   138,    -1,    -1,    -1,    -1,    -1,    -1,   145,   120,
+    -1,    -1,    -1,    -1,   137,    -1,    -1,    -1,    -1,    -1,
+    -1,   144,   119,   120,   121,   122,   123,   124,   125,   126,
+   127,   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,
+   137,    -1,    -1,    -1,    -1,    -1,    -1,   144,   119,   120,
    121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
-   131,   132,   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,
-    -1,    -1,    -1,    -1,   145,   120,   121,   122,   123,   124,
-   125,   126,   127,   128,   129,   130,   131,   132,   133,    -1,
-    -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,    -1,    -1,
-   145,   120,   121,   122,   123,   124,   125,   126,   127,   128,
-   129,   130,   131,   132,   133,    -1,    -1,    -1,    -1,   138,
-    -1,    -1,    -1,    -1,    -1,    -1,   145,   120,   121,   122,
+   131,   132,    -1,    -1,    -1,    -1,   137,    -1,    -1,    -1,
+    -1,    -1,    -1,   144,   119,   120,   121,   122,   123,   124,
+   125,   126,   127,   128,   129,   130,   131,   132,    -1,    -1,
+    -1,    -1,   137,    -1,    -1,    -1,    -1,    -1,    -1,   144,
+   119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
+   129,   130,   131,   132,    -1,    -1,    -1,    -1,   137,    -1,
+    -1,    -1,    -1,    -1,    -1,   144,   119,   120,   121,   122,
    123,   124,   125,   126,   127,   128,   129,   130,   131,   132,
-   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,
-    -1,    -1,   145,   120,   121,   122,   123,   124,   125,   126,
-   127,   128,   129,   130,   131,   132,   133,    -1,    -1,    -1,
-    -1,   138,    -1,    -1,    -1,    -1,    -1,    -1,   145,   120,
+    -1,    -1,    -1,    -1,   137,    -1,    -1,    -1,    -1,    -1,
+    -1,   144,   119,   120,   121,   122,   123,   124,   125,   126,
+   127,   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,
+   137,    -1,    -1,    -1,    -1,    -1,    -1,   144,   119,   120,
    121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
-   131,   132,   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,
-    -1,    -1,    -1,    -1,   145,   120,   121,   122,   123,   124,
-   125,   126,   127,   128,   129,   130,   131,   132,   133,    -1,
-    -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,    -1,    -1,
-   145,   120,   121,   122,   123,   124,   125,   126,   127,   128,
-   129,   130,   131,   132,   133,    -1,    -1,    -1,    -1,   138,
-    -1,    -1,    -1,    -1,    -1,    -1,   145,   120,   121,   122,
+   131,   132,    -1,    -1,    -1,    -1,   137,    -1,    -1,    -1,
+    -1,    -1,    -1,   144,   119,   120,   121,   122,   123,   124,
+   125,   126,   127,   128,   129,   130,   131,   132,    -1,    -1,
+    -1,    -1,   137,    -1,    -1,    -1,    -1,    -1,    -1,   144,
+   119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
+   129,   130,   131,   132,    -1,    -1,    -1,    -1,   137,    -1,
+    -1,    -1,    -1,    -1,    -1,   144,   119,   120,   121,   122,
    123,   124,   125,   126,   127,   128,   129,   130,   131,   132,
-   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,
-    -1,    -1,   145,   120,   121,   122,   123,   124,   125,   126,
-   127,   128,   129,   130,   131,   132,   133,    -1,    -1,    -1,
-    -1,   138,    -1,    -1,    -1,    -1,    -1,    -1,   145,   120,
+    -1,    -1,    -1,    -1,   137,    -1,    -1,    -1,    -1,    -1,
+    -1,   144,   119,   120,   121,   122,   123,   124,   125,   126,
+   127,   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,
+   137,    -1,    -1,    -1,    -1,    -1,    -1,   144,   119,   120,
    121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
-   131,   132,   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,
-    -1,    -1,    -1,    -1,   145,   120,   121,   122,   123,   124,
-   125,   126,   127,   128,   129,   130,   131,   132,   133,    -1,
-    -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,    -1,    -1,
-   145,   120,   121,   122,   123,   124,   125,   126,   127,   128,
-   129,   130,   131,   132,   133,    -1,    -1,    -1,    -1,   138,
-    -1,    -1,    -1,    -1,    -1,    -1,   145,   120,   121,   122,
+   131,   132,    -1,    -1,    -1,    -1,   137,    -1,    -1,    -1,
+    -1,    -1,    -1,   144,   119,   120,   121,   122,   123,   124,
+   125,   126,   127,   128,   129,   130,   131,   132,    -1,    -1,
+    -1,    -1,   137,    -1,    -1,    -1,    -1,    -1,    -1,   144,
+   119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
+   129,   130,   131,   132,    -1,    -1,    -1,    -1,   137,    -1,
+    -1,    -1,   141,   119,   120,   121,   122,   123,   124,   125,
+   126,   127,   128,   129,   130,   131,   132,    -1,    -1,    -1,
+    -1,   137,    -1,    -1,    -1,   141,   119,   120,   121,   122,
    123,   124,   125,   126,   127,   128,   129,   130,   131,   132,
-   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,    -1,   142,
+    -1,    -1,    -1,    -1,   137,    -1,    -1,    -1,   141,   119,
    120,   121,   122,   123,   124,   125,   126,   127,   128,   129,
-   130,   131,   132,   133,    -1,    -1,    -1,    -1,   138,    -1,
-    -1,    -1,   142,   120,   121,   122,   123,   124,   125,   126,
-   127,   128,   129,   130,   131,   132,   133,    -1,    -1,    -1,
-    -1,   138,    -1,    -1,    -1,   142,   120,   121,   122,   123,
-   124,   125,   126,   127,   128,   129,   130,   131,   132,   133,
-    -1,    -1,    -1,    -1,   138,    -1,    -1,    -1,   142,   120,
+   130,   131,   132,    -1,    -1,    -1,    -1,   137,    -1,    -1,
+    -1,   141,   119,   120,   121,   122,   123,   124,   125,   126,
+   127,   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,
+   137,    -1,    -1,    -1,   141,   119,   120,   121,   122,   123,
+   124,   125,   126,   127,   128,   129,   130,   131,   132,    -1,
+    -1,    -1,    -1,   137,    -1,    -1,    -1,   141,   119,   120,
    121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
-   131,   132,   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,
-    -1,   142,   120,   121,   122,   123,   124,   125,   126,   127,
-   128,   129,   130,   131,   132,   133,    -1,    -1,    -1,    -1,
-   138,    -1,    -1,    -1,   142,   120,   121,   122,   123,   124,
-   125,   126,   127,   128,   129,   130,   131,   132,   133,    -1,
-    -1,    -1,    -1,   138,    -1,    -1,    -1,   142,   120,   121,
+   131,   132,    -1,    -1,    -1,    -1,   137,    -1,    -1,    -1,
+   141,   119,   120,   121,   122,   123,   124,   125,   126,   127,
+   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,   137,
+    -1,    -1,    -1,   141,   119,   120,   121,   122,   123,   124,
+   125,   126,   127,   128,   129,   130,   131,   132,    -1,    -1,
+    -1,    -1,   137,    -1,    -1,    -1,   141,   119,   120,   121,
    122,   123,   124,   125,   126,   127,   128,   129,   130,   131,
-   132,   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,    -1,
-   142,   120,   121,   122,   123,   124,   125,   126,   127,   128,
-   129,   130,   131,   132,   133,    -1,    -1,    -1,    -1,   138,
-    -1,    -1,    -1,   142,   120,   121,   122,   123,   124,   125,
-   126,   127,   128,   129,   130,   131,   132,   133,    -1,    -1,
-    -1,    -1,   138,    -1,    -1,    -1,   142,   120,   121,   122,
+   132,    -1,    -1,    -1,    -1,   137,    -1,    -1,    -1,   141,
+   119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
+   129,   130,   131,   132,    -1,    -1,    -1,    -1,   137,    -1,
+    -1,    -1,   141,   119,   120,   121,   122,   123,   124,   125,
+   126,   127,   128,   129,   130,   131,   132,    -1,    -1,    -1,
+    -1,   137,    -1,    -1,    -1,   141,   119,   120,   121,   122,
    123,   124,   125,   126,   127,   128,   129,   130,   131,   132,
-   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,    -1,   142,
+    -1,    -1,    -1,    -1,   137,    -1,    -1,    -1,   141,   119,
    120,   121,   122,   123,   124,   125,   126,   127,   128,   129,
-   130,   131,   132,   133,    -1,    -1,    -1,    -1,   138,    -1,
-    -1,    -1,   142,   120,   121,   122,   123,   124,   125,   126,
-   127,   128,   129,   130,   131,   132,   133,    -1,    -1,    -1,
-    -1,   138,    -1,    -1,    -1,   142,   120,   121,   122,   123,
-   124,   125,   126,   127,   128,   129,   130,   131,   132,   133,
-    -1,    -1,    -1,    -1,   138,    -1,    -1,    -1,   142,   120,
+   130,   131,   132,    -1,    -1,    -1,    -1,   137,    -1,    -1,
+    -1,   141,   119,   120,   121,   122,   123,   124,   125,   126,
+   127,   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,
+   137,    -1,    -1,    -1,   141,   119,   120,   121,   122,   123,
+   124,   125,   126,   127,   128,   129,   130,   131,   132,    -1,
+    -1,    -1,    -1,   137,    -1,    -1,    -1,   141,   119,   120,
    121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
-   131,   132,   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,
-    -1,   142,   120,   121,   122,   123,   124,   125,   126,   127,
-   128,   129,   130,   131,   132,   133,    -1,    -1,    -1,    -1,
-   138,    -1,    -1,    -1,   142,   120,   121,   122,   123,   124,
-   125,   126,   127,   128,   129,   130,   131,   132,   133,    -1,
-    -1,    -1,    -1,   138,    -1,    -1,    -1,   142,   120,   121,
+   131,   132,    -1,    -1,    -1,    -1,   137,    -1,    -1,    -1,
+   141,   119,   120,   121,   122,   123,   124,   125,   126,   127,
+   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,   137,
+    -1,    -1,    -1,   141,   119,   120,   121,   122,   123,   124,
+   125,   126,   127,   128,   129,   130,   131,   132,    -1,    -1,
+    -1,    -1,   137,    -1,    -1,    -1,   141,   119,   120,   121,
    122,   123,   124,   125,   126,   127,   128,   129,   130,   131,
-   132,   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,    -1,
-   142,   120,   121,   122,   123,   124,   125,   126,   127,   128,
-   129,   130,   131,   132,   133,    -1,    -1,    -1,    -1,   138,
-    -1,    -1,    -1,   142,   120,   121,   122,   123,   124,   125,
-   126,   127,   128,   129,   130,   131,   132,   133,    -1,    -1,
-    -1,    -1,   138,    -1,    -1,    -1,   142,   120,   121,   122,
+   132,    -1,    -1,    -1,    -1,   137,    -1,    -1,    -1,   141,
+   119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
+   129,   130,   131,   132,    -1,    -1,    -1,    -1,   137,    -1,
+    -1,    -1,   141,   119,   120,   121,   122,   123,   124,   125,
+   126,   127,   128,   129,   130,   131,   132,    -1,    -1,    -1,
+    -1,   137,    -1,    -1,    -1,   141,   119,   120,   121,   122,
    123,   124,   125,   126,   127,   128,   129,   130,   131,   132,
-   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,    -1,   142,
+    -1,    -1,    -1,    -1,   137,    -1,    -1,    -1,   141,   119,
    120,   121,   122,   123,   124,   125,   126,   127,   128,   129,
-   130,   131,   132,   133,    -1,    -1,    -1,    -1,   138,    -1,
-    -1,    -1,   142,   120,   121,   122,   123,   124,   125,   126,
-   127,   128,   129,   130,   131,   132,   133,    -1,    -1,    -1,
-    -1,   138,    -1,    -1,    -1,   142,   120,   121,   122,   123,
-   124,   125,   126,   127,   128,   129,   130,   131,   132,   133,
-    -1,    -1,    -1,    -1,   138,    -1,    -1,    -1,   142,   120,
+   130,   131,   132,    -1,    -1,    -1,    -1,   137,    -1,    -1,
+    -1,   141,   119,   120,   121,   122,   123,   124,   125,   126,
+   127,   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,
+   137,    -1,    -1,    -1,   141,   119,   120,   121,   122,   123,
+   124,   125,   126,   127,   128,   129,   130,   131,   132,    -1,
+    -1,    -1,    -1,   137,    -1,    -1,    -1,   141,   119,   120,
    121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
-   131,   132,   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,
-    -1,   142,   120,   121,   122,   123,   124,   125,   126,   127,
-   128,   129,   130,   131,   132,   133,    -1,    -1,    -1,    -1,
-   138,    -1,    -1,    -1,   142,   120,   121,   122,   123,   124,
-   125,   126,   127,   128,   129,   130,   131,   132,   133,    -1,
-    -1,    -1,    -1,   138,    -1,    -1,    -1,   142,   120,   121,
+   131,   132,    -1,    -1,    -1,    -1,   137,    -1,    -1,    -1,
+   141,   119,   120,   121,   122,   123,   124,   125,   126,   127,
+   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,   137,
+    -1,    -1,    -1,   141,   119,   120,   121,   122,   123,   124,
+   125,   126,   127,   128,   129,   130,   131,   132,    -1,    -1,
+    -1,    -1,   137,    -1,    -1,    -1,   141,   119,   120,   121,
    122,   123,   124,   125,   126,   127,   128,   129,   130,   131,
-   132,   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,    -1,
-   142,   120,   121,   122,   123,   124,   125,   126,   127,   128,
-   129,   130,   131,   132,   133,    -1,    -1,    -1,    -1,   138,
-    -1,    -1,    -1,   142,   120,   121,   122,   123,   124,   125,
-   126,   127,   128,   129,   130,   131,   132,   133,    -1,    -1,
-    -1,    -1,   138,    -1,    -1,    -1,   142,   120,   121,   122,
-   123,   124,   125,   126,   127,   128,   129,   130,   131,   132,
-   133,    -1,    -1,    -1,    -1,   138,    -1,    -1,    -1,   142,
-   120,   121,   122,   123,   124,   125,   126,   127,   128,   129,
-   130,   131,   132,   133,    -1,    -1,    -1,    -1,   138,    -1,
-   140,   120,   121,   122,   123,   124,   125,   126,   127,   128,
-   129,   130,   131,   132,   133,    -1,    -1,    -1,    -1,   138,
-    -1,   140,   120,   121,   122,   123,   124,   125,   126,   127,
-   128,   129,   130,   131,   132,   133,    -1,    -1,    -1,    -1,
-   138,    -1,   140,   120,   121,   122,   123,   124,   125,   126,
-   127,   128,   129,   130,   131,   132,   133,    -1,    -1,    -1,
-    -1,   138,    -1,   140,   120,   121,   122,   123,   124,   125,
-   126,   127,   128,   129,   130,   131,   132,   133,    -1,    -1,
-    -1,    -1,   138,    -1,   140,   120,   121,   122,   123,   124,
-   125,   126,   127,   128,   129,   130,   131,   132,   133,    -1,
-    -1,    -1,    -1,   138,    -1,   140,   120,   121,   122,   123,
-   124,   125,   126,   127,   128,   129,   130,   131,   132,   133,
-    -1,    -1,    -1,    -1,   138,    -1,   140,   120,   121,   122,
+   132,    -1,    -1,    -1,    -1,   137,    -1,    -1,    -1,   141,
+   119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
+   129,   130,   131,   132,    -1,    -1,    -1,    -1,   137,    -1,
+    -1,    -1,   141,   119,   120,   121,   122,   123,   124,   125,
+   126,   127,   128,   129,   130,   131,   132,    -1,    -1,    -1,
+    -1,   137,    -1,   139,   119,   120,   121,   122,   123,   124,
+   125,   126,   127,   128,   129,   130,   131,   132,    -1,    -1,
+    -1,    -1,   137,    -1,   139,   119,   120,   121,   122,   123,
+   124,   125,   126,   127,   128,   129,   130,   131,   132,    -1,
+    -1,    -1,    -1,   137,    -1,   139,   119,   120,   121,   122,
    123,   124,   125,   126,   127,   128,   129,   130,   131,   132,
-   133,    -1,    -1,    -1,    -1,   138,    -1,   140,   120,   121,
+    -1,    -1,    -1,    -1,   137,    -1,   139,   119,   120,   121,
    122,   123,   124,   125,   126,   127,   128,   129,   130,   131,
-   132,   133,    -1,    -1,    -1,    -1,   138,    -1,   140,   120,
+   132,    -1,    -1,    -1,    -1,   137,    -1,   139,   119,   120,
    121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
-   131,   132,   133,    -1,    -1,    -1,    -1,   138,    -1,   140,
+   131,   132,    -1,    -1,    -1,    -1,   137,    -1,   139,   119,
    120,   121,   122,   123,   124,   125,   126,   127,   128,   129,
-   130,   131,   132,   133,    -1,    -1,    -1,    -1,   138,    -1,
-   140,   120,   121,   122,   123,   124,   125,   126,   127,   128,
-   129,   130,   131,   132,   133,    -1,    -1,    -1,    -1,   138,
-    -1,   140,   120,   121,   122,   123,   124,   125,   126,   127,
-   128,   129,   130,   131,   132,   133,    -1,    -1,    -1,    -1,
-   138,    -1,   140,   120,   121,   122,   123,   124,   125,   126,
-   127,   128,   129,   130,   131,   132,   133,    -1,    -1,    -1,
-    -1,   138,    -1,   140,   120,   121,   122,   123,   124,   125,
-   126,   127,   128,   129,   130,   131,   132,   133,    -1,    -1,
-    -1,    -1,   138,    -1,   140,   120,   121,   122,   123,   124,
-   125,   126,   127,   128,   129,   130,   131,   132,   133,    -1,
-    -1,    -1,    -1,   138,    -1,   140,   120,   121,   122,   123,
-   124,   125,   126,   127,   128,   129,   130,   131,   132,   133,
-    -1,    -1,    -1,    -1,   138,    -1,   140,   120,   121,   122,
+   130,   131,   132,    -1,    -1,    -1,    -1,   137,    -1,   139,
+   119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
+   129,   130,   131,   132,    -1,    -1,    -1,    -1,   137,    -1,
+   139,   119,   120,   121,   122,   123,   124,   125,   126,   127,
+   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,   137,
+    -1,   139,   119,   120,   121,   122,   123,   124,   125,   126,
+   127,   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,
+   137,    -1,   139,   119,   120,   121,   122,   123,   124,   125,
+   126,   127,   128,   129,   130,   131,   132,    -1,    -1,    -1,
+    -1,   137,    -1,   139,   119,   120,   121,   122,   123,   124,
+   125,   126,   127,   128,   129,   130,   131,   132,    -1,    -1,
+    -1,    -1,   137,    -1,   139,   119,   120,   121,   122,   123,
+   124,   125,   126,   127,   128,   129,   130,   131,   132,    -1,
+    -1,    -1,    -1,   137,    -1,   139,   119,   120,   121,   122,
    123,   124,   125,   126,   127,   128,   129,   130,   131,   132,
-   133,    -1,    -1,    -1,    -1,   138,    -1,   140,   120,   121,
+    -1,    -1,    -1,    -1,   137,    -1,   139,   119,   120,   121,
    122,   123,   124,   125,   126,   127,   128,   129,   130,   131,
-   132,   133,    -1,    -1,    -1,    -1,   138,    -1,   140,   120,
+   132,    -1,    -1,    -1,    -1,   137,    -1,   139,   119,   120,
    121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
-   131,   132,   133,    -1,    -1,    -1,    -1,   138,    -1,   140,
+   131,   132,    -1,    -1,    -1,    -1,   137,    -1,   139,   119,
    120,   121,   122,   123,   124,   125,   126,   127,   128,   129,
-   130,   131,   132,   133,    -1,    -1,    -1,    -1,   138,    -1,
-   140,   120,   121,   122,   123,   124,   125,   126,   127,   128,
-   129,   130,   131,   132,   133,    -1,    -1,    -1,    -1,   138,
-    -1,   140,   120,   121,   122,   123,   124,   125,   126,   127,
-   128,   129,   130,   131,   132,   133,    -1,    -1,    -1,    -1,
-   138,    -1,   140,   120,   121,   122,   123,   124,   125,   126,
-   127,   128,   129,   130,   131,   132,   133,    -1,    -1,    -1,
-    -1,   138,    -1,   140,   120,   121,   122,   123,   124,   125,
-   126,   127,   128,   129,   130,   131,   132,   133,    -1,    -1,
-    -1,    -1,   138,    -1,   140,   120,   121,   122,   123,   124,
-   125,   126,   127,   128,   129,   130,   131,   132,   133,    -1,
-    -1,    -1,    -1,   138,    -1,   140,   120,   121,   122,   123,
-   124,   125,   126,   127,   128,   129,   130,   131,   132,   133,
-    -1,    -1,    -1,    -1,   138,    -1,   140,   120,   121,   122,
+   130,   131,   132,    -1,    -1,    -1,    -1,   137,    -1,   139,
+   119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
+   129,   130,   131,   132,    -1,    -1,    -1,    -1,   137,    -1,
+   139,   119,   120,   121,   122,   123,   124,   125,   126,   127,
+   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,   137,
+    -1,   139,   119,   120,   121,   122,   123,   124,   125,   126,
+   127,   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,
+   137,    -1,   139,   119,   120,   121,   122,   123,   124,   125,
+   126,   127,   128,   129,   130,   131,   132,    -1,    -1,    -1,
+    -1,   137,    -1,   139,   119,   120,   121,   122,   123,   124,
+   125,   126,   127,   128,   129,   130,   131,   132,    -1,    -1,
+    -1,    -1,   137,    -1,   139,   119,   120,   121,   122,   123,
+   124,   125,   126,   127,   128,   129,   130,   131,   132,    -1,
+    -1,    -1,    -1,   137,    -1,   139,   119,   120,   121,   122,
    123,   124,   125,   126,   127,   128,   129,   130,   131,   132,
-   133,    -1,    -1,    -1,    -1,   138,    -1,   140,   120,   121,
+    -1,    -1,    -1,    -1,   137,    -1,   139,   119,   120,   121,
    122,   123,   124,   125,   126,   127,   128,   129,   130,   131,
-   132,   133,    -1,    -1,    -1,    -1,   138,    -1,   140,   120,
+   132,    -1,    -1,    -1,    -1,   137,    -1,   139,   119,   120,
    121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
-   131,   132,   133,    -1,    -1,    -1,    -1,   138,    -1,   140,
+   131,   132,    -1,    -1,    -1,    -1,   137,    -1,   139,   119,
    120,   121,   122,   123,   124,   125,   126,   127,   128,   129,
-   130,   131,   132,   133,    -1,    -1,    -1,    -1,   138,    -1,
-   140,   120,   121,   122,   123,   124,   125,   126,   127,   128,
-   129,   130,   131,   132,   133,    -1,    -1,    -1,    -1,   138,
-    -1,   140,   120,   121,   122,   123,   124,   125,   126,   127,
-   128,   129,   130,   131,   132,   133,    -1,    -1,    -1,    -1,
-   138,    -1,   140,   120,   121,   122,   123,   124,   125,   126,
-   127,   128,   129,   130,   131,   132,   133,    -1,    -1,    -1,
-    -1,   138,    -1,   140,   120,   121,   122,   123,   124,   125,
-   126,   127,   128,   129,   130,   131,   132,   133,    -1,    -1,
-    -1,    -1,   138,    -1,   140,   120,   121,   122,   123,   124,
-   125,   126,   127,   128,   129,   130,   131,   132,   133,    -1,
-    -1,    -1,    -1,   138,    -1,   140,   120,   121,   122,   123,
-   124,   125,   126,   127,   128,   129,   130,   131,   132,   133,
-    -1,    -1,    -1,    -1,   138,    -1,   140,   120,   121,   122,
+   130,   131,   132,    -1,    -1,    -1,    -1,   137,    -1,   139,
+   119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
+   129,   130,   131,   132,    -1,    -1,    -1,    -1,   137,    -1,
+   139,   119,   120,   121,   122,   123,   124,   125,   126,   127,
+   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,   137,
+    -1,   139,   119,   120,   121,   122,   123,   124,   125,   126,
+   127,   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,
+   137,    -1,   139,   119,   120,   121,   122,   123,   124,   125,
+   126,   127,   128,   129,   130,   131,   132,    -1,    -1,    -1,
+    -1,   137,    -1,   139,   119,   120,   121,   122,   123,   124,
+   125,   126,   127,   128,   129,   130,   131,   132,    -1,    -1,
+    -1,    -1,   137,    -1,   139,   119,   120,   121,   122,   123,
+   124,   125,   126,   127,   128,   129,   130,   131,   132,    -1,
+    -1,    -1,    -1,   137,    -1,   139,   119,   120,   121,   122,
    123,   124,   125,   126,   127,   128,   129,   130,   131,   132,
-   133,    -1,    -1,    -1,    -1,   138,    -1,   140,   120,   121,
+    -1,    -1,    -1,    -1,   137,    -1,   139,   119,   120,   121,
    122,   123,   124,   125,   126,   127,   128,   129,   130,   131,
-   132,   133,    -1,    -1,    -1,    -1,   138,    -1,   140,   120,
+   132,    -1,    -1,    -1,    -1,   137,    -1,   139,   119,   120,
    121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
-   131,   132,   133,    -1,    -1,    -1,    -1,   138,    -1,   140,
+   131,   132,    -1,    -1,    -1,    -1,   137,    -1,   139,   119,
    120,   121,   122,   123,   124,   125,   126,   127,   128,   129,
-   130,   131,   132,   133,    -1,    -1,    -1,    -1,   138,    -1,
-   140,   120,   121,   122,   123,   124,   125,   126,   127,   128,
-   129,   130,   131,   132,   133,    -1,    -1,    -1,    -1,   138,
-    -1,   140,   120,   121,   122,   123,   124,   125,   126,   127,
-   128,   129,   130,   131,   132,   133,    -1,    -1,    -1,    -1,
-   138,    -1,   140,   120,   121,   122,   123,   124,   125,   126,
-   127,   128,   129,   130,   131,   132,   133,    -1,    -1,    -1,
-    -1,   138,    -1,   140,   120,   121,   122,   123,   124,   125,
-   126,   127,   128,   129,   130,   131,   132,   133,    -1,    -1,
-    -1,    -1,   138,    -1,   140,   120,   121,   122,   123,   124,
-   125,   126,   127,   128,   129,   130,   131,   132,   133,    -1,
-    -1,    -1,    -1,   138,    -1,   140,   120,   121,   122,   123,
-   124,   125,   126,   127,   128,   129,   130,   131,   132,   133,
-    -1,    -1,    -1,    -1,   138,    -1,   140,   120,   121,   122,
+   130,   131,   132,    -1,    -1,    -1,    -1,   137,    -1,   139,
+   119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
+   129,   130,   131,   132,    -1,    -1,    -1,    -1,   137,    -1,
+   139,   119,   120,   121,   122,   123,   124,   125,   126,   127,
+   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,   137,
+    -1,   139,   119,   120,   121,   122,   123,   124,   125,   126,
+   127,   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,
+   137,    -1,   139,   119,   120,   121,   122,   123,   124,   125,
+   126,   127,   128,   129,   130,   131,   132,    -1,    -1,    -1,
+    -1,   137,    -1,   139,   119,   120,   121,   122,   123,   124,
+   125,   126,   127,   128,   129,   130,   131,   132,    -1,    -1,
+    -1,    -1,   137,    -1,   139,   119,   120,   121,   122,   123,
+   124,   125,   126,   127,   128,   129,   130,   131,   132,    -1,
+    -1,    -1,    -1,   137,    -1,   139,   119,   120,   121,   122,
    123,   124,   125,   126,   127,   128,   129,   130,   131,   132,
-   133,    -1,    -1,    -1,    -1,   138,    -1,   140,   120,   121,
+    -1,    -1,    -1,    -1,   137,    -1,   139,   119,   120,   121,
    122,   123,   124,   125,   126,   127,   128,   129,   130,   131,
-   132,   133,    -1,    -1,    -1,    -1,   138,    -1,   140,   120,
+   132,    -1,    -1,    -1,    -1,   137,    -1,   139,   119,   120,
    121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
-   131,   132,   133,    -1,    -1,    -1,    -1,   138,    -1,   140,
+   131,   132,    -1,    -1,    -1,    -1,   137,    -1,   139,   119,
    120,   121,   122,   123,   124,   125,   126,   127,   128,   129,
-   130,   131,   132,   133,    -1,    -1,    -1,    -1,   138,    -1,
-   140,   120,   121,   122,   123,   124,   125,   126,   127,   128,
-   129,   130,   131,   132,   133,    -1,    -1,    -1,    -1,   138,
-    -1,   140,   120,   121,   122,   123,   124,   125,   126,   127,
-   128,   129,   130,   131,   132,   133,    -1,    -1,    -1,    -1,
-   138,    -1,   140,   120,   121,   122,   123,   124,   125,   126,
-   127,   128,   129,   130,   131,   132,   133,    -1,    -1,    -1,
-    -1,   138,    -1,   140
+   130,   131,   132,    -1,    -1,    -1,    -1,   137,    -1,   139,
+   119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
+   129,   130,   131,   132,    -1,    -1,    -1,    -1,   137,    -1,
+   139,   119,   120,   121,   122,   123,   124,   125,   126,   127,
+   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,   137,
+    -1,   139,   119,   120,   121,   122,   123,   124,   125,   126,
+   127,   128,   129,   130,   131,   132,    -1,    -1,    -1,    -1,
+   137,    -1,   139,   119,   120,   121,   122,   123,   124,   125,
+   126,   127,   128,   129,   130,   131,   132,    -1,    -1,    -1,
+    -1,   137,    -1,   139,   119,   120,   121,   122,   123,   124,
+   125,   126,   127,   128,   129,   130,   131,   132,    -1,    -1,
+    -1,    -1,   137,    -1,   139,   119,   120,   121,   122,   123,
+   124,   125,   126,   127,   128,   129,   130,   131,   132,    -1,
+    -1,    -1,    -1,   137,    -1,   139,   119,   120,   121,   122,
+   123,   124,   125,   126,   127,   128,   129,   130,   131,   132,
+    -1,    -1,    -1,    -1,   137
 };
 /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
 #line 3 "/usr/share/bison.simple"
@@ -2871,86 +2831,86 @@ yyreduce:
   switch (yyn) {
 
 case 2:
-#line 146 "Gmsh.y"
+#line 144 "Gmsh.y"
 { yyerrok; return 1; ;
     break;}
 case 5:
-#line 157 "Gmsh.y"
+#line 155 "Gmsh.y"
 { return 1; ;
     break;}
 case 6:
-#line 158 "Gmsh.y"
+#line 156 "Gmsh.y"
 { return 1; ;
     break;}
 case 7:
-#line 159 "Gmsh.y"
+#line 157 "Gmsh.y"
 { return 1; ;
     break;}
 case 8:
-#line 160 "Gmsh.y"
+#line 158 "Gmsh.y"
 { return 1; ;
     break;}
 case 9:
-#line 161 "Gmsh.y"
+#line 159 "Gmsh.y"
 { List_Delete(yyvsp[0].l); return 1; ;
     break;}
 case 10:
-#line 162 "Gmsh.y"
+#line 160 "Gmsh.y"
 { return 1; ;
     break;}
 case 11:
-#line 163 "Gmsh.y"
+#line 161 "Gmsh.y"
 { return 1; ;
     break;}
 case 12:
-#line 164 "Gmsh.y"
+#line 162 "Gmsh.y"
 { return 1; ;
     break;}
 case 13:
-#line 165 "Gmsh.y"
+#line 163 "Gmsh.y"
 { List_Delete(yyvsp[0].l); return 1; ;
     break;}
 case 14:
-#line 166 "Gmsh.y"
+#line 164 "Gmsh.y"
 { return 1; ;
     break;}
 case 15:
-#line 167 "Gmsh.y"
+#line 165 "Gmsh.y"
 { return 1; ;
     break;}
 case 16:
-#line 168 "Gmsh.y"
+#line 166 "Gmsh.y"
 { return 1; ;
     break;}
 case 17:
-#line 169 "Gmsh.y"
+#line 167 "Gmsh.y"
 { return 1; ;
     break;}
 case 18:
-#line 170 "Gmsh.y"
+#line 168 "Gmsh.y"
 { return 1; ;
     break;}
 case 19:
-#line 175 "Gmsh.y"
+#line 173 "Gmsh.y"
 {
       yyval.c = "w";
     ;
     break;}
 case 20:
-#line 179 "Gmsh.y"
+#line 177 "Gmsh.y"
 {
       yyval.c = "a";
     ;
     break;}
 case 21:
-#line 186 "Gmsh.y"
+#line 184 "Gmsh.y"
 {
       Msg(DIRECT, yyvsp[-2].c);
       Free(yyvsp[-2].c);
     ;
     break;}
 case 22:
-#line 191 "Gmsh.y"
+#line 189 "Gmsh.y"
 {
       char tmpstring[1024];
       FixRelativePath(yyvsp[-1].c, tmpstring);
@@ -2967,7 +2927,7 @@ case 22:
     ;
     break;}
 case 23:
-#line 206 "Gmsh.y"
+#line 204 "Gmsh.y"
 {
       char tmpstring[1024];
       int i = PrintListOfDouble(yyvsp[-4].c, yyvsp[-2].l, tmpstring);
@@ -2982,7 +2942,7 @@ case 23:
     ;
     break;}
 case 24:
-#line 219 "Gmsh.y"
+#line 217 "Gmsh.y"
 {
       char tmpstring[1024];
       int i = PrintListOfDouble(yyvsp[-6].c, yyvsp[-4].l, tmpstring);
@@ -3008,397 +2968,339 @@ case 24:
     ;
     break;}
 case 25:
-#line 248 "Gmsh.y"
+#line 246 "Gmsh.y"
 { 
-      if(!strcmp(yyvsp[-5].c, "View") && !CheckViewErrorFlags(View)){
-	EndView(View, 0, yyname, yyvsp[-4].c);
+      if(!strcmp(yyvsp[-5].c, "View") && ViewData->finalize()){
+	ViewData->setName(yyvsp[-4].c);
+	ViewData->setFileName(yyname);
+	ViewData->setFileIndex(yyviewindex++);
+	new PView(ViewData);
       }
+      else
+	delete ViewData;
       Free(yyvsp[-5].c); Free(yyvsp[-4].c);
     ;
     break;}
 case 26:
-#line 255 "Gmsh.y"
+#line 258 "Gmsh.y"
 {
-      if(!strcmp(yyvsp[-7].c, "View") && !CheckViewErrorFlags(View)){
-	EndView(View, 0, yyname, yyvsp[-6].c);
+      if(!strcmp(yyvsp[-4].c, "View")){
+	int index = (int)yyvsp[-2].d;
+	if(index >= 0 && index < PView::list.size())
+	  new PView(PView::list[index], false);
       }
-      Free(yyvsp[-7].c); Free(yyvsp[-6].c); Free(yyvsp[-5].c);
-    ;
-    break;}
-case 27:
-#line 262 "Gmsh.y"
-{
-      if(!strcmp(yyvsp[-4].c, "View")) AliasView((int)yyvsp[-2].d, 0);
       Free(yyvsp[-4].c);
     ;
     break;}
-case 28:
+case 27:
 #line 267 "Gmsh.y"
 {
-      if(!strcmp(yyvsp[-4].c, "View")) AliasView((int)yyvsp[-2].d, 1);
+      if(!strcmp(yyvsp[-4].c, "View")){
+	int index = (int)yyvsp[-2].d;
+	if(index >= 0 && index < PView::list.size())
+	  new PView(PView::list[index], true);
+      }
       Free(yyvsp[-4].c);
     ;
     break;}
-case 29:
-#line 275 "Gmsh.y"
+case 28:
+#line 279 "Gmsh.y"
 {
-      View = BeginView(1); 
-      for(int i = 0; i < VIEW_NB_ELEMENT_TYPES; i++){
-	ViewErrorFlags[i] = 0;
-      }
+      ViewData = new PViewDataList(true); 
     ;
     break;}
-case 36:
+case 34:
 #line 291 "Gmsh.y"
-{ ViewCoord[ViewCoordIdx] = yyvsp[0].d; ViewCoordIdx++; ;
+{ ViewCoord[ViewCoordIdx++] = yyvsp[0].d; ;
     break;}
-case 37:
+case 35:
 #line 293 "Gmsh.y"
-{ ViewCoord[ViewCoordIdx] = yyvsp[0].d; ViewCoordIdx++; ;
+{ ViewCoord[ViewCoordIdx++] = yyvsp[0].d; ;
     break;}
-case 38:
+case 36:
 #line 298 "Gmsh.y"
 { if(ViewValueList) List_Add(ViewValueList, &yyvsp[0].d); ;
     break;}
-case 39:
+case 37:
 #line 300 "Gmsh.y"
 { if(ViewValueList) List_Add(ViewValueList, &yyvsp[0].d); ;
     break;}
-case 40:
+case 38:
 #line 305 "Gmsh.y"
 {
       if(!strcmp(yyvsp[0].c, "SP")){
-	ViewElementIdx = 0; ViewNumNodes = 1; ViewNumComp = 1;
-	ViewValueList = View->SP; ViewNumList = &View->NbSP;
+	ViewValueList = ViewData->SP; ViewNumList = &ViewData->NbSP;
       }
       else if(!strcmp(yyvsp[0].c, "VP")){
-	ViewElementIdx = 1; ViewNumNodes = 1; ViewNumComp = 3;
-	ViewValueList = View->VP; ViewNumList = &View->NbVP;
+	ViewValueList = ViewData->VP; ViewNumList = &ViewData->NbVP;
       }
       else if(!strcmp(yyvsp[0].c, "TP")){
-	ViewElementIdx = 2; ViewNumNodes = 1; ViewNumComp = 9;
-	ViewValueList = View->TP; ViewNumList = &View->NbTP;
+	ViewValueList = ViewData->TP; ViewNumList = &ViewData->NbTP;
       }
       else if(!strcmp(yyvsp[0].c, "SL")){
-	ViewElementIdx = 3; ViewNumNodes = 2; ViewNumComp = 1;
-	ViewValueList = View->SL; ViewNumList = &View->NbSL;
+	ViewValueList = ViewData->SL; ViewNumList = &ViewData->NbSL;
       }
       else if(!strcmp(yyvsp[0].c, "VL")){
-	ViewElementIdx = 4; ViewNumNodes = 2; ViewNumComp = 3;
-	ViewValueList = View->VL; ViewNumList = &View->NbVL;
+	ViewValueList = ViewData->VL; ViewNumList = &ViewData->NbVL;
       }
       else if(!strcmp(yyvsp[0].c, "TL")){
-	ViewElementIdx = 5; ViewNumNodes = 2; ViewNumComp = 9;
-	ViewValueList = View->TL; ViewNumList = &View->NbTL;
+	ViewValueList = ViewData->TL; ViewNumList = &ViewData->NbTL;
       }
       else if(!strcmp(yyvsp[0].c, "ST")){
-	ViewElementIdx = 6; ViewNumNodes = 3; ViewNumComp = 1;
-	ViewValueList = View->ST; ViewNumList = &View->NbST;
+	ViewValueList = ViewData->ST; ViewNumList = &ViewData->NbST;
       }
       else if(!strcmp(yyvsp[0].c, "VT")){
-	ViewElementIdx = 7; ViewNumNodes = 3; ViewNumComp = 3;
-	ViewValueList = View->VT; ViewNumList = &View->NbVT;
+	ViewValueList = ViewData->VT; ViewNumList = &ViewData->NbVT;
       }
       else if(!strcmp(yyvsp[0].c, "TT")){
-	ViewElementIdx = 8; ViewNumNodes = 3; ViewNumComp = 9;
-	ViewValueList = View->TT; ViewNumList = &View->NbTT;
+	ViewValueList = ViewData->TT; ViewNumList = &ViewData->NbTT;
       }
       else if(!strcmp(yyvsp[0].c, "SQ")){
-	ViewElementIdx = 9; ViewNumNodes = 4; ViewNumComp = 1;
-	ViewValueList = View->SQ; ViewNumList = &View->NbSQ;
+	ViewValueList = ViewData->SQ; ViewNumList = &ViewData->NbSQ;
       }
       else if(!strcmp(yyvsp[0].c, "VQ")){
-	ViewElementIdx = 10; ViewNumNodes = 4; ViewNumComp = 3;
-	ViewValueList = View->VQ; ViewNumList = &View->NbVQ;
+	ViewValueList = ViewData->VQ; ViewNumList = &ViewData->NbVQ;
       }
       else if(!strcmp(yyvsp[0].c, "TQ")){
-	ViewElementIdx = 11; ViewNumNodes = 4; ViewNumComp = 9;
-	ViewValueList = View->TQ; ViewNumList = &View->NbTQ;
+	ViewValueList = ViewData->TQ; ViewNumList = &ViewData->NbTQ;
       }
       else if(!strcmp(yyvsp[0].c, "SS")){
-	ViewElementIdx = 12; ViewNumNodes = 4; ViewNumComp = 1;
-	ViewValueList = View->SS; ViewNumList = &View->NbSS;
+	ViewValueList = ViewData->SS; ViewNumList = &ViewData->NbSS;
       }
       else if(!strcmp(yyvsp[0].c, "VS")){
-	ViewElementIdx = 13; ViewNumNodes = 4; ViewNumComp = 3;
-	ViewValueList = View->VS; ViewNumList = &View->NbVS;
+	ViewValueList = ViewData->VS; ViewNumList = &ViewData->NbVS;
       }
       else if(!strcmp(yyvsp[0].c, "TS")){
-	ViewElementIdx = 14; ViewNumNodes = 4; ViewNumComp = 9;
-	ViewValueList = View->TS; ViewNumList = &View->NbTS;
+	ViewValueList = ViewData->TS; ViewNumList = &ViewData->NbTS;
       }
       else if(!strcmp(yyvsp[0].c, "SH")){
-	ViewElementIdx = 15; ViewNumNodes = 8; ViewNumComp = 1;
-	ViewValueList = View->SH; ViewNumList = &View->NbSH;
+	ViewValueList = ViewData->SH; ViewNumList = &ViewData->NbSH;
       }
       else if(!strcmp(yyvsp[0].c, "VH")){
-	ViewElementIdx = 16; ViewNumNodes = 8; ViewNumComp = 3;
-	ViewValueList = View->VH; ViewNumList = &View->NbVH;
+	ViewValueList = ViewData->VH; ViewNumList = &ViewData->NbVH;
       }
       else if(!strcmp(yyvsp[0].c, "TH")){
-	ViewElementIdx = 17; ViewNumNodes = 8; ViewNumComp = 9;
-	ViewValueList = View->TH; ViewNumList = &View->NbTH;
+	ViewValueList = ViewData->TH; ViewNumList = &ViewData->NbTH;
       }
       else if(!strcmp(yyvsp[0].c, "SI")){
-	ViewElementIdx = 18; ViewNumNodes = 6; ViewNumComp = 1;
-	ViewValueList = View->SI; ViewNumList = &View->NbSI;
+	ViewValueList = ViewData->SI; ViewNumList = &ViewData->NbSI;
       }
       else if(!strcmp(yyvsp[0].c, "VI")){
-	ViewElementIdx = 19; ViewNumNodes = 6; ViewNumComp = 3;
-	ViewValueList = View->VI; ViewNumList = &View->NbVI;
+	ViewValueList = ViewData->VI; ViewNumList = &ViewData->NbVI;
       }
       else if(!strcmp(yyvsp[0].c, "TI")){
-	ViewElementIdx = 20; ViewNumNodes = 6; ViewNumComp = 9;
-	ViewValueList = View->TI; ViewNumList = &View->NbTI;
+	ViewValueList = ViewData->TI; ViewNumList = &ViewData->NbTI;
       }
       else if(!strcmp(yyvsp[0].c, "SY")){
-	ViewElementIdx = 21; ViewNumNodes = 5; ViewNumComp = 1;
-	ViewValueList = View->SY; ViewNumList = &View->NbSY;
+	ViewValueList = ViewData->SY; ViewNumList = &ViewData->NbSY;
       }
       else if(!strcmp(yyvsp[0].c, "VY")){
-	ViewElementIdx = 22; ViewNumNodes = 5; ViewNumComp = 3;
-	ViewValueList = View->VY; ViewNumList = &View->NbVY;
+	ViewValueList = ViewData->VY; ViewNumList = &ViewData->NbVY;
       }
       else if(!strcmp(yyvsp[0].c, "TY")){
-	ViewElementIdx = 23; ViewNumNodes = 5; ViewNumComp = 9;
-	ViewValueList = View->TY; ViewNumList = &View->NbTY;
+	ViewValueList = ViewData->TY; ViewNumList = &ViewData->NbTY;
       }
       else if(!strcmp(yyvsp[0].c, "SL2")){
-	ViewElementIdx = 3; ViewNumNodes = 3; ViewNumComp = 1;
-	ViewValueList = View->SL2; ViewNumList = &View->NbSL2;
+	ViewValueList = ViewData->SL2; ViewNumList = &ViewData->NbSL2;
       }
       else if(!strcmp(yyvsp[0].c, "VL2")){
-	ViewElementIdx = 4; ViewNumNodes = 3; ViewNumComp = 3;
-	ViewValueList = View->VL2; ViewNumList = &View->NbVL2;
+	ViewValueList = ViewData->VL2; ViewNumList = &ViewData->NbVL2;
       }
       else if(!strcmp(yyvsp[0].c, "TL2")){
-	ViewElementIdx = 5; ViewNumNodes = 3; ViewNumComp = 9;
-	ViewValueList = View->TL2; ViewNumList = &View->NbTL2;
+	ViewValueList = ViewData->TL2; ViewNumList = &ViewData->NbTL2;
       }
       else if(!strcmp(yyvsp[0].c, "ST2")){
-	ViewElementIdx = 6; ViewNumNodes = 6; ViewNumComp = 1;
-	ViewValueList = View->ST2; ViewNumList = &View->NbST2;
+	ViewValueList = ViewData->ST2; ViewNumList = &ViewData->NbST2;
       }
       else if(!strcmp(yyvsp[0].c, "VT2")){
-	ViewElementIdx = 7; ViewNumNodes = 6; ViewNumComp = 3;
-	ViewValueList = View->VT2; ViewNumList = &View->NbVT2;
+	ViewValueList = ViewData->VT2; ViewNumList = &ViewData->NbVT2;
       }
       else if(!strcmp(yyvsp[0].c, "TT2")){
-	ViewElementIdx = 8; ViewNumNodes = 6; ViewNumComp = 9;
-	ViewValueList = View->TT2; ViewNumList = &View->NbTT2;
+	ViewValueList = ViewData->TT2; ViewNumList = &ViewData->NbTT2;
       }
       else if(!strcmp(yyvsp[0].c, "SQ2")){
-	ViewElementIdx = 9; ViewNumNodes = 9; ViewNumComp = 1;
-	ViewValueList = View->SQ2; ViewNumList = &View->NbSQ2;
+	ViewValueList = ViewData->SQ2; ViewNumList = &ViewData->NbSQ2;
       }
       else if(!strcmp(yyvsp[0].c, "VQ2")){
-	ViewElementIdx = 10; ViewNumNodes = 9; ViewNumComp = 3;
-	ViewValueList = View->VQ2; ViewNumList = &View->NbVQ2;
+	ViewValueList = ViewData->VQ2; ViewNumList = &ViewData->NbVQ2;
       }
       else if(!strcmp(yyvsp[0].c, "TQ2")){
-	ViewElementIdx = 11; ViewNumNodes = 9; ViewNumComp = 9;
-	ViewValueList = View->TQ2; ViewNumList = &View->NbTQ2;
+	ViewValueList = ViewData->TQ2; ViewNumList = &ViewData->NbTQ2;
       }
       else if(!strcmp(yyvsp[0].c, "SS2")){
-	ViewElementIdx = 12; ViewNumNodes = 10; ViewNumComp = 1;
-	ViewValueList = View->SS2; ViewNumList = &View->NbSS2;
+	ViewValueList = ViewData->SS2; ViewNumList = &ViewData->NbSS2;
       }
       else if(!strcmp(yyvsp[0].c, "VS2")){
-	ViewElementIdx = 13; ViewNumNodes = 10; ViewNumComp = 3;
-	ViewValueList = View->VS2; ViewNumList = &View->NbVS2;
+	ViewValueList = ViewData->VS2; ViewNumList = &ViewData->NbVS2;
       }
       else if(!strcmp(yyvsp[0].c, "TS2")){
-	ViewElementIdx = 14; ViewNumNodes = 10; ViewNumComp = 9;
-	ViewValueList = View->TS2; ViewNumList = &View->NbTS2;
+	ViewValueList = ViewData->TS2; ViewNumList = &ViewData->NbTS2;
       }
       else if(!strcmp(yyvsp[0].c, "SH2")){
-	ViewElementIdx = 15; ViewNumNodes = 27; ViewNumComp = 1;
-	ViewValueList = View->SH2; ViewNumList = &View->NbSH2;
+	ViewValueList = ViewData->SH2; ViewNumList = &ViewData->NbSH2;
       }
       else if(!strcmp(yyvsp[0].c, "VH2")){
-	ViewElementIdx = 16; ViewNumNodes = 27; ViewNumComp = 3;
-	ViewValueList = View->VH2; ViewNumList = &View->NbVH2;
+	ViewValueList = ViewData->VH2; ViewNumList = &ViewData->NbVH2;
       }
       else if(!strcmp(yyvsp[0].c, "TH2")){
-	ViewElementIdx = 17; ViewNumNodes = 27; ViewNumComp = 9;
-	ViewValueList = View->TH2; ViewNumList = &View->NbTH2;
+	ViewValueList = ViewData->TH2; ViewNumList = &ViewData->NbTH2;
       }
       else if(!strcmp(yyvsp[0].c, "SI2")){
-	ViewElementIdx = 18; ViewNumNodes = 18; ViewNumComp = 1;
-	ViewValueList = View->SI2; ViewNumList = &View->NbSI2;
+	ViewValueList = ViewData->SI2; ViewNumList = &ViewData->NbSI2;
       }
       else if(!strcmp(yyvsp[0].c, "VI2")){
-	ViewElementIdx = 19; ViewNumNodes = 18; ViewNumComp = 3;
-	ViewValueList = View->VI2; ViewNumList = &View->NbVI2;
+	ViewValueList = ViewData->VI2; ViewNumList = &ViewData->NbVI2;
       }
       else if(!strcmp(yyvsp[0].c, "TI2")){
-	ViewElementIdx = 20; ViewNumNodes = 18; ViewNumComp = 9;
-	ViewValueList = View->TI2; ViewNumList = &View->NbTI2;
+	ViewValueList = ViewData->TI2; ViewNumList = &ViewData->NbTI2;
       }
       else if(!strcmp(yyvsp[0].c, "SY2")){
-	ViewElementIdx = 21; ViewNumNodes = 14; ViewNumComp = 1;
-	ViewValueList = View->SY2; ViewNumList = &View->NbSY2;
+	ViewValueList = ViewData->SY2; ViewNumList = &ViewData->NbSY2;
       }
       else if(!strcmp(yyvsp[0].c, "VY2")){
-	ViewElementIdx = 22; ViewNumNodes = 14; ViewNumComp = 3;
-	ViewValueList = View->VY2; ViewNumList = &View->NbVY2;
+	ViewValueList = ViewData->VY2; ViewNumList = &ViewData->NbVY2;
       }
       else if(!strcmp(yyvsp[0].c, "TY2")){
-	ViewElementIdx = 23; ViewNumNodes = 14; ViewNumComp = 9;
-	ViewValueList = View->TY2; ViewNumList = &View->NbTY2;
+	ViewValueList = ViewData->TY2; ViewNumList = &ViewData->NbTY2;
       }
       else{
 	yymsg(GERROR, "Unknown element type '%s'", yyvsp[0].c);	
-	ViewElementIdx = -1; ViewNumNodes = 0; ViewNumComp = 0;
-	ViewValueList = NULL; ViewNumList = NULL;
+	ViewValueList = 0; ViewNumList = 0;
       }
       Free(yyvsp[0].c);
       ViewCoordIdx = 0;
     ;
     break;}
-case 41:
-#line 495 "Gmsh.y"
+case 39:
+#line 449 "Gmsh.y"
 {
       if(ViewValueList){
-	if(ViewCoordIdx != 3 * ViewNumNodes){
- 	  // yymsg(GERROR, "Wrong number of node coordinates (%d != %d)", 
-	  //       ViewCoordIdx, 3 * ViewNumNodes);
-	  ViewNumNodes = ViewCoordIdx/3;
-	}
 	for(int i = 0; i < 3; i++)
-	  for(int j = 0; j < ViewNumNodes; j++)
-	    List_Add(ViewValueList, &ViewCoord[3*j+i]);
-	ViewNumListTmp = List_Nbr(ViewValueList);
+	  for(int j = 0; j < ViewCoordIdx / 3; j++)
+	    List_Add(ViewValueList, &ViewCoord[3 * j + i]);
       }
     ;
     break;}
-case 42:
-#line 509 "Gmsh.y"
+case 40:
+#line 457 "Gmsh.y"
 {
-      if(ViewValueList){  
-	if((List_Nbr(ViewValueList) - ViewNumListTmp) % (ViewNumComp * ViewCoordIdx/3)) 
-	  ViewErrorFlags[ViewElementIdx]++;
-	(*ViewNumList)++;
-      }
+      if(ViewValueList) (*ViewNumList)++;
     ;
     break;}
-case 43:
-#line 520 "Gmsh.y"
+case 41:
+#line 464 "Gmsh.y"
 { 
-      for(int i = 0; i < (int)strlen(yyvsp[0].c)+1; i++) List_Add(View->T2C, &yyvsp[0].c[i]); 
+      for(int i = 0; i < (int)strlen(yyvsp[0].c)+1; i++) List_Add(ViewData->T2C, &yyvsp[0].c[i]); 
       Free(yyvsp[0].c);
     ;
     break;}
-case 44:
-#line 525 "Gmsh.y"
+case 42:
+#line 469 "Gmsh.y"
 { 
-      for(int i = 0; i < (int)strlen(yyvsp[0].c)+1; i++) List_Add(View->T2C, &yyvsp[0].c[i]); 
+      for(int i = 0; i < (int)strlen(yyvsp[0].c)+1; i++) List_Add(ViewData->T2C, &yyvsp[0].c[i]); 
       Free(yyvsp[0].c);
     ;
     break;}
-case 45:
-#line 533 "Gmsh.y"
+case 43:
+#line 477 "Gmsh.y"
 { 
-      List_Add(View->T2D, &yyvsp[-5].d); List_Add(View->T2D, &yyvsp[-3].d);
-      List_Add(View->T2D, &yyvsp[-1].d); 
-      double d = List_Nbr(View->T2C);
-      List_Add(View->T2D, &d); 
+      List_Add(ViewData->T2D, &yyvsp[-5].d); 
+      List_Add(ViewData->T2D, &yyvsp[-3].d);
+      List_Add(ViewData->T2D, &yyvsp[-1].d); 
+      double d = List_Nbr(ViewData->T2C);
+      List_Add(ViewData->T2D, &d); 
     ;
     break;}
-case 46:
-#line 540 "Gmsh.y"
+case 44:
+#line 485 "Gmsh.y"
 {
-      View->NbT2++;
+      ViewData->NbT2++;
     ;
     break;}
-case 47:
-#line 547 "Gmsh.y"
+case 45:
+#line 492 "Gmsh.y"
 { 
-      for(int i = 0; i < (int)strlen(yyvsp[0].c)+1; i++) List_Add(View->T3C, &yyvsp[0].c[i]); 
+      for(int i = 0; i < (int)strlen(yyvsp[0].c)+1; i++) List_Add(ViewData->T3C, &yyvsp[0].c[i]); 
       Free(yyvsp[0].c);
     ;
     break;}
-case 48:
-#line 552 "Gmsh.y"
+case 46:
+#line 497 "Gmsh.y"
 { 
-      for(int i = 0; i < (int)strlen(yyvsp[0].c)+1; i++) List_Add(View->T3C, &yyvsp[0].c[i]); 
+      for(int i = 0; i < (int)strlen(yyvsp[0].c)+1; i++) List_Add(ViewData->T3C, &yyvsp[0].c[i]); 
       Free(yyvsp[0].c);
     ;
     break;}
-case 49:
-#line 560 "Gmsh.y"
+case 47:
+#line 505 "Gmsh.y"
 { 
-      List_Add(View->T3D, &yyvsp[-7].d); List_Add(View->T3D, &yyvsp[-5].d);
-      List_Add(View->T3D, &yyvsp[-3].d); List_Add(View->T3D, &yyvsp[-1].d); 
-      double d = List_Nbr(View->T3C);
-      List_Add(View->T3D, &d); 
-    ;
-    break;}
-case 50:
-#line 567 "Gmsh.y"
-{
-      View->NbT3++;
+      List_Add(ViewData->T3D, &yyvsp[-7].d); List_Add(ViewData->T3D, &yyvsp[-5].d);
+      List_Add(ViewData->T3D, &yyvsp[-3].d); List_Add(ViewData->T3D, &yyvsp[-1].d); 
+      double d = List_Nbr(ViewData->T3C);
+      List_Add(ViewData->T3D, &d); 
     ;
     break;}
-case 51:
-#line 575 "Gmsh.y"
+case 48:
+#line 512 "Gmsh.y"
 {
-      View->adaptive = new Adaptive_Post_View(View, yyvsp[-5].l, yyvsp[-2].l);
+      ViewData->NbT3++;
     ;
     break;}
-case 52:
-#line 582 "Gmsh.y"
+case 49:
+#line 520 "Gmsh.y"
 {
-      View->adaptive = new Adaptive_Post_View(View, yyvsp[-11].l, yyvsp[-8].l, yyvsp[-5].l, yyvsp[-2].l);
+      yyerror("TODO: reinterface adaptive views");
+      //ViewData->adaptive = new Adaptive_Post_View(ViewData, $3, $6);
     ;
     break;}
-case 53:
-#line 589 "Gmsh.y"
+case 50:
+#line 528 "Gmsh.y"
 {
-      ViewValueList = View->Time;
+      yyerror("TODO: reinterface adaptive views");
+      //ViewData->adaptive = new Adaptive_Post_View(ViewData, $3, $6, $9, $12);
     ;
     break;}
-case 54:
-#line 593 "Gmsh.y"
+case 51:
+#line 536 "Gmsh.y"
 {
+      ViewValueList = ViewData->Time;
     ;
     break;}
-case 55:
-#line 599 "Gmsh.y"
+case 52:
+#line 540 "Gmsh.y"
 {
-      (*View->Grains) [(int)yyvsp[-3].d] = yyvsp[-1].l;
     ;
     break;}
-case 56:
-#line 607 "Gmsh.y"
+case 53:
+#line 547 "Gmsh.y"
 { yyval.i = 0; ;
     break;}
-case 57:
-#line 608 "Gmsh.y"
+case 54:
+#line 548 "Gmsh.y"
 { yyval.i = 1; ;
     break;}
-case 58:
-#line 609 "Gmsh.y"
+case 55:
+#line 549 "Gmsh.y"
 { yyval.i = 2; ;
     break;}
-case 59:
-#line 610 "Gmsh.y"
+case 56:
+#line 550 "Gmsh.y"
 { yyval.i = 3; ;
     break;}
-case 60:
-#line 611 "Gmsh.y"
+case 57:
+#line 551 "Gmsh.y"
 { yyval.i = 4; ;
     break;}
-case 61:
-#line 615 "Gmsh.y"
+case 58:
+#line 555 "Gmsh.y"
 { yyval.i = 1; ;
     break;}
-case 62:
-#line 616 "Gmsh.y"
+case 59:
+#line 556 "Gmsh.y"
 { yyval.i = -1; ;
     break;}
-case 63:
-#line 624 "Gmsh.y"
+case 60:
+#line 564 "Gmsh.y"
 {
       Symbol TheSymbol;
       TheSymbol.Name = yyvsp[-3].c;
@@ -3430,8 +3332,8 @@ case 63:
       }
     ;
     break;}
-case 64:
-#line 655 "Gmsh.y"
+case 61:
+#line 595 "Gmsh.y"
 {
       Symbol TheSymbol;
       TheSymbol.Name = yyvsp[-6].c;
@@ -3471,8 +3373,8 @@ case 64:
       }
     ;
     break;}
-case 65:
-#line 694 "Gmsh.y"
+case 62:
+#line 634 "Gmsh.y"
 {
       if(List_Nbr(yyvsp[-5].l) != List_Nbr(yyvsp[-1].l)){
 	yymsg(GERROR, "Incompatible array dimensions in affectation");
@@ -3527,8 +3429,8 @@ case 65:
       List_Delete(yyvsp[-1].l);
     ;
     break;}
-case 66:
-#line 748 "Gmsh.y"
+case 63:
+#line 688 "Gmsh.y"
 {
       Symbol TheSymbol;
       TheSymbol.Name = yyvsp[-5].c;
@@ -3546,8 +3448,8 @@ case 66:
       List_Delete(yyvsp[-1].l);
     ;
     break;}
-case 67:
-#line 765 "Gmsh.y"
+case 64:
+#line 705 "Gmsh.y"
 {
       // appends to the list
       Symbol TheSymbol;
@@ -3566,8 +3468,8 @@ case 67:
       List_Delete(yyvsp[-1].l);
     ;
     break;}
-case 68:
-#line 783 "Gmsh.y"
+case 65:
+#line 723 "Gmsh.y"
 {
       Symbol TheSymbol;
       TheSymbol.Name = yyvsp[-2].c;
@@ -3579,8 +3481,8 @@ case 68:
       Free(yyvsp[-2].c);
     ;
     break;}
-case 69:
-#line 794 "Gmsh.y"
+case 66:
+#line 734 "Gmsh.y"
 {
       Symbol TheSymbol;
       TheSymbol.Name = yyvsp[-5].c;
@@ -3597,14 +3499,14 @@ case 69:
       Free(yyvsp[-5].c);
     ;
     break;}
-case 70:
-#line 811 "Gmsh.y"
+case 67:
+#line 751 "Gmsh.y"
 { 
       Msg(WARNING, "Named string expressions not implemented yet");
     ;
     break;}
-case 71:
-#line 818 "Gmsh.y"
+case 68:
+#line 758 "Gmsh.y"
 { 
       char* (*pStrOpt)(int num, int action, char *value);
       StringXString *pStrCat;
@@ -3619,8 +3521,8 @@ case 71:
       Free(yyvsp[-5].c); Free(yyvsp[-3].c); //FIXME: somtimes leak $5
     ;
     break;}
-case 72:
-#line 832 "Gmsh.y"
+case 69:
+#line 772 "Gmsh.y"
 { 
       char* (*pStrOpt)(int num, int action, char *value);
       StringXString *pStrCat;
@@ -3635,8 +3537,8 @@ case 72:
       Free(yyvsp[-8].c); Free(yyvsp[-3].c); //FIXME: somtimes leak $8
     ;
     break;}
-case 73:
-#line 849 "Gmsh.y"
+case 70:
+#line 789 "Gmsh.y"
 {
       double (*pNumOpt)(int num, int action, double value);
       StringXNumber *pNumCat;
@@ -3663,8 +3565,8 @@ case 73:
       Free(yyvsp[-5].c); Free(yyvsp[-3].c);
     ;
     break;}
-case 74:
-#line 875 "Gmsh.y"
+case 71:
+#line 815 "Gmsh.y"
 {
       double (*pNumOpt)(int num, int action, double value);
       StringXNumber *pNumCat;
@@ -3692,8 +3594,8 @@ case 74:
       Free(yyvsp[-8].c); Free(yyvsp[-3].c);
     ;
     break;}
-case 75:
-#line 902 "Gmsh.y"
+case 72:
+#line 842 "Gmsh.y"
 {
       double (*pNumOpt)(int num, int action, double value);
       StringXNumber *pNumCat;
@@ -3708,8 +3610,8 @@ case 75:
       Free(yyvsp[-4].c); Free(yyvsp[-2].c);
     ;
     break;}
-case 76:
-#line 916 "Gmsh.y"
+case 73:
+#line 856 "Gmsh.y"
 {
       double (*pNumOpt)(int num, int action, double value);
       StringXNumber *pNumCat;
@@ -3724,8 +3626,8 @@ case 76:
       Free(yyvsp[-7].c); Free(yyvsp[-2].c);
     ;
     break;}
-case 77:
-#line 933 "Gmsh.y"
+case 74:
+#line 873 "Gmsh.y"
 {
       unsigned int (*pColOpt)(int num, int action, unsigned int value);
       StringXColor *pColCat;
@@ -3740,8 +3642,8 @@ case 77:
       Free(yyvsp[-7].c); Free(yyvsp[-3].c);
     ;
     break;}
-case 78:
-#line 947 "Gmsh.y"
+case 75:
+#line 887 "Gmsh.y"
 {
       unsigned int (*pColOpt)(int num, int action, unsigned int value);
       StringXColor *pColCat;
@@ -3756,8 +3658,8 @@ case 78:
       Free(yyvsp[-10].c); Free(yyvsp[-3].c);
     ;
     break;}
-case 79:
-#line 964 "Gmsh.y"
+case 76:
+#line 904 "Gmsh.y"
 {
       GmshColorTable *ct = Get_ColorTable(0);
       if(!ct)
@@ -3778,8 +3680,8 @@ case 79:
       List_Delete(yyvsp[-1].l);
     ;
     break;}
-case 80:
-#line 984 "Gmsh.y"
+case 77:
+#line 924 "Gmsh.y"
 {
       GmshColorTable *ct = Get_ColorTable((int)yyvsp[-6].d);
       if(!ct)
@@ -3800,8 +3702,8 @@ case 80:
       List_Delete(yyvsp[-1].l);
     ;
     break;}
-case 81:
-#line 1007 "Gmsh.y"
+case 78:
+#line 947 "Gmsh.y"
 {
       try {
 	GMSH_PluginManager::instance()->setPluginOption(yyvsp[-6].c, yyvsp[-3].c, yyvsp[-1].d); 
@@ -3812,8 +3714,8 @@ case 81:
       Free(yyvsp[-6].c); Free(yyvsp[-3].c);
     ;
     break;}
-case 82:
-#line 1017 "Gmsh.y"
+case 79:
+#line 957 "Gmsh.y"
 {
       try {
 	GMSH_PluginManager::instance()->setPluginOption(yyvsp[-6].c, yyvsp[-3].c, yyvsp[-1].c); 
@@ -3824,22 +3726,22 @@ case 82:
       Free(yyvsp[-6].c); Free(yyvsp[-3].c); // FIXME: sometimes leak $8
     ;
     break;}
-case 83:
-#line 1032 "Gmsh.y"
+case 80:
+#line 972 "Gmsh.y"
 { 
       yyval.i = (int)yyvsp[0].d; 
     ;
     break;}
-case 84:
-#line 1036 "Gmsh.y"
+case 81:
+#line 976 "Gmsh.y"
 { 
       yyval.i = GModel::current()->setPhysicalName(std::string(yyvsp[0].c),
 					      ++THEM->MaxPhysicalNum);
       Free(yyvsp[0].c);
     ;
     break;}
-case 85:
-#line 1049 "Gmsh.y"
+case 82:
+#line 989 "Gmsh.y"
 {
       int num = (int)yyvsp[-4].d;
       if(FindPoint(num)){
@@ -3862,8 +3764,8 @@ case 85:
       yyval.s.Num = num;
     ;
     break;}
-case 86:
-#line 1071 "Gmsh.y"
+case 83:
+#line 1011 "Gmsh.y"
 {
       int num = (int)yyvsp[-4].i;
       if(FindPhysicalGroup(num, MSH_PHYSICAL_POINT)){
@@ -3880,8 +3782,8 @@ case 86:
       yyval.s.Num = num;
     ;
     break;}
-case 87:
-#line 1087 "Gmsh.y"
+case 84:
+#line 1027 "Gmsh.y"
 {
       AttractorField *att = new AttractorField();
       for(int i = 0; i < List_Nbr(yyvsp[-1].l); i++){
@@ -3903,8 +3805,8 @@ case 87:
       yyval.s.Num = 0;
     ;
     break;}
-case 88:
-#line 1108 "Gmsh.y"
+case 85:
+#line 1048 "Gmsh.y"
 {
       fields.insert(new LatLonField(fields.get((int)yyvsp[-1].d)), (int)yyvsp[-4].d);
       // dummy values
@@ -3912,21 +3814,21 @@ case 88:
       yyval.s.Num = 0;
     ;
     break;}
-case 89:
-#line 1115 "Gmsh.y"
+case 86:
+#line 1055 "Gmsh.y"
 {
-      Post_View **vv = (Post_View **)List_Pointer_Test(CTX.post.list, (int)yyvsp[-1].d);
-      if(vv) 
-        fields.insert(new PostViewField(*vv), (int)yyvsp[-4].d);
+      int index = (int)yyvsp[-1].d;
+      if(index >= 0 && index < PView::list.size()) 
+        fields.insert(new PostViewField(PView::list[index]), (int)yyvsp[-4].d);
       else
-        yymsg(GERROR, "Field %i error, view %i does not exist",(int)yyvsp[-4].d,(int)yyvsp[-1].d);
+        yymsg(GERROR, "Field %i error, view %i does not exist", (int)yyvsp[-4].d, (int)yyvsp[-1].d);
       // dummy values
       yyval.s.Type = 0;
       yyval.s.Num = 0;
     ;
     break;}
-case 90:
-#line 1126 "Gmsh.y"
+case 87:
+#line 1066 "Gmsh.y"
 {
       double pars[] = {0, CTX.lc/10, CTX.lc, CTX.lc/100, CTX.lc/20};
       for(int i = 0; i < List_Nbr(yyvsp[-1].l); i++){
@@ -3942,8 +3844,8 @@ case 90:
       yyval.s.Num = 0;
     ;
     break;}
-case 91:
-#line 1141 "Gmsh.y"
+case 88:
+#line 1081 "Gmsh.y"
 {
       std::list<Field*> *flist = new std::list<Field*>;
       fields.insert(new FunctionField(flist,yyvsp[-1].c), (int)yyvsp[-4].d);
@@ -3952,8 +3854,8 @@ case 91:
       yyval.s.Num = 0;
     ;
     break;}
-case 92:
-#line 1149 "Gmsh.y"
+case 89:
+#line 1089 "Gmsh.y"
 {
       std::list<Field*> *flist = new std::list<Field*>;
       flist->resize(0);
@@ -3969,8 +3871,8 @@ case 92:
       yyval.s.Num = 0;
     ;
     break;}
-case 93:
-#line 1164 "Gmsh.y"
+case 90:
+#line 1104 "Gmsh.y"
 {
       fields.insert(new StructuredField(yyvsp[-1].c), (int)yyvsp[-4].d);
       // dummy values
@@ -3978,8 +3880,8 @@ case 93:
       yyval.s.Num = 0;
     ;
     break;}
-case 94:
-#line 1171 "Gmsh.y"
+case 91:
+#line 1111 "Gmsh.y"
 {
       for(int i = 0; i < List_Nbr(yyvsp[-1].l); i++){
 	double id;
@@ -3991,8 +3893,8 @@ case 94:
       yyval.s.Num = 0;
     ;
     break;}
-case 95:
-#line 1183 "Gmsh.y"
+case 92:
+#line 1123 "Gmsh.y"
 {
       double pars[] = { CTX.lc/10, CTX.lc/100., CTX.lc/20, 1, 3 };
       for(int i = 0; i < List_Nbr(yyvsp[-1].l); i++){
@@ -4027,8 +3929,8 @@ case 95:
       yyval.s.Num = 0;
     ;
     break;}
-case 96:
-#line 1217 "Gmsh.y"
+case 93:
+#line 1157 "Gmsh.y"
 {
       double pars[] = { CTX.lc/10, CTX.lc/100., CTX.lc/20, 10, 3 };
       for(int i = 0; i < List_Nbr(yyvsp[-1].l); i++){
@@ -4065,8 +3967,8 @@ case 96:
       yyval.s.Num = 0;
     ;
     break;}
-case 97:
-#line 1253 "Gmsh.y"
+case 94:
+#line 1193 "Gmsh.y"
 {      
       for(int i = 0; i < List_Nbr(yyvsp[-3].l); i++){
 	double d;
@@ -4086,8 +3988,8 @@ case 97:
       yyval.s.Num = 0;
     ;
     break;}
-case 98:
-#line 1275 "Gmsh.y"
+case 95:
+#line 1215 "Gmsh.y"
 {
       int num = (int)yyvsp[-4].d;
       if(FindCurve(num)){
@@ -4106,8 +4008,8 @@ case 98:
       yyval.s.Num = num;
     ;
     break;}
-case 99:
-#line 1293 "Gmsh.y"
+case 96:
+#line 1233 "Gmsh.y"
 {
       int num = (int)yyvsp[-4].d;
       if(FindCurve(num)){
@@ -4126,8 +4028,8 @@ case 99:
       yyval.s.Num = num;
     ;
     break;}
-case 100:
-#line 1311 "Gmsh.y"
+case 97:
+#line 1251 "Gmsh.y"
 {
       int num = (int)yyvsp[-4].d;
       if(FindCurve(num)){
@@ -4146,8 +4048,8 @@ case 100:
       yyval.s.Num = num;
     ;
     break;}
-case 101:
-#line 1329 "Gmsh.y"
+case 98:
+#line 1269 "Gmsh.y"
 {
       int num = (int)yyvsp[-6].d;
       if(FindCurve(num)){
@@ -4174,8 +4076,8 @@ case 101:
       yyval.s.Num = num;
     ;
     break;}
-case 102:
-#line 1355 "Gmsh.y"
+case 99:
+#line 1295 "Gmsh.y"
 {
       int num = (int)yyvsp[-4].d;
       if(FindCurve(num)){
@@ -4194,8 +4096,8 @@ case 102:
       yyval.s.Num = num;
     ;
     break;}
-case 103:
-#line 1373 "Gmsh.y"
+case 100:
+#line 1313 "Gmsh.y"
 {
       int num = (int)yyvsp[-6].d;
       if(FindCurve(num)){
@@ -4222,8 +4124,8 @@ case 103:
       yyval.s.Num = num;
     ;
     break;}
-case 104:
-#line 1400 "Gmsh.y"
+case 101:
+#line 1340 "Gmsh.y"
 {
       int num = (int)yyvsp[-14].d;
       if(FindCurve(num)){
@@ -4243,8 +4145,8 @@ case 104:
       yyval.s.Num = num;
     ;
     break;}
-case 105:
-#line 1419 "Gmsh.y"
+case 102:
+#line 1359 "Gmsh.y"
 {
       int num = (int)yyvsp[-4].d;
       if(FindCurve(num)){
@@ -4263,8 +4165,8 @@ case 105:
       yyval.s.Num = num;
     ;
     break;}
-case 106:
-#line 1437 "Gmsh.y"
+case 103:
+#line 1377 "Gmsh.y"
 {
       int num = (int)yyvsp[-4].d;
       if(FindCurve(num)){
@@ -4283,8 +4185,8 @@ case 106:
       yyval.s.Num = num;
     ;
     break;}
-case 107:
-#line 1455 "Gmsh.y"
+case 104:
+#line 1395 "Gmsh.y"
 {
       int num = (int)yyvsp[-8].d;
       if(List_Nbr(yyvsp[-5].l) + (int)yyvsp[-1].d + 1 != List_Nbr(yyvsp[-3].l)){
@@ -4311,8 +4213,8 @@ case 107:
       yyval.s.Num = num;
     ;
     break;}
-case 108:
-#line 1481 "Gmsh.y"
+case 105:
+#line 1421 "Gmsh.y"
 {
       int num = (int)yyvsp[-4].d;
       if(FindEdgeLoop(num)){
@@ -4330,8 +4232,8 @@ case 108:
       yyval.s.Num = num;
     ;
     break;}
-case 109:
-#line 1498 "Gmsh.y"
+case 106:
+#line 1438 "Gmsh.y"
 {
       int num = (int)yyvsp[-4].i;
       if(FindPhysicalGroup(num, MSH_PHYSICAL_LINE)){
@@ -4348,8 +4250,8 @@ case 109:
       yyval.s.Num = num;
     ;
     break;}
-case 110:
-#line 1517 "Gmsh.y"
+case 107:
+#line 1457 "Gmsh.y"
 {
       int num = (int)yyvsp[-4].d;
       if(FindSurface(num)){
@@ -4368,8 +4270,8 @@ case 110:
       yyval.s.Num = num;
     ;
     break;}
-case 111:
-#line 1535 "Gmsh.y"
+case 108:
+#line 1475 "Gmsh.y"
 {
       int num = (int)yyvsp[-4].d, type = 0;
       if(FindSurface(num)){
@@ -4408,27 +4310,27 @@ case 111:
       yyval.s.Num = num;
     ;
     break;}
-case 112:
-#line 1573 "Gmsh.y"
+case 109:
+#line 1513 "Gmsh.y"
 {
       myGmshSurface = 0;
     ;
     break;}
-case 113:
-#line 1577 "Gmsh.y"
+case 110:
+#line 1517 "Gmsh.y"
 {
       myGmshSurface = gmshSurface :: surfaceByTag ( (int) yyvsp[-1].d);
     ;
     break;}
-case 114:
-#line 1581 "Gmsh.y"
+case 111:
+#line 1521 "Gmsh.y"
 {
       int num = (int)yyvsp[-6].d, type = 0;
       myGmshSurface = gmshParametricSurface::NewParametricSurface ((int)yyvsp[-6].d,yyvsp[-3].c,yyvsp[-2].c,yyvsp[-1].c);
     ;
     break;}
-case 115:
-#line 1586 "Gmsh.y"
+case 112:
+#line 1526 "Gmsh.y"
 {
       int num = (int)yyvsp[-4].d, type = 0;
       if (List_Nbr(yyvsp[-1].l) != 2){
@@ -4451,8 +4353,8 @@ case 115:
       }      
     ;
     break;}
-case 116:
-#line 1608 "Gmsh.y"
+case 113:
+#line 1548 "Gmsh.y"
 {
       int num = (int)yyvsp[-4].d, type = 0;
       if (List_Nbr(yyvsp[-1].l) != 2){
@@ -4475,8 +4377,8 @@ case 116:
       }      
     ;
     break;}
-case 117:
-#line 1630 "Gmsh.y"
+case 114:
+#line 1570 "Gmsh.y"
 {
       int num = (int)yyvsp[-4].d;
       if(FindSurfaceLoop(num)){
@@ -4493,8 +4395,8 @@ case 117:
       yyval.s.Num = num;
     ;
     break;}
-case 118:
-#line 1646 "Gmsh.y"
+case 115:
+#line 1586 "Gmsh.y"
 {
       int num = (int)yyvsp[-4].i;
       if(FindPhysicalGroup(num, MSH_PHYSICAL_SURFACE)){
@@ -4511,8 +4413,8 @@ case 118:
       yyval.s.Num = num;
     ;
     break;}
-case 119:
-#line 1666 "Gmsh.y"
+case 116:
+#line 1606 "Gmsh.y"
 {
       int num = (int)yyvsp[-4].d;
       if(FindVolume(num)){
@@ -4530,8 +4432,8 @@ case 119:
       yyval.s.Num = num;
     ;
     break;}
-case 120:
-#line 1683 "Gmsh.y"
+case 117:
+#line 1623 "Gmsh.y"
 {
       int num = (int)yyvsp[-4].d;
       if(FindVolume(num)){
@@ -4549,8 +4451,8 @@ case 120:
       yyval.s.Num = num;
     ;
     break;}
-case 121:
-#line 1700 "Gmsh.y"
+case 118:
+#line 1640 "Gmsh.y"
 {
       int num = (int)yyvsp[-4].i;
       if(FindPhysicalGroup(num, MSH_PHYSICAL_VOLUME)){
@@ -4567,36 +4469,36 @@ case 121:
       yyval.s.Num = num;
     ;
     break;}
-case 122:
-#line 1721 "Gmsh.y"
+case 119:
+#line 1661 "Gmsh.y"
 {
       TranslateShapes(yyvsp[-3].v[0], yyvsp[-3].v[1], yyvsp[-3].v[2], yyvsp[-1].l);
       yyval.l = yyvsp[-1].l;
     ;
     break;}
-case 123:
-#line 1726 "Gmsh.y"
+case 120:
+#line 1666 "Gmsh.y"
 {
       RotateShapes(yyvsp[-8].v[0], yyvsp[-8].v[1], yyvsp[-8].v[2], yyvsp[-6].v[0], yyvsp[-6].v[1], yyvsp[-6].v[2], yyvsp[-4].d, yyvsp[-1].l);
       yyval.l = yyvsp[-1].l;
     ;
     break;}
-case 124:
-#line 1731 "Gmsh.y"
+case 121:
+#line 1671 "Gmsh.y"
 {
       SymmetryShapes(yyvsp[-3].v[0], yyvsp[-3].v[1], yyvsp[-3].v[2], yyvsp[-3].v[3], yyvsp[-1].l);
       yyval.l = yyvsp[-1].l;
     ;
     break;}
-case 125:
-#line 1736 "Gmsh.y"
+case 122:
+#line 1676 "Gmsh.y"
 {
       DilatShapes(yyvsp[-6].v[0], yyvsp[-6].v[1], yyvsp[-6].v[2], yyvsp[-4].d, yyvsp[-1].l);
       yyval.l = yyvsp[-1].l;
     ;
     break;}
-case 126:
-#line 1741 "Gmsh.y"
+case 123:
+#line 1681 "Gmsh.y"
 {
       yyval.l = List_Create(3, 3, sizeof(Shape));
       for(int i = 0; i < List_Nbr(yyvsp[-1].l); i++){
@@ -4608,44 +4510,44 @@ case 126:
       List_Delete(yyvsp[-1].l);
     ;
     break;}
-case 127:
-#line 1752 "Gmsh.y"
+case 124:
+#line 1692 "Gmsh.y"
 { 
       yyval.l = List_Create(2, 1, sizeof(Shape));
       IntersectCurvesWithSurface(yyvsp[-5].l, (int)yyvsp[-1].d, yyval.l);
       List_Delete(yyvsp[-5].l);
     ;
     break;}
-case 128:
-#line 1758 "Gmsh.y"
+case 125:
+#line 1698 "Gmsh.y"
 { 
       yyval.l = List_Create(2, 1, sizeof(Shape));
       BoundaryShapes(yyvsp[-1].l, yyval.l);
       List_Delete(yyvsp[-1].l);
     ;
     break;}
-case 129:
-#line 1766 "Gmsh.y"
+case 126:
+#line 1706 "Gmsh.y"
 { yyval.l = yyvsp[0].l; ;
     break;}
-case 130:
-#line 1767 "Gmsh.y"
+case 127:
+#line 1707 "Gmsh.y"
 { yyval.l = yyvsp[0].l; ;
     break;}
-case 131:
-#line 1772 "Gmsh.y"
+case 128:
+#line 1712 "Gmsh.y"
 {
       yyval.l = List_Create(3, 3, sizeof(Shape));
     ;
     break;}
-case 132:
-#line 1776 "Gmsh.y"
+case 129:
+#line 1716 "Gmsh.y"
 {
       List_Add(yyval.l, &yyvsp[0].s);
     ;
     break;}
-case 133:
-#line 1780 "Gmsh.y"
+case 130:
+#line 1720 "Gmsh.y"
 {
       for(int i = 0; i < List_Nbr(yyvsp[-2].l); i++){
 	double d;
@@ -4669,8 +4571,8 @@ case 133:
       }
     ;
     break;}
-case 134:
-#line 1803 "Gmsh.y"
+case 131:
+#line 1743 "Gmsh.y"
 {
       for(int i = 0; i < List_Nbr(yyvsp[-2].l); i++){
 	double d;
@@ -4694,8 +4596,8 @@ case 134:
       }
     ;
     break;}
-case 135:
-#line 1826 "Gmsh.y"
+case 132:
+#line 1766 "Gmsh.y"
 {
       for(int i = 0; i < List_Nbr(yyvsp[-2].l); i++){
 	double d;
@@ -4719,8 +4621,8 @@ case 135:
       }
     ;
     break;}
-case 136:
-#line 1849 "Gmsh.y"
+case 133:
+#line 1789 "Gmsh.y"
 {
       for(int i = 0; i < List_Nbr(yyvsp[-2].l); i++){
 	double d;
@@ -4744,8 +4646,8 @@ case 136:
       }
     ;
     break;}
-case 137:
-#line 1877 "Gmsh.y"
+case 134:
+#line 1817 "Gmsh.y"
 {
       for(int i = 0; i < List_Nbr(yyvsp[-1].l); i++){
 	Shape TheShape;
@@ -4755,20 +4657,23 @@ case 137:
       List_Delete(yyvsp[-1].l);
     ;
     break;}
-case 138:
-#line 1886 "Gmsh.y"
+case 135:
+#line 1826 "Gmsh.y"
 {
       if(!strcmp(yyvsp[-4].c, "View")){
-	RemoveViewByIndex((int)yyvsp[-2].d);
+	int index = (int)yyvsp[-2].d;
+	if(index >= 0 && index < PView::list.size())
+	  delete PView::list[index];
+	else
+	  yymsg(GERROR, "Unknown view %d", index);
       }
-      else{
+      else
 	yymsg(GERROR, "Unknown command 'Delete %s'", yyvsp[-4].c);
-      }
       Free(yyvsp[-4].c);
     ;
     break;}
-case 139:
-#line 1896 "Gmsh.y"
+case 136:
+#line 1839 "Gmsh.y"
 {
       if(!strcmp(yyvsp[-1].c, "Meshes") || !strcmp(yyvsp[-1].c, "All")){
 	GModel::current()->destroy();
@@ -4779,30 +4684,25 @@ case 139:
 	List_Reset(THEM->PhysicalGroups);
 	GModel::current()->deletePhysicalGroups();
       }
-      else{
+      else
 	yymsg(GERROR, "Unknown command 'Delete %s'", yyvsp[-1].c);
-      }
       Free(yyvsp[-1].c);
     ;
     break;}
-case 140:
-#line 1912 "Gmsh.y"
+case 137:
+#line 1854 "Gmsh.y"
 {
       if(!strcmp(yyvsp[-2].c, "Empty") && !strcmp(yyvsp[-1].c, "Views")){
-	for(int i = List_Nbr(CTX.post.list) - 1; i >= 0; i--){
-	  Post_View *v = *(Post_View **) List_Pointer(CTX.post.list, i);
-	  if(v->empty())
-	    RemoveViewByIndex(i);
-	}
+	for(int i = PView::list.size() - 1; i >= 0; i--)
+	  if(PView::list[i]->getData()->empty()) delete PView::list[i];
       }
-      else{
+      else
 	yymsg(GERROR, "Unknown command 'Delete %s %s'", yyvsp[-2].c, yyvsp[-1].c);
-      }
       Free(yyvsp[-2].c); Free(yyvsp[-1].c);
     ;
     break;}
-case 141:
-#line 1931 "Gmsh.y"
+case 138:
+#line 1869 "Gmsh.y"
 {
       for(int i = 0; i < List_Nbr(yyvsp[-1].l); i++){
 	Shape TheShape;
@@ -4812,24 +4712,24 @@ case 141:
       List_Delete(yyvsp[-1].l);      
     ;
     break;}
-case 142:
-#line 1945 "Gmsh.y"
+case 139:
+#line 1883 "Gmsh.y"
 {
       for(int i = 0; i < 4; i++)
 	VisibilityShape(yyvsp[-1].c, i, 1);
       Free(yyvsp[-1].c);
     ;
     break;}
-case 143:
-#line 1951 "Gmsh.y"
+case 140:
+#line 1889 "Gmsh.y"
 {
       for(int i = 0; i < 4; i++)
 	VisibilityShape(yyvsp[-1].c, i, 0);
       Free(yyvsp[-1].c);
     ;
     break;}
-case 144:
-#line 1957 "Gmsh.y"
+case 141:
+#line 1895 "Gmsh.y"
 {
       for(int i = 0; i < List_Nbr(yyvsp[-1].l); i++){
 	Shape TheShape;
@@ -4839,8 +4739,8 @@ case 144:
       List_Delete(yyvsp[-1].l);
     ;
     break;}
-case 145:
-#line 1966 "Gmsh.y"
+case 142:
+#line 1904 "Gmsh.y"
 {
       for(int i = 0; i < List_Nbr(yyvsp[-1].l); i++){
 	Shape TheShape;
@@ -4850,8 +4750,8 @@ case 145:
       List_Delete(yyvsp[-1].l);
     ;
     break;}
-case 146:
-#line 1980 "Gmsh.y"
+case 143:
+#line 1918 "Gmsh.y"
 {
       if(!strcmp(yyvsp[-2].c, "Include")){
 	char tmpstring[1024];
@@ -4893,51 +4793,51 @@ case 146:
 	FixRelativePath(yyvsp[-1].c, tmpstring);
 	MergeFile(tmpstring, 1);
       }
-      else if(!strcmp(yyvsp[-2].c, "System")){
+      else if(!strcmp(yyvsp[-2].c, "System"))
 	SystemCall(yyvsp[-1].c);
-      }
-      else{
+      else
 	yymsg(GERROR, "Unknown command '%s'", yyvsp[-2].c);
-      }
       Free(yyvsp[-2].c); Free(yyvsp[-1].c);
     ;
     break;}
-case 147:
-#line 2030 "Gmsh.y"
+case 144:
+#line 1966 "Gmsh.y"
 {
       if(!strcmp(yyvsp[-6].c, "Save") && !strcmp(yyvsp[-5].c, "View")){
-	Post_View **vv = (Post_View **)List_Pointer_Test(CTX.post.list, (int)yyvsp[-3].d);
-	if(vv){
+	int index = (int)yyvsp[-3].d;
+	if(index >= 0 && index < PView::list.size()){
 	  char tmpstring[1024];
 	  FixRelativePath(yyvsp[-1].c, tmpstring);
-	  WriteView(*vv, tmpstring, CTX.post.file_format, 0);
+	  PView::list[index]->write(tmpstring, CTX.post.file_format);
 	}
+	else
+	  yymsg(GERROR, "Unknown view %d", index);
       }
-      else{
+      else
 	yymsg(GERROR, "Unknown command '%s'", yyvsp[-6].c);
-      }
       Free(yyvsp[-6].c); Free(yyvsp[-5].c); Free(yyvsp[-1].c);
     ;
     break;}
-case 148:
-#line 2045 "Gmsh.y"
+case 145:
+#line 1982 "Gmsh.y"
 {
       if(!strcmp(yyvsp[-6].c, "Background") && !strcmp(yyvsp[-5].c, "Mesh")  && !strcmp(yyvsp[-4].c, "View")){
-	Post_View **vv = (Post_View **)List_Pointer_Test(CTX.post.list, (int)yyvsp[-2].d);
-	if(vv){
-	  Field *field = new PostViewField(*vv);
+	int index = (int)yyvsp[-2].d;
+	if(index >= 0 && index < PView::list.size()){
+	  Field *field = new PostViewField(PView::list[index]);
 	  fields.insert(field);
 	  BGMAddField(field);
 	}
+	else
+	  yymsg(GERROR, "Unknown view %d", index);
       }
-      else{
+      else
 	yymsg(GERROR, "Unknown command '%s'", yyvsp[-6].c);
-      }
       Free(yyvsp[-6].c); Free(yyvsp[-5].c); Free(yyvsp[-4].c);
     ;
     break;}
-case 149:
-#line 2060 "Gmsh.y"
+case 146:
+#line 1998 "Gmsh.y"
 {
       if(!strcmp(yyvsp[-2].c, "Sleep")){
 	SleepInSeconds(yyvsp[-1].d);
@@ -4952,14 +4852,13 @@ case 149:
       else if(!strcmp(yyvsp[-2].c, "Status")){
 	yymsg(GERROR, "Mesh directives are not (yet) allowed in scripts");
       }
-      else{
+      else
 	yymsg(GERROR, "Unknown command '%s'", yyvsp[-2].c);
-      }
       Free(yyvsp[-2].c);
     ;
     break;}
-case 150:
-#line 2080 "Gmsh.y"
+case 147:
+#line 2017 "Gmsh.y"
 {
        try {
 	 GMSH_PluginManager::instance()->action(yyvsp[-4].c, yyvsp[-1].c, 0);
@@ -4970,60 +4869,60 @@ case 150:
        Free(yyvsp[-4].c); Free(yyvsp[-1].c);
      ;
     break;}
-case 151:
-#line 2090 "Gmsh.y"
+case 148:
+#line 2027 "Gmsh.y"
 {
       if(!strcmp(yyvsp[-1].c, "ElementsFromAllViews"))
-	CombineViews(0, 1, CTX.post.combine_remove_orig);
+	PView::combine(false, 1, CTX.post.combine_remove_orig);
       else if(!strcmp(yyvsp[-1].c, "ElementsFromVisibleViews"))
-	CombineViews(0, 0, CTX.post.combine_remove_orig);
+	PView::combine(false, 0, CTX.post.combine_remove_orig);
       else if(!strcmp(yyvsp[-1].c, "ElementsByViewName"))
-	CombineViews(0, 2, CTX.post.combine_remove_orig);
+	PView::combine(false, 2, CTX.post.combine_remove_orig);
       else if(!strcmp(yyvsp[-1].c, "TimeStepsFromAllViews"))
-	CombineViews(1, 1, CTX.post.combine_remove_orig);
+	PView::combine(true, 1, CTX.post.combine_remove_orig);
       else if(!strcmp(yyvsp[-1].c, "TimeStepsFromVisibleViews"))
-	CombineViews(1, 0, CTX.post.combine_remove_orig);
+	PView::combine(true, 0, CTX.post.combine_remove_orig);
       else if(!strcmp(yyvsp[-1].c, "TimeStepsByViewName"))
-	CombineViews(1, 2, CTX.post.combine_remove_orig);
+	PView::combine(true, 2, CTX.post.combine_remove_orig);
       else if(!strcmp(yyvsp[-1].c, "Views"))
-	CombineViews(0, 1, CTX.post.combine_remove_orig);
+	PView::combine(false, 1, CTX.post.combine_remove_orig);
       else if(!strcmp(yyvsp[-1].c, "TimeSteps"))
-	CombineViews(1, 2, CTX.post.combine_remove_orig);
+	PView::combine(true, 2, CTX.post.combine_remove_orig);
       else
 	yymsg(GERROR, "Unknown 'Combine' command");
       Free(yyvsp[-1].c);
     ;
     break;}
-case 152:
-#line 2112 "Gmsh.y"
+case 149:
+#line 2049 "Gmsh.y"
 {
       exit(0);
     ;
     break;}
-case 153:
-#line 2116 "Gmsh.y"
+case 150:
+#line 2053 "Gmsh.y"
 {
       CTX.forced_bbox = 0;
       SetBoundingBox();
     ;
     break;}
-case 154:
-#line 2121 "Gmsh.y"
+case 151:
+#line 2058 "Gmsh.y"
 {
       CTX.forced_bbox = 1;
       SetBoundingBox(yyvsp[-12].d, yyvsp[-10].d, yyvsp[-8].d, yyvsp[-6].d, yyvsp[-4].d, yyvsp[-2].d);
     ;
     break;}
-case 155:
-#line 2126 "Gmsh.y"
+case 152:
+#line 2063 "Gmsh.y"
 {
 #if defined(HAVE_FLTK)
       Draw();
 #endif
     ;
     break;}
-case 156:
-#line 2138 "Gmsh.y"
+case 153:
+#line 2075 "Gmsh.y"
 {
       LoopControlVariablesTab[ImbricatedLoop][0] = yyvsp[-3].d;
       LoopControlVariablesTab[ImbricatedLoop][1] = yyvsp[-1].d;
@@ -5039,8 +4938,8 @@ case 156:
       if(yyvsp[-3].d > yyvsp[-1].d) skip_until("For", "EndFor");
     ;
     break;}
-case 157:
-#line 2153 "Gmsh.y"
+case 154:
+#line 2090 "Gmsh.y"
 {
       LoopControlVariablesTab[ImbricatedLoop][0] = yyvsp[-5].d;
       LoopControlVariablesTab[ImbricatedLoop][1] = yyvsp[-3].d;
@@ -5057,8 +4956,8 @@ case 157:
 	skip_until("For", "EndFor");
     ;
     break;}
-case 158:
-#line 2169 "Gmsh.y"
+case 155:
+#line 2106 "Gmsh.y"
 {
       LoopControlVariablesTab[ImbricatedLoop][0] = yyvsp[-3].d;
       LoopControlVariablesTab[ImbricatedLoop][1] = yyvsp[-1].d;
@@ -5072,9 +4971,8 @@ case 158:
 	List_Put(TheSymbol.val, 0, &yyvsp[-3].d);
 	Tree_Add(Symbol_T, &TheSymbol);
       }
-      else{
+      else
 	List_Write(pSymbol->val, 0, &yyvsp[-3].d);
-      }
       fgetpos(yyin, &yyposImbricatedLoopsTab[ImbricatedLoop]);
       yylinenoImbricatedLoopsTab[ImbricatedLoop] = yylineno;
       ImbricatedLoop++;
@@ -5085,8 +4983,8 @@ case 158:
       if(yyvsp[-3].d > yyvsp[-1].d) skip_until("For", "EndFor");
     ;
     break;}
-case 159:
-#line 2195 "Gmsh.y"
+case 156:
+#line 2131 "Gmsh.y"
 {
       LoopControlVariablesTab[ImbricatedLoop][0] = yyvsp[-5].d;
       LoopControlVariablesTab[ImbricatedLoop][1] = yyvsp[-3].d;
@@ -5100,9 +4998,8 @@ case 159:
 	List_Put(TheSymbol.val, 0, &yyvsp[-5].d);
 	Tree_Add(Symbol_T, &TheSymbol);
       }
-      else{
+      else
 	List_Write(pSymbol->val, 0, &yyvsp[-5].d);
-      }
       fgetpos(yyin, &yyposImbricatedLoopsTab[ImbricatedLoop]);
       yylinenoImbricatedLoopsTab[ImbricatedLoop] = yylineno;
       ImbricatedLoop++;
@@ -5114,8 +5011,8 @@ case 159:
 	skip_until("For", "EndFor");
     ;
     break;}
-case 160:
-#line 2222 "Gmsh.y"
+case 157:
+#line 2157 "Gmsh.y"
 {
       if(ImbricatedLoop <= 0){
 	yymsg(GERROR, "Invalid For/EndFor loop");
@@ -5142,14 +5039,13 @@ case 160:
 	  fsetpos(yyin, &yyposImbricatedLoopsTab[ImbricatedLoop-1]);
 	  yylineno = yylinenoImbricatedLoopsTab[ImbricatedLoop-1];
 	}
-	else{
+	else
 	  ImbricatedLoop--;
-	}
       }
     ;
     break;}
-case 161:
-#line 2254 "Gmsh.y"
+case 158:
+#line 2188 "Gmsh.y"
 {
       if(!FunctionManager::Instance()->createFunction(yyvsp[0].c, yyin, yyname, yylineno))
 	yymsg(GERROR, "Redefinition of function %s", yyvsp[0].c);
@@ -5157,34 +5053,34 @@ case 161:
       //FIXME: wee leak $2
     ;
     break;}
-case 162:
-#line 2261 "Gmsh.y"
+case 159:
+#line 2195 "Gmsh.y"
 {
       if(!FunctionManager::Instance()->leaveFunction(&yyin, yyname, yylineno))
 	yymsg(GERROR, "Error while exiting function");
     ;
     break;}
-case 163:
-#line 2266 "Gmsh.y"
+case 160:
+#line 2200 "Gmsh.y"
 {
       if(!FunctionManager::Instance()->enterFunction(yyvsp[-1].c, &yyin, yyname, yylineno))
 	yymsg(GERROR, "Unknown function %s", yyvsp[-1].c);
       //FIXME: wee leak $2
     ;
     break;}
-case 164:
-#line 2272 "Gmsh.y"
+case 161:
+#line 2206 "Gmsh.y"
 {
       if(!yyvsp[-1].d) skip_until("If", "EndIf");
     ;
     break;}
-case 165:
-#line 2276 "Gmsh.y"
+case 162:
+#line 2210 "Gmsh.y"
 {
     ;
     break;}
-case 166:
-#line 2285 "Gmsh.y"
+case 163:
+#line 2219 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(TRANSLATE, yyvsp[-1].l, 
@@ -5193,8 +5089,8 @@ case 166:
       List_Delete(yyvsp[-1].l);
     ;
     break;}
-case 167:
-#line 2293 "Gmsh.y"
+case 164:
+#line 2227 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(ROTATE, yyvsp[-1].l, 
@@ -5203,8 +5099,8 @@ case 167:
       List_Delete(yyvsp[-1].l);
     ;
     break;}
-case 168:
-#line 2301 "Gmsh.y"
+case 165:
+#line 2235 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(TRANSLATE_ROTATE, yyvsp[-1].l, 
@@ -5213,14 +5109,14 @@ case 168:
       List_Delete(yyvsp[-1].l);
     ;
     break;}
-case 169:
-#line 2309 "Gmsh.y"
+case 166:
+#line 2243 "Gmsh.y"
 {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;
     break;}
-case 170:
-#line 2313 "Gmsh.y"
+case 167:
+#line 2247 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(TRANSLATE, yyvsp[-3].l, 
@@ -5229,14 +5125,14 @@ case 170:
       List_Delete(yyvsp[-3].l);
     ;
     break;}
-case 171:
-#line 2321 "Gmsh.y"
+case 168:
+#line 2255 "Gmsh.y"
 {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;
     break;}
-case 172:
-#line 2325 "Gmsh.y"
+case 169:
+#line 2259 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(ROTATE, yyvsp[-3].l, 
@@ -5245,14 +5141,14 @@ case 172:
       List_Delete(yyvsp[-3].l);
     ;
     break;}
-case 173:
-#line 2333 "Gmsh.y"
+case 170:
+#line 2267 "Gmsh.y"
 {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;
     break;}
-case 174:
-#line 2337 "Gmsh.y"
+case 171:
+#line 2271 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(TRANSLATE_ROTATE, yyvsp[-3].l, 
@@ -5261,14 +5157,14 @@ case 174:
       List_Delete(yyvsp[-3].l);
     ;
     break;}
-case 175:
-#line 2345 "Gmsh.y"
+case 172:
+#line 2279 "Gmsh.y"
 {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;
     break;}
-case 176:
-#line 2349 "Gmsh.y"
+case 173:
+#line 2283 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(BOUNDARY_LAYER, yyvsp[-3].l, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
@@ -5276,14 +5172,14 @@ case 176:
       List_Delete(yyvsp[-3].l);
     ;
     break;}
-case 177:
-#line 2356 "Gmsh.y"
+case 174:
+#line 2290 "Gmsh.y"
 {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;
     break;}
-case 178:
-#line 2360 "Gmsh.y"
+case 175:
+#line 2294 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(Shape));
       extr.mesh.ViewIndex = (int)yyvsp[-6].d;
@@ -5294,8 +5190,8 @@ case 178:
       List_Delete(yyvsp[-3].l);
     ;
     break;}
-case 179:
-#line 2372 "Gmsh.y"
+case 176:
+#line 2306 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_POINT, (int)yyvsp[-4].d, 
@@ -5303,8 +5199,8 @@ case 179:
 		   NULL, yyval.l);
     ;
     break;}
-case 180:
-#line 2379 "Gmsh.y"
+case 177:
+#line 2313 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)yyvsp[-4].d, 
@@ -5312,8 +5208,8 @@ case 180:
 		   NULL, yyval.l);
     ;
     break;}
-case 181:
-#line 2386 "Gmsh.y"
+case 178:
+#line 2320 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)yyvsp[-4].d, 
@@ -5321,8 +5217,8 @@ case 181:
 		   NULL, yyval.l);
     ;
     break;}
-case 182:
-#line 2393 "Gmsh.y"
+case 179:
+#line 2327 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_POINT, (int)yyvsp[-8].d, 
@@ -5330,8 +5226,8 @@ case 182:
 		   NULL, yyval.l);
     ;
     break;}
-case 183:
-#line 2400 "Gmsh.y"
+case 180:
+#line 2334 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)yyvsp[-8].d, 
@@ -5339,8 +5235,8 @@ case 183:
 		   NULL, yyval.l);
     ;
     break;}
-case 184:
-#line 2407 "Gmsh.y"
+case 181:
+#line 2341 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)yyvsp[-8].d, 
@@ -5348,8 +5244,8 @@ case 184:
 		   NULL, yyval.l);
     ;
     break;}
-case 185:
-#line 2414 "Gmsh.y"
+case 182:
+#line 2348 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)yyvsp[-10].d, 
@@ -5357,8 +5253,8 @@ case 185:
 		   NULL, yyval.l);
     ;
     break;}
-case 186:
-#line 2421 "Gmsh.y"
+case 183:
+#line 2355 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)yyvsp[-10].d, 
@@ -5366,8 +5262,8 @@ case 186:
 		   NULL, yyval.l);
     ;
     break;}
-case 187:
-#line 2428 "Gmsh.y"
+case 184:
+#line 2362 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)yyvsp[-10].d, 
@@ -5375,14 +5271,14 @@ case 187:
 		   NULL, yyval.l);
     ;
     break;}
-case 188:
-#line 2435 "Gmsh.y"
+case 185:
+#line 2369 "Gmsh.y"
 {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;
     break;}
-case 189:
-#line 2439 "Gmsh.y"
+case 186:
+#line 2373 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_POINT, (int)yyvsp[-8].d, 
@@ -5390,14 +5286,14 @@ case 189:
 		   &extr, yyval.l);
     ;
     break;}
-case 190:
-#line 2446 "Gmsh.y"
+case 187:
+#line 2380 "Gmsh.y"
 {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;
     break;}
-case 191:
-#line 2450 "Gmsh.y"
+case 188:
+#line 2384 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)yyvsp[-8].d, 
@@ -5405,14 +5301,14 @@ case 191:
 		   &extr, yyval.l);
     ;
     break;}
-case 192:
-#line 2457 "Gmsh.y"
+case 189:
+#line 2391 "Gmsh.y"
 {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;
     break;}
-case 193:
-#line 2461 "Gmsh.y"
+case 190:
+#line 2395 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)yyvsp[-8].d, 
@@ -5420,14 +5316,14 @@ case 193:
 		   &extr, yyval.l);
     ;
     break;}
-case 194:
-#line 2468 "Gmsh.y"
+case 191:
+#line 2402 "Gmsh.y"
 {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;
     break;}
-case 195:
-#line 2472 "Gmsh.y"
+case 192:
+#line 2406 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_POINT, (int)yyvsp[-12].d, 
@@ -5435,14 +5331,14 @@ case 195:
 		   &extr, yyval.l);
     ;
     break;}
-case 196:
-#line 2479 "Gmsh.y"
+case 193:
+#line 2413 "Gmsh.y"
 {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;
     break;}
-case 197:
-#line 2483 "Gmsh.y"
+case 194:
+#line 2417 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)yyvsp[-12].d, 
@@ -5450,14 +5346,14 @@ case 197:
 		   &extr, yyval.l);
     ;
     break;}
-case 198:
-#line 2490 "Gmsh.y"
+case 195:
+#line 2424 "Gmsh.y"
 {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;
     break;}
-case 199:
-#line 2494 "Gmsh.y"
+case 196:
+#line 2428 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)yyvsp[-12].d, 
@@ -5465,14 +5361,14 @@ case 199:
 		   &extr, yyval.l);
     ;
     break;}
-case 200:
-#line 2501 "Gmsh.y"
+case 197:
+#line 2435 "Gmsh.y"
 {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;
     break;}
-case 201:
-#line 2505 "Gmsh.y"
+case 198:
+#line 2439 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)yyvsp[-14].d, 
@@ -5480,14 +5376,14 @@ case 201:
 		   &extr, yyval.l);
     ;
     break;}
-case 202:
-#line 2512 "Gmsh.y"
+case 199:
+#line 2446 "Gmsh.y"
 {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;
     break;}
-case 203:
-#line 2516 "Gmsh.y"
+case 200:
+#line 2450 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)yyvsp[-14].d, 
@@ -5495,14 +5391,14 @@ case 203:
 		   &extr, yyval.l);
     ;
     break;}
-case 204:
-#line 2523 "Gmsh.y"
+case 201:
+#line 2457 "Gmsh.y"
 {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;
     break;}
-case 205:
-#line 2527 "Gmsh.y"
+case 202:
+#line 2461 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)yyvsp[-14].d, 
@@ -5510,18 +5406,18 @@ case 205:
 		   &extr, yyval.l);
     ;
     break;}
-case 206:
-#line 2538 "Gmsh.y"
+case 203:
+#line 2472 "Gmsh.y"
 {
     ;
     break;}
-case 207:
-#line 2541 "Gmsh.y"
+case 204:
+#line 2475 "Gmsh.y"
 {
     ;
     break;}
-case 208:
-#line 2547 "Gmsh.y"
+case 205:
+#line 2481 "Gmsh.y"
 {
       extr.mesh.ExtrudeMesh = true;
       extr.mesh.NbLayer = 1;
@@ -5531,8 +5427,8 @@ case 208:
       extr.mesh.hLayer.push_back(1.);
     ;
     break;}
-case 209:
-#line 2556 "Gmsh.y"
+case 206:
+#line 2490 "Gmsh.y"
 {
       double d;
       extr.mesh.ExtrudeMesh = true;
@@ -5547,16 +5443,14 @@ case 209:
 	  extr.mesh.hLayer.push_back(d);
 	}
       }
-      else{
-	yymsg(GERROR, "Wrong layer definition {%d, %d}", 
-	      List_Nbr(yyvsp[-4].l), List_Nbr(yyvsp[-2].l));
-      }
+      else
+	yymsg(GERROR, "Wrong layer definition {%d, %d}", List_Nbr(yyvsp[-4].l), List_Nbr(yyvsp[-2].l));
       List_Delete(yyvsp[-4].l);
       List_Delete(yyvsp[-2].l);
     ;
     break;}
-case 210:
-#line 2578 "Gmsh.y"
+case 207:
+#line 2510 "Gmsh.y"
 {
       yymsg(GERROR, "Explicit region numbers in layers are deprecated");
       double d;
@@ -5572,23 +5466,22 @@ case 210:
 	  extr.mesh.hLayer.push_back(d);
 	}
       }
-      else{
-	yymsg(GERROR, "Wrong layer definition {%d, %d, %d}", 
-	      List_Nbr(yyvsp[-6].l), List_Nbr(yyvsp[-4].l), List_Nbr(yyvsp[-2].l));
-      }
+      else
+	yymsg(GERROR, "Wrong layer definition {%d, %d, %d}", List_Nbr(yyvsp[-6].l), 
+	      List_Nbr(yyvsp[-4].l), List_Nbr(yyvsp[-2].l));
       List_Delete(yyvsp[-6].l);
       List_Delete(yyvsp[-4].l);
       List_Delete(yyvsp[-2].l);
     ;
     break;}
-case 211:
-#line 2602 "Gmsh.y"
+case 208:
+#line 2533 "Gmsh.y"
 {
       extr.mesh.Recombine = true;
     ;
     break;}
-case 212:
-#line 2606 "Gmsh.y"
+case 209:
+#line 2537 "Gmsh.y"
 {
       int num = (int)yyvsp[-6].d;
       if(FindSurface(num)){
@@ -5608,8 +5501,8 @@ case 212:
       List_Delete(yyvsp[-3].l);
     ;
     break;}
-case 213:
-#line 2630 "Gmsh.y"
+case 210:
+#line 2561 "Gmsh.y"
 {
       for(int i = 0; i < List_Nbr(yyvsp[-3].l); i++){
 	double d;
@@ -5628,8 +5521,8 @@ case 213:
       List_Delete(yyvsp[-3].l);
     ;
     break;}
-case 214:
-#line 2648 "Gmsh.y"
+case 211:
+#line 2579 "Gmsh.y"
 {
       for(int i = 0; i < List_Nbr(yyvsp[-6].l); i++){
 	double d;
@@ -5648,8 +5541,8 @@ case 214:
       List_Delete(yyvsp[-6].l);
     ;
     break;}
-case 215:
-#line 2666 "Gmsh.y"
+case 212:
+#line 2597 "Gmsh.y"
 {
       for(int i = 0; i < List_Nbr(yyvsp[-6].l); i++){
 	double d;
@@ -5668,8 +5561,8 @@ case 215:
       List_Delete(yyvsp[-6].l);
     ;
     break;}
-case 216:
-#line 2684 "Gmsh.y"
+case 213:
+#line 2615 "Gmsh.y"
 {
       Surface *s = FindSurface((int)yyvsp[-4].d);
       if(!s)
@@ -5699,8 +5592,8 @@ case 216:
       List_Delete(yyvsp[-1].l);
     ;
     break;}
-case 217:
-#line 2713 "Gmsh.y"
+case 214:
+#line 2644 "Gmsh.y"
 {
       Surface *s = FindSurface((int)yyvsp[-5].d);
       if(!s)
@@ -5736,15 +5629,15 @@ case 217:
       Free(yyvsp[-1].c);
     ;
     break;}
-case 218:
-#line 2748 "Gmsh.y"
+case 215:
+#line 2679 "Gmsh.y"
 {
       yymsg(WARNING, "Elliptic Surface is deprecated: use Transfinite instead (with smoothing)");
       List_Delete(yyvsp[-1].l);
     ;
     break;}
-case 219:
-#line 2753 "Gmsh.y"
+case 216:
+#line 2684 "Gmsh.y"
 {
       Volume *v = FindVolume((int)yyvsp[-4].d);
       if(!v)
@@ -5772,8 +5665,8 @@ case 219:
       List_Delete(yyvsp[-1].l);
     ;
     break;}
-case 220:
-#line 2780 "Gmsh.y"
+case 217:
+#line 2711 "Gmsh.y"
 {
       for(int i = 0; i < List_Nbr(yyvsp[-3].l); i++){
 	double d;
@@ -5788,8 +5681,8 @@ case 220:
       List_Delete(yyvsp[-3].l);
     ;
     break;}
-case 221:
-#line 2794 "Gmsh.y"
+case 218:
+#line 2725 "Gmsh.y"
 {
       for(int i = 0; i < List_Nbr(yyvsp[-1].l); i++){
 	double d;
@@ -5803,72 +5696,72 @@ case 221:
       List_Delete(yyvsp[-1].l);
     ;
     break;}
-case 222:
-#line 2813 "Gmsh.y"
+case 219:
+#line 2744 "Gmsh.y"
 { 
       Surface *s = FindSurface((int)yyvsp[-2].d);
       if(s)
 	setSurfaceEmbeddedPoints(s, yyvsp[-7].l);
     ;
     break;}
-case 223:
-#line 2819 "Gmsh.y"
+case 220:
+#line 2750 "Gmsh.y"
 {
       Surface *s = FindSurface((int)yyvsp[-2].d);
       if(s)
 	setSurfaceEmbeddedCurves(s, yyvsp[-7].l);
     ;
     break;}
-case 224:
-#line 2825 "Gmsh.y"
+case 221:
+#line 2756 "Gmsh.y"
 {
     ;
     break;}
-case 225:
-#line 2828 "Gmsh.y"
+case 222:
+#line 2759 "Gmsh.y"
 {
     ;
     break;}
-case 226:
-#line 2837 "Gmsh.y"
+case 223:
+#line 2768 "Gmsh.y"
 { 
       ReplaceAllDuplicates();
     ;
     break;}
-case 227:
-#line 2846 "Gmsh.y"
+case 224:
+#line 2777 "Gmsh.y"
 { yyval.d = yyvsp[0].d;           ;
     break;}
-case 228:
-#line 2847 "Gmsh.y"
+case 225:
+#line 2778 "Gmsh.y"
 { yyval.d = yyvsp[-1].d;           ;
     break;}
-case 229:
-#line 2848 "Gmsh.y"
+case 226:
+#line 2779 "Gmsh.y"
 { yyval.d = -yyvsp[0].d;          ;
     break;}
-case 230:
-#line 2849 "Gmsh.y"
+case 227:
+#line 2780 "Gmsh.y"
 { yyval.d = yyvsp[0].d;           ;
     break;}
-case 231:
-#line 2850 "Gmsh.y"
+case 228:
+#line 2781 "Gmsh.y"
 { yyval.d = !yyvsp[0].d;          ;
     break;}
-case 232:
-#line 2851 "Gmsh.y"
+case 229:
+#line 2782 "Gmsh.y"
 { yyval.d = yyvsp[-2].d - yyvsp[0].d;      ;
     break;}
-case 233:
-#line 2852 "Gmsh.y"
+case 230:
+#line 2783 "Gmsh.y"
 { yyval.d = yyvsp[-2].d + yyvsp[0].d;      ;
     break;}
-case 234:
-#line 2853 "Gmsh.y"
+case 231:
+#line 2784 "Gmsh.y"
 { yyval.d = yyvsp[-2].d * yyvsp[0].d;      ;
     break;}
-case 235:
-#line 2855 "Gmsh.y"
+case 232:
+#line 2786 "Gmsh.y"
 { 
       if(!yyvsp[0].d)
 	yymsg(GERROR, "Division by zero in '%g / %g'", yyvsp[-2].d, yyvsp[0].d);
@@ -5876,248 +5769,248 @@ case 235:
 	yyval.d = yyvsp[-2].d / yyvsp[0].d;     
     ;
     break;}
-case 236:
-#line 2861 "Gmsh.y"
+case 233:
+#line 2792 "Gmsh.y"
 { yyval.d = (int)yyvsp[-2].d % (int)yyvsp[0].d;  ;
     break;}
-case 237:
-#line 2862 "Gmsh.y"
+case 234:
+#line 2793 "Gmsh.y"
 { yyval.d = pow(yyvsp[-2].d, yyvsp[0].d);  ;
     break;}
-case 238:
-#line 2863 "Gmsh.y"
+case 235:
+#line 2794 "Gmsh.y"
 { yyval.d = yyvsp[-2].d < yyvsp[0].d;      ;
     break;}
-case 239:
-#line 2864 "Gmsh.y"
+case 236:
+#line 2795 "Gmsh.y"
 { yyval.d = yyvsp[-2].d > yyvsp[0].d;      ;
     break;}
-case 240:
-#line 2865 "Gmsh.y"
+case 237:
+#line 2796 "Gmsh.y"
 { yyval.d = yyvsp[-2].d <= yyvsp[0].d;     ;
     break;}
-case 241:
-#line 2866 "Gmsh.y"
+case 238:
+#line 2797 "Gmsh.y"
 { yyval.d = yyvsp[-2].d >= yyvsp[0].d;     ;
     break;}
-case 242:
-#line 2867 "Gmsh.y"
+case 239:
+#line 2798 "Gmsh.y"
 { yyval.d = yyvsp[-2].d == yyvsp[0].d;     ;
     break;}
-case 243:
-#line 2868 "Gmsh.y"
+case 240:
+#line 2799 "Gmsh.y"
 { yyval.d = yyvsp[-2].d != yyvsp[0].d;     ;
     break;}
-case 244:
-#line 2869 "Gmsh.y"
+case 241:
+#line 2800 "Gmsh.y"
 { yyval.d = yyvsp[-2].d && yyvsp[0].d;     ;
     break;}
-case 245:
-#line 2870 "Gmsh.y"
+case 242:
+#line 2801 "Gmsh.y"
 { yyval.d = yyvsp[-2].d || yyvsp[0].d;     ;
     break;}
-case 246:
-#line 2871 "Gmsh.y"
+case 243:
+#line 2802 "Gmsh.y"
 { yyval.d = yyvsp[-4].d? yyvsp[-2].d : yyvsp[0].d;  ;
     break;}
-case 247:
-#line 2872 "Gmsh.y"
+case 244:
+#line 2803 "Gmsh.y"
 { yyval.d = exp(yyvsp[-1].d);      ;
     break;}
-case 248:
-#line 2873 "Gmsh.y"
+case 245:
+#line 2804 "Gmsh.y"
 { yyval.d = log(yyvsp[-1].d);      ;
     break;}
-case 249:
-#line 2874 "Gmsh.y"
+case 246:
+#line 2805 "Gmsh.y"
 { yyval.d = log10(yyvsp[-1].d);    ;
     break;}
-case 250:
-#line 2875 "Gmsh.y"
+case 247:
+#line 2806 "Gmsh.y"
 { yyval.d = sqrt(yyvsp[-1].d);     ;
     break;}
-case 251:
-#line 2876 "Gmsh.y"
+case 248:
+#line 2807 "Gmsh.y"
 { yyval.d = sin(yyvsp[-1].d);      ;
     break;}
-case 252:
-#line 2877 "Gmsh.y"
+case 249:
+#line 2808 "Gmsh.y"
 { yyval.d = asin(yyvsp[-1].d);     ;
     break;}
-case 253:
-#line 2878 "Gmsh.y"
+case 250:
+#line 2809 "Gmsh.y"
 { yyval.d = cos(yyvsp[-1].d);      ;
     break;}
-case 254:
-#line 2879 "Gmsh.y"
+case 251:
+#line 2810 "Gmsh.y"
 { yyval.d = acos(yyvsp[-1].d);     ;
     break;}
-case 255:
-#line 2880 "Gmsh.y"
+case 252:
+#line 2811 "Gmsh.y"
 { yyval.d = tan(yyvsp[-1].d);      ;
     break;}
-case 256:
-#line 2881 "Gmsh.y"
+case 253:
+#line 2812 "Gmsh.y"
 { yyval.d = atan(yyvsp[-1].d);     ;
     break;}
-case 257:
-#line 2882 "Gmsh.y"
+case 254:
+#line 2813 "Gmsh.y"
 { yyval.d = atan2(yyvsp[-3].d, yyvsp[-1].d);;
     break;}
-case 258:
-#line 2883 "Gmsh.y"
+case 255:
+#line 2814 "Gmsh.y"
 { yyval.d = sinh(yyvsp[-1].d);     ;
     break;}
-case 259:
-#line 2884 "Gmsh.y"
+case 256:
+#line 2815 "Gmsh.y"
 { yyval.d = cosh(yyvsp[-1].d);     ;
     break;}
-case 260:
-#line 2885 "Gmsh.y"
+case 257:
+#line 2816 "Gmsh.y"
 { yyval.d = tanh(yyvsp[-1].d);     ;
     break;}
-case 261:
-#line 2886 "Gmsh.y"
+case 258:
+#line 2817 "Gmsh.y"
 { yyval.d = fabs(yyvsp[-1].d);     ;
     break;}
-case 262:
-#line 2887 "Gmsh.y"
+case 259:
+#line 2818 "Gmsh.y"
 { yyval.d = floor(yyvsp[-1].d);    ;
     break;}
-case 263:
-#line 2888 "Gmsh.y"
+case 260:
+#line 2819 "Gmsh.y"
 { yyval.d = ceil(yyvsp[-1].d);     ;
     break;}
-case 264:
-#line 2889 "Gmsh.y"
+case 261:
+#line 2820 "Gmsh.y"
 { yyval.d = fmod(yyvsp[-3].d, yyvsp[-1].d); ;
     break;}
-case 265:
-#line 2890 "Gmsh.y"
+case 262:
+#line 2821 "Gmsh.y"
 { yyval.d = fmod(yyvsp[-3].d, yyvsp[-1].d); ;
     break;}
-case 266:
-#line 2891 "Gmsh.y"
+case 263:
+#line 2822 "Gmsh.y"
 { yyval.d = sqrt(yyvsp[-3].d*yyvsp[-3].d+yyvsp[-1].d*yyvsp[-1].d); ;
     break;}
-case 267:
-#line 2892 "Gmsh.y"
+case 264:
+#line 2823 "Gmsh.y"
 { yyval.d = yyvsp[-1].d*(double)rand()/(double)RAND_MAX; ;
     break;}
-case 268:
-#line 2894 "Gmsh.y"
+case 265:
+#line 2825 "Gmsh.y"
 { yyval.d = exp(yyvsp[-1].d);      ;
     break;}
-case 269:
-#line 2895 "Gmsh.y"
+case 266:
+#line 2826 "Gmsh.y"
 { yyval.d = log(yyvsp[-1].d);      ;
     break;}
-case 270:
-#line 2896 "Gmsh.y"
+case 267:
+#line 2827 "Gmsh.y"
 { yyval.d = log10(yyvsp[-1].d);    ;
     break;}
-case 271:
-#line 2897 "Gmsh.y"
+case 268:
+#line 2828 "Gmsh.y"
 { yyval.d = sqrt(yyvsp[-1].d);     ;
     break;}
-case 272:
-#line 2898 "Gmsh.y"
+case 269:
+#line 2829 "Gmsh.y"
 { yyval.d = sin(yyvsp[-1].d);      ;
     break;}
-case 273:
-#line 2899 "Gmsh.y"
+case 270:
+#line 2830 "Gmsh.y"
 { yyval.d = asin(yyvsp[-1].d);     ;
     break;}
-case 274:
-#line 2900 "Gmsh.y"
+case 271:
+#line 2831 "Gmsh.y"
 { yyval.d = cos(yyvsp[-1].d);      ;
     break;}
-case 275:
-#line 2901 "Gmsh.y"
+case 272:
+#line 2832 "Gmsh.y"
 { yyval.d = acos(yyvsp[-1].d);     ;
     break;}
-case 276:
-#line 2902 "Gmsh.y"
+case 273:
+#line 2833 "Gmsh.y"
 { yyval.d = tan(yyvsp[-1].d);      ;
     break;}
-case 277:
-#line 2903 "Gmsh.y"
+case 274:
+#line 2834 "Gmsh.y"
 { yyval.d = atan(yyvsp[-1].d);     ;
     break;}
-case 278:
-#line 2904 "Gmsh.y"
+case 275:
+#line 2835 "Gmsh.y"
 { yyval.d = atan2(yyvsp[-3].d, yyvsp[-1].d);;
     break;}
-case 279:
-#line 2905 "Gmsh.y"
+case 276:
+#line 2836 "Gmsh.y"
 { yyval.d = sinh(yyvsp[-1].d);     ;
     break;}
-case 280:
-#line 2906 "Gmsh.y"
+case 277:
+#line 2837 "Gmsh.y"
 { yyval.d = cosh(yyvsp[-1].d);     ;
     break;}
-case 281:
-#line 2907 "Gmsh.y"
+case 278:
+#line 2838 "Gmsh.y"
 { yyval.d = tanh(yyvsp[-1].d);     ;
     break;}
-case 282:
-#line 2908 "Gmsh.y"
+case 279:
+#line 2839 "Gmsh.y"
 { yyval.d = fabs(yyvsp[-1].d);     ;
     break;}
-case 283:
-#line 2909 "Gmsh.y"
+case 280:
+#line 2840 "Gmsh.y"
 { yyval.d = floor(yyvsp[-1].d);    ;
     break;}
-case 284:
-#line 2910 "Gmsh.y"
+case 281:
+#line 2841 "Gmsh.y"
 { yyval.d = ceil(yyvsp[-1].d);     ;
     break;}
-case 285:
-#line 2911 "Gmsh.y"
+case 282:
+#line 2842 "Gmsh.y"
 { yyval.d = fmod(yyvsp[-3].d, yyvsp[-1].d); ;
     break;}
-case 286:
-#line 2912 "Gmsh.y"
+case 283:
+#line 2843 "Gmsh.y"
 { yyval.d = fmod(yyvsp[-3].d, yyvsp[-1].d); ;
     break;}
-case 287:
-#line 2913 "Gmsh.y"
+case 284:
+#line 2844 "Gmsh.y"
 { yyval.d = sqrt(yyvsp[-3].d*yyvsp[-3].d+yyvsp[-1].d*yyvsp[-1].d); ;
     break;}
-case 288:
-#line 2914 "Gmsh.y"
+case 285:
+#line 2845 "Gmsh.y"
 { yyval.d = yyvsp[-1].d*(double)rand()/(double)RAND_MAX; ;
     break;}
-case 289:
-#line 2923 "Gmsh.y"
+case 286:
+#line 2854 "Gmsh.y"
 { yyval.d = yyvsp[0].d; ;
     break;}
-case 290:
-#line 2924 "Gmsh.y"
+case 287:
+#line 2855 "Gmsh.y"
 { yyval.d = 3.141592653589793; ;
     break;}
-case 291:
-#line 2925 "Gmsh.y"
+case 288:
+#line 2856 "Gmsh.y"
 { yyval.d = ParUtil::Instance()->rank(); ;
     break;}
-case 292:
-#line 2926 "Gmsh.y"
+case 289:
+#line 2857 "Gmsh.y"
 { yyval.d = ParUtil::Instance()->size(); ;
     break;}
-case 293:
-#line 2927 "Gmsh.y"
+case 290:
+#line 2858 "Gmsh.y"
 { yyval.d = Get_GmshMajorVersion(); ;
     break;}
-case 294:
-#line 2928 "Gmsh.y"
+case 291:
+#line 2859 "Gmsh.y"
 { yyval.d = Get_GmshMinorVersion(); ;
     break;}
-case 295:
-#line 2929 "Gmsh.y"
+case 292:
+#line 2860 "Gmsh.y"
 { yyval.d = Get_GmshPatchVersion(); ;
     break;}
-case 296:
-#line 2934 "Gmsh.y"
+case 293:
+#line 2865 "Gmsh.y"
 {
       Symbol TheSymbol;
       TheSymbol.Name = yyvsp[0].c;
@@ -6131,8 +6024,8 @@ case 296:
       Free(yyvsp[0].c);
     ;
     break;}
-case 297:
-#line 2950 "Gmsh.y"
+case 294:
+#line 2881 "Gmsh.y"
 {
       char tmpstring[1024];
       sprintf(tmpstring, "%s_%d", yyvsp[-4].c, (int)yyvsp[-1].d) ;
@@ -6148,8 +6041,8 @@ case 297:
       Free(yyvsp[-4].c);
     ;
     break;}
-case 298:
-#line 2965 "Gmsh.y"
+case 295:
+#line 2896 "Gmsh.y"
 {
       Symbol TheSymbol;
       TheSymbol.Name = yyvsp[-3].c;
@@ -6170,8 +6063,8 @@ case 298:
       Free(yyvsp[-3].c);
     ;
     break;}
-case 299:
-#line 2985 "Gmsh.y"
+case 296:
+#line 2916 "Gmsh.y"
 {
       Symbol TheSymbol;
       TheSymbol.Name = yyvsp[-2].c;
@@ -6180,14 +6073,13 @@ case 299:
 	yymsg(GERROR, "Unknown variable '%s'", yyvsp[-2].c);
 	yyval.d = 0.;
       }
-      else{
+      else
 	yyval.d = List_Nbr(pSymbol->val);
-      }
       Free(yyvsp[-2].c);
     ;
     break;}
-case 300:
-#line 2999 "Gmsh.y"
+case 297:
+#line 2929 "Gmsh.y"
 {
       Symbol TheSymbol;
       TheSymbol.Name = yyvsp[-1].c;
@@ -6201,8 +6093,8 @@ case 300:
       Free(yyvsp[-1].c);
     ;
     break;}
-case 301:
-#line 3012 "Gmsh.y"
+case 298:
+#line 2942 "Gmsh.y"
 {
       Symbol TheSymbol;
       TheSymbol.Name = yyvsp[-4].c;
@@ -6223,8 +6115,8 @@ case 301:
       Free(yyvsp[-4].c);
     ;
     break;}
-case 302:
-#line 3035 "Gmsh.y"
+case 299:
+#line 2965 "Gmsh.y"
 {
       double (*pNumOpt)(int num, int action, double value);
       StringXNumber *pNumCat;
@@ -6243,8 +6135,8 @@ case 302:
       Free(yyvsp[-2].c); Free(yyvsp[0].c);
     ;
     break;}
-case 303:
-#line 3053 "Gmsh.y"
+case 300:
+#line 2983 "Gmsh.y"
 {
       double (*pNumOpt)(int num, int action, double value);
       StringXNumber *pNumCat;
@@ -6263,8 +6155,8 @@ case 303:
       Free(yyvsp[-5].c); Free(yyvsp[0].c);
     ;
     break;}
-case 304:
-#line 3071 "Gmsh.y"
+case 301:
+#line 3001 "Gmsh.y"
 {
       double (*pNumOpt)(int num, int action, double value);
       StringXNumber *pNumCat;
@@ -6283,8 +6175,8 @@ case 304:
       Free(yyvsp[-3].c); Free(yyvsp[-1].c);
     ;
     break;}
-case 305:
-#line 3089 "Gmsh.y"
+case 302:
+#line 3019 "Gmsh.y"
 {
       double (*pNumOpt)(int num, int action, double value);
       StringXNumber *pNumCat;
@@ -6303,108 +6195,108 @@ case 305:
       Free(yyvsp[-6].c); Free(yyvsp[-1].c);
     ;
     break;}
-case 306:
-#line 3107 "Gmsh.y"
+case 303:
+#line 3037 "Gmsh.y"
 { 
       yyval.d = GetValue(yyvsp[-3].c, yyvsp[-1].d);
       Free(yyvsp[-3].c);
     ;
     break;}
-case 307:
-#line 3115 "Gmsh.y"
+case 304:
+#line 3045 "Gmsh.y"
 {
       memcpy(yyval.v, yyvsp[0].v, 5*sizeof(double));
     ;
     break;}
-case 308:
-#line 3119 "Gmsh.y"
+case 305:
+#line 3049 "Gmsh.y"
 {
       for(int i = 0; i < 5; i++) yyval.v[i] = -yyvsp[0].v[i];
     ;
     break;}
-case 309:
-#line 3123 "Gmsh.y"
+case 306:
+#line 3053 "Gmsh.y"
 { 
       for(int i = 0; i < 5; i++) yyval.v[i] = yyvsp[0].v[i];
     ;
     break;}
-case 310:
-#line 3127 "Gmsh.y"
+case 307:
+#line 3057 "Gmsh.y"
 { 
       for(int i = 0; i < 5; i++) yyval.v[i] = yyvsp[-2].v[i] - yyvsp[0].v[i];
     ;
     break;}
-case 311:
-#line 3131 "Gmsh.y"
+case 308:
+#line 3061 "Gmsh.y"
 {
       for(int i = 0; i < 5; i++) yyval.v[i] = yyvsp[-2].v[i] + yyvsp[0].v[i];
     ;
     break;}
-case 312:
-#line 3138 "Gmsh.y"
+case 309:
+#line 3068 "Gmsh.y"
 { 
       yyval.v[0] = yyvsp[-9].d;  yyval.v[1] = yyvsp[-7].d;  yyval.v[2] = yyvsp[-5].d;  yyval.v[3] = yyvsp[-3].d; yyval.v[4] = yyvsp[-1].d;
     ;
     break;}
-case 313:
-#line 3142 "Gmsh.y"
+case 310:
+#line 3072 "Gmsh.y"
 { 
       yyval.v[0] = yyvsp[-7].d;  yyval.v[1] = yyvsp[-5].d;  yyval.v[2] = yyvsp[-3].d;  yyval.v[3] = yyvsp[-1].d; yyval.v[4] = 1.0;
     ;
     break;}
-case 314:
-#line 3146 "Gmsh.y"
+case 311:
+#line 3076 "Gmsh.y"
 {
       yyval.v[0] = yyvsp[-5].d;  yyval.v[1] = yyvsp[-3].d;  yyval.v[2] = yyvsp[-1].d;  yyval.v[3] = 0.0; yyval.v[4] = 1.0;
     ;
     break;}
-case 315:
-#line 3150 "Gmsh.y"
+case 312:
+#line 3080 "Gmsh.y"
 {
       yyval.v[0] = yyvsp[-5].d;  yyval.v[1] = yyvsp[-3].d;  yyval.v[2] = yyvsp[-1].d;  yyval.v[3] = 0.0; yyval.v[4] = 1.0;
     ;
     break;}
-case 316:
-#line 3157 "Gmsh.y"
+case 313:
+#line 3087 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(List_T*));
       List_Add(yyval.l, &(yyvsp[0].l));
     ;
     break;}
-case 317:
-#line 3162 "Gmsh.y"
+case 314:
+#line 3092 "Gmsh.y"
 {
       List_Add(yyval.l, &(yyvsp[0].l));
     ;
     break;}
-case 318:
-#line 3170 "Gmsh.y"
+case 315:
+#line 3100 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(double));
       List_Add(yyval.l, &(yyvsp[0].d));
     ;
     break;}
-case 319:
-#line 3175 "Gmsh.y"
+case 316:
+#line 3105 "Gmsh.y"
 {
       yyval.l = yyvsp[0].l;
     ;
     break;}
-case 320:
-#line 3179 "Gmsh.y"
+case 317:
+#line 3109 "Gmsh.y"
 {
       // creates an empty list
       yyval.l = List_Create(2, 1, sizeof(double));
     ;
     break;}
-case 321:
-#line 3184 "Gmsh.y"
+case 318:
+#line 3114 "Gmsh.y"
 {
       yyval.l = yyvsp[-1].l;
     ;
     break;}
-case 322:
-#line 3188 "Gmsh.y"
+case 319:
+#line 3118 "Gmsh.y"
 {
       yyval.l = yyvsp[-1].l;
       for(int i = 0; i < List_Nbr(yyval.l); i++){
@@ -6413,8 +6305,8 @@ case 322:
       }
     ;
     break;}
-case 323:
-#line 3196 "Gmsh.y"
+case 320:
+#line 3126 "Gmsh.y"
 {
       yyval.l = yyvsp[-1].l;
       for(int i = 0; i < List_Nbr(yyval.l); i++){
@@ -6423,8 +6315,8 @@ case 323:
       }
     ;
     break;}
-case 324:
-#line 3207 "Gmsh.y"
+case 321:
+#line 3137 "Gmsh.y"
 {
       yyval.l = yyvsp[0].l;
       for(int i = 0; i < List_Nbr(yyval.l); i++){
@@ -6433,8 +6325,8 @@ case 324:
       }
     ;
     break;}
-case 325:
-#line 3215 "Gmsh.y"
+case 322:
+#line 3145 "Gmsh.y"
 {
       yyval.l = yyvsp[0].l;
       for(int i = 0; i < List_Nbr(yyval.l); i++){
@@ -6443,16 +6335,16 @@ case 325:
       }
     ;
     break;}
-case 326:
-#line 3223 "Gmsh.y"
+case 323:
+#line 3153 "Gmsh.y"
 { 
       yyval.l = List_Create(2, 1, sizeof(double)); 
       for(double d = yyvsp[-2].d; (yyvsp[-2].d < yyvsp[0].d) ? (d <= yyvsp[0].d) : (d >= yyvsp[0].d); (yyvsp[-2].d < yyvsp[0].d) ? (d += 1.) : (d -= 1.)) 
 	List_Add(yyval.l, &d);
     ;
     break;}
-case 327:
-#line 3229 "Gmsh.y"
+case 324:
+#line 3159 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(double)); 
       if(!yyvsp[0].d || (yyvsp[-4].d < yyvsp[-2].d && yyvsp[0].d < 0) || (yyvsp[-4].d > yyvsp[-2].d && yyvsp[0].d > 0)){
@@ -6464,8 +6356,8 @@ case 327:
 	  List_Add(yyval.l, &d);
    ;
     break;}
-case 328:
-#line 3240 "Gmsh.y"
+case 325:
+#line 3170 "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
@@ -6486,8 +6378,8 @@ case 328:
       }
     ;
     break;}
-case 329:
-#line 3260 "Gmsh.y"
+case 326:
+#line 3190 "Gmsh.y"
 {
       yyval.l = List_Create(List_Nbr(yyvsp[0].l), 1, sizeof(double));
       for(int i = 0; i < List_Nbr(yyvsp[0].l); i++){
@@ -6498,8 +6390,8 @@ case 329:
       List_Delete(yyvsp[0].l);
     ;
     break;}
-case 330:
-#line 3270 "Gmsh.y"
+case 327:
+#line 3200 "Gmsh.y"
 {
       yyval.l = List_Create(List_Nbr(yyvsp[0].l), 1, sizeof(double));
       for(int i = 0; i < List_Nbr(yyvsp[0].l); i++){
@@ -6510,8 +6402,8 @@ case 330:
       List_Delete(yyvsp[0].l);
     ;
     break;}
-case 331:
-#line 3280 "Gmsh.y"
+case 328:
+#line 3210 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(double));
       Symbol TheSymbol;
@@ -6529,8 +6421,8 @@ case 331:
       Free(yyvsp[-2].c);
     ;
     break;}
-case 332:
-#line 3297 "Gmsh.y"
+case 329:
+#line 3227 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(double));
       Symbol TheSymbol;
@@ -6555,27 +6447,27 @@ case 332:
       List_Delete(yyvsp[-2].l);
     ;
     break;}
-case 333:
-#line 3324 "Gmsh.y"
+case 330:
+#line 3254 "Gmsh.y"
 {
       yyval.l = List_Create(2, 1, sizeof(double));
       List_Add(yyval.l, &(yyvsp[0].d));
     ;
     break;}
-case 334:
-#line 3329 "Gmsh.y"
+case 331:
+#line 3259 "Gmsh.y"
 {
       yyval.l = yyvsp[0].l;
     ;
     break;}
-case 335:
-#line 3333 "Gmsh.y"
+case 332:
+#line 3263 "Gmsh.y"
 {
       List_Add(yyval.l, &(yyvsp[0].d));
     ;
     break;}
-case 336:
-#line 3337 "Gmsh.y"
+case 333:
+#line 3267 "Gmsh.y"
 {
       for(int i = 0; i < List_Nbr(yyvsp[0].l); i++){
 	double d;
@@ -6585,20 +6477,20 @@ case 336:
       List_Delete(yyvsp[0].l);
     ;
     break;}
-case 337:
-#line 3350 "Gmsh.y"
+case 334:
+#line 3280 "Gmsh.y"
 {
       yyval.u = CTX.PACK_COLOR((int)yyvsp[-7].d, (int)yyvsp[-5].d, (int)yyvsp[-3].d, (int)yyvsp[-1].d);
     ;
     break;}
-case 338:
-#line 3354 "Gmsh.y"
+case 335:
+#line 3284 "Gmsh.y"
 {
       yyval.u = CTX.PACK_COLOR((int)yyvsp[-5].d, (int)yyvsp[-3].d, (int)yyvsp[-1].d, 255);
     ;
     break;}
-case 339:
-#line 3366 "Gmsh.y"
+case 336:
+#line 3296 "Gmsh.y"
 {
       int flag;
       yyval.u = Get_ColorForString(ColorString, -1, yyvsp[0].c, &flag);
@@ -6606,8 +6498,8 @@ case 339:
       Free(yyvsp[0].c);
     ;
     break;}
-case 340:
-#line 3373 "Gmsh.y"
+case 337:
+#line 3303 "Gmsh.y"
 {
       unsigned int (*pColOpt)(int num, int action, unsigned int value);
       StringXColor *pColCat;
@@ -6620,21 +6512,20 @@ case 340:
 	  yymsg(GERROR, "Unknown color option '%s.Color.%s'", yyvsp[-4].c, yyvsp[0].c);
 	  yyval.u = 0;
 	}
-	else{
+	else
 	  yyval.u = pColOpt(0, GMSH_GET, 0);
-	}
       }
       Free(yyvsp[-4].c); Free(yyvsp[0].c);
     ;
     break;}
-case 341:
-#line 3395 "Gmsh.y"
+case 338:
+#line 3324 "Gmsh.y"
 {
       yyval.l = yyvsp[-1].l;
     ;
     break;}
-case 342:
-#line 3399 "Gmsh.y"
+case 339:
+#line 3328 "Gmsh.y"
 {
       yyval.l = List_Create(256, 10, sizeof(unsigned int));
       GmshColorTable *ct = Get_ColorTable((int)yyvsp[-3].d);
@@ -6647,39 +6538,39 @@ case 342:
       Free(yyvsp[-5].c);
     ;
     break;}
-case 343:
-#line 3414 "Gmsh.y"
+case 340:
+#line 3343 "Gmsh.y"
 {
       yyval.l = List_Create(256, 10, sizeof(unsigned int));
       List_Add(yyval.l, &(yyvsp[0].u));
     ;
     break;}
-case 344:
-#line 3419 "Gmsh.y"
+case 341:
+#line 3348 "Gmsh.y"
 {
       List_Add(yyval.l, &(yyvsp[0].u));
     ;
     break;}
-case 345:
-#line 3426 "Gmsh.y"
+case 342:
+#line 3355 "Gmsh.y"
 {
       yyval.c = yyvsp[0].c;
     ;
     break;}
-case 346:
-#line 3430 "Gmsh.y"
+case 343:
+#line 3359 "Gmsh.y"
 {
       Msg(WARNING, "Named string expressions not implemented yet");
     ;
     break;}
-case 347:
-#line 3437 "Gmsh.y"
+case 344:
+#line 3366 "Gmsh.y"
 {
       yyval.c = yyvsp[0].c;
     ;
     break;}
-case 348:
-#line 3441 "Gmsh.y"
+case 345:
+#line 3370 "Gmsh.y"
 {
       yyval.c = (char *)Malloc(32*sizeof(char));
       time_t now;
@@ -6688,8 +6579,8 @@ case 348:
       yyval.c[strlen(yyval.c) - 1] = '\0';
     ;
     break;}
-case 349:
-#line 3449 "Gmsh.y"
+case 346:
+#line 3378 "Gmsh.y"
 {
       yyval.c = (char *)Malloc((strlen(yyvsp[-3].c)+strlen(yyvsp[-1].c)+1)*sizeof(char));
       strcpy(yyval.c, yyvsp[-3].c);
@@ -6698,8 +6589,8 @@ case 349:
       Free(yyvsp[-1].c);
     ;
     break;}
-case 350:
-#line 3457 "Gmsh.y"
+case 347:
+#line 3386 "Gmsh.y"
 {
       yyval.c = (char *)Malloc((strlen(yyvsp[-1].c)+1)*sizeof(char));
       int i;
@@ -6714,8 +6605,8 @@ case 350:
       Free(yyvsp[-1].c);
     ;
     break;}
-case 351:
-#line 3471 "Gmsh.y"
+case 348:
+#line 3400 "Gmsh.y"
 {
       yyval.c = (char *)Malloc((strlen(yyvsp[-1].c)+1)*sizeof(char));
       int i;
@@ -6730,14 +6621,14 @@ case 351:
       Free(yyvsp[-1].c);
     ;
     break;}
-case 352:
-#line 3485 "Gmsh.y"
+case 349:
+#line 3414 "Gmsh.y"
 {
       yyval.c = yyvsp[-1].c;
     ;
     break;}
-case 353:
-#line 3489 "Gmsh.y"
+case 350:
+#line 3418 "Gmsh.y"
 {
       char tmpstring[1024];
       int i = PrintListOfDouble(yyvsp[-3].c, yyvsp[-1].l, tmpstring);
@@ -6757,8 +6648,8 @@ case 353:
       List_Delete(yyvsp[-1].l);
     ;
     break;}
-case 354:
-#line 3508 "Gmsh.y"
+case 351:
+#line 3437 "Gmsh.y"
 { 
       char* (*pStrOpt)(int num, int action, char *value);
       StringXString *pStrCat;
@@ -6781,8 +6672,8 @@ case 354:
       }
     ;
     break;}
-case 355:
-#line 3530 "Gmsh.y"
+case 352:
+#line 3459 "Gmsh.y"
 { 
       char* (*pStrOpt)(int num, int action, char *value);
       StringXString *pStrCat;
@@ -7027,7 +6918,7 @@ yyerrhandle:
     }
   return 1;
 }
-#line 3553 "Gmsh.y"
+#line 3482 "Gmsh.y"
 
 
 void DeleteSymbol(void *a, void *b){
@@ -7074,36 +6965,14 @@ int PrintListOfDouble(char *format, List_T *list, char *buffer){
 	strcat(buffer, tmp2);
       }
     }
-    else{
+    else
       return List_Nbr(list)-i;
-    }
   }
   if(j != (int)strlen(format))
     return -1;
   return 0;
 }
 
-int CheckViewErrorFlags(Post_View *v){
-  if(View->adaptive) return 0; // hope for the best :-)
-
-  char *name[8] = { "point", "line", "triangle", "quadrangle", 
-		    "tetrahedron", "hexahedron", "prism", "pyramid" };
-  char *type[3] = { "scalar", "vector", "tensor" };
-
-  if(8 * 3 != VIEW_NB_ELEMENT_TYPES){
-    Msg(GERROR, "Please upgrade CheckViewErrorFlags!");
-    return 0;
-  }
-  
-  for(int i = 0; i < VIEW_NB_ELEMENT_TYPES; i++)
-    if(ViewErrorFlags[i])
-      Msg(GERROR, "%d %s %s%s in View[%d] contain%s a wrong number of values",
-	  ViewErrorFlags[i], type[i%3], name[i/3], (ViewErrorFlags[i] > 1) ? "s" : "",
-	  v->Index, (ViewErrorFlags[i] > 1) ? "" : "s");
-  
-  return 0;
-}
-
 void yyerror(char *s){
   Msg(GERROR, "'%s', line %d : %s (%s)", yyname, yylineno-1, s, yytext);
   yyerrorstate++;
diff --git a/Parser/Gmsh.tab.hpp b/Parser/Gmsh.tab.hpp
index 55b22ceb95655ac5fb493f9880ab8862b8b7b0ae..fc5011a275c570857c2f573f6857bef9448abc51 100644
--- a/Parser/Gmsh.tab.hpp
+++ b/Parser/Gmsh.tab.hpp
@@ -90,49 +90,48 @@ typedef union {
 #define	tText3D	337
 #define	tInterpolationScheme	338
 #define	tTime	339
-#define	tGrain	340
-#define	tCombine	341
-#define	tBSpline	342
-#define	tBezier	343
-#define	tNurbs	344
-#define	tOrder	345
-#define	tKnots	346
-#define	tColor	347
-#define	tColorTable	348
-#define	tFor	349
-#define	tIn	350
-#define	tEndFor	351
-#define	tIf	352
-#define	tEndIf	353
-#define	tExit	354
-#define	tField	355
-#define	tThreshold	356
-#define	tStructured	357
-#define	tLatLon	358
-#define	tGrad	359
-#define	tPostView	360
-#define	tReturn	361
-#define	tCall	362
-#define	tFunction	363
-#define	tShow	364
-#define	tHide	365
-#define	tGetValue	366
-#define	tGMSH_MAJOR_VERSION	367
-#define	tGMSH_MINOR_VERSION	368
-#define	tGMSH_PATCH_VERSION	369
-#define	tAFFECTPLUS	370
-#define	tAFFECTMINUS	371
-#define	tAFFECTTIMES	372
-#define	tAFFECTDIVIDE	373
-#define	tOR	374
-#define	tAND	375
-#define	tEQUAL	376
-#define	tNOTEQUAL	377
-#define	tLESSOREQUAL	378
-#define	tGREATEROREQUAL	379
-#define	tPLUSPLUS	380
-#define	tMINUSMINUS	381
-#define	UNARYPREC	382
+#define	tCombine	340
+#define	tBSpline	341
+#define	tBezier	342
+#define	tNurbs	343
+#define	tOrder	344
+#define	tKnots	345
+#define	tColor	346
+#define	tColorTable	347
+#define	tFor	348
+#define	tIn	349
+#define	tEndFor	350
+#define	tIf	351
+#define	tEndIf	352
+#define	tExit	353
+#define	tField	354
+#define	tThreshold	355
+#define	tStructured	356
+#define	tLatLon	357
+#define	tGrad	358
+#define	tPostView	359
+#define	tReturn	360
+#define	tCall	361
+#define	tFunction	362
+#define	tShow	363
+#define	tHide	364
+#define	tGetValue	365
+#define	tGMSH_MAJOR_VERSION	366
+#define	tGMSH_MINOR_VERSION	367
+#define	tGMSH_PATCH_VERSION	368
+#define	tAFFECTPLUS	369
+#define	tAFFECTMINUS	370
+#define	tAFFECTTIMES	371
+#define	tAFFECTDIVIDE	372
+#define	tOR	373
+#define	tAND	374
+#define	tEQUAL	375
+#define	tNOTEQUAL	376
+#define	tLESSOREQUAL	377
+#define	tGREATEROREQUAL	378
+#define	tPLUSPLUS	379
+#define	tMINUSMINUS	380
+#define	UNARYPREC	381
 
 
 extern YYSTYPE yylval;
diff --git a/Parser/Gmsh.y b/Parser/Gmsh.y
index 476a1195936521d3b5106ab246946dcfc24abaeb..9707365f5e93a7d6c4eaf5796d5a34dda529b186 100644
--- a/Parser/Gmsh.y
+++ b/Parser/Gmsh.y
@@ -1,5 +1,5 @@
 %{
-// $Id: Gmsh.y,v 1.285 2007-09-09 00:18:04 geuzaine Exp $
+// $Id: Gmsh.y,v 1.286 2007-09-10 04:47:06 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -32,7 +32,8 @@
 #include "GeoInterpolation.h"
 #include "Generator.h"
 #include "Draw.h"
-#include "Views.h"
+#include "PView.h"
+#include "PViewDataList.h"
 #include "Options.h"
 #include "Colors.h"
 #include "Parser.h"
@@ -53,12 +54,10 @@ extern Mesh *THEM;
 
 static ExtrudeParams extr;
 
-static Post_View *View;
+static PViewDataList *ViewData;
 static List_T *ViewValueList;
 static double ViewCoord[100];
-static int *ViewNumList, ViewNumNodes, ViewNumComp, ViewNumListTmp;
-static int ViewCoordIdx, ViewElementIdx;
-static int ViewErrorFlags[VIEW_NB_ELEMENT_TYPES];
+static int *ViewNumList, ViewCoordIdx;
 
 #define MAX_RECUR_LOOPS 100
 static int ImbricatedLoop = 0;
@@ -72,7 +71,6 @@ void yyerror(char *s);
 void yymsg(int type, char *fmt, ...);
 void skip_until(char *skip, char *until);
 int PrintListOfDouble(char *format, List_T *list, char *buffer);
-int CheckViewErrorFlags(Post_View *v);
 %}
 
 %union {
@@ -101,7 +99,7 @@ int CheckViewErrorFlags(Post_View *v);
 %token tRotate tTranslate tSymmetry tDilate tExtrude tDuplicata
 %token tLoop tRecombine tDelete tCoherence tIntersect tBoundary
 %token tAttractor tLayers tHole tAlias tAliasWithOptions
-%token tText2D tText3D tInterpolationScheme  tTime tGrain tCombine
+%token tText2D tText3D tInterpolationScheme  tTime tCombine
 %token tBSpline tBezier tNurbs tOrder tKnots
 %token tColor tColorTable tFor tIn tEndFor tIf tEndIf tExit
 %token tField tThreshold tStructured tLatLon tGrad tPostView 
@@ -246,26 +244,32 @@ Printf :
 View :
     tSTRING tBIGSTR '{' Views '}' tEND
     { 
-      if(!strcmp($1, "View") && !CheckViewErrorFlags(View)){
-	EndView(View, 0, yyname, $2);
+      if(!strcmp($1, "View") && ViewData->finalize()){
+	ViewData->setName($2);
+	ViewData->setFileName(yyname);
+	ViewData->setFileIndex(yyviewindex++);
+	new PView(ViewData);
       }
+      else
+	delete ViewData;
       Free($1); Free($2);
     }
-  | tSTRING tBIGSTR tSTRING VExpr '{' Views '}' tEND
-    {
-      if(!strcmp($1, "View") && !CheckViewErrorFlags(View)){
-	EndView(View, 0, yyname, $2);
-      }
-      Free($1); Free($2); Free($3);
-    }  
   | tAlias tSTRING '[' FExpr ']' tEND
     {
-      if(!strcmp($2, "View")) AliasView((int)$4, 0);
+      if(!strcmp($2, "View")){
+	int index = (int)$4;
+	if(index >= 0 && index < PView::list.size())
+	  new PView(PView::list[index], false);
+      }
       Free($2);
     }
   | tAliasWithOptions tSTRING '[' FExpr ']' tEND
     {
-      if(!strcmp($2, "View")) AliasView((int)$4, 1);
+      if(!strcmp($2, "View")){
+	int index = (int)$4;
+	if(index >= 0 && index < PView::list.size())
+	  new PView(PView::list[index], true);
+      }
       Free($2);
     }
 ;
@@ -273,24 +277,20 @@ View :
 Views :
     // nothing
     {
-      View = BeginView(1); 
-      for(int i = 0; i < VIEW_NB_ELEMENT_TYPES; i++){
-	ViewErrorFlags[i] = 0;
-      }
+      ViewData = new PViewDataList(true); 
     }
   | Views Element
   | Views Text2D
   | Views Text3D
   | Views InterpolationMatrix
   | Views Time
-  | Views Grain
 ;
 
 ElementCoords :
     FExpr
-    { ViewCoord[ViewCoordIdx] = $1; ViewCoordIdx++; }
+    { ViewCoord[ViewCoordIdx++] = $1; }
   | ElementCoords ',' FExpr
-    { ViewCoord[ViewCoordIdx] = $3; ViewCoordIdx++; }
+    { ViewCoord[ViewCoordIdx++] = $3; }
 ;
 
 ElementValues :
@@ -304,189 +304,143 @@ Element :
     tSTRING 
     {
       if(!strcmp($1, "SP")){
-	ViewElementIdx = 0; ViewNumNodes = 1; ViewNumComp = 1;
-	ViewValueList = View->SP; ViewNumList = &View->NbSP;
+	ViewValueList = ViewData->SP; ViewNumList = &ViewData->NbSP;
       }
       else if(!strcmp($1, "VP")){
-	ViewElementIdx = 1; ViewNumNodes = 1; ViewNumComp = 3;
-	ViewValueList = View->VP; ViewNumList = &View->NbVP;
+	ViewValueList = ViewData->VP; ViewNumList = &ViewData->NbVP;
       }
       else if(!strcmp($1, "TP")){
-	ViewElementIdx = 2; ViewNumNodes = 1; ViewNumComp = 9;
-	ViewValueList = View->TP; ViewNumList = &View->NbTP;
+	ViewValueList = ViewData->TP; ViewNumList = &ViewData->NbTP;
       }
       else if(!strcmp($1, "SL")){
-	ViewElementIdx = 3; ViewNumNodes = 2; ViewNumComp = 1;
-	ViewValueList = View->SL; ViewNumList = &View->NbSL;
+	ViewValueList = ViewData->SL; ViewNumList = &ViewData->NbSL;
       }
       else if(!strcmp($1, "VL")){
-	ViewElementIdx = 4; ViewNumNodes = 2; ViewNumComp = 3;
-	ViewValueList = View->VL; ViewNumList = &View->NbVL;
+	ViewValueList = ViewData->VL; ViewNumList = &ViewData->NbVL;
       }
       else if(!strcmp($1, "TL")){
-	ViewElementIdx = 5; ViewNumNodes = 2; ViewNumComp = 9;
-	ViewValueList = View->TL; ViewNumList = &View->NbTL;
+	ViewValueList = ViewData->TL; ViewNumList = &ViewData->NbTL;
       }
       else if(!strcmp($1, "ST")){
-	ViewElementIdx = 6; ViewNumNodes = 3; ViewNumComp = 1;
-	ViewValueList = View->ST; ViewNumList = &View->NbST;
+	ViewValueList = ViewData->ST; ViewNumList = &ViewData->NbST;
       }
       else if(!strcmp($1, "VT")){
-	ViewElementIdx = 7; ViewNumNodes = 3; ViewNumComp = 3;
-	ViewValueList = View->VT; ViewNumList = &View->NbVT;
+	ViewValueList = ViewData->VT; ViewNumList = &ViewData->NbVT;
       }
       else if(!strcmp($1, "TT")){
-	ViewElementIdx = 8; ViewNumNodes = 3; ViewNumComp = 9;
-	ViewValueList = View->TT; ViewNumList = &View->NbTT;
+	ViewValueList = ViewData->TT; ViewNumList = &ViewData->NbTT;
       }
       else if(!strcmp($1, "SQ")){
-	ViewElementIdx = 9; ViewNumNodes = 4; ViewNumComp = 1;
-	ViewValueList = View->SQ; ViewNumList = &View->NbSQ;
+	ViewValueList = ViewData->SQ; ViewNumList = &ViewData->NbSQ;
       }
       else if(!strcmp($1, "VQ")){
-	ViewElementIdx = 10; ViewNumNodes = 4; ViewNumComp = 3;
-	ViewValueList = View->VQ; ViewNumList = &View->NbVQ;
+	ViewValueList = ViewData->VQ; ViewNumList = &ViewData->NbVQ;
       }
       else if(!strcmp($1, "TQ")){
-	ViewElementIdx = 11; ViewNumNodes = 4; ViewNumComp = 9;
-	ViewValueList = View->TQ; ViewNumList = &View->NbTQ;
+	ViewValueList = ViewData->TQ; ViewNumList = &ViewData->NbTQ;
       }
       else if(!strcmp($1, "SS")){
-	ViewElementIdx = 12; ViewNumNodes = 4; ViewNumComp = 1;
-	ViewValueList = View->SS; ViewNumList = &View->NbSS;
+	ViewValueList = ViewData->SS; ViewNumList = &ViewData->NbSS;
       }
       else if(!strcmp($1, "VS")){
-	ViewElementIdx = 13; ViewNumNodes = 4; ViewNumComp = 3;
-	ViewValueList = View->VS; ViewNumList = &View->NbVS;
+	ViewValueList = ViewData->VS; ViewNumList = &ViewData->NbVS;
       }
       else if(!strcmp($1, "TS")){
-	ViewElementIdx = 14; ViewNumNodes = 4; ViewNumComp = 9;
-	ViewValueList = View->TS; ViewNumList = &View->NbTS;
+	ViewValueList = ViewData->TS; ViewNumList = &ViewData->NbTS;
       }
       else if(!strcmp($1, "SH")){
-	ViewElementIdx = 15; ViewNumNodes = 8; ViewNumComp = 1;
-	ViewValueList = View->SH; ViewNumList = &View->NbSH;
+	ViewValueList = ViewData->SH; ViewNumList = &ViewData->NbSH;
       }
       else if(!strcmp($1, "VH")){
-	ViewElementIdx = 16; ViewNumNodes = 8; ViewNumComp = 3;
-	ViewValueList = View->VH; ViewNumList = &View->NbVH;
+	ViewValueList = ViewData->VH; ViewNumList = &ViewData->NbVH;
       }
       else if(!strcmp($1, "TH")){
-	ViewElementIdx = 17; ViewNumNodes = 8; ViewNumComp = 9;
-	ViewValueList = View->TH; ViewNumList = &View->NbTH;
+	ViewValueList = ViewData->TH; ViewNumList = &ViewData->NbTH;
       }
       else if(!strcmp($1, "SI")){
-	ViewElementIdx = 18; ViewNumNodes = 6; ViewNumComp = 1;
-	ViewValueList = View->SI; ViewNumList = &View->NbSI;
+	ViewValueList = ViewData->SI; ViewNumList = &ViewData->NbSI;
       }
       else if(!strcmp($1, "VI")){
-	ViewElementIdx = 19; ViewNumNodes = 6; ViewNumComp = 3;
-	ViewValueList = View->VI; ViewNumList = &View->NbVI;
+	ViewValueList = ViewData->VI; ViewNumList = &ViewData->NbVI;
       }
       else if(!strcmp($1, "TI")){
-	ViewElementIdx = 20; ViewNumNodes = 6; ViewNumComp = 9;
-	ViewValueList = View->TI; ViewNumList = &View->NbTI;
+	ViewValueList = ViewData->TI; ViewNumList = &ViewData->NbTI;
       }
       else if(!strcmp($1, "SY")){
-	ViewElementIdx = 21; ViewNumNodes = 5; ViewNumComp = 1;
-	ViewValueList = View->SY; ViewNumList = &View->NbSY;
+	ViewValueList = ViewData->SY; ViewNumList = &ViewData->NbSY;
       }
       else if(!strcmp($1, "VY")){
-	ViewElementIdx = 22; ViewNumNodes = 5; ViewNumComp = 3;
-	ViewValueList = View->VY; ViewNumList = &View->NbVY;
+	ViewValueList = ViewData->VY; ViewNumList = &ViewData->NbVY;
       }
       else if(!strcmp($1, "TY")){
-	ViewElementIdx = 23; ViewNumNodes = 5; ViewNumComp = 9;
-	ViewValueList = View->TY; ViewNumList = &View->NbTY;
+	ViewValueList = ViewData->TY; ViewNumList = &ViewData->NbTY;
       }
       else if(!strcmp($1, "SL2")){
-	ViewElementIdx = 3; ViewNumNodes = 3; ViewNumComp = 1;
-	ViewValueList = View->SL2; ViewNumList = &View->NbSL2;
+	ViewValueList = ViewData->SL2; ViewNumList = &ViewData->NbSL2;
       }
       else if(!strcmp($1, "VL2")){
-	ViewElementIdx = 4; ViewNumNodes = 3; ViewNumComp = 3;
-	ViewValueList = View->VL2; ViewNumList = &View->NbVL2;
+	ViewValueList = ViewData->VL2; ViewNumList = &ViewData->NbVL2;
       }
       else if(!strcmp($1, "TL2")){
-	ViewElementIdx = 5; ViewNumNodes = 3; ViewNumComp = 9;
-	ViewValueList = View->TL2; ViewNumList = &View->NbTL2;
+	ViewValueList = ViewData->TL2; ViewNumList = &ViewData->NbTL2;
       }
       else if(!strcmp($1, "ST2")){
-	ViewElementIdx = 6; ViewNumNodes = 6; ViewNumComp = 1;
-	ViewValueList = View->ST2; ViewNumList = &View->NbST2;
+	ViewValueList = ViewData->ST2; ViewNumList = &ViewData->NbST2;
       }
       else if(!strcmp($1, "VT2")){
-	ViewElementIdx = 7; ViewNumNodes = 6; ViewNumComp = 3;
-	ViewValueList = View->VT2; ViewNumList = &View->NbVT2;
+	ViewValueList = ViewData->VT2; ViewNumList = &ViewData->NbVT2;
       }
       else if(!strcmp($1, "TT2")){
-	ViewElementIdx = 8; ViewNumNodes = 6; ViewNumComp = 9;
-	ViewValueList = View->TT2; ViewNumList = &View->NbTT2;
+	ViewValueList = ViewData->TT2; ViewNumList = &ViewData->NbTT2;
       }
       else if(!strcmp($1, "SQ2")){
-	ViewElementIdx = 9; ViewNumNodes = 9; ViewNumComp = 1;
-	ViewValueList = View->SQ2; ViewNumList = &View->NbSQ2;
+	ViewValueList = ViewData->SQ2; ViewNumList = &ViewData->NbSQ2;
       }
       else if(!strcmp($1, "VQ2")){
-	ViewElementIdx = 10; ViewNumNodes = 9; ViewNumComp = 3;
-	ViewValueList = View->VQ2; ViewNumList = &View->NbVQ2;
+	ViewValueList = ViewData->VQ2; ViewNumList = &ViewData->NbVQ2;
       }
       else if(!strcmp($1, "TQ2")){
-	ViewElementIdx = 11; ViewNumNodes = 9; ViewNumComp = 9;
-	ViewValueList = View->TQ2; ViewNumList = &View->NbTQ2;
+	ViewValueList = ViewData->TQ2; ViewNumList = &ViewData->NbTQ2;
       }
       else if(!strcmp($1, "SS2")){
-	ViewElementIdx = 12; ViewNumNodes = 10; ViewNumComp = 1;
-	ViewValueList = View->SS2; ViewNumList = &View->NbSS2;
+	ViewValueList = ViewData->SS2; ViewNumList = &ViewData->NbSS2;
       }
       else if(!strcmp($1, "VS2")){
-	ViewElementIdx = 13; ViewNumNodes = 10; ViewNumComp = 3;
-	ViewValueList = View->VS2; ViewNumList = &View->NbVS2;
+	ViewValueList = ViewData->VS2; ViewNumList = &ViewData->NbVS2;
       }
       else if(!strcmp($1, "TS2")){
-	ViewElementIdx = 14; ViewNumNodes = 10; ViewNumComp = 9;
-	ViewValueList = View->TS2; ViewNumList = &View->NbTS2;
+	ViewValueList = ViewData->TS2; ViewNumList = &ViewData->NbTS2;
       }
       else if(!strcmp($1, "SH2")){
-	ViewElementIdx = 15; ViewNumNodes = 27; ViewNumComp = 1;
-	ViewValueList = View->SH2; ViewNumList = &View->NbSH2;
+	ViewValueList = ViewData->SH2; ViewNumList = &ViewData->NbSH2;
       }
       else if(!strcmp($1, "VH2")){
-	ViewElementIdx = 16; ViewNumNodes = 27; ViewNumComp = 3;
-	ViewValueList = View->VH2; ViewNumList = &View->NbVH2;
+	ViewValueList = ViewData->VH2; ViewNumList = &ViewData->NbVH2;
       }
       else if(!strcmp($1, "TH2")){
-	ViewElementIdx = 17; ViewNumNodes = 27; ViewNumComp = 9;
-	ViewValueList = View->TH2; ViewNumList = &View->NbTH2;
+	ViewValueList = ViewData->TH2; ViewNumList = &ViewData->NbTH2;
       }
       else if(!strcmp($1, "SI2")){
-	ViewElementIdx = 18; ViewNumNodes = 18; ViewNumComp = 1;
-	ViewValueList = View->SI2; ViewNumList = &View->NbSI2;
+	ViewValueList = ViewData->SI2; ViewNumList = &ViewData->NbSI2;
       }
       else if(!strcmp($1, "VI2")){
-	ViewElementIdx = 19; ViewNumNodes = 18; ViewNumComp = 3;
-	ViewValueList = View->VI2; ViewNumList = &View->NbVI2;
+	ViewValueList = ViewData->VI2; ViewNumList = &ViewData->NbVI2;
       }
       else if(!strcmp($1, "TI2")){
-	ViewElementIdx = 20; ViewNumNodes = 18; ViewNumComp = 9;
-	ViewValueList = View->TI2; ViewNumList = &View->NbTI2;
+	ViewValueList = ViewData->TI2; ViewNumList = &ViewData->NbTI2;
       }
       else if(!strcmp($1, "SY2")){
-	ViewElementIdx = 21; ViewNumNodes = 14; ViewNumComp = 1;
-	ViewValueList = View->SY2; ViewNumList = &View->NbSY2;
+	ViewValueList = ViewData->SY2; ViewNumList = &ViewData->NbSY2;
       }
       else if(!strcmp($1, "VY2")){
-	ViewElementIdx = 22; ViewNumNodes = 14; ViewNumComp = 3;
-	ViewValueList = View->VY2; ViewNumList = &View->NbVY2;
+	ViewValueList = ViewData->VY2; ViewNumList = &ViewData->NbVY2;
       }
       else if(!strcmp($1, "TY2")){
-	ViewElementIdx = 23; ViewNumNodes = 14; ViewNumComp = 9;
-	ViewValueList = View->TY2; ViewNumList = &View->NbTY2;
+	ViewValueList = ViewData->TY2; ViewNumList = &ViewData->NbTY2;
       }
       else{
 	yymsg(GERROR, "Unknown element type '%s'", $1);	
-	ViewElementIdx = -1; ViewNumNodes = 0; ViewNumComp = 0;
-	ViewValueList = NULL; ViewNumList = NULL;
+	ViewValueList = 0; ViewNumList = 0;
       }
       Free($1);
       ViewCoordIdx = 0;
@@ -494,36 +448,26 @@ Element :
     '(' ElementCoords ')'
     {
       if(ViewValueList){
-	if(ViewCoordIdx != 3 * ViewNumNodes){
- 	  // yymsg(GERROR, "Wrong number of node coordinates (%d != %d)", 
-	  //       ViewCoordIdx, 3 * ViewNumNodes);
-	  ViewNumNodes = ViewCoordIdx/3;
-	}
 	for(int i = 0; i < 3; i++)
-	  for(int j = 0; j < ViewNumNodes; j++)
-	    List_Add(ViewValueList, &ViewCoord[3*j+i]);
-	ViewNumListTmp = List_Nbr(ViewValueList);
+	  for(int j = 0; j < ViewCoordIdx / 3; j++)
+	    List_Add(ViewValueList, &ViewCoord[3 * j + i]);
       }
     }
     '{' ElementValues '}' tEND
     {
-      if(ViewValueList){  
-	if((List_Nbr(ViewValueList) - ViewNumListTmp) % (ViewNumComp * ViewCoordIdx/3)) 
-	  ViewErrorFlags[ViewElementIdx]++;
-	(*ViewNumList)++;
-      }
+      if(ViewValueList) (*ViewNumList)++;
     }
 ;
 
 Text2DValues :
     StringExprVar
     { 
-      for(int i = 0; i < (int)strlen($1)+1; i++) List_Add(View->T2C, &$1[i]); 
+      for(int i = 0; i < (int)strlen($1)+1; i++) List_Add(ViewData->T2C, &$1[i]); 
       Free($1);
     }
   | Text2DValues ',' StringExprVar
     { 
-      for(int i = 0; i < (int)strlen($3)+1; i++) List_Add(View->T2C, &$3[i]); 
+      for(int i = 0; i < (int)strlen($3)+1; i++) List_Add(ViewData->T2C, &$3[i]); 
       Free($3);
     }
 ;
@@ -531,26 +475,27 @@ Text2DValues :
 Text2D : 
     tText2D '(' FExpr ',' FExpr ',' FExpr ')'
     { 
-      List_Add(View->T2D, &$3); List_Add(View->T2D, &$5);
-      List_Add(View->T2D, &$7); 
-      double d = List_Nbr(View->T2C);
-      List_Add(View->T2D, &d); 
+      List_Add(ViewData->T2D, &$3); 
+      List_Add(ViewData->T2D, &$5);
+      List_Add(ViewData->T2D, &$7); 
+      double d = List_Nbr(ViewData->T2C);
+      List_Add(ViewData->T2D, &d); 
     }
     '{' Text2DValues '}' tEND
     {
-      View->NbT2++;
+      ViewData->NbT2++;
     }
 ;
 
 Text3DValues :
     StringExprVar
     { 
-      for(int i = 0; i < (int)strlen($1)+1; i++) List_Add(View->T3C, &$1[i]); 
+      for(int i = 0; i < (int)strlen($1)+1; i++) List_Add(ViewData->T3C, &$1[i]); 
       Free($1);
     }
   | Text3DValues ',' StringExprVar
     { 
-      for(int i = 0; i < (int)strlen($3)+1; i++) List_Add(View->T3C, &$3[i]); 
+      for(int i = 0; i < (int)strlen($3)+1; i++) List_Add(ViewData->T3C, &$3[i]); 
       Free($3);
     }
 ;
@@ -558,14 +503,14 @@ Text3DValues :
 Text3D : 
     tText3D '(' FExpr ',' FExpr ',' FExpr ',' FExpr ')'
     { 
-      List_Add(View->T3D, &$3); List_Add(View->T3D, &$5);
-      List_Add(View->T3D, &$7); List_Add(View->T3D, &$9); 
-      double d = List_Nbr(View->T3C);
-      List_Add(View->T3D, &d); 
+      List_Add(ViewData->T3D, &$3); List_Add(ViewData->T3D, &$5);
+      List_Add(ViewData->T3D, &$7); List_Add(ViewData->T3D, &$9); 
+      double d = List_Nbr(ViewData->T3C);
+      List_Add(ViewData->T3D, &d); 
     }
     '{' Text3DValues '}' tEND
     {
-      View->NbT3++;
+      ViewData->NbT3++;
     }
 ;
 
@@ -573,34 +518,29 @@ InterpolationMatrix :
     tInterpolationScheme '{' RecursiveListOfListOfDouble '}' 
                          '{' RecursiveListOfListOfDouble '}'  tEND
     {
-      View->adaptive = new Adaptive_Post_View(View, $3, $6);
+      yyerror("TODO: reinterface adaptive views");
+      //ViewData->adaptive = new Adaptive_Post_View(ViewData, $3, $6);
     }
  |  tInterpolationScheme '{' RecursiveListOfListOfDouble '}' 
                          '{' RecursiveListOfListOfDouble '}'  
                          '{' RecursiveListOfListOfDouble '}'  
                          '{' RecursiveListOfListOfDouble '}'  tEND
     {
-      View->adaptive = new Adaptive_Post_View(View, $3, $6, $9, $12);
+      yyerror("TODO: reinterface adaptive views");
+      //ViewData->adaptive = new Adaptive_Post_View(ViewData, $3, $6, $9, $12);
     }
 ;
 
 Time :
     tTime 
     {
-      ViewValueList = View->Time;
+      ViewValueList = ViewData->Time;
     }
    '{' ElementValues '}' tEND
     {
     }
 ;
 
-Grain :
-    tGrain '(' FExpr ')'  ListOfDouble  tEND
-    {
-      (*View->Grains) [(int)$3] = $5;
-    }
-;
-
 //  A F F E C T A T I O N
 
 NumericAffectation :
@@ -1113,11 +1053,11 @@ Shape :
     }
   | tPostView tField '(' FExpr ')' tAFFECT FExpr tEND 
     {
-      Post_View **vv = (Post_View **)List_Pointer_Test(CTX.post.list, (int)$7);
-      if(vv) 
-        fields.insert(new PostViewField(*vv), (int)$4);
+      int index = (int)$7;
+      if(index >= 0 && index < 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);
+        yymsg(GERROR, "Field %i error, view %i does not exist", (int)$4, (int)$7);
       // dummy values
       $$.Type = 0;
       $$.Num = 0;
@@ -1885,11 +1825,14 @@ Delete :
   | tDelete tSTRING '[' FExpr ']' tEND
     {
       if(!strcmp($2, "View")){
-	RemoveViewByIndex((int)$4);
+	int index = (int)$4;
+	if(index >= 0 && index < PView::list.size())
+	  delete PView::list[index];
+	else
+	  yymsg(GERROR, "Unknown view %d", index);
       }
-      else{
+      else
 	yymsg(GERROR, "Unknown command 'Delete %s'", $2);
-      }
       Free($2);
     }
   | tDelete tSTRING tEND
@@ -1903,23 +1846,18 @@ Delete :
 	List_Reset(THEM->PhysicalGroups);
 	GModel::current()->deletePhysicalGroups();
       }
-      else{
+      else
 	yymsg(GERROR, "Unknown command 'Delete %s'", $2);
-      }
       Free($2);
     }
   | tDelete tSTRING tSTRING tEND
     {
       if(!strcmp($2, "Empty") && !strcmp($3, "Views")){
-	for(int i = List_Nbr(CTX.post.list) - 1; i >= 0; i--){
-	  Post_View *v = *(Post_View **) List_Pointer(CTX.post.list, i);
-	  if(v->empty())
-	    RemoveViewByIndex(i);
-	}
+	for(int i = PView::list.size() - 1; i >= 0; i--)
+	  if(PView::list[i]->getData()->empty()) delete PView::list[i];
       }
-      else{
+      else
 	yymsg(GERROR, "Unknown command 'Delete %s %s'", $2, $3);
-      }
       Free($2); Free($3);
     }
 ;
@@ -2018,42 +1956,42 @@ Command :
 	FixRelativePath($2, tmpstring);
 	MergeFile(tmpstring, 1);
       }
-      else if(!strcmp($1, "System")){
+      else if(!strcmp($1, "System"))
 	SystemCall($2);
-      }
-      else{
+      else
 	yymsg(GERROR, "Unknown command '%s'", $1);
-      }
       Free($1); Free($2);
     } 
   | tSTRING tSTRING '[' FExpr ']' StringExprVar tEND
     {
       if(!strcmp($1, "Save") && !strcmp($2, "View")){
-	Post_View **vv = (Post_View **)List_Pointer_Test(CTX.post.list, (int)$4);
-	if(vv){
+	int index = (int)$4;
+	if(index >= 0 && index < PView::list.size()){
 	  char tmpstring[1024];
 	  FixRelativePath($6, tmpstring);
-	  WriteView(*vv, tmpstring, CTX.post.file_format, 0);
+	  PView::list[index]->write(tmpstring, CTX.post.file_format);
 	}
+	else
+	  yymsg(GERROR, "Unknown view %d", index);
       }
-      else{
+      else
 	yymsg(GERROR, "Unknown command '%s'", $1);
-      }
       Free($1); Free($2); Free($6);
     }
   | tSTRING tSTRING tSTRING '[' FExpr ']' tEND
     {
       if(!strcmp($1, "Background") && !strcmp($2, "Mesh")  && !strcmp($3, "View")){
-	Post_View **vv = (Post_View **)List_Pointer_Test(CTX.post.list, (int)$5);
-	if(vv){
-	  Field *field = new PostViewField(*vv);
+	int index = (int)$5;
+	if(index >= 0 && index < PView::list.size()){
+	  Field *field = new PostViewField(PView::list[index]);
 	  fields.insert(field);
 	  BGMAddField(field);
 	}
+	else
+	  yymsg(GERROR, "Unknown view %d", index);
       }
-      else{
+      else
 	yymsg(GERROR, "Unknown command '%s'", $1);
-      }
       Free($1); Free($2); Free($3);
     }
   | tSTRING FExpr tEND
@@ -2071,9 +2009,8 @@ Command :
       else if(!strcmp($1, "Status")){
 	yymsg(GERROR, "Mesh directives are not (yet) allowed in scripts");
       }
-      else{
+      else
 	yymsg(GERROR, "Unknown command '%s'", $1);
-      }
       Free($1);
     }
    | tPlugin '(' tSTRING ')' '.' tSTRING tEND
@@ -2089,21 +2026,21 @@ Command :
    | tCombine tSTRING tEND
     {
       if(!strcmp($2, "ElementsFromAllViews"))
-	CombineViews(0, 1, CTX.post.combine_remove_orig);
+	PView::combine(false, 1, CTX.post.combine_remove_orig);
       else if(!strcmp($2, "ElementsFromVisibleViews"))
-	CombineViews(0, 0, CTX.post.combine_remove_orig);
+	PView::combine(false, 0, CTX.post.combine_remove_orig);
       else if(!strcmp($2, "ElementsByViewName"))
-	CombineViews(0, 2, CTX.post.combine_remove_orig);
+	PView::combine(false, 2, CTX.post.combine_remove_orig);
       else if(!strcmp($2, "TimeStepsFromAllViews"))
-	CombineViews(1, 1, CTX.post.combine_remove_orig);
+	PView::combine(true, 1, CTX.post.combine_remove_orig);
       else if(!strcmp($2, "TimeStepsFromVisibleViews"))
-	CombineViews(1, 0, CTX.post.combine_remove_orig);
+	PView::combine(true, 0, CTX.post.combine_remove_orig);
       else if(!strcmp($2, "TimeStepsByViewName"))
-	CombineViews(1, 2, CTX.post.combine_remove_orig);
+	PView::combine(true, 2, CTX.post.combine_remove_orig);
       else if(!strcmp($2, "Views"))
-	CombineViews(0, 1, CTX.post.combine_remove_orig);
+	PView::combine(false, 1, CTX.post.combine_remove_orig);
       else if(!strcmp($2, "TimeSteps"))
-	CombineViews(1, 2, CTX.post.combine_remove_orig);
+	PView::combine(true, 2, CTX.post.combine_remove_orig);
       else
 	yymsg(GERROR, "Unknown 'Combine' command");
       Free($2);
@@ -2179,9 +2116,8 @@ Loop :
 	List_Put(TheSymbol.val, 0, &$5);
 	Tree_Add(Symbol_T, &TheSymbol);
       }
-      else{
+      else
 	List_Write(pSymbol->val, 0, &$5);
-      }
       fgetpos(yyin, &yyposImbricatedLoopsTab[ImbricatedLoop]);
       yylinenoImbricatedLoopsTab[ImbricatedLoop] = yylineno;
       ImbricatedLoop++;
@@ -2205,9 +2141,8 @@ Loop :
 	List_Put(TheSymbol.val, 0, &$5);
 	Tree_Add(Symbol_T, &TheSymbol);
       }
-      else{
+      else
 	List_Write(pSymbol->val, 0, &$5);
-      }
       fgetpos(yyin, &yyposImbricatedLoopsTab[ImbricatedLoop]);
       yylinenoImbricatedLoopsTab[ImbricatedLoop] = yylineno;
       ImbricatedLoop++;
@@ -2245,9 +2180,8 @@ Loop :
 	  fsetpos(yyin, &yyposImbricatedLoopsTab[ImbricatedLoop-1]);
 	  yylineno = yylinenoImbricatedLoopsTab[ImbricatedLoop-1];
 	}
-	else{
+	else
 	  ImbricatedLoop--;
-	}
       }
     }
   | tFunction tSTRING
@@ -2567,10 +2501,8 @@ ExtrudeParameter :
 	  extr.mesh.hLayer.push_back(d);
 	}
       }
-      else{
-	yymsg(GERROR, "Wrong layer definition {%d, %d}", 
-	      List_Nbr($3), List_Nbr($5));
-      }
+      else
+	yymsg(GERROR, "Wrong layer definition {%d, %d}", List_Nbr($3), List_Nbr($5));
       List_Delete($3);
       List_Delete($5);
     }
@@ -2590,10 +2522,9 @@ ExtrudeParameter :
 	  extr.mesh.hLayer.push_back(d);
 	}
       }
-      else{
-	yymsg(GERROR, "Wrong layer definition {%d, %d, %d}", 
-	      List_Nbr($3), List_Nbr($5), List_Nbr($7));
-      }
+      else
+	yymsg(GERROR, "Wrong layer definition {%d, %d, %d}", List_Nbr($3), 
+	      List_Nbr($5), List_Nbr($7));
       List_Delete($3);
       List_Delete($5);
       List_Delete($7);
@@ -2990,9 +2921,8 @@ FExpr_Single :
 	yymsg(GERROR, "Unknown variable '%s'", $2);
 	$$ = 0.;
       }
-      else{
+      else
 	$$ = List_Nbr(pSymbol->val);
-      }
       Free($2);
     }
   | tSTRING NumericIncrement
@@ -3382,9 +3312,8 @@ ColorExpr :
 	  yymsg(GERROR, "Unknown color option '%s.Color.%s'", $1, $5);
 	  $$ = 0;
 	}
-	else{
+	else
 	  $$ = pColOpt(0, GMSH_GET, 0);
-	}
       }
       Free($1); Free($5);
     }
@@ -3596,36 +3525,14 @@ int PrintListOfDouble(char *format, List_T *list, char *buffer){
 	strcat(buffer, tmp2);
       }
     }
-    else{
+    else
       return List_Nbr(list)-i;
-    }
   }
   if(j != (int)strlen(format))
     return -1;
   return 0;
 }
 
-int CheckViewErrorFlags(Post_View *v){
-  if(View->adaptive) return 0; // hope for the best :-)
-
-  char *name[8] = { "point", "line", "triangle", "quadrangle", 
-		    "tetrahedron", "hexahedron", "prism", "pyramid" };
-  char *type[3] = { "scalar", "vector", "tensor" };
-
-  if(8 * 3 != VIEW_NB_ELEMENT_TYPES){
-    Msg(GERROR, "Please upgrade CheckViewErrorFlags!");
-    return 0;
-  }
-  
-  for(int i = 0; i < VIEW_NB_ELEMENT_TYPES; i++)
-    if(ViewErrorFlags[i])
-      Msg(GERROR, "%d %s %s%s in View[%d] contain%s a wrong number of values",
-	  ViewErrorFlags[i], type[i%3], name[i/3], (ViewErrorFlags[i] > 1) ? "s" : "",
-	  v->Index, (ViewErrorFlags[i] > 1) ? "" : "s");
-  
-  return 0;
-}
-
 void yyerror(char *s){
   Msg(GERROR, "'%s', line %d : %s (%s)", yyname, yylineno-1, s, yytext);
   yyerrorstate++;
diff --git a/Parser/Gmsh.yy.cpp b/Parser/Gmsh.yy.cpp
index c554fddbb0884e88d1f1ee89ba85950d08a03c8a..8f8cf6f1b26a06f6c83150330429b148167036c9 100644
--- a/Parser/Gmsh.yy.cpp
+++ b/Parser/Gmsh.yy.cpp
@@ -2,7 +2,7 @@
 /* A lexical scanner generated by flex */
 
 /* Scanner skeleton version:
- * $Header: /cvsroot/gmsh/Parser/Gmsh.yy.cpp,v 1.330 2007-09-09 00:18:04 geuzaine Exp $
+ * $Header: /cvsroot/gmsh/Parser/Gmsh.yy.cpp,v 1.331 2007-09-10 04:47:06 geuzaine Exp $
  */
 
 #define FLEX_SCANNER
@@ -283,81 +283,80 @@ static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
 	*yy_cp = '\0'; \
 	yy_c_buf_p = yy_cp;
 
-#define YY_NUM_RULES 150
-#define YY_END_OF_BUFFER 151
-static yyconst short int yy_accept[644] =
+#define YY_NUM_RULES 149
+#define YY_END_OF_BUFFER 150
+static yyconst short int yy_accept[640] =
     {   0,
-        0,    0,  151,  149,    1,    1,  149,    5,  149,    6,
-      149,  149,  149,  149,  149,  144,   20,    2,  149,   15,
-      149,  148,  148,  148,  148,  148,  148,  148,  148,  148,
-      148,  148,  148,  148,  148,  148,  148,  148,  148,  148,
-      148,  148,  148,  149,   27,   23,   18,   24,   16,   25,
-       17,    0,  146,    3,    4,   19,  145,  144,    0,   28,
-       26,   29,  148,  148,  148,  148,  148,  148,  148,  148,
-      148,  148,  148,  148,  148,  148,  148,  148,  148,  148,
-      148,  148,  148,  148,  148,  148,  148,  148,  148,  148,
-      148,  148,  148,  148,  148,  148,  148,  148,  148,   87,
-
-       86,  148,  148,  148,  148,  148,  148,  148,  148,  148,
-      148,  148,  103,  148,  148,  148,  148,  148,  148,  148,
-      148,  148,  148,  148,  148,  148,  148,  139,  140,  148,
-      148,  148,  148,  148,  148,  148,  148,   22,   21,    0,
-      145,    0,    0,  147,  148,  148,  148,  148,  148,  148,
-      148,  148,  148,  148,  148,  148,  148,  148,  148,  148,
-      148,  148,  148,   51,  148,  148,  148,  148,  148,  148,
-      148,  148,   63,  148,  148,  148,  148,  148,   76,  148,
-      148,  148,  148,  148,  148,  148,  148,  148,  148,  148,
-      148,  148,  148,  148,   94,  148,  148,  148,  148,  148,
-
-      148,  148,  148,  148,  148,  148,  148,  148,  148,  148,
-      148,  148,  148,  148,  148,  148,  118,  148,  148,  148,
-      148,  148,  148,  148,  148,  133,  148,  148,  148,  148,
-      148,  148,    0,  146,    0,    0,  145,   30,  148,  148,
-      148,  148,   34,   36,  148,  148,  148,  148,   43,   58,
-      148,   46,  148,  148,  148,  148,  148,  148,  148,   50,
-      148,  148,   62,  148,  148,  148,  148,  148,   71,  148,
-       72,  148,  148,   75,  148,  148,  148,  148,   79,   83,
-       84,  148,  148,  148,  148,  148,  148,  148,   92,  148,
-       93,  148,  148,  148,  148,  148,  148,  148,  148,  148,
-
-      148,  148,  148,  148,  148,  115,  148,  148,  148,  148,
-      129,  119,  148,  148,  148,  117,  148,  148,  148,  148,
-      148,  148,  142,  132,  148,  148,  148,  148,  148,   10,
-        9,    8,  148,   12,   14,    0,  145,   32,  148,  148,
-      148,   38,  148,  148,  148,  148,  148,  148,  148,  148,
-       54,  148,  148,  148,  148,  148,  148,  148,  148,   69,
-      148,  148,   73,   74,  148,  148,  143,  148,   85,  148,
-      148,   89,  148,  148,  148,   95,  148,  148,  148,  100,
-      101,  148,  148,  104,  148,  105,  148,  148,  106,  148,
-      148,  148,  148,  148,  114,  148,  148,  148,  148,  148,
-
-      148,  148,  148,  148,  148,  135,  148,  136,  148,   11,
-      148,   13,  148,   31,   35,   37,  148,  148,   41,  148,
-      148,  148,  148,   47,  148,  148,  148,  148,  148,   59,
-       60,  148,  148,  148,   68,  148,  148,  148,  148,  148,
-      148,  148,  148,   90,   96,   91,  148,  148,   97,  148,
-      148,  111,  148,  148,  110,  148,  148,  116,  113,  120,
-      121,  148,  125,  148,  148,  148,  148,  148,  148,  148,
-      148,  137,    7,  148,   39,  148,   44,  148,  148,  148,
-      148,  148,  148,   49,   53,  148,  148,   65,  148,  148,
-      148,   66,  148,  148,  148,  148,  148,  148,  148,  148,
-
-      148,  148,  148,  148,  148,  148,  148,  124,  148,  148,
-      148,  122,  148,  148,  148,  148,  148,  148,   42,  148,
-      148,  148,  148,  148,  148,  148,   64,   67,  148,   77,
-      148,  148,  148,   78,  148,  148,   98,   99,  148,  102,
-      148,  138,  148,  148,  148,  148,  148,  123,  148,  148,
-      148,  148,   40,  148,  148,  148,   48,  148,  148,   61,
-       70,  148,  148,  148,  148,   88,  148,  148,  148,  112,
-      126,  148,  148,  134,  148,  131,  148,  148,   57,  148,
-       55,  148,  148,  148,  148,  148,  108,  148,  148,  148,
-      128,  148,  148,   45,  148,   56,  148,  148,  148,  148,
-
-      109,  107,  127,  130,  148,  148,  148,  148,  148,  148,
-      148,  148,  148,  148,  148,  148,  148,   52,  148,  148,
-      148,  148,  148,  148,  148,  148,  148,   33,  148,  148,
-      148,  148,  148,  148,  148,  148,   80,   81,   82,  148,
-      148,  141,    0
+        0,    0,  150,  148,    1,    1,  148,    5,  148,    6,
+      148,  148,  148,  148,  148,  143,   20,    2,  148,   15,
+      148,  147,  147,  147,  147,  147,  147,  147,  147,  147,
+      147,  147,  147,  147,  147,  147,  147,  147,  147,  147,
+      147,  147,  147,  148,   27,   23,   18,   24,   16,   25,
+       17,    0,  145,    3,    4,   19,  144,  143,    0,   28,
+       26,   29,  147,  147,  147,  147,  147,  147,  147,  147,
+      147,  147,  147,  147,  147,  147,  147,  147,  147,  147,
+      147,  147,  147,  147,  147,  147,  147,  147,  147,  147,
+      147,  147,  147,  147,  147,  147,  147,  147,   87,   86,
+
+      147,  147,  147,  147,  147,  147,  147,  147,  147,  147,
+      147,  103,  147,  147,  147,  147,  147,  147,  147,  147,
+      147,  147,  147,  147,  147,  147,  139,  140,  147,  147,
+      147,  147,  147,  147,  147,  147,   22,   21,    0,  144,
+        0,    0,  146,  147,  147,  147,  147,  147,  147,  147,
+      147,  147,  147,  147,  147,  147,  147,  147,  147,  147,
+      147,  147,   51,  147,  147,  147,  147,  147,  147,  147,
+      147,   63,  147,  147,  147,  147,  147,   76,  147,  147,
+      147,  147,  147,  147,  147,  147,  147,  147,  147,  147,
+      147,  147,   94,  147,  147,  147,  147,  147,  147,  147,
+
+      147,  147,  147,  147,  147,  147,  147,  147,  147,  147,
+      147,  147,  147,  147,  118,  147,  147,  147,  147,  147,
+      147,  147,  147,  133,  147,  147,  147,  147,  147,  147,
+        0,  145,    0,    0,  144,   30,  147,  147,  147,  147,
+       34,   36,  147,  147,  147,  147,   43,   58,  147,   46,
+      147,  147,  147,  147,  147,  147,  147,   50,  147,  147,
+       62,  147,  147,  147,  147,  147,   71,  147,   72,  147,
+      147,   75,  147,  147,  147,   79,   83,   84,  147,  147,
+      147,  147,  147,  147,  147,   92,  147,   93,  147,  147,
+      147,  147,  147,  147,  147,  147,  147,  147,  147,  147,
+
+      147,  147,  115,  147,  147,  147,  147,  129,  119,  147,
+      147,  147,  117,  147,  147,  147,  147,  147,  147,  142,
+      132,  147,  147,  147,  147,  147,   10,    9,    8,  147,
+       12,   14,    0,  144,   32,  147,  147,  147,   38,  147,
+      147,  147,  147,  147,  147,  147,  147,   54,  147,  147,
+      147,  147,  147,  147,  147,  147,   69,  147,  147,   73,
+       74,  147,  147,  147,   85,  147,  147,   89,  147,  147,
+      147,   95,  147,  147,  147,  100,  101,  147,  147,  104,
+      147,  105,  147,  147,  106,  147,  147,  147,  147,  147,
+      114,  147,  147,  147,  147,  147,  147,  147,  147,  147,
+
+      147,  135,  147,  136,  147,   11,  147,   13,  147,   31,
+       35,   37,  147,  147,   41,  147,  147,  147,  147,   47,
+      147,  147,  147,  147,  147,   59,   60,  147,  147,  147,
+       68,  147,  147,  147,  147,  147,  147,  147,  147,   90,
+       96,   91,  147,  147,   97,  147,  147,  111,  147,  147,
+      110,  147,  147,  116,  113,  120,  121,  147,  125,  147,
+      147,  147,  147,  147,  147,  147,  147,  137,    7,  147,
+       39,  147,   44,  147,  147,  147,  147,  147,  147,   49,
+       53,  147,  147,   65,  147,  147,  147,   66,  147,  147,
+      147,  147,  147,  147,  147,  147,  147,  147,  147,  147,
+
+      147,  147,  147,  124,  147,  147,  147,  122,  147,  147,
+      147,  147,  147,  147,   42,  147,  147,  147,  147,  147,
+      147,  147,   64,   67,  147,   77,  147,  147,  147,   78,
+      147,  147,   98,   99,  147,  102,  147,  138,  147,  147,
+      147,  147,  147,  123,  147,  147,  147,  147,   40,  147,
+      147,  147,   48,  147,  147,   61,   70,  147,  147,  147,
+      147,   88,  147,  147,  147,  112,  126,  147,  147,  134,
+      147,  131,  147,  147,   57,  147,   55,  147,  147,  147,
+      147,  147,  108,  147,  147,  147,  128,  147,  147,   45,
+      147,   56,  147,  147,  147,  147,  109,  107,  127,  130,
+
+      147,  147,  147,  147,  147,  147,  147,  147,  147,  147,
+      147,  147,  147,   52,  147,  147,  147,  147,  147,  147,
+      147,  147,  147,   33,  147,  147,  147,  147,  147,  147,
+      147,  147,   80,   81,   82,  147,  147,  141,    0
     } ;
 
 static yyconst int yy_ec[256] =
@@ -404,157 +403,155 @@ static yyconst int yy_meta[73] =
         2,    1
     } ;
 
-static yyconst short int yy_base[645] =
+static yyconst short int yy_base[641] =
     {   0,
-        0,    0,  765,  766,  766,  766,  743,  766,  757,  766,
-      741,   64,   65,   63,   75,   77,  766,  766,  740,  739,
-      738,   46,   48,   65,   66,   65,   80,   67,   45,   90,
-        0,  699,   92,   46,  691,  693,  101,   94,  108,  135,
-      691,  694,  702,  680,  766,  766,  766,  766,  766,  766,
-      766,  740,  170,  766,  766,  766,  177,  192,  201,  766,
-      766,  766,    0,  690,  694,  699,  692,  106,  685,  674,
-      678,  685,   79,  687,  694,  677,  166,  682,  681,  690,
-      675,  678,  684,  684,  170,  684,  680,  670,  669,  665,
-      668,  685,  702,  659,  676,  672,  664,  659,  677,    0,
-
-      653,  657,  102,  657,  656,  115,  683,  663,  649,  661,
-      647,  639,    0,   35,  172,  121,  649,   32,  642,  649,
-      645,  645,  184,  640,  639,  638,  642,    0,    0,  664,
-      639,  634,  646,  648,  639,  636,  624,  766,  766,  235,
-      240,  249,  255,  260,  627,  643,  171,  630,  629,  624,
-      629,  630,  625,  622,  625,  623,  623,  616,  629,  626,
-      616,  140,  612,  620,  622,  625,  603,  613,  614,  149,
-      611,  602,    0,  603,  601,  607,  603,  612,    0,  612,
-      630,  628,  614,  607,  605,  604,  594,  626,  601,  586,
-      616,  598,  595,  596,  632,  584,  598,  577,  594,  590,
-
-      593,  575,  579,  584,  577,  588,  569,  582,  573,  578,
-      580,  569,  562,  580,  575,  557,  570,  572,  567,  566,
-      555,  254,  567,  560,  590,  562,  564,  567,  554,  553,
-      545,  232,  269,  287,  296,  301,  308,    0,  546,  549,
-      553,  560,    0,  591,  558,  549,  552,  552,    0,    0,
-      535,    0,  553,  542,  535,  534,  541,  538,  544,    0,
-      528,  527,    0,  536,  529,  529,  536,  532,    0,  520,
-        0,  535,  521,    0,  518,  536,  545,  533,    0,    0,
-        0,  514,  538,  514,  512,  515,  511,  508,    0,  559,
-        0,  159,  514,  506,  506,  510,  512,  515,  510,  499,
-
-      500,  518,  498,  495,  496,    0,  500,  494,  491,  505,
-        0,    0,  491,  494,  493,    0,  504,  487,  498,  499,
-      500,  495,    0,    0,  481,  474,  479,  489,  483,    0,
-      483,    0,  488,  481,    0,  313,  318,  492,  472,  476,
-      475,    0,  484,  473,  468,  110,  473,  480,  477,  476,
-      484,  466,  473,  468,  471,  470,  471,  168,  456,    0,
-      468,  467,    0,    0,  461,  199,    0,  458,    0,  476,
-      449,    0,  453,  447,  456,    0,  462,  453,  447,    0,
-        0,  455,  456,    0,  445,    0,  462,  447,    0,  449,
-      449,  451,  439,  446,    0,  445,  444,  429,  428,  441,
-
-      434,  425,  440,  423,  433,    0,  284,    0,  435,    0,
-      432,    0,  429,    0,    0,  468,  417,  430,    0,  417,
-      420,  421,  412,    0,  417,  428,  423,  404,  413,    0,
-        0,  424,  191,  415,    0,  414,  417,  407,  257,  443,
-      399,  427,  412,    0,    0,    0,  403,  390,    0,  395,
-      412,    0,  397,  406,    0,  392,  400,    0,    0,    0,
-        0,  402,    0,  401,  405,  385,  399,  386,  388,  392,
-      399,    0,    0,  380,    0,  384,    0,  373,  389,  401,
-      389,  390,  390,    0,    0,  390,  371,    0,  371,  385,
-      386,    0,  373,  399,  394,  387,  377,  393,  377,  369,
-
-      373,  360,  365,  367,  352,  355,  359,    0,  362,  351,
-      352,    0,  344,  356,  353,  346,  356,  346,    0,  384,
-      347,  343,  354,  347,  338,  355,    0,    0,  342,    0,
-      363,  362,  373,    0,  374,  331,    0,    0,  340,    0,
-      343,    0,  338,  341,  322,  335,  338,    0,  338,  332,
-      335,  348,    0,  324,  325,  327,    0,  330,  329,    0,
-        0,  339,  338,  347,  334,    0,  326,  311,  313,    0,
-        0,  305,  321,    0,  305,    0,  308,  299,    0,  303,
-        0,  302,  319,  318,  317,  331,    0,  310,  301,  308,
-        0,  307,  292,    0,  291,    0,  311,  310,  309,  315,
-
-        0,    0,    0,    0,  296,  295,  322,  321,  320,  310,
-      285,  295,  303,  302,  300,  293,  279,    0,  296,  278,
-      267,  266,  234,  266,  259,  256,  253,    0,  224,  223,
-      202,  192,  166,  143,  123,  106,    0,    0,    0,   88,
-       86,    0,  766,   96
+        0,    0,  761,  762,  762,  762,  739,  762,  753,  762,
+      737,   64,   65,   63,   75,   77,  762,  762,  736,  735,
+      734,   46,   48,   65,   66,   65,   80,   67,   45,   90,
+        0,  695,   92,   46,  687,  689,  101,   94,  108,  135,
+      687,  690,  698,  676,  762,  762,  762,  762,  762,  762,
+      762,  736,  170,  762,  762,  762,  177,  192,  201,  762,
+      762,  762,    0,  686,  690,  695,  688,  106,  681,  670,
+      674,  681,   79,  683,  690,  673,  166,  678,  677,  686,
+      671,  674,  680,  680,  170,  680,  676,  666,  665,  661,
+      664,  681,  656,  673,  669,  661,  656,  674,    0,  650,
+
+      654,  102,  654,  653,  115,  680,  660,  646,  658,  644,
+      636,    0,   35,  172,  121,  646,   32,  639,  646,  642,
+      642,  184,  637,  636,  635,  639,    0,    0,  661,  636,
+      631,  643,  645,  636,  633,  621,  762,  762,  235,  240,
+      249,  255,  260,  624,  640,  171,  627,  626,  621,  626,
+      627,  622,  619,  622,  620,  620,  613,  626,  623,  613,
+      140,  609,  617,  619,  622,  600,  610,  611,  149,  608,
+      599,    0,  600,  598,  604,  600,  609,    0,  609,  627,
+      612,  605,  603,  602,  592,  624,  599,  584,  614,  596,
+      593,  594,  630,  582,  596,  575,  592,  588,  591,  573,
+
+      577,  582,  575,  586,  567,  580,  571,  576,  578,  567,
+      560,  578,  573,  555,  568,  570,  565,  564,  553,  254,
+      565,  558,  588,  560,  562,  565,  552,  551,  543,  232,
+      269,  287,  296,  301,  308,    0,  544,  547,  551,  558,
+        0,  589,  556,  547,  550,  550,    0,    0,  533,    0,
+      551,  540,  533,  532,  539,  536,  542,    0,  526,  525,
+        0,  534,  527,  527,  534,  530,    0,  518,    0,  533,
+      519,    0,  516,  534,  532,    0,    0,    0,  513,  537,
+      513,  511,  514,  510,  507,    0,  558,    0,  159,  513,
+      505,  505,  509,  511,  514,  509,  498,  499,  517,  497,
+
+      494,  495,    0,  499,  493,  490,  504,    0,    0,  490,
+      493,  492,    0,  503,  486,  497,  498,  499,  494,    0,
+        0,  480,  473,  478,  488,  482,    0,  482,    0,  487,
+      480,    0,  313,  318,  491,  471,  475,  474,    0,  483,
+      472,  467,  110,  472,  479,  476,  475,  483,  465,  472,
+      467,  470,  469,  470,  168,  455,    0,  467,  466,    0,
+        0,  460,  199,  457,    0,  475,  448,    0,  452,  446,
+      455,    0,  461,  452,  446,    0,    0,  454,  455,    0,
+      444,    0,  461,  446,    0,  448,  448,  450,  438,  445,
+        0,  444,  443,  428,  427,  440,  433,  424,  439,  422,
+
+      432,    0,  284,    0,  434,    0,  431,    0,  428,    0,
+        0,  467,  416,  429,    0,  416,  419,  420,  411,    0,
+      416,  427,  422,  403,  412,    0,    0,  423,  191,  414,
+        0,  413,  416,  406,  257,  442,  398,  426,  411,    0,
+        0,    0,  402,  389,    0,  394,  411,    0,  396,  405,
+        0,  391,  399,    0,    0,    0,    0,  401,    0,  400,
+      404,  384,  398,  385,  387,  391,  398,    0,    0,  379,
+        0,  383,    0,  372,  388,  400,  388,  389,  389,    0,
+        0,  389,  370,    0,  370,  384,  385,    0,  372,  398,
+      393,  386,  376,  392,  376,  368,  372,  359,  364,  366,
+
+      351,  354,  358,    0,  361,  350,  351,    0,  343,  355,
+      352,  345,  355,  345,    0,  383,  346,  342,  353,  346,
+      337,  354,    0,    0,  341,    0,  362,  361,  372,    0,
+      373,  330,    0,    0,  339,    0,  342,    0,  337,  340,
+      321,  334,  337,    0,  337,  331,  334,  347,    0,  323,
+      324,  326,    0,  329,  328,    0,    0,  338,  337,  346,
+      333,    0,  325,  310,  312,    0,    0,  304,  320,    0,
+      304,    0,  307,  298,    0,  302,    0,  301,  318,  317,
+      316,  330,    0,  309,  300,  307,    0,  306,  291,    0,
+      290,    0,  310,  309,  308,  314,    0,    0,    0,    0,
+
+      295,  294,  321,  320,  319,  309,  284,  294,  302,  300,
+      299,  292,  278,    0,  278,  267,  266,  257,  233,  259,
+      256,  247,  236,    0,  223,  202,  185,  172,  143,  123,
+       97,   96,    0,    0,    0,   78,   80,    0,  762,   96
     } ;
 
-static yyconst short int yy_def[645] =
+static yyconst short int yy_def[641] =
     {   0,
-      643,    1,  643,  643,  643,  643,  643,  643,  643,  643,
-      643,  643,  643,  643,  643,  643,  643,  643,  643,  643,
-      643,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  643,  643,  643,  643,  643,  643,  643,
-      643,  643,  643,  643,  643,  643,  643,  643,  643,  643,
-      643,  643,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  643,  643,  643,
-      643,  643,  643,  643,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  643,  643,  643,  643,  643,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  643,  643,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,  644,  644,  644,  644,  644,  644,  644,  644,
-      644,  644,    0,  643
+      639,    1,  639,  639,  639,  639,  639,  639,  639,  639,
+      639,  639,  639,  639,  639,  639,  639,  639,  639,  639,
+      639,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  639,  639,  639,  639,  639,  639,  639,
+      639,  639,  639,  639,  639,  639,  639,  639,  639,  639,
+      639,  639,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  639,  639,  639,  639,
+      639,  639,  639,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      639,  639,  639,  639,  639,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  639,  639,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,  640,  640,
+      640,  640,  640,  640,  640,  640,  640,  640,    0,  639
     } ;
 
-static yyconst short int yy_nxt[839] =
+static yyconst short int yy_nxt[835] =
     {   0,
         4,    5,    6,    7,    8,    9,   10,   11,   12,   13,
        14,   15,   16,   16,   16,   16,   16,   17,   18,   19,
@@ -564,93 +561,93 @@ static yyconst short int yy_nxt[839] =
        31,   31,   31,   31,   31,   31,   31,   31,   43,   31,
        31,   31,   31,   31,   31,   31,   31,   31,   31,   31,
        31,   44,   48,   52,   50,   53,   53,   53,   53,   53,
-      212,  203,   54,  107,   49,   51,   55,   57,   69,   58,
-       58,   58,   58,   58,   64,   56,  213,   63,   70,   96,
-
-      204,   92,   65,   59,   97,  108,   93,   71,   66,   67,
-       68,   73,  642,   72,   98,   74,   78,   94,   75,   76,
-       79,   82,  641,   83,   77,   99,   86,   59,   80,   95,
-       84,   81,  640,   85,   87,  155,   88,   89,  103,   90,
-      117,  100,  104,  156,  118,   91,  105,  111,  101,  128,
-      129,  106,  149,  119,  112,  113,  420,  114,  639,  120,
-      115,  121,  122,  116,  421,  130,  191,  195,  123,  124,
-      150,  192,  125,  126,  196,  209,  266,  127,  638,  267,
-      210,  131,   53,   53,   53,   53,   53,  257,  132,  141,
-      141,  141,  141,  141,  133,  240,  140,  134,  377,  378,
-
-      258,  637,   57,  142,   58,   58,   58,   58,   58,  143,
-      143,  241,  242,  144,  144,  144,  144,  144,   59,  160,
-      140,  636,  161,  162,  172,  163,  205,  142,  206,  164,
-      173,  433,  434,  439,  174,  207,  440,  218,  635,  208,
-      219,  488,   59,  233,  233,  489,  220,  234,  234,  234,
-      234,  234,  141,  141,  141,  141,  141,  236,  236,  634,
-      633,  237,  237,  237,  237,  237,  235,  144,  144,  144,
-      144,  144,  144,  144,  144,  144,  144,  632,  317,  494,
-      330,  234,  234,  234,  234,  234,  631,  495,  331,  630,
-      235,  318,  332,  319,  333,  334,  629,  628,  335,  234,
-
-      234,  234,  234,  234,  336,  336,  627,  626,  337,  337,
-      337,  337,  337,  237,  237,  237,  237,  237,  625,  320,
-      237,  237,  237,  237,  237,  337,  337,  337,  337,  337,
-      337,  337,  337,  337,  337,  470,  624,  623,  622,  621,
-      471,  620,  619,  618,  617,  616,  615,  614,  613,  612,
-      611,  610,  609,  608,  607,  606,  605,  604,  603,  602,
-      601,  600,  599,  598,  597,  596,  595,  594,  593,  592,
-      591,  590,  589,  588,  587,  586,  585,  584,  583,  582,
-      581,  580,  579,  578,  577,  576,  575,  574,  573,  572,
-      571,  570,  569,  568,  567,  566,  565,  564,  563,  562,
-
-      561,  560,  559,  558,  557,  556,  555,  554,  553,  552,
-      551,  550,  549,  548,  547,  546,  545,  544,  543,  542,
-      541,  540,  539,  538,  537,  536,  535,  534,  533,  532,
-      531,  530,  529,  528,  527,  526,  525,  524,  523,  522,
-      521,  520,  519,  518,  517,  516,  515,  514,  513,  512,
-      511,  510,  509,  508,  507,  506,  505,  504,  503,  502,
-      501,  500,  499,  498,  497,  496,  493,  492,  491,  490,
-      487,  486,  485,  484,  483,  482,  481,  480,  479,  478,
-      477,  476,  475,  474,  473,  472,  469,  468,  467,  466,
-      465,  464,  463,  462,  461,  460,  459,  458,  457,  456,
-
-      455,  454,  453,  452,  451,  450,  449,  448,  447,  446,
-      445,  444,  443,  442,  441,  438,  437,  436,  435,  432,
-      431,  430,  429,  428,  427,  426,  425,  424,  423,  422,
-      419,  418,  417,  416,  415,  414,  413,  412,  411,  410,
-      409,  408,  407,  406,  405,  404,  403,  402,  401,  400,
-      399,  398,  397,  396,  395,  394,  393,  392,  391,  390,
-      389,  388,  387,  386,  385,  384,  383,  382,  381,  380,
-      379,  376,  375,  374,  373,  372,  371,  370,  369,  368,
-      367,  366,  365,  364,  363,  362,  361,  360,  359,  358,
-      357,  356,  355,  354,  353,  352,  351,  350,  349,  348,
-
-      347,  346,  345,  344,  343,  342,  341,  340,  339,  338,
-      329,  328,  327,  326,  325,  324,  323,  322,  321,  316,
-      315,  314,  313,  312,  311,  310,  309,  308,  307,  306,
-      305,  304,  303,  302,  301,  300,  299,  298,  297,  296,
-      295,  294,  293,  292,  291,  290,  289,  288,  287,  286,
-      285,  284,  283,  282,  281,  280,  279,  278,  277,  276,
-      275,  274,  273,  272,  271,  270,  269,  268,  265,  264,
-      263,  262,  261,  260,  259,  256,  255,  254,  253,  252,
-      251,  250,  249,  248,  247,  246,  245,  244,  243,  239,
-      238,  232,  231,  230,  229,  228,  227,  226,  225,  224,
-
-      223,  222,  221,  217,  216,  215,  214,  211,  202,  201,
-      200,  199,  198,  197,  194,  193,  190,  189,  188,  187,
-      186,  185,  184,  183,  182,  181,  180,  179,  178,  177,
-      176,  175,  171,  170,  169,  168,  167,  166,  165,  159,
-      158,  157,  154,  153,  152,  151,  148,  147,  146,  145,
-      139,  138,  137,  136,  135,  110,  109,  102,   62,   61,
-       60,   47,   46,   45,  643,    3,  643,  643,  643,  643,
-      643,  643,  643,  643,  643,  643,  643,  643,  643,  643,
-      643,  643,  643,  643,  643,  643,  643,  643,  643,  643,
-      643,  643,  643,  643,  643,  643,  643,  643,  643,  643,
-
-      643,  643,  643,  643,  643,  643,  643,  643,  643,  643,
-      643,  643,  643,  643,  643,  643,  643,  643,  643,  643,
-      643,  643,  643,  643,  643,  643,  643,  643,  643,  643,
-      643,  643,  643,  643,  643,  643,  643,  643
+      210,  201,   54,  106,   49,   51,   55,   57,   69,   58,
+       58,   58,   58,   58,   64,   56,  211,   63,   70,   95,
+
+      202,   92,   65,   59,   96,  107,  638,   71,   66,   67,
+       68,   73,  637,   72,   97,   74,   78,   93,   75,   76,
+       79,   82,  636,   83,   77,   98,   86,   59,   80,   94,
+       84,   81,  635,   85,   87,  154,   88,   89,  102,   90,
+      116,   99,  103,  155,  117,   91,  104,  110,  100,  127,
+      128,  105,  148,  118,  111,  112,  416,  113,  634,  119,
+      114,  120,  121,  115,  417,  129,  189,  193,  122,  123,
+      149,  190,  124,  125,  194,  207,  264,  126,  633,  265,
+      208,  130,   53,   53,   53,   53,   53,  255,  131,  140,
+      140,  140,  140,  140,  132,  238,  139,  133,  373,  374,
+
+      256,  632,   57,  141,   58,   58,   58,   58,   58,  142,
+      142,  239,  240,  143,  143,  143,  143,  143,   59,  159,
+      139,  631,  160,  161,  171,  162,  203,  141,  204,  163,
+      172,  429,  430,  435,  173,  205,  436,  216,  630,  206,
+      217,  484,   59,  231,  231,  485,  218,  232,  232,  232,
+      232,  232,  140,  140,  140,  140,  140,  234,  234,  629,
+      628,  235,  235,  235,  235,  235,  233,  143,  143,  143,
+      143,  143,  143,  143,  143,  143,  143,  627,  314,  490,
+      327,  232,  232,  232,  232,  232,  626,  491,  328,  625,
+      233,  315,  329,  316,  330,  331,  624,  623,  332,  232,
+
+      232,  232,  232,  232,  333,  333,  622,  621,  334,  334,
+      334,  334,  334,  235,  235,  235,  235,  235,  620,  317,
+      235,  235,  235,  235,  235,  334,  334,  334,  334,  334,
+      334,  334,  334,  334,  334,  466,  619,  618,  617,  616,
+      467,  615,  614,  613,  612,  611,  610,  609,  608,  607,
+      606,  605,  604,  603,  602,  601,  600,  599,  598,  597,
+      596,  595,  594,  593,  592,  591,  590,  589,  588,  587,
+      586,  585,  584,  583,  582,  581,  580,  579,  578,  577,
+      576,  575,  574,  573,  572,  571,  570,  569,  568,  567,
+      566,  565,  564,  563,  562,  561,  560,  559,  558,  557,
+
+      556,  555,  554,  553,  552,  551,  550,  549,  548,  547,
+      546,  545,  544,  543,  542,  541,  540,  539,  538,  537,
+      536,  535,  534,  533,  532,  531,  530,  529,  528,  527,
+      526,  525,  524,  523,  522,  521,  520,  519,  518,  517,
+      516,  515,  514,  513,  512,  511,  510,  509,  508,  507,
+      506,  505,  504,  503,  502,  501,  500,  499,  498,  497,
+      496,  495,  494,  493,  492,  489,  488,  487,  486,  483,
+      482,  481,  480,  479,  478,  477,  476,  475,  474,  473,
+      472,  471,  470,  469,  468,  465,  464,  463,  462,  461,
+      460,  459,  458,  457,  456,  455,  454,  453,  452,  451,
+
+      450,  449,  448,  447,  446,  445,  444,  443,  442,  441,
+      440,  439,  438,  437,  434,  433,  432,  431,  428,  427,
+      426,  425,  424,  423,  422,  421,  420,  419,  418,  415,
+      414,  413,  412,  411,  410,  409,  408,  407,  406,  405,
+      404,  403,  402,  401,  400,  399,  398,  397,  396,  395,
+      394,  393,  392,  391,  390,  389,  388,  387,  386,  385,
+      384,  383,  382,  381,  380,  379,  378,  377,  376,  375,
+      372,  371,  370,  369,  368,  367,  366,  365,  364,  363,
+      362,  361,  360,  359,  358,  357,  356,  355,  354,  353,
+      352,  351,  350,  349,  348,  347,  346,  345,  344,  343,
+
+      342,  341,  340,  339,  338,  337,  336,  335,  326,  325,
+      324,  323,  322,  321,  320,  319,  318,  313,  312,  311,
+      310,  309,  308,  307,  306,  305,  304,  303,  302,  301,
+      300,  299,  298,  297,  296,  295,  294,  293,  292,  291,
+      290,  289,  288,  287,  286,  285,  284,  283,  282,  281,
+      280,  279,  278,  277,  276,  275,  274,  273,  272,  271,
+      270,  269,  268,  267,  266,  263,  262,  261,  260,  259,
+      258,  257,  254,  253,  252,  251,  250,  249,  248,  247,
+      246,  245,  244,  243,  242,  241,  237,  236,  230,  229,
+      228,  227,  226,  225,  224,  223,  222,  221,  220,  219,
+
+      215,  214,  213,  212,  209,  200,  199,  198,  197,  196,
+      195,  192,  191,  188,  187,  186,  185,  184,  183,  182,
+      181,  180,  179,  178,  177,  176,  175,  174,  170,  169,
+      168,  167,  166,  165,  164,  158,  157,  156,  153,  152,
+      151,  150,  147,  146,  145,  144,  138,  137,  136,  135,
+      134,  109,  108,  101,   62,   61,   60,   47,   46,   45,
+      639,    3,  639,  639,  639,  639,  639,  639,  639,  639,
+      639,  639,  639,  639,  639,  639,  639,  639,  639,  639,
+      639,  639,  639,  639,  639,  639,  639,  639,  639,  639,
+      639,  639,  639,  639,  639,  639,  639,  639,  639,  639,
+
+      639,  639,  639,  639,  639,  639,  639,  639,  639,  639,
+      639,  639,  639,  639,  639,  639,  639,  639,  639,  639,
+      639,  639,  639,  639,  639,  639,  639,  639,  639,  639,
+      639,  639,  639,  639
     } ;
 
-static yyconst short int yy_chk[839] =
+static yyconst short int yy_chk[835] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -660,90 +657,90 @@ static yyconst short int yy_chk[839] =
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,   12,   14,   13,   14,   14,   14,   14,   14,
-      118,  114,   15,   34,   12,   13,   15,   16,   23,   16,
-       16,   16,   16,   16,   22,   15,  118,  644,   23,   29,
+      117,  113,   15,   34,   12,   13,   15,   16,   23,   16,
+       16,   16,   16,   16,   22,   15,  117,  640,   23,   29,
 
-      114,   28,   22,   16,   29,   34,   28,   23,   22,   22,
-       22,   24,  641,   23,   29,   24,   25,   28,   24,   24,
-       25,   26,  640,   26,   24,   30,   27,   16,   25,   28,
-       26,   25,  636,   26,   27,   73,   27,   27,   33,   27,
+      113,   28,   22,   16,   29,   34,  637,   23,   22,   22,
+       22,   24,  636,   23,   29,   24,   25,   28,   24,   24,
+       25,   26,  632,   26,   24,   30,   27,   16,   25,   28,
+       26,   25,  631,   26,   27,   73,   27,   27,   33,   27,
        38,   30,   33,   73,   38,   27,   33,   37,   30,   40,
-       40,   33,   68,   38,   37,   37,  346,   37,  635,   38,
-       37,   39,   39,   37,  346,   40,  103,  106,   39,   39,
-       68,  103,   39,   39,  106,  116,  170,   39,  634,  170,
-      116,   40,   53,   53,   53,   53,   53,  162,   40,   57,
-       57,   57,   57,   57,   40,  147,   53,   40,  292,  292,
-
-      162,  633,   58,   57,   58,   58,   58,   58,   58,   59,
-       59,  147,  147,   59,   59,   59,   59,   59,   58,   77,
-       53,  632,   77,   77,   85,   77,  115,   57,  115,   77,
-       85,  358,  358,  366,   85,  115,  366,  123,  631,  115,
-      123,  433,   58,  140,  140,  433,  123,  140,  140,  140,
-      140,  140,  141,  141,  141,  141,  141,  142,  142,  630,
-      629,  142,  142,  142,  142,  142,  141,  143,  143,  143,
-      143,  143,  144,  144,  144,  144,  144,  627,  222,  439,
-      232,  233,  233,  233,  233,  233,  626,  439,  232,  625,
-      141,  222,  232,  222,  232,  232,  624,  623,  232,  234,
-
-      234,  234,  234,  234,  235,  235,  622,  621,  235,  235,
-      235,  235,  235,  236,  236,  236,  236,  236,  620,  222,
-      237,  237,  237,  237,  237,  336,  336,  336,  336,  336,
-      337,  337,  337,  337,  337,  407,  619,  617,  616,  615,
-      407,  614,  613,  612,  611,  610,  609,  608,  607,  606,
-      605,  600,  599,  598,  597,  595,  593,  592,  590,  589,
-      588,  586,  585,  584,  583,  582,  580,  578,  577,  575,
-      573,  572,  569,  568,  567,  565,  564,  563,  562,  559,
-      558,  556,  555,  554,  552,  551,  550,  549,  547,  546,
-      545,  544,  543,  541,  539,  536,  535,  533,  532,  531,
-
-      529,  526,  525,  524,  523,  522,  521,  520,  518,  517,
-      516,  515,  514,  513,  511,  510,  509,  507,  506,  505,
-      504,  503,  502,  501,  500,  499,  498,  497,  496,  495,
-      494,  493,  491,  490,  489,  487,  486,  483,  482,  481,
-      480,  479,  478,  476,  474,  471,  470,  469,  468,  467,
-      466,  465,  464,  462,  457,  456,  454,  453,  451,  450,
-      448,  447,  443,  442,  441,  440,  438,  437,  436,  434,
-      432,  429,  428,  427,  426,  425,  423,  422,  421,  420,
-      418,  417,  416,  413,  411,  409,  405,  404,  403,  402,
-      401,  400,  399,  398,  397,  396,  394,  393,  392,  391,
-
-      390,  388,  387,  385,  383,  382,  379,  378,  377,  375,
-      374,  373,  371,  370,  368,  365,  362,  361,  359,  357,
-      356,  355,  354,  353,  352,  351,  350,  349,  348,  347,
-      345,  344,  343,  341,  340,  339,  338,  334,  333,  331,
-      329,  328,  327,  326,  325,  322,  321,  320,  319,  318,
-      317,  315,  314,  313,  310,  309,  308,  307,  305,  304,
-      303,  302,  301,  300,  299,  298,  297,  296,  295,  294,
-      293,  290,  288,  287,  286,  285,  284,  283,  282,  278,
-      277,  276,  275,  273,  272,  270,  268,  267,  266,  265,
-      264,  262,  261,  259,  258,  257,  256,  255,  254,  253,
-
-      251,  248,  247,  246,  245,  244,  242,  241,  240,  239,
-      231,  230,  229,  228,  227,  226,  225,  224,  223,  221,
-      220,  219,  218,  217,  216,  215,  214,  213,  212,  211,
-      210,  209,  208,  207,  206,  205,  204,  203,  202,  201,
-      200,  199,  198,  197,  196,  195,  194,  193,  192,  191,
-      190,  189,  188,  187,  186,  185,  184,  183,  182,  181,
-      180,  178,  177,  176,  175,  174,  172,  171,  169,  168,
-      167,  166,  165,  164,  163,  161,  160,  159,  158,  157,
-      156,  155,  154,  153,  152,  151,  150,  149,  148,  146,
-      145,  137,  136,  135,  134,  133,  132,  131,  130,  127,
-
-      126,  125,  124,  122,  121,  120,  119,  117,  112,  111,
-      110,  109,  108,  107,  105,  104,  102,  101,   99,   98,
-       97,   96,   95,   94,   93,   92,   91,   90,   89,   88,
-       87,   86,   84,   83,   82,   81,   80,   79,   78,   76,
-       75,   74,   72,   71,   70,   69,   67,   66,   65,   64,
-       52,   44,   43,   42,   41,   36,   35,   32,   21,   20,
-       19,   11,    9,    7,    3,  643,  643,  643,  643,  643,
-      643,  643,  643,  643,  643,  643,  643,  643,  643,  643,
-      643,  643,  643,  643,  643,  643,  643,  643,  643,  643,
-      643,  643,  643,  643,  643,  643,  643,  643,  643,  643,
-
-      643,  643,  643,  643,  643,  643,  643,  643,  643,  643,
-      643,  643,  643,  643,  643,  643,  643,  643,  643,  643,
-      643,  643,  643,  643,  643,  643,  643,  643,  643,  643,
-      643,  643,  643,  643,  643,  643,  643,  643
+       40,   33,   68,   38,   37,   37,  343,   37,  630,   38,
+       37,   39,   39,   37,  343,   40,  102,  105,   39,   39,
+       68,  102,   39,   39,  105,  115,  169,   39,  629,  169,
+      115,   40,   53,   53,   53,   53,   53,  161,   40,   57,
+       57,   57,   57,   57,   40,  146,   53,   40,  289,  289,
+
+      161,  628,   58,   57,   58,   58,   58,   58,   58,   59,
+       59,  146,  146,   59,   59,   59,   59,   59,   58,   77,
+       53,  627,   77,   77,   85,   77,  114,   57,  114,   77,
+       85,  355,  355,  363,   85,  114,  363,  122,  626,  114,
+      122,  429,   58,  139,  139,  429,  122,  139,  139,  139,
+      139,  139,  140,  140,  140,  140,  140,  141,  141,  625,
+      623,  141,  141,  141,  141,  141,  140,  142,  142,  142,
+      142,  142,  143,  143,  143,  143,  143,  622,  220,  435,
+      230,  231,  231,  231,  231,  231,  621,  435,  230,  620,
+      140,  220,  230,  220,  230,  230,  619,  618,  230,  232,
+
+      232,  232,  232,  232,  233,  233,  617,  616,  233,  233,
+      233,  233,  233,  234,  234,  234,  234,  234,  615,  220,
+      235,  235,  235,  235,  235,  333,  333,  333,  333,  333,
+      334,  334,  334,  334,  334,  403,  613,  612,  611,  610,
+      403,  609,  608,  607,  606,  605,  604,  603,  602,  601,
+      596,  595,  594,  593,  591,  589,  588,  586,  585,  584,
+      582,  581,  580,  579,  578,  576,  574,  573,  571,  569,
+      568,  565,  564,  563,  561,  560,  559,  558,  555,  554,
+      552,  551,  550,  548,  547,  546,  545,  543,  542,  541,
+      540,  539,  537,  535,  532,  531,  529,  528,  527,  525,
+
+      522,  521,  520,  519,  518,  517,  516,  514,  513,  512,
+      511,  510,  509,  507,  506,  505,  503,  502,  501,  500,
+      499,  498,  497,  496,  495,  494,  493,  492,  491,  490,
+      489,  487,  486,  485,  483,  482,  479,  478,  477,  476,
+      475,  474,  472,  470,  467,  466,  465,  464,  463,  462,
+      461,  460,  458,  453,  452,  450,  449,  447,  446,  444,
+      443,  439,  438,  437,  436,  434,  433,  432,  430,  428,
+      425,  424,  423,  422,  421,  419,  418,  417,  416,  414,
+      413,  412,  409,  407,  405,  401,  400,  399,  398,  397,
+      396,  395,  394,  393,  392,  390,  389,  388,  387,  386,
+
+      384,  383,  381,  379,  378,  375,  374,  373,  371,  370,
+      369,  367,  366,  364,  362,  359,  358,  356,  354,  353,
+      352,  351,  350,  349,  348,  347,  346,  345,  344,  342,
+      341,  340,  338,  337,  336,  335,  331,  330,  328,  326,
+      325,  324,  323,  322,  319,  318,  317,  316,  315,  314,
+      312,  311,  310,  307,  306,  305,  304,  302,  301,  300,
+      299,  298,  297,  296,  295,  294,  293,  292,  291,  290,
+      287,  285,  284,  283,  282,  281,  280,  279,  275,  274,
+      273,  271,  270,  268,  266,  265,  264,  263,  262,  260,
+      259,  257,  256,  255,  254,  253,  252,  251,  249,  246,
+
+      245,  244,  243,  242,  240,  239,  238,  237,  229,  228,
+      227,  226,  225,  224,  223,  222,  221,  219,  218,  217,
+      216,  215,  214,  213,  212,  211,  210,  209,  208,  207,
+      206,  205,  204,  203,  202,  201,  200,  199,  198,  197,
+      196,  195,  194,  193,  192,  191,  190,  189,  188,  187,
+      186,  185,  184,  183,  182,  181,  180,  179,  177,  176,
+      175,  174,  173,  171,  170,  168,  167,  166,  165,  164,
+      163,  162,  160,  159,  158,  157,  156,  155,  154,  153,
+      152,  151,  150,  149,  148,  147,  145,  144,  136,  135,
+      134,  133,  132,  131,  130,  129,  126,  125,  124,  123,
+
+      121,  120,  119,  118,  116,  111,  110,  109,  108,  107,
+      106,  104,  103,  101,  100,   98,   97,   96,   95,   94,
+       93,   92,   91,   90,   89,   88,   87,   86,   84,   83,
+       82,   81,   80,   79,   78,   76,   75,   74,   72,   71,
+       70,   69,   67,   66,   65,   64,   52,   44,   43,   42,
+       41,   36,   35,   32,   21,   20,   19,   11,    9,    7,
+        3,  639,  639,  639,  639,  639,  639,  639,  639,  639,
+      639,  639,  639,  639,  639,  639,  639,  639,  639,  639,
+      639,  639,  639,  639,  639,  639,  639,  639,  639,  639,
+      639,  639,  639,  639,  639,  639,  639,  639,  639,  639,
+
+      639,  639,  639,  639,  639,  639,  639,  639,  639,  639,
+      639,  639,  639,  639,  639,  639,  639,  639,  639,  639,
+      639,  639,  639,  639,  639,  639,  639,  639,  639,  639,
+      639,  639,  639,  639
     } ;
 
 static yy_state_type yy_last_accepting_state;
@@ -760,7 +757,7 @@ char *yytext;
 #line 1 "Gmsh.l"
 #define INITIAL 0
 #line 2 "Gmsh.l"
-// $Id: Gmsh.yy.cpp,v 1.330 2007-09-09 00:18:04 geuzaine Exp $
+// $Id: Gmsh.yy.cpp,v 1.331 2007-09-10 04:47:06 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -794,6 +791,7 @@ char *yytext;
 char yyname[256] = "";
 int  yylineno = 1;
 int  yyerrorstate = 0;
+int  yyviewindex = 0;
 
 void   parsestring(char endchar);
 char  *strsave(char *ptr);
@@ -821,7 +819,7 @@ void   skipline(void);
 	     && ferror( yyin ) )					\
      Msg(FATAL, "Input in flex scanner failed");
 
-#line 825 "Gmsh.yy.cpp"
+#line 823 "Gmsh.yy.cpp"
 
 /* Macros after this point can all be overridden by user definitions in
  * section 1.
@@ -972,10 +970,10 @@ YY_DECL
 	register char *yy_cp, *yy_bp;
 	register int yy_act;
 
-#line 79 "Gmsh.l"
+#line 80 "Gmsh.l"
 
 
-#line 979 "Gmsh.yy.cpp"
+#line 977 "Gmsh.yy.cpp"
 
 	if ( yy_init )
 		{
@@ -1026,13 +1024,13 @@ yy_match:
 			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 				{
 				yy_current_state = (int) yy_def[yy_current_state];
-				if ( yy_current_state >= 644 )
+				if ( yy_current_state >= 640 )
 					yy_c = yy_meta[(unsigned int) yy_c];
 				}
 			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
 			++yy_cp;
 			}
-		while ( yy_base[yy_current_state] != 766 );
+		while ( yy_base[yy_current_state] != 762 );
 
 yy_find_action:
 		yy_act = yy_accept[yy_current_state];
@@ -1060,746 +1058,741 @@ do_action:	/* This label is used only to access EOF actions. */
 
 case 1:
 YY_RULE_SETUP
-#line 81 "Gmsh.l"
+#line 82 "Gmsh.l"
 /* none */;
 	YY_BREAK
 case 2:
 YY_RULE_SETUP
-#line 82 "Gmsh.l"
+#line 83 "Gmsh.l"
 return tEND;
 	YY_BREAK
 case 3:
 YY_RULE_SETUP
-#line 83 "Gmsh.l"
+#line 84 "Gmsh.l"
 skipcomments();
 	YY_BREAK
 case 4:
 YY_RULE_SETUP
-#line 84 "Gmsh.l"
+#line 85 "Gmsh.l"
 skipline();
 	YY_BREAK
 case 5:
 YY_RULE_SETUP
-#line 85 "Gmsh.l"
+#line 86 "Gmsh.l"
 {parsestring('\"'); return tBIGSTR;}
 	YY_BREAK
 case 6:
 YY_RULE_SETUP
-#line 86 "Gmsh.l"
+#line 87 "Gmsh.l"
 {parsestring('\''); return tBIGSTR;}
 	YY_BREAK
 case 7:
 YY_RULE_SETUP
-#line 87 "Gmsh.l"
+#line 88 "Gmsh.l"
 {yylval.d = NEWREG(); return tDOUBLE;}
 	YY_BREAK
 case 8:
 YY_RULE_SETUP
-#line 88 "Gmsh.l"
+#line 89 "Gmsh.l"
 {yylval.d = NEWPOINT(); return tDOUBLE;}
 	YY_BREAK
 case 9:
 YY_RULE_SETUP
-#line 89 "Gmsh.l"
+#line 90 "Gmsh.l"
 {yylval.d = NEWLINE(); return tDOUBLE;}
 	YY_BREAK
 case 10:
 YY_RULE_SETUP
-#line 90 "Gmsh.l"
+#line 91 "Gmsh.l"
 {yylval.d = NEWLINE(); return tDOUBLE;}
 	YY_BREAK
 case 11:
 YY_RULE_SETUP
-#line 91 "Gmsh.l"
+#line 92 "Gmsh.l"
 {yylval.d = NEWLINELOOP(); return tDOUBLE;}
 	YY_BREAK
 case 12:
 YY_RULE_SETUP
-#line 92 "Gmsh.l"
+#line 93 "Gmsh.l"
 {yylval.d = NEWSURFACE(); return tDOUBLE;}
 	YY_BREAK
 case 13:
 YY_RULE_SETUP
-#line 93 "Gmsh.l"
+#line 94 "Gmsh.l"
 {yylval.d = NEWSURFACELOOP(); return tDOUBLE;}
 	YY_BREAK
 case 14:
 YY_RULE_SETUP
-#line 94 "Gmsh.l"
+#line 95 "Gmsh.l"
 {yylval.d = NEWVOLUME(); return tDOUBLE;}
 	YY_BREAK
 case 15:
 YY_RULE_SETUP
-#line 95 "Gmsh.l"
+#line 96 "Gmsh.l"
 return tAFFECT;
 	YY_BREAK
 case 16:
 YY_RULE_SETUP
-#line 96 "Gmsh.l"
+#line 97 "Gmsh.l"
 return tAFFECTPLUS;
 	YY_BREAK
 case 17:
 YY_RULE_SETUP
-#line 97 "Gmsh.l"
+#line 98 "Gmsh.l"
 return tAFFECTMINUS;
 	YY_BREAK
 case 18:
 YY_RULE_SETUP
-#line 98 "Gmsh.l"
+#line 99 "Gmsh.l"
 return tAFFECTTIMES;
 	YY_BREAK
 case 19:
 YY_RULE_SETUP
-#line 99 "Gmsh.l"
+#line 100 "Gmsh.l"
 return tAFFECTDIVIDE;
 	YY_BREAK
 case 20:
 YY_RULE_SETUP
-#line 100 "Gmsh.l"
+#line 101 "Gmsh.l"
 return tDOTS;
 	YY_BREAK
 case 21:
 YY_RULE_SETUP
-#line 101 "Gmsh.l"
+#line 102 "Gmsh.l"
 return tDOTS;
 	YY_BREAK
 case 22:
 YY_RULE_SETUP
-#line 102 "Gmsh.l"
+#line 103 "Gmsh.l"
 return tOR;
 	YY_BREAK
 case 23:
 YY_RULE_SETUP
-#line 103 "Gmsh.l"
+#line 104 "Gmsh.l"
 return tAND;
 	YY_BREAK
 case 24:
 YY_RULE_SETUP
-#line 104 "Gmsh.l"
+#line 105 "Gmsh.l"
 return tPLUSPLUS;
 	YY_BREAK
 case 25:
 YY_RULE_SETUP
-#line 105 "Gmsh.l"
+#line 106 "Gmsh.l"
 return tMINUSMINUS;
 	YY_BREAK
 case 26:
 YY_RULE_SETUP
-#line 106 "Gmsh.l"
+#line 107 "Gmsh.l"
 return tEQUAL;
 	YY_BREAK
 case 27:
 YY_RULE_SETUP
-#line 107 "Gmsh.l"
+#line 108 "Gmsh.l"
 return tNOTEQUAL;
 	YY_BREAK
 case 28:
 YY_RULE_SETUP
-#line 108 "Gmsh.l"
+#line 109 "Gmsh.l"
 return tLESSOREQUAL;
 	YY_BREAK
 case 29:
 YY_RULE_SETUP
-#line 109 "Gmsh.l"
+#line 110 "Gmsh.l"
 return tGREATEROREQUAL;
 	YY_BREAK
 case 30:
 YY_RULE_SETUP
-#line 111 "Gmsh.l"
+#line 112 "Gmsh.l"
 return tAcos;
 	YY_BREAK
 case 31:
 YY_RULE_SETUP
-#line 112 "Gmsh.l"
+#line 113 "Gmsh.l"
 return tAcos;
 	YY_BREAK
 case 32:
 YY_RULE_SETUP
-#line 113 "Gmsh.l"
+#line 114 "Gmsh.l"
 return tAlias;
 	YY_BREAK
 case 33:
 YY_RULE_SETUP
-#line 114 "Gmsh.l"
+#line 115 "Gmsh.l"
 return tAliasWithOptions;
 	YY_BREAK
 case 34:
 YY_RULE_SETUP
-#line 115 "Gmsh.l"
+#line 116 "Gmsh.l"
 return tAsin;
 	YY_BREAK
 case 35:
 YY_RULE_SETUP
-#line 116 "Gmsh.l"
+#line 117 "Gmsh.l"
 return tAsin;
 	YY_BREAK
 case 36:
 YY_RULE_SETUP
-#line 117 "Gmsh.l"
+#line 118 "Gmsh.l"
 return tAtan;
 	YY_BREAK
 case 37:
 YY_RULE_SETUP
-#line 118 "Gmsh.l"
+#line 119 "Gmsh.l"
 return tAtan;
 	YY_BREAK
 case 38:
 YY_RULE_SETUP
-#line 119 "Gmsh.l"
+#line 120 "Gmsh.l"
 return tAtan2;
 	YY_BREAK
 case 39:
 YY_RULE_SETUP
-#line 120 "Gmsh.l"
+#line 121 "Gmsh.l"
 return tAtan2;
 	YY_BREAK
 case 40:
 YY_RULE_SETUP
-#line 121 "Gmsh.l"
+#line 122 "Gmsh.l"
 return tAttractor;
 	YY_BREAK
 case 41:
 YY_RULE_SETUP
-#line 123 "Gmsh.l"
+#line 124 "Gmsh.l"
 return tBezier;
 	YY_BREAK
 case 42:
 YY_RULE_SETUP
-#line 124 "Gmsh.l"
+#line 125 "Gmsh.l"
 return tBoundary;
 	YY_BREAK
 case 43:
 YY_RULE_SETUP
-#line 125 "Gmsh.l"
+#line 126 "Gmsh.l"
 return tBump;
 	YY_BREAK
 case 44:
 YY_RULE_SETUP
-#line 126 "Gmsh.l"
+#line 127 "Gmsh.l"
 return tBSpline;
 	YY_BREAK
 case 45:
 YY_RULE_SETUP
-#line 127 "Gmsh.l"
+#line 128 "Gmsh.l"
 return tBoundingBox;
 	YY_BREAK
 case 46:
 YY_RULE_SETUP
-#line 129 "Gmsh.l"
+#line 130 "Gmsh.l"
 return tCeil;
 	YY_BREAK
 case 47:
 YY_RULE_SETUP
-#line 130 "Gmsh.l"
+#line 131 "Gmsh.l"
 return tCircle;
 	YY_BREAK
 case 48:
 YY_RULE_SETUP
-#line 131 "Gmsh.l"
+#line 132 "Gmsh.l"
 return tCoherence;
 	YY_BREAK
 case 49:
 YY_RULE_SETUP
-#line 132 "Gmsh.l"
+#line 133 "Gmsh.l"
 return tCombine;
 	YY_BREAK
 case 50:
 YY_RULE_SETUP
-#line 133 "Gmsh.l"
+#line 134 "Gmsh.l"
 return tCosh;
 	YY_BREAK
 case 51:
 YY_RULE_SETUP
-#line 134 "Gmsh.l"
+#line 135 "Gmsh.l"
 return tCos;
 	YY_BREAK
 case 52:
 YY_RULE_SETUP
-#line 135 "Gmsh.l"
+#line 136 "Gmsh.l"
 return tCharacteristic;
 	YY_BREAK
 case 53:
 YY_RULE_SETUP
-#line 136 "Gmsh.l"
+#line 137 "Gmsh.l"
 return tComplex;
 	YY_BREAK
 case 54:
 YY_RULE_SETUP
-#line 137 "Gmsh.l"
+#line 138 "Gmsh.l"
 return tColor;
 	YY_BREAK
 case 55:
 YY_RULE_SETUP
-#line 138 "Gmsh.l"
+#line 139 "Gmsh.l"
 return tColorTable;
 	YY_BREAK
 case 56:
 YY_RULE_SETUP
-#line 139 "Gmsh.l"
+#line 140 "Gmsh.l"
 return tCoordinates;
 	YY_BREAK
 case 57:
 YY_RULE_SETUP
-#line 140 "Gmsh.l"
+#line 141 "Gmsh.l"
 return tSpline;
 	YY_BREAK
 case 58:
 YY_RULE_SETUP
-#line 141 "Gmsh.l"
+#line 142 "Gmsh.l"
 return tCall;
 	YY_BREAK
 case 59:
 YY_RULE_SETUP
-#line 143 "Gmsh.l"
+#line 144 "Gmsh.l"
 return tDelete;
 	YY_BREAK
 case 60:
 YY_RULE_SETUP
-#line 144 "Gmsh.l"
+#line 145 "Gmsh.l"
 return tDilate;
 	YY_BREAK
 case 61:
 YY_RULE_SETUP
-#line 145 "Gmsh.l"
+#line 146 "Gmsh.l"
 return tDuplicata;
 	YY_BREAK
 case 62:
 YY_RULE_SETUP
-#line 146 "Gmsh.l"
+#line 147 "Gmsh.l"
 return tDraw;
 	YY_BREAK
 case 63:
 YY_RULE_SETUP
-#line 148 "Gmsh.l"
+#line 149 "Gmsh.l"
 return tExp;
 	YY_BREAK
 case 64:
 YY_RULE_SETUP
-#line 149 "Gmsh.l"
+#line 150 "Gmsh.l"
 return tEllipse;
 	YY_BREAK
 case 65:
 YY_RULE_SETUP
-#line 150 "Gmsh.l"
+#line 151 "Gmsh.l"
 return tEllipse;
 	YY_BREAK
 case 66:
 YY_RULE_SETUP
-#line 151 "Gmsh.l"
+#line 152 "Gmsh.l"
 return tExtrude;
 	YY_BREAK
 case 67:
 YY_RULE_SETUP
-#line 152 "Gmsh.l"
+#line 153 "Gmsh.l"
 return tElliptic;
 	YY_BREAK
 case 68:
 YY_RULE_SETUP
-#line 153 "Gmsh.l"
+#line 154 "Gmsh.l"
 return tEndFor;
 	YY_BREAK
 case 69:
 YY_RULE_SETUP
-#line 154 "Gmsh.l"
+#line 155 "Gmsh.l"
 return tEndIf;
 	YY_BREAK
 case 70:
 YY_RULE_SETUP
-#line 155 "Gmsh.l"
+#line 156 "Gmsh.l"
 return tEuclidian;
 	YY_BREAK
 case 71:
 YY_RULE_SETUP
-#line 156 "Gmsh.l"
+#line 157 "Gmsh.l"
 return tExit;
 	YY_BREAK
 case 72:
 YY_RULE_SETUP
-#line 158 "Gmsh.l"
+#line 159 "Gmsh.l"
 return tFabs;
 	YY_BREAK
 case 73:
 YY_RULE_SETUP
-#line 159 "Gmsh.l"
+#line 160 "Gmsh.l"
 return tField;
 	YY_BREAK
 case 74:
 YY_RULE_SETUP
-#line 160 "Gmsh.l"
+#line 161 "Gmsh.l"
 return tFloor;
 	YY_BREAK
 case 75:
 YY_RULE_SETUP
-#line 161 "Gmsh.l"
+#line 162 "Gmsh.l"
 return tFmod;
 	YY_BREAK
 case 76:
 YY_RULE_SETUP
-#line 162 "Gmsh.l"
+#line 163 "Gmsh.l"
 return tFor;
 	YY_BREAK
 case 77:
 YY_RULE_SETUP
-#line 163 "Gmsh.l"
+#line 164 "Gmsh.l"
 return tFunction;
 	YY_BREAK
 case 78:
 YY_RULE_SETUP
-#line 165 "Gmsh.l"
+#line 166 "Gmsh.l"
 return tGetValue;
 	YY_BREAK
 case 79:
 YY_RULE_SETUP
-#line 166 "Gmsh.l"
+#line 167 "Gmsh.l"
 return tGrad;
 	YY_BREAK
 case 80:
 YY_RULE_SETUP
-#line 167 "Gmsh.l"
+#line 168 "Gmsh.l"
 return tGMSH_MAJOR_VERSION;
 	YY_BREAK
 case 81:
 YY_RULE_SETUP
-#line 168 "Gmsh.l"
+#line 169 "Gmsh.l"
 return tGMSH_MINOR_VERSION;
 	YY_BREAK
 case 82:
 YY_RULE_SETUP
-#line 169 "Gmsh.l"
+#line 170 "Gmsh.l"
 return tGMSH_PATCH_VERSION;
 	YY_BREAK
 case 83:
 YY_RULE_SETUP
-#line 171 "Gmsh.l"
+#line 172 "Gmsh.l"
 return tHide;
 	YY_BREAK
 case 84:
 YY_RULE_SETUP
-#line 172 "Gmsh.l"
+#line 173 "Gmsh.l"
 return tHole;
 	YY_BREAK
 case 85:
 YY_RULE_SETUP
-#line 173 "Gmsh.l"
+#line 174 "Gmsh.l"
 return tHypot;
 	YY_BREAK
 case 86:
 YY_RULE_SETUP
-#line 175 "Gmsh.l"
+#line 176 "Gmsh.l"
 return tIn;
 	YY_BREAK
 case 87:
 YY_RULE_SETUP
-#line 176 "Gmsh.l"
+#line 177 "Gmsh.l"
 return tIf;
 	YY_BREAK
 case 88:
 YY_RULE_SETUP
-#line 177 "Gmsh.l"
+#line 178 "Gmsh.l"
 return tIntersect;
 	YY_BREAK
 case 89:
 YY_RULE_SETUP
-#line 179 "Gmsh.l"
+#line 180 "Gmsh.l"
 return tKnots;
 	YY_BREAK
 case 90:
 YY_RULE_SETUP
-#line 181 "Gmsh.l"
+#line 182 "Gmsh.l"
 return tLatLon;
 	YY_BREAK
 case 91:
 YY_RULE_SETUP
-#line 182 "Gmsh.l"
+#line 183 "Gmsh.l"
 return tLength;
 	YY_BREAK
 case 92:
 YY_RULE_SETUP
-#line 183 "Gmsh.l"
+#line 184 "Gmsh.l"
 return tLine;
 	YY_BREAK
 case 93:
 YY_RULE_SETUP
-#line 184 "Gmsh.l"
+#line 185 "Gmsh.l"
 return tLoop;
 	YY_BREAK
 case 94:
 YY_RULE_SETUP
-#line 185 "Gmsh.l"
+#line 186 "Gmsh.l"
 return tLog;
 	YY_BREAK
 case 95:
 YY_RULE_SETUP
-#line 186 "Gmsh.l"
+#line 187 "Gmsh.l"
 return tLog10;
 	YY_BREAK
 case 96:
 YY_RULE_SETUP
-#line 187 "Gmsh.l"
+#line 188 "Gmsh.l"
 return tLayers;
 	YY_BREAK
 case 97:
 YY_RULE_SETUP
-#line 189 "Gmsh.l"
+#line 190 "Gmsh.l"
 return tModulo;
 	YY_BREAK
 case 98:
 YY_RULE_SETUP
-#line 190 "Gmsh.l"
+#line 191 "Gmsh.l"
 return tMPI_Rank;
 	YY_BREAK
 case 99:
 YY_RULE_SETUP
-#line 191 "Gmsh.l"
+#line 192 "Gmsh.l"
 return tMPI_Size;
 	YY_BREAK
 case 100:
 YY_RULE_SETUP
-#line 193 "Gmsh.l"
+#line 194 "Gmsh.l"
 return tNurbs;
 	YY_BREAK
 case 101:
 YY_RULE_SETUP
-#line 195 "Gmsh.l"
+#line 196 "Gmsh.l"
 return tOrder;
 	YY_BREAK
 case 102:
 YY_RULE_SETUP
-#line 197 "Gmsh.l"
+#line 198 "Gmsh.l"
 return tPhysical;
 	YY_BREAK
 case 103:
 YY_RULE_SETUP
-#line 198 "Gmsh.l"
+#line 199 "Gmsh.l"
 return tPi;
 	YY_BREAK
 case 104:
 YY_RULE_SETUP
-#line 199 "Gmsh.l"
+#line 200 "Gmsh.l"
 return tPlane;
 	YY_BREAK
 case 105:
 YY_RULE_SETUP
-#line 200 "Gmsh.l"
+#line 201 "Gmsh.l"
 return tPoint;
 	YY_BREAK
 case 106:
 YY_RULE_SETUP
-#line 201 "Gmsh.l"
+#line 202 "Gmsh.l"
 return tProgression;
 	YY_BREAK
 case 107:
 YY_RULE_SETUP
-#line 202 "Gmsh.l"
+#line 203 "Gmsh.l"
 return tProgression;
 	YY_BREAK
 case 108:
 YY_RULE_SETUP
-#line 203 "Gmsh.l"
+#line 204 "Gmsh.l"
 return tParametric;
 	YY_BREAK
 case 109:
 YY_RULE_SETUP
-#line 204 "Gmsh.l"
+#line 205 "Gmsh.l"
 return tPolarSphere;
 	YY_BREAK
 case 110:
 YY_RULE_SETUP
-#line 205 "Gmsh.l"
+#line 206 "Gmsh.l"
 return tPrintf;
 	YY_BREAK
 case 111:
 YY_RULE_SETUP
-#line 206 "Gmsh.l"
+#line 207 "Gmsh.l"
 return tPlugin;
 	YY_BREAK
 case 112:
 YY_RULE_SETUP
-#line 208 "Gmsh.l"
+#line 209 "Gmsh.l"
 return tRecombine;
 	YY_BREAK
 case 113:
 YY_RULE_SETUP
-#line 209 "Gmsh.l"
+#line 210 "Gmsh.l"
 return tRotate;
 	YY_BREAK
 case 114:
 YY_RULE_SETUP
-#line 210 "Gmsh.l"
+#line 211 "Gmsh.l"
 return tRuled;
 	YY_BREAK
 case 115:
 YY_RULE_SETUP
-#line 211 "Gmsh.l"
+#line 212 "Gmsh.l"
 return tRand;
 	YY_BREAK
 case 116:
 YY_RULE_SETUP
-#line 212 "Gmsh.l"
+#line 213 "Gmsh.l"
 return tReturn;
 	YY_BREAK
 case 117:
 YY_RULE_SETUP
-#line 214 "Gmsh.l"
+#line 215 "Gmsh.l"
 return tSqrt;
 	YY_BREAK
 case 118:
 YY_RULE_SETUP
-#line 215 "Gmsh.l"
+#line 216 "Gmsh.l"
 return tSin;
 	YY_BREAK
 case 119:
 YY_RULE_SETUP
-#line 216 "Gmsh.l"
+#line 217 "Gmsh.l"
 return tSinh;
 	YY_BREAK
 case 120:
 YY_RULE_SETUP
-#line 217 "Gmsh.l"
+#line 218 "Gmsh.l"
 return tSphere;
 	YY_BREAK
 case 121:
 YY_RULE_SETUP
-#line 218 "Gmsh.l"
+#line 219 "Gmsh.l"
 return tSpline;
 	YY_BREAK
 case 122:
 YY_RULE_SETUP
-#line 219 "Gmsh.l"
+#line 220 "Gmsh.l"
 return tSurface;
 	YY_BREAK
 case 123:
 YY_RULE_SETUP
-#line 220 "Gmsh.l"
+#line 221 "Gmsh.l"
 return tSymmetry;
 	YY_BREAK
 case 124:
 YY_RULE_SETUP
-#line 221 "Gmsh.l"
+#line 222 "Gmsh.l"
 return tSprintf;
 	YY_BREAK
 case 125:
 YY_RULE_SETUP
-#line 222 "Gmsh.l"
+#line 223 "Gmsh.l"
 return tStrCat;
 	YY_BREAK
 case 126:
 YY_RULE_SETUP
-#line 223 "Gmsh.l"
+#line 224 "Gmsh.l"
 return tStrPrefix;
 	YY_BREAK
 case 127:
 YY_RULE_SETUP
-#line 224 "Gmsh.l"
+#line 225 "Gmsh.l"
 return tStrRelative;
 	YY_BREAK
 case 128:
 YY_RULE_SETUP
-#line 225 "Gmsh.l"
+#line 226 "Gmsh.l"
 return tStructured;
 	YY_BREAK
 case 129:
 YY_RULE_SETUP
-#line 226 "Gmsh.l"
+#line 227 "Gmsh.l"
 return tShow;
 	YY_BREAK
 case 130:
 YY_RULE_SETUP
-#line 228 "Gmsh.l"
+#line 229 "Gmsh.l"
 return tTransfinite;
 	YY_BREAK
 case 131:
 YY_RULE_SETUP
-#line 229 "Gmsh.l"
+#line 230 "Gmsh.l"
 return tTranslate;
 	YY_BREAK
 case 132:
 YY_RULE_SETUP
-#line 230 "Gmsh.l"
+#line 231 "Gmsh.l"
 return tTanh;
 	YY_BREAK
 case 133:
 YY_RULE_SETUP
-#line 231 "Gmsh.l"
+#line 232 "Gmsh.l"
 return tTan;
 	YY_BREAK
 case 134:
 YY_RULE_SETUP
-#line 232 "Gmsh.l"
+#line 233 "Gmsh.l"
 return tThreshold;
 	YY_BREAK
 case 135:
 YY_RULE_SETUP
-#line 233 "Gmsh.l"
+#line 234 "Gmsh.l"
 return tToday;
 	YY_BREAK
 case 136:
 YY_RULE_SETUP
-#line 235 "Gmsh.l"
+#line 236 "Gmsh.l"
 return tUsing;
 	YY_BREAK
 case 137:
 YY_RULE_SETUP
-#line 237 "Gmsh.l"
+#line 238 "Gmsh.l"
 return tVolume;
 	YY_BREAK
 case 138:
 YY_RULE_SETUP
-#line 238 "Gmsh.l"
+#line 239 "Gmsh.l"
 return tPostView;
 	YY_BREAK
 case 139:
 YY_RULE_SETUP
-#line 240 "Gmsh.l"
+#line 241 "Gmsh.l"
 return tText2D;
 	YY_BREAK
 case 140:
 YY_RULE_SETUP
-#line 241 "Gmsh.l"
+#line 242 "Gmsh.l"
 return tText3D;
 	YY_BREAK
 case 141:
 YY_RULE_SETUP
-#line 242 "Gmsh.l"
+#line 243 "Gmsh.l"
 return tInterpolationScheme;
 	YY_BREAK
 case 142:
 YY_RULE_SETUP
-#line 243 "Gmsh.l"
+#line 244 "Gmsh.l"
 return tTime;
 	YY_BREAK
 case 143:
-YY_RULE_SETUP
-#line 244 "Gmsh.l"
-return tGrain;
-	YY_BREAK
-case 144:
 #line 247 "Gmsh.l"
-case 145:
+case 144:
 #line 248 "Gmsh.l"
-case 146:
+case 145:
 #line 249 "Gmsh.l"
-case 147:
+case 146:
 YY_RULE_SETUP
 #line 249 "Gmsh.l"
 {yylval.d = atof((char *)yytext); return tDOUBLE;}
 	YY_BREAK
-case 148:
+case 147:
 YY_RULE_SETUP
 #line 251 "Gmsh.l"
 {yylval.c = strsave((char*)yytext); return tSTRING;}
 	YY_BREAK
-case 149:
+case 148:
 YY_RULE_SETUP
 #line 253 "Gmsh.l"
 return yytext[0];
 	YY_BREAK
-case 150:
+case 149:
 YY_RULE_SETUP
 #line 255 "Gmsh.l"
 ECHO;
 	YY_BREAK
-#line 1803 "Gmsh.yy.cpp"
+#line 1796 "Gmsh.yy.cpp"
 case YY_STATE_EOF(INITIAL):
 	yyterminate();
 
@@ -2091,7 +2084,7 @@ static yy_state_type yy_get_previous_state()
 		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 			{
 			yy_current_state = (int) yy_def[yy_current_state];
-			if ( yy_current_state >= 644 )
+			if ( yy_current_state >= 640 )
 				yy_c = yy_meta[(unsigned int) yy_c];
 			}
 		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -2126,11 +2119,11 @@ yy_state_type yy_current_state;
 	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 		{
 		yy_current_state = (int) yy_def[yy_current_state];
-		if ( yy_current_state >= 644 )
+		if ( yy_current_state >= 640 )
 			yy_c = yy_meta[(unsigned int) yy_c];
 		}
 	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-	yy_is_jam = (yy_current_state == 643);
+	yy_is_jam = (yy_current_state == 639);
 
 	return yy_is_jam ? 0 : yy_current_state;
 	}
diff --git a/Parser/Makefile b/Parser/Makefile
index 1985569bc47bcdd745f023fb1e283fb15aeb3277..cbae760d4460ad5670bea03fdfd0de2cb077747f 100644
--- a/Parser/Makefile
+++ b/Parser/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.125 2007-09-08 21:26:04 geuzaine Exp $
+# $Id: Makefile,v 1.126 2007-09-10 04:47:07 geuzaine Exp $
 #
 # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 #
@@ -77,13 +77,13 @@ depend:
 
 # DO NOT DELETE THIS LINE
 Gmsh.tab.o: Gmsh.tab.cpp ../Plugin/PluginManager.h ../Plugin/Plugin.h \
-  ../Common/Options.h ../Common/Message.h ../Post/Views.h \
-  ../Post/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \
-  ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
-  ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \
-  ../Parallel/ParUtil.h ../Common/Gmsh.h ../Common/Message.h \
-  ../DataStr/Malloc.h ../DataStr/Tree.h ../DataStr/avl.h \
-  ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \
+  ../Common/Options.h ../Post/ColorTable.h ../Common/Message.h \
+  ../Post/Views.h ../Post/ColorTable.h ../DataStr/List.h \
+  ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \
+  ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \
+  ../Common/GmshMatrix.h ../Parallel/ParUtil.h ../Common/Gmsh.h \
+  ../Common/Message.h ../DataStr/Malloc.h ../DataStr/Tree.h \
+  ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \
   ../Common/Context.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \
   ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \
   ../Geo/SPoint3.h ../Common/GmshDefines.h ../Geo/MVertex.h \
@@ -100,10 +100,13 @@ Gmsh.tab.o: Gmsh.tab.cpp ../Plugin/PluginManager.h ../Plugin/Plugin.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
+  ../Graphics/Draw.h ../Post/PView.h ../Post/PViewData.h \
+  ../Post/PViewOptions.h ../Post/ColorTable.h ../Post/PViewDataList.h \
+  ../Post/PViewData.h ../Post/AdaptiveViews.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/Gmsh.h ../Common/Message.h \
   ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
   ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \
@@ -131,18 +134,17 @@ OpenFile.o: OpenFile.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../Geo/SVector3.h ../Geo/Pair.h ../Geo/ExtrudeParams.h ../Geo/GRegion.h \
   ../Geo/GEntity.h ../Geo/MElement.h ../Geo/ExtrudeParams.h \
   ../Geo/SBoundingBox3d.h Parser.h OpenFile.h ../Common/CommandLine.h \
-  ../Post/Views.h ../Post/ColorTable.h ../Common/VertexArray.h \
-  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h ../Post/PView.h \
-  ../Post/PViewData.h ../Post/PViewOptions.h ../Post/ColorTable.h \
-  ../Graphics/ReadImg.h ../Common/OS.h ../Mesh/HighOrder.h \
-  ../Common/GmshUI.h ../Graphics/Draw.h ../Graphics/SelectBuffer.h \
-  ../Fltk/GUI.h ../Fltk/Opengl_Window.h ../Fltk/Colorbar_Window.h \
+  ../Post/PView.h ../Common/VertexArray.h ../Post/PViewData.h \
+  ../Post/PViewOptions.h ../Post/ColorTable.h ../Graphics/ReadImg.h \
+  ../Common/OS.h ../Mesh/HighOrder.h ../Common/GmshUI.h \
+  ../Graphics/Draw.h ../Graphics/SelectBuffer.h ../Fltk/GUI.h \
+  ../Fltk/Opengl_Window.h ../Fltk/Colorbar_Window.h \
   ../Fltk/Popup_Button.h ../Fltk/SpherePosition_Widget.h
 CreateFile.o: CreateFile.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
   ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \
-  OpenFile.h ../Common/Context.h ../Common/Options.h ../Geo/Geo.h \
-  ../Common/GmshDefines.h ../Geo/gmshSurface.h ../Geo/Pair.h \
+  OpenFile.h ../Common/Context.h ../Common/Options.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 ../Geo/SPoint3.h \
   ../Geo/SPoint2.h ../Geo/ExtrudeParams.h ../Common/SmoothData.h \
diff --git a/Parser/OpenFile.cpp b/Parser/OpenFile.cpp
index 85cff4c62dab20e670b822df96c00cb2b1970ace..609a098c5ab823ac56da85831435057b899092df 100644
--- a/Parser/OpenFile.cpp
+++ b/Parser/OpenFile.cpp
@@ -1,4 +1,4 @@
-// $Id: OpenFile.cpp,v 1.158 2007-09-09 00:18:04 geuzaine Exp $
+// $Id: OpenFile.cpp,v 1.159 2007-09-10 04:47:07 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -31,7 +31,6 @@
 #include "Parser.h"
 #include "OpenFile.h"
 #include "CommandLine.h"
-#include "Views.h"
 #include "PView.h"
 #include "ReadImg.h"
 #include "OS.h"
@@ -43,7 +42,7 @@
 #include "SelectBuffer.h"
 #include "GUI.h"
 extern GUI *WID;
-void UpdateViewsInGUI();
+extern void UpdateViewsInGUI();
 #endif
 
 extern Context_T CTX;
@@ -151,18 +150,9 @@ void SetBoundingBox(void)
 
   SBoundingBox3d bb = GModel::current()->bounds();
   
-  if(bb.empty() && List_Nbr(CTX.post.list)) {
-    for(int i = 0; i < List_Nbr(CTX.post.list); i++){
-      Post_View *v = *(Post_View **)List_Pointer(CTX.post.list, i);
-      if(fabs(v->BBox[0]) != VAL_INF && 
-	 fabs(v->BBox[2]) != VAL_INF &&
-	 fabs(v->BBox[4]) != VAL_INF)
-	bb += SPoint3(v->BBox[0], v->BBox[2], v->BBox[4]);
-      if(fabs(v->BBox[1]) != VAL_INF && 
-	 fabs(v->BBox[3]) != VAL_INF &&
-	 fabs(v->BBox[5]) != VAL_INF)
-      bb += SPoint3(v->BBox[1], v->BBox[3], v->BBox[5]);
-    }
+  if(bb.empty()) {
+    for(unsigned int i = 0; i < PView::list.size(); i++)
+      bb += PView::list[i]->getData()->getBoundingBox();
   }
 
   if(bb.empty()){
@@ -201,7 +191,7 @@ int ParseFile(char *f, int close, int warn_if_missing)
 {
   char yyname_old[256], tmp[256];
   FILE *yyin_old, *fp;
-  int yylineno_old, yyerrorstate_old, numviews_old;
+  int yylineno_old, yyerrorstate_old, yyviewindex_old;
 
   // add 'b' for pure Windows programs: opening in text mode messes up
   // fsetpos/fgetpos (used e.g. for user-defined functions)
@@ -210,16 +200,19 @@ int ParseFile(char *f, int close, int warn_if_missing)
     return 0;
   }
 
+  int numViewsBefore = PView::list.size();
+
   strncpy(yyname_old, yyname, 255);
   yyin_old = yyin;
   yyerrorstate_old = yyerrorstate;
   yylineno_old = yylineno;
-  numviews_old = List_Nbr(CTX.post.list);
+  yyviewindex_old = yyviewindex;
 
   strncpy(yyname, f, 255);
   yyin = fp;
   yyerrorstate = 0;
   yylineno = 1;
+  yyviewindex = 0;
 
   fpos_t position;
   fgetpos(yyin, &position);
@@ -235,20 +228,19 @@ int ParseFile(char *f, int close, int warn_if_missing)
     }
   }
 
-  if(close)
-    fclose(yyin);
+  if(close) fclose(yyin);
 
   strncpy(yyname, yyname_old, 255);
   yyin = yyin_old;
   yyerrorstate = yyerrorstate_old;
   yylineno = yylineno_old;
+  yyviewindex = yyviewindex_old;
 
-  if(List_Nbr(CTX.post.list) != numviews_old){
 #if defined(HAVE_FLTK)
+  if(numViewsBefore != PView::list.size())
     UpdateViewsInGUI();
 #endif
-  }
-  
+
   return 1;
 }
 
@@ -321,6 +313,8 @@ int MergeFile(char *name, int warn_if_missing)
 
   GModel *m = GModel::current();
 
+  int numViewsBefore = PView::list.size();
+
   int status = 0;
   if(!strcmp(ext, ".stl") || !strcmp(ext, ".STL")){
     status = m->readSTL(name, CTX.geom.tolerance);
@@ -389,12 +383,7 @@ int MergeFile(char *name, int warn_if_missing)
     }
     else if(!strncmp(header, "$PostFormat", 11) || 
 	    !strncmp(header, "$View", 5)) {
-#if 0 // test new post-pro
       status = PView::read(name);
-      //PView::combine(true, 1, true);
-#else
-      status = ReadView(name);
-#endif
     }
     else {
       status = m->readGEO(name);
@@ -408,6 +397,11 @@ int MergeFile(char *name, int warn_if_missing)
 
   checkHighOrderTriangles(m);
 
+#if defined(HAVE_FLTK)
+  if(numViewsBefore != PView::list.size())
+    UpdateViewsInGUI();
+#endif
+
   Msg(STATUS2, "Read '%s'", name);
   return status;
 }
diff --git a/Parser/Parser.h b/Parser/Parser.h
index 0200bb923705767719cb385b85bd53ec793cb74f..8d32e933352b8f41c48d1092ecad99812b642909 100644
--- a/Parser/Parser.h
+++ b/Parser/Parser.h
@@ -38,6 +38,7 @@ void force_yyflush();
 
 extern FILE *yyin;
 extern int yylineno;
+extern int yyviewindex;
 extern char yyname[256];
 extern char *yytext;
 extern int yyerrorstate;
diff --git a/Plugin/CutGrid.cpp b/Plugin/CutGrid.cpp
index 227f44c13169bf6239aff9958e4ed4db19b4d5ca..985bededfee3f31f9ce3ed03efe7dabd9ec2e01c 100644
--- a/Plugin/CutGrid.cpp
+++ b/Plugin/CutGrid.cpp
@@ -1,4 +1,4 @@
-// $Id: CutGrid.cpp,v 1.21 2007-08-29 18:41:06 geuzaine Exp $
+// $Id: CutGrid.cpp,v 1.22 2007-09-10 04:47:07 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -330,6 +330,9 @@ Post_View * GMSH_CutGridPlugin::GenerateView(Post_View * v, int connect)
   if(getNbU() <= 0 || getNbV() <= 0)
     return v;
 
+  Msg(FATAL, "XXXXXXXXXXXXXXXXXXXXX");
+  return 0;
+  /*
   Post_View * View = BeginView(1);
 
   OctreePost o(v);
@@ -398,6 +401,8 @@ Post_View * GMSH_CutGridPlugin::GenerateView(Post_View * v, int connect)
   EndView(View, v->NbTimeStep, filename, name);
 
   return View;
+
+  */
 }
 
 Post_View *GMSH_CutGridPlugin::execute(Post_View * v)
diff --git a/Plugin/CutParametric.cpp b/Plugin/CutParametric.cpp
index 6638c9b9810be14ee9a98e4c0f49a41bc9b2ea9b..d40d53706bbf5f67030f1a4c515b8d485368fe82 100644
--- a/Plugin/CutParametric.cpp
+++ b/Plugin/CutParametric.cpp
@@ -1,4 +1,4 @@
-// $Id: CutParametric.cpp,v 1.20 2007-08-29 18:41:06 geuzaine Exp $
+// $Id: CutParametric.cpp,v 1.21 2007-09-10 04:47:08 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -305,6 +305,10 @@ Post_View *GMSH_CutParametricPlugin::execute(Post_View * v)
   if(!fillXYZ())
     return v;
 
+  Msg(FATAL, "XXXXXXXXXXXXXXX");
+  return 0;
+
+  /*
   int nbU = (int)CutParametricOptions_Number[2].def;
   int connect = (int)CutParametricOptions_Number[3].def;
   if(nbU < 2) connect = 0;
@@ -357,4 +361,5 @@ Post_View *GMSH_CutParametricPlugin::execute(Post_View * v)
   delete [] res1;
 
   return v2;
+  */
 }
diff --git a/Plugin/Evaluate.cpp b/Plugin/Evaluate.cpp
index 4d396b1dd041ec385bda6939fa124c5cff1443ce..b4f186577ec73e2859980b703e73efe4173b3774 100644
--- a/Plugin/Evaluate.cpp
+++ b/Plugin/Evaluate.cpp
@@ -1,4 +1,4 @@
-// $Id: Evaluate.cpp,v 1.29 2007-05-04 10:45:08 geuzaine Exp $
+// $Id: Evaluate.cpp,v 1.30 2007-09-10 04:47:08 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -156,6 +156,10 @@ void GMSH_EvaluatePlugin::evaluate(Post_View *v1, List_T *list1, int nbElm1,
   if(!nbElm1)
     return;
 
+  Msg(FATAL, "XXXXXXXXXXXXXXXXXXXXXX");
+  return;
+
+  /*
   void *f = evaluator_create(expression);
 
   if(!f){
@@ -220,6 +224,8 @@ void GMSH_EvaluatePlugin::evaluate(Post_View *v1, List_T *list1, int nbElm1,
   }
 
   evaluator_destroy(f);
+
+  */
 #endif
 }
 
diff --git a/Plugin/ExtractEdges.cpp b/Plugin/ExtractEdges.cpp
index b997086501422e4c7aed82eb7fe65e7817d2bf30..ce7725c19b2db284d4fe4fd2375f221f2342f6c0 100644
--- a/Plugin/ExtractEdges.cpp
+++ b/Plugin/ExtractEdges.cpp
@@ -1,4 +1,4 @@
-// $Id: ExtractEdges.cpp,v 1.4 2006-11-27 22:22:32 geuzaine Exp $
+// $Id: ExtractEdges.cpp,v 1.5 2007-09-10 04:47:08 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -98,8 +98,8 @@ Post_View *GMSH_ExtractEdgesPlugin::execute(Post_View * v)
   Post_View *v2 = BeginView(1);
 
   BDS_Mesh bds;
-  bds.import_view(v1, CTX.lc * 1.e-12);
-  //  bds.classify(angle * M_PI / 180.);
+  //bds.import_view(v1, CTX.lc * 1.e-12);
+  //bds.classify(angle * M_PI / 180.);
 
   Msg(GERROR, "BDS->classify(angle, edge_prolongation) must be reinterfaced");
 
diff --git a/Plugin/Makefile b/Plugin/Makefile
index 5e16e5f64bbb59ecc501d93ab9504a5bfc1c217a..a9ead8e1967969f5e818b604e68f5637d2979dd9 100644
--- a/Plugin/Makefile
+++ b/Plugin/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.129 2007-08-27 13:46:22 geuzaine Exp $
+# $Id: Makefile,v 1.130 2007-09-10 04:47:08 geuzaine Exp $
 #
 # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 #
@@ -69,107 +69,111 @@ depend:
 	rm -f Makefile.new
 
 # DO NOT DELETE THIS LINE
-Plugin.o: Plugin.cpp Plugin.h ../Common/Options.h ../Common/Message.h \
-  ../Post/Views.h ../Post/ColorTable.h ../DataStr/List.h \
-  ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \
-  ../Common/GmshMatrix.h PluginManager.h CutMap.h Levelset.h CutGrid.h \
-  StreamLines.h CutPlane.h CutParametric.h CutSphere.h Skin.h \
-  ../DataStr/Tree.h ../DataStr/avl.h Extract.h ExtractElements.h \
-  ExtractEdges.h HarmonicToTime.h ModulusPhase.h Integrate.h Gradient.h \
-  Curl.h Divergence.h Annotate.h Remove.h MakeSimplex.h Smooth.h \
-  Transform.h Triangulate.h Warp.h SphericalRaise.h Eigenvectors.h \
-  Eigenvalues.h Lambda2.h Evaluate.h ../Post/OctreePost.h \
-  ../Common/Octree.h ../Common/OctreeInternals.h Probe.h FieldView.h \
-  ../Common/Context.h
-Levelset.o: Levelset.cpp Levelset.h Plugin.h ../Common/Options.h \
+Plugin.o: Plugin.cpp Plugin.h ../Common/Options.h ../Post/ColorTable.h \
   ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \
   ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \
   ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \
-  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h MakeSimplex.h \
-  ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h \
-  ../Graphics/Iso.h ../Common/Context.h ../DataStr/Malloc.h
-CutPlane.o: CutPlane.cpp CutPlane.h Levelset.h Plugin.h \
-  ../Common/Options.h ../Common/Message.h ../Post/Views.h \
+  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h PluginManager.h CutMap.h \
+  Levelset.h CutGrid.h StreamLines.h CutPlane.h CutParametric.h \
+  CutSphere.h Skin.h ../DataStr/Tree.h ../DataStr/avl.h Extract.h \
+  ExtractElements.h ExtractEdges.h HarmonicToTime.h ModulusPhase.h \
+  Integrate.h Gradient.h Curl.h Divergence.h Annotate.h Remove.h \
+  MakeSimplex.h Smooth.h Transform.h Triangulate.h Warp.h \
+  SphericalRaise.h Eigenvectors.h Eigenvalues.h Lambda2.h Evaluate.h \
+  ../Post/OctreePost.h ../Common/Octree.h ../Common/OctreeInternals.h \
+  Probe.h FieldView.h ../Common/Context.h
+Levelset.o: Levelset.cpp Levelset.h Plugin.h ../Common/Options.h \
+  ../Post/ColorTable.h ../Common/Message.h ../Post/Views.h \
   ../Post/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \
   ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
   ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \
-  ../Common/Context.h ../Common/GmshUI.h ../Graphics/Draw.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h
+  MakeSimplex.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \
+  ../DataStr/avl.h ../Graphics/Iso.h ../Common/Context.h \
+  ../DataStr/Malloc.h
+CutPlane.o: CutPlane.cpp CutPlane.h Levelset.h Plugin.h \
+  ../Common/Options.h ../Post/ColorTable.h ../Common/Message.h \
+  ../Post/Views.h ../Post/ColorTable.h ../DataStr/List.h \
+  ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \
+  ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \
+  ../Common/GmshMatrix.h ../Common/Context.h ../Common/GmshUI.h \
+  ../Graphics/Draw.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h
 CutSphere.o: CutSphere.cpp CutSphere.h Levelset.h Plugin.h \
-  ../Common/Options.h ../Common/Message.h ../Post/Views.h \
+  ../Common/Options.h ../Post/ColorTable.h ../Common/Message.h \
+  ../Post/Views.h ../Post/ColorTable.h ../DataStr/List.h \
+  ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \
+  ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \
+  ../Common/GmshMatrix.h ../Common/Context.h ../Common/GmshUI.h \
+  ../Graphics/Draw.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h
+CutMap.o: CutMap.cpp CutMap.h Levelset.h Plugin.h ../Common/Options.h \
+  ../Post/ColorTable.h ../Common/Message.h ../Post/Views.h \
   ../Post/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \
   ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
   ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \
-  ../Common/Context.h ../Common/GmshUI.h ../Graphics/Draw.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h
-CutMap.o: CutMap.cpp CutMap.h Levelset.h Plugin.h ../Common/Options.h \
+  ../Common/Context.h
+Smooth.o: Smooth.cpp Plugin.h ../Common/Options.h ../Post/ColorTable.h \
   ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \
   ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \
   ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \
-  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h ../Common/Context.h
-Smooth.o: Smooth.cpp Plugin.h ../Common/Options.h ../Common/Message.h \
-  ../Post/Views.h ../Post/ColorTable.h ../DataStr/List.h \
-  ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \
-  ../Common/GmshMatrix.h Smooth.h ../Common/Context.h
+  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h Smooth.h \
+  ../Common/Context.h
 CutParametric.o: CutParametric.cpp ../Post/OctreePost.h \
   ../Common/Octree.h ../Common/OctreeInternals.h CutParametric.h Plugin.h \
-  ../Common/Options.h ../Common/Message.h ../Post/Views.h \
-  ../Post/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \
-  ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
-  ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \
-  ../Common/Context.h ../Common/GmshUI.h ../Graphics/Draw.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h
-Lambda2.o: Lambda2.cpp Plugin.h ../Common/Options.h ../Common/Message.h \
+  ../Common/Options.h ../Post/ColorTable.h ../Common/Message.h \
   ../Post/Views.h ../Post/ColorTable.h ../DataStr/List.h \
   ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \
   ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \
-  ../Common/GmshMatrix.h Lambda2.h ../Common/Context.h \
-  ../Common/ShapeFunctions.h
-Eigenvectors.o: Eigenvectors.cpp Plugin.h ../Common/Options.h \
+  ../Common/GmshMatrix.h ../Common/Context.h ../Common/GmshUI.h \
+  ../Graphics/Draw.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h
+Lambda2.o: Lambda2.cpp Plugin.h ../Common/Options.h ../Post/ColorTable.h \
   ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \
   ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \
   ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \
-  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h Eigenvectors.h \
-  ../Common/Context.h ../DataStr/Malloc.h ../Numeric/EigSolve.h
+  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h Lambda2.h \
+  ../Common/Context.h ../Common/ShapeFunctions.h
+Eigenvectors.o: Eigenvectors.cpp Plugin.h ../Common/Options.h \
+  ../Post/ColorTable.h ../Common/Message.h ../Post/Views.h \
+  ../Post/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
+  ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \
+  Eigenvectors.h ../Common/Context.h ../DataStr/Malloc.h \
+  ../Numeric/EigSolve.h
 Eigenvalues.o: Eigenvalues.cpp Plugin.h ../Common/Options.h \
-  ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \
-  ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \
-  ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \
-  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h Eigenvalues.h \
-  ../Common/Context.h ../DataStr/Malloc.h
+  ../Post/ColorTable.h ../Common/Message.h ../Post/Views.h \
+  ../Post/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
+  ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \
+  Eigenvalues.h ../Common/Context.h ../DataStr/Malloc.h
 StreamLines.o: StreamLines.cpp ../Post/OctreePost.h ../Common/Octree.h \
   ../Common/OctreeInternals.h StreamLines.h Plugin.h ../Common/Options.h \
-  ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \
-  ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \
-  ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \
-  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h ../Common/Context.h \
-  ../Common/GmshUI.h ../Graphics/Draw.h ../Geo/SBoundingBox3d.h \
-  ../Geo/SPoint3.h
+  ../Post/ColorTable.h ../Common/Message.h ../Post/Views.h \
+  ../Post/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
+  ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \
+  ../Common/Context.h ../Common/GmshUI.h ../Graphics/Draw.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h
 CutGrid.o: CutGrid.cpp ../Post/OctreePost.h ../Common/Octree.h \
   ../Common/OctreeInternals.h CutGrid.h Plugin.h ../Common/Options.h \
-  ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \
-  ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \
-  ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \
-  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h ../Common/Context.h \
-  ../Common/GmshUI.h ../Graphics/Draw.h ../Geo/SBoundingBox3d.h \
-  ../Geo/SPoint3.h
+  ../Post/ColorTable.h ../Common/Message.h ../Post/Views.h \
+  ../Post/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
+  ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \
+  ../Common/Context.h ../Common/GmshUI.h ../Graphics/Draw.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h
 Transform.o: Transform.cpp Plugin.h ../Common/Options.h \
-  ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \
-  ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \
-  ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \
-  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h Transform.h \
-  ../Common/Context.h
+  ../Post/ColorTable.h ../Common/Message.h ../Post/Views.h \
+  ../Post/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
+  ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \
+  Transform.h ../Common/Context.h
 Triangulate.o: Triangulate.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
   ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \
-  Plugin.h ../Common/Options.h ../Post/Views.h ../Post/ColorTable.h \
-  ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \
-  ../Common/GmshMatrix.h Triangulate.h ../Common/Context.h \
-  ../Geo/MVertex.h ../Geo/SPoint3.h ../Geo/gmshFace.h ../Geo/Geo.h \
-  ../Common/GmshDefines.h ../Geo/gmshSurface.h ../Geo/Pair.h \
+  Plugin.h ../Common/Options.h ../Post/ColorTable.h ../Post/Views.h \
+  ../Post/ColorTable.h ../Common/VertexArray.h ../Geo/SVector3.h \
+  ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \
+  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h Triangulate.h \
+  ../Common/Context.h ../Geo/MVertex.h ../Geo/SPoint3.h ../Geo/gmshFace.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/SPoint3.h ../Geo/SPoint2.h \
   ../Geo/ExtrudeParams.h ../Geo/GFace.h ../Geo/GPoint.h ../Geo/GEntity.h \
@@ -182,41 +186,42 @@ Triangulate.o: Triangulate.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../Geo/ExtrudeParams.h ../Geo/MElement.h ../Geo/SPoint2.h \
   ../Geo/SVector3.h ../Geo/Pair.h ../Geo/ExtrudeParams.h \
   ../Geo/gmshVertex.h ../Geo/Geo.h ../Geo/GVertex.h ../Geo/Range.h
-Warp.o: Warp.cpp Plugin.h ../Common/Options.h ../Common/Message.h \
-  ../Post/Views.h ../Post/ColorTable.h ../DataStr/List.h \
-  ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \
-  ../Common/GmshMatrix.h Warp.h ../Common/Context.h
-SphericalRaise.o: SphericalRaise.cpp Plugin.h ../Common/Options.h \
+Warp.o: Warp.cpp Plugin.h ../Common/Options.h ../Post/ColorTable.h \
   ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \
   ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \
   ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \
-  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h SphericalRaise.h \
+  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h Warp.h \
   ../Common/Context.h
-Skin.o: Skin.cpp Plugin.h ../Common/Options.h ../Common/Message.h \
-  ../Post/Views.h ../Post/ColorTable.h ../DataStr/List.h \
-  ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \
-  ../Common/GmshMatrix.h Skin.h ../DataStr/Tree.h ../DataStr/avl.h \
-  ../Common/Context.h ../DataStr/Malloc.h
-Extract.o: Extract.cpp Plugin.h ../Common/Options.h ../Common/Message.h \
-  ../Post/Views.h ../Post/ColorTable.h ../DataStr/List.h \
-  ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \
-  ../Common/GmshMatrix.h Extract.h ../Common/Context.h \
-  ../DataStr/Malloc.h
-ExtractElements.o: ExtractElements.cpp Plugin.h ../Common/Options.h \
+SphericalRaise.o: SphericalRaise.cpp Plugin.h ../Common/Options.h \
+  ../Post/ColorTable.h ../Common/Message.h ../Post/Views.h \
+  ../Post/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
+  ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \
+  SphericalRaise.h ../Common/Context.h
+Skin.o: Skin.cpp Plugin.h ../Common/Options.h ../Post/ColorTable.h \
   ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \
   ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \
   ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \
-  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h ExtractElements.h \
-  ../Common/Context.h ../DataStr/Malloc.h
-ExtractEdges.o: ExtractEdges.cpp Plugin.h ../Common/Options.h \
+  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h Skin.h ../DataStr/Tree.h \
+  ../DataStr/avl.h ../Common/Context.h ../DataStr/Malloc.h
+Extract.o: Extract.cpp Plugin.h ../Common/Options.h ../Post/ColorTable.h \
   ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \
   ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \
   ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \
-  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h ExtractEdges.h \
-  ../DataStr/Tree.h ../DataStr/avl.h ../Common/Context.h \
+  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h Extract.h \
+  ../Common/Context.h ../DataStr/Malloc.h
+ExtractElements.o: ExtractElements.cpp Plugin.h ../Common/Options.h \
+  ../Post/ColorTable.h ../Common/Message.h ../Post/Views.h \
+  ../Post/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
+  ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \
+  ExtractElements.h ../Common/Context.h ../DataStr/Malloc.h
+ExtractEdges.o: ExtractEdges.cpp Plugin.h ../Common/Options.h \
+  ../Post/ColorTable.h ../Common/Message.h ../Post/Views.h \
+  ../Post/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
+  ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \
+  ExtractEdges.h ../DataStr/Tree.h ../DataStr/avl.h ../Common/Context.h \
   ../DataStr/Malloc.h ../Mesh/BDS.h ../Geo/GFace.h ../Geo/GPoint.h \
   ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/GmshDefines.h \
@@ -226,93 +231,99 @@ ExtractEdges.o: ExtractEdges.cpp Plugin.h ../Common/Options.h \
   ../Geo/MElement.h ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h \
   ../Geo/SVector3.h ../Common/Hash.h ../Geo/MFace.h ../Geo/MVertex.h \
   ../Geo/SVector3.h ../Geo/ExtrudeParams.h ../Geo/MElement.h \
-  ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/ExtrudeParams.h
+  ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/ExtrudeParams.h \
+  ../Post/PView.h ../Post/PViewData.h ../Post/PViewOptions.h \
+  ../Post/ColorTable.h
 MakeSimplex.o: MakeSimplex.cpp Plugin.h ../Common/Options.h \
-  ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \
-  ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \
-  ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \
-  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h MakeSimplex.h \
-  ../DataStr/Tree.h ../DataStr/avl.h ../Common/Context.h \
+  ../Post/ColorTable.h ../Common/Message.h ../Post/Views.h \
+  ../Post/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
+  ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \
+  MakeSimplex.h ../DataStr/Tree.h ../DataStr/avl.h ../Common/Context.h \
   ../DataStr/Malloc.h
-Evaluate.o: Evaluate.cpp Plugin.h ../Common/Options.h ../Common/Message.h \
-  ../Post/Views.h ../Post/ColorTable.h ../DataStr/List.h \
-  ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \
-  ../Common/GmshMatrix.h Evaluate.h ../Post/OctreePost.h \
-  ../Common/Octree.h ../Common/OctreeInternals.h ../Common/Context.h
+Evaluate.o: Evaluate.cpp Plugin.h ../Common/Options.h \
+  ../Post/ColorTable.h ../Common/Message.h ../Post/Views.h \
+  ../Post/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
+  ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \
+  Evaluate.h ../Post/OctreePost.h ../Common/Octree.h \
+  ../Common/OctreeInternals.h ../Common/Context.h
 FieldView.o: FieldView.cpp Plugin.h ../Common/Options.h \
-  ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \
-  ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \
-  ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \
-  ../Post/AdaptiveViews.h ../Common/GmshMatrix.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/SPoint3.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 ../Geo/MElement.h \
-  ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
-  ../Common/Hash.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
-  ../Common/Context.h ../Geo/ExtrudeParams.h ../Post/OctreePost.h \
-  ../Common/Octree.h ../Common/OctreeInternals.h FieldView.h \
-  ../Common/ShapeFunctions.h
+  ../Post/ColorTable.h ../Common/Message.h ../Post/Views.h \
+  ../Post/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
+  ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \
+  ../Mesh/Field.h ../Post/PView.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/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 \
+  ../Geo/MElement.h ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h \
+  ../Geo/SVector3.h ../Common/Hash.h ../Geo/MFace.h ../Geo/MVertex.h \
+  ../Geo/SVector3.h ../Common/Context.h ../Geo/ExtrudeParams.h \
+  ../Post/OctreePost.h ../Common/Octree.h ../Common/OctreeInternals.h \
+  FieldView.h ../Common/ShapeFunctions.h
 Integrate.o: Integrate.cpp Plugin.h ../Common/Options.h \
+  ../Post/ColorTable.h ../Common/Message.h ../Post/Views.h \
+  ../Post/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
+  ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \
+  Integrate.h ../Common/Context.h ../Common/ShapeFunctions.h
+Gradient.o: Gradient.cpp Plugin.h ../Common/Options.h \
+  ../Post/ColorTable.h ../Common/Message.h ../Post/Views.h \
+  ../Post/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
+  ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \
+  Gradient.h ../Common/Context.h ../Common/ShapeFunctions.h
+Curl.o: Curl.cpp Plugin.h ../Common/Options.h ../Post/ColorTable.h \
   ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \
   ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \
   ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \
-  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h Integrate.h \
+  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h Curl.h \
   ../Common/Context.h ../Common/ShapeFunctions.h
-Gradient.o: Gradient.cpp Plugin.h ../Common/Options.h ../Common/Message.h \
-  ../Post/Views.h ../Post/ColorTable.h ../DataStr/List.h \
-  ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \
-  ../Common/GmshMatrix.h Gradient.h ../Common/Context.h \
-  ../Common/ShapeFunctions.h
-Curl.o: Curl.cpp Plugin.h ../Common/Options.h ../Common/Message.h \
-  ../Post/Views.h ../Post/ColorTable.h ../DataStr/List.h \
-  ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \
-  ../Common/GmshMatrix.h Curl.h ../Common/Context.h \
-  ../Common/ShapeFunctions.h
 Divergence.o: Divergence.cpp Plugin.h ../Common/Options.h \
+  ../Post/ColorTable.h ../Common/Message.h ../Post/Views.h \
+  ../Post/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
+  ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \
+  Divergence.h ../Common/Context.h ../Common/ShapeFunctions.h
+Annotate.o: Annotate.cpp Plugin.h ../Common/Options.h \
+  ../Post/ColorTable.h ../Common/Message.h ../Post/Views.h \
+  ../Post/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
+  ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \
+  Annotate.h ../Common/Context.h ../Common/GmshUI.h ../Fltk/GUI.h \
+  ../Fltk/Opengl_Window.h ../Fltk/Colorbar_Window.h \
+  ../Fltk/Popup_Button.h ../Fltk/SpherePosition_Widget.h \
+  ../Graphics/Draw.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h
+Remove.o: Remove.cpp Plugin.h ../Common/Options.h ../Post/ColorTable.h \
   ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \
   ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \
   ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \
-  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h Divergence.h \
-  ../Common/Context.h ../Common/ShapeFunctions.h
-Annotate.o: Annotate.cpp Plugin.h ../Common/Options.h ../Common/Message.h \
-  ../Post/Views.h ../Post/ColorTable.h ../DataStr/List.h \
-  ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \
-  ../Common/GmshMatrix.h Annotate.h ../Common/Context.h \
-  ../Common/GmshUI.h ../Fltk/GUI.h ../Fltk/Opengl_Window.h \
-  ../Fltk/Colorbar_Window.h ../Fltk/Popup_Button.h \
-  ../Fltk/SpherePosition_Widget.h ../Graphics/Draw.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h
-Remove.o: Remove.cpp Plugin.h ../Common/Options.h ../Common/Message.h \
-  ../Post/Views.h ../Post/ColorTable.h ../DataStr/List.h \
-  ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \
-  ../Common/GmshMatrix.h Remove.h ../Common/Context.h
+  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h Remove.h \
+  ../Common/Context.h
 Probe.o: Probe.cpp Probe.h Plugin.h ../Common/Options.h \
-  ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \
-  ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \
-  ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \
-  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h ../Common/Context.h \
-  ../Common/GmshUI.h ../Graphics/Draw.h ../Geo/SBoundingBox3d.h \
-  ../Geo/SPoint3.h ../Post/OctreePost.h ../Common/Octree.h \
-  ../Common/OctreeInternals.h
+  ../Post/ColorTable.h ../Common/Message.h ../Post/Views.h \
+  ../Post/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
+  ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \
+  ../Common/Context.h ../Common/GmshUI.h ../Graphics/Draw.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Post/OctreePost.h \
+  ../Common/Octree.h ../Common/OctreeInternals.h
 HarmonicToTime.o: HarmonicToTime.cpp Plugin.h ../Common/Options.h \
-  ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \
-  ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \
-  ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \
-  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h HarmonicToTime.h \
-  ../Common/Context.h
+  ../Post/ColorTable.h ../Common/Message.h ../Post/Views.h \
+  ../Post/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
+  ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \
+  HarmonicToTime.h ../Common/Context.h
 ModulusPhase.o: ModulusPhase.cpp Plugin.h ../Common/Options.h \
-  ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \
-  ../DataStr/List.h ../Common/VertexArray.h ../Geo/SVector3.h \
-  ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \
-  ../Post/AdaptiveViews.h ../Common/GmshMatrix.h ModulusPhase.h \
-  ../Common/Context.h
+  ../Post/ColorTable.h ../Common/Message.h ../Post/Views.h \
+  ../Post/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
+  ../Numeric/Numeric.h ../Post/AdaptiveViews.h ../Common/GmshMatrix.h \
+  ModulusPhase.h ../Common/Context.h
diff --git a/Plugin/Plugin.cpp b/Plugin/Plugin.cpp
index 792f4516070d8104afd912d4eeeb5d6c626a1190..6b18b63026acc87dfc7332d0b483645fed3baa04 100644
--- a/Plugin/Plugin.cpp
+++ b/Plugin/Plugin.cpp
@@ -1,4 +1,4 @@
-// $Id: Plugin.cpp,v 1.89 2007-05-07 07:50:33 remacle Exp $
+// $Id: Plugin.cpp,v 1.90 2007-09-10 04:47:08 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -64,6 +64,24 @@
 #include "FieldView.h"
 #include "Context.h"
 
+
+//////////// FIXME ///////////////
+
+Post_View *BeginView(int alloc)
+{
+  return 0;
+}
+void EndView(Post_View *v, int AddInUI, char *FileName, char *Name)
+{
+
+}
+
+//////////////////////////////
+
+
+
+
+
 extern Context_T CTX;
 
 const char *GMSH_PluginEntry = "GMSH_RegisterPlugin";
diff --git a/Plugin/Probe.cpp b/Plugin/Probe.cpp
index 89d33f6755133842c8e0890df932ac3ae2260b28..d9543a707a31c1cd16140879b3c4394bc2b56956 100644
--- a/Plugin/Probe.cpp
+++ b/Plugin/Probe.cpp
@@ -1,4 +1,4 @@
-// $Id: Probe.cpp,v 1.15 2007-08-29 18:41:06 geuzaine Exp $
+// $Id: Probe.cpp,v 1.16 2007-09-10 04:47:08 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -168,7 +168,12 @@ Post_View *GMSH_ProbePlugin::execute(Post_View * v)
     Msg(GERROR, "View[%d] does not exist", iView);
     return v;
   }
-  
+
+
+  Msg(FATAL, "XXXXXXXXXXXXXXXXXXXXX");
+  return 0;
+
+  /*
   Post_View *v1 = *(Post_View **)List_Pointer(CTX.post.list, iView);
   Post_View *v2 = BeginView(1);
 
@@ -217,4 +222,7 @@ Post_View *GMSH_ProbePlugin::execute(Post_View * v)
   sprintf(filename, "%s_Probe.pos", v1->Name);
   EndView(v2, 1, filename, name);
   return v2;
+
+
+  */
 }
diff --git a/Plugin/Smooth.cpp b/Plugin/Smooth.cpp
index 35f3cb33a2461a02dbf20b0598bf04b364bbe4f6..c6958aabb4dc834e526c1ffc09c02bf0df82b1f2 100644
--- a/Plugin/Smooth.cpp
+++ b/Plugin/Smooth.cpp
@@ -1,4 +1,4 @@
-// $Id: Smooth.cpp,v 1.25 2007-09-04 13:47:05 remacle Exp $
+// $Id: Smooth.cpp,v 1.26 2007-09-10 04:47:08 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -92,7 +92,6 @@ Post_View *GMSH_SmoothPlugin::execute(Post_View * v)
 
   Post_View *v1 = *(Post_View **)List_Pointer(CTX.post.list, iView);
 
-  v1->smooth();
+  //v1->smooth();
   return v1;
 }
-
diff --git a/Plugin/StreamLines.cpp b/Plugin/StreamLines.cpp
index 13e82231b08f90356619b686a94c4c88aa94d902..e3f0fd5389d339c3ccdf06af1482b3668ab475ec 100644
--- a/Plugin/StreamLines.cpp
+++ b/Plugin/StreamLines.cpp
@@ -1,4 +1,4 @@
-// $Id: StreamLines.cpp,v 1.29 2007-08-29 18:41:06 geuzaine Exp $
+// $Id: StreamLines.cpp,v 1.30 2007-09-10 04:47:08 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -243,6 +243,10 @@ Post_View * GMSH_StreamLinesPlugin::GenerateView(int iView, int dView) const
   double XINIT[3], X[3], DX[3], X1[3], X2[3], X3[3], X4[3];
   double val[3], *val2 = NULL;
 
+  Msg(FATAL, "XXXXXXXXXXXXXXXXXXX");
+  return 0;
+  /*
+
   Post_View *View = BeginView(1);
 
   Post_View *v1;
@@ -374,6 +378,8 @@ Post_View * GMSH_StreamLinesPlugin::GenerateView(int iView, int dView) const
   EndView(View, 1, filename, name);
 
   return View;
+
+  */
 }
 
 Post_View *GMSH_StreamLinesPlugin::execute(Post_View * v)
diff --git a/Post/Makefile b/Post/Makefile
index 248bd06f4cea3e218617233ae523d7eab696b75c..dad83c6676a558646ca5d04b62dba07f9dc37055 100644
--- a/Post/Makefile
+++ b/Post/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.12 2007-09-08 21:26:04 geuzaine Exp $
+# $Id: Makefile,v 1.13 2007-09-10 04:47:08 geuzaine Exp $
 #
 # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 #
@@ -32,8 +32,6 @@ SRC = PView.cpp\
           PViewDataList.cpp PViewDataListIO.cpp\
           PViewDataGModel.cpp\
         PViewOptions.cpp\
-      Views.cpp\
-        ViewsIO.cpp\
       AdaptiveViews.cpp\
       OctreePost.cpp\
       ColorTable.cpp
@@ -94,30 +92,19 @@ PViewDataGModel.o: PViewDataGModel.cpp PViewDataGModel.h PViewData.h \
   ../Geo/SBoundingBox3d.h
 PViewOptions.o: PViewOptions.cpp PViewOptions.h ColorTable.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/Message.h
-Views.o: Views.cpp ../Common/Gmsh.h ../Common/Message.h \
-  ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
-  ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \
-  ../Numeric/Numeric.h Views.h ColorTable.h ../Common/VertexArray.h \
-  ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
-  AdaptiveViews.h ../Common/GmshMatrix.h ../Common/Context.h \
-  ../Common/Options.h ../Mesh/BackgroundMesh.h
-ViewsIO.o: ViewsIO.cpp ../Common/Gmsh.h ../Common/Message.h \
-  ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
-  ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \
-  ../Numeric/Numeric.h Views.h ColorTable.h ../Common/VertexArray.h \
-  ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
-  AdaptiveViews.h ../Common/GmshMatrix.h ../Common/Context.h
 AdaptiveViews.o: AdaptiveViews.cpp AdaptiveViews.h ../DataStr/List.h \
   ../Common/GmshMatrix.h ../Plugin/Plugin.h ../Common/Options.h \
-  ../Common/Message.h ../Post/Views.h ../Post/ColorTable.h \
-  ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/AdaptiveViews.h \
-  ../Common/OS.h
+  ../Post/ColorTable.h ../Common/Message.h ../Post/Views.h \
+  ../Post/ColorTable.h ../Common/VertexArray.h ../Geo/SVector3.h \
+  ../Geo/SPoint3.h ../Common/SmoothData.h ../Numeric/Numeric.h \
+  ../Post/AdaptiveViews.h ../Common/OS.h
 OctreePost.o: OctreePost.cpp ../Common/Octree.h \
-  ../Common/OctreeInternals.h OctreePost.h ../DataStr/List.h Views.h \
-  ColorTable.h ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Common/SmoothData.h ../Numeric/Numeric.h AdaptiveViews.h \
-  ../Common/GmshMatrix.h ../Common/Message.h ../Common/ShapeFunctions.h
+  ../Common/OctreeInternals.h OctreePost.h ../DataStr/List.h PView.h \
+  ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \
+  ../Common/SmoothData.h ../Numeric/Numeric.h PViewData.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h PViewOptions.h ColorTable.h \
+  PViewDataList.h AdaptiveViews.h ../Common/GmshMatrix.h \
+  ../Common/Message.h ../Common/ShapeFunctions.h
 ColorTable.o: ColorTable.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
   ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \
diff --git a/Post/OctreePost.cpp b/Post/OctreePost.cpp
index d0f6e6c36b769e4ef383bf59613aa6f81baba749..797916a0948bf750f3b7357b66459ab54994b28a 100644
--- a/Post/OctreePost.cpp
+++ b/Post/OctreePost.cpp
@@ -1,4 +1,4 @@
-// $Id: OctreePost.cpp,v 1.1 2007-07-09 13:54:37 geuzaine Exp $
+// $Id: OctreePost.cpp,v 1.2 2007-09-10 04:47:08 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -22,7 +22,8 @@
 #include "Octree.h"
 #include "OctreePost.h"
 #include "List.h"
-#include "Views.h"
+#include "PView.h"
+#include "PViewDataList.h"
 #include "Numeric.h"
 #include "Message.h"
 #include "ShapeFunctions.h"
@@ -223,85 +224,94 @@ OctreePost::~OctreePost()
   Octree_Delete(SY); Octree_Delete(VY); Octree_Delete(TY);
 }
 
-OctreePost::OctreePost(Post_View *v) 
+OctreePost::OctreePost(PView *v) 
   : theView(v)
 {
-  double min [3] = {v->BBox[0], v->BBox[2], v->BBox[4]};
+  PViewDataList *l = dynamic_cast<PViewDataList*>(theView->getData());
 
-  double size[3] = {v->BBox[1] - v->BBox[0],
-		    v->BBox[3] - v->BBox[2],
-		    v->BBox[5] - v->BBox[4]};		    
+  if(!l){
+    Msg(GERROR, "OctreePost only accepts list-based view data for now");
+    return;
+  }
+
+  SBoundingBox3d bb = l->getBoundingBox();
+
+  double min[3] = {bb.min().x(), bb.min().y(), bb.min().z()};
+
+  double size[3] = {bb.max().x() - bb.min().x(),
+		    bb.max().y() - bb.min().y(),
+		    bb.max().z() - bb.min().z()};		    
   
   const int maxElePerBucket = 100; // memory vs. speed trade-off
 
   SL = Octree_Create(maxElePerBucket, min, size, linBB, linCentroid, linInEle);
-  addListOfStuff(SL, v->SL, 6 + 2 * v->NbTimeStep);
+  addListOfStuff(SL, l->SL, 6 + 2 * l->getNumTimeSteps());
   Octree_Arrange(SL);
   VL = Octree_Create(maxElePerBucket, min, size, linBB, linCentroid, linInEle);
-  addListOfStuff(VL, v->VL, 6 + 6 * v->NbTimeStep);
+  addListOfStuff(VL, l->VL, 6 + 6 * l->getNumTimeSteps());
   Octree_Arrange(VL);
   TL = Octree_Create(maxElePerBucket, min, size, linBB, linCentroid, linInEle);
-  addListOfStuff(TL, v->TL, 6 + 18 * v->NbTimeStep);
+  addListOfStuff(TL, l->TL, 6 + 18 * l->getNumTimeSteps());
   Octree_Arrange(TL);
 
   ST = Octree_Create(maxElePerBucket, min, size, triBB, triCentroid, triInEle);
-  addListOfStuff(ST, v->ST, 9 + 3 * v->NbTimeStep);
+  addListOfStuff(ST, l->ST, 9 + 3 * l->getNumTimeSteps());
   Octree_Arrange(ST);
   VT = Octree_Create(maxElePerBucket, min, size, triBB, triCentroid, triInEle);
-  addListOfStuff(VT, v->VT, 9 + 9 * v->NbTimeStep);
+  addListOfStuff(VT, l->VT, 9 + 9 * l->getNumTimeSteps());
   Octree_Arrange(VT);
   TT = Octree_Create(maxElePerBucket, min, size, triBB, triCentroid, triInEle);
-  addListOfStuff(TT, v->TT, 9 + 27 * v->NbTimeStep);
+  addListOfStuff(TT, l->TT, 9 + 27 * l->getNumTimeSteps());
   Octree_Arrange(TT);
 
   SQ = Octree_Create(maxElePerBucket, min, size, quaBB, quaCentroid, quaInEle);
-  addListOfStuff(SQ, v->SQ, 12 + 4 * v->NbTimeStep);
+  addListOfStuff(SQ, l->SQ, 12 + 4 * l->getNumTimeSteps());
   Octree_Arrange(SQ);
   VQ = Octree_Create(maxElePerBucket, min, size, quaBB, quaCentroid, quaInEle);
-  addListOfStuff(VQ, v->VQ, 12 + 12 * v->NbTimeStep);
+  addListOfStuff(VQ, l->VQ, 12 + 12 * l->getNumTimeSteps());
   Octree_Arrange(VQ);
   TQ = Octree_Create(maxElePerBucket, min, size, quaBB, quaCentroid, quaInEle);
-  addListOfStuff(TQ, v->TQ, 12 + 36 * v->NbTimeStep);
+  addListOfStuff(TQ, l->TQ, 12 + 36 * l->getNumTimeSteps());
   Octree_Arrange(TQ);
 
   SS = Octree_Create(maxElePerBucket, min, size, tetBB, tetCentroid, tetInEle);
-  addListOfStuff(SS, v->SS, 12 + 4 * v->NbTimeStep);
+  addListOfStuff(SS, l->SS, 12 + 4 * l->getNumTimeSteps());
   Octree_Arrange(SS);
   VS = Octree_Create(maxElePerBucket, min, size, tetBB, tetCentroid, tetInEle);
-  addListOfStuff(VS, v->VS, 12 + 12 * v->NbTimeStep);
+  addListOfStuff(VS, l->VS, 12 + 12 * l->getNumTimeSteps());
   Octree_Arrange(VS);
   TS = Octree_Create(maxElePerBucket, min, size, tetBB, tetCentroid, tetInEle);
-  addListOfStuff(TS, v->TS, 12 + 36 * v->NbTimeStep);
+  addListOfStuff(TS, l->TS, 12 + 36 * l->getNumTimeSteps());
   Octree_Arrange(TS);
 
   SH = Octree_Create(maxElePerBucket, min, size, hexBB, hexCentroid, hexInEle);
-  addListOfStuff(SH, v->SH, 24 + 8 * v->NbTimeStep);
+  addListOfStuff(SH, l->SH, 24 + 8 * l->getNumTimeSteps());
   Octree_Arrange(SH);
   VH = Octree_Create(maxElePerBucket, min, size, hexBB, hexCentroid, hexInEle);
-  addListOfStuff(VH, v->VH, 24 + 24 * v->NbTimeStep);
+  addListOfStuff(VH, l->VH, 24 + 24 * l->getNumTimeSteps());
   Octree_Arrange(VH);
   TH = Octree_Create(maxElePerBucket, min, size, hexBB, hexCentroid, hexInEle);
-  addListOfStuff(TH, v->TH, 24 + 72 * v->NbTimeStep);
+  addListOfStuff(TH, l->TH, 24 + 72 * l->getNumTimeSteps());
   Octree_Arrange(TH);
 
   SI = Octree_Create(maxElePerBucket, min, size, priBB, priCentroid, priInEle);
-  addListOfStuff(SI, v->SI, 18 + 6 * v->NbTimeStep);
+  addListOfStuff(SI, l->SI, 18 + 6 * l->getNumTimeSteps());
   Octree_Arrange(SI);
   VI = Octree_Create(maxElePerBucket, min, size, priBB, priCentroid, priInEle);
-  addListOfStuff(VI, v->VI, 18 + 18 * v->NbTimeStep);
+  addListOfStuff(VI, l->VI, 18 + 18 * l->getNumTimeSteps());
   Octree_Arrange(VI);
   TI = Octree_Create(maxElePerBucket, min, size, priBB, priCentroid, priInEle);
-  addListOfStuff(TI, v->TI, 18 + 54 * v->NbTimeStep);
+  addListOfStuff(TI, l->TI, 18 + 54 * l->getNumTimeSteps());
   Octree_Arrange(TI);
 
   SY = Octree_Create(maxElePerBucket, min, size, pyrBB, pyrCentroid, pyrInEle);
-  addListOfStuff(SY, v->SY, 15 + 5 * v->NbTimeStep);
+  addListOfStuff(SY, l->SY, 15 + 5 * l->getNumTimeSteps());
   Octree_Arrange(SY);
   VY = Octree_Create(maxElePerBucket, min, size, pyrBB, pyrCentroid, pyrInEle);
-  addListOfStuff(VY, v->VY, 15 + 15 * v->NbTimeStep);
+  addListOfStuff(VY, l->VY, 15 + 15 * l->getNumTimeSteps());
   Octree_Arrange(VY);
   TY = Octree_Create(maxElePerBucket, min, size, pyrBB, pyrCentroid, pyrInEle);
-  addListOfStuff(TY, v->TY, 15 + 45 * v->NbTimeStep);
+  addListOfStuff(TY, l->TY, 15 + 45 * l->getNumTimeSteps());
   Octree_Arrange(TY);
 }
 
@@ -318,7 +328,7 @@ bool OctreePost::getValue(void *in, int dim, int nbNod, int nbComp,
 
   e->xyz2uvw(P, U);
   if(timestep < 0){
-    for(int i = 0; i < theView->NbTimeStep; i++)
+    for(int i = 0; i < theView->getData()->getNumTimeSteps(); i++)
       for(int j = 0; j < nbComp; j++)
 	values[nbComp * i + j] = e->interpolate(&V[nbNod * nbComp * i + j], 
 						U[0], U[1], U[2], nbComp);
@@ -342,7 +352,7 @@ bool OctreePost::searchScalar(double x, double y, double z, double *values,
   double P[3] = {x, y, z};
 
   if(timestep < 0)
-    for(int i = 0; i < theView->NbTimeStep; i++)
+    for(int i = 0; i < theView->getData()->getNumTimeSteps(); i++)
       values[i] = 0.0; 
   else
     values[0] = 0.0;
@@ -364,7 +374,7 @@ bool OctreePost::searchVector(double x, double y, double z, double *values,
   double P[3] = {x, y, z};
 
   if(timestep < 0)
-    for(int i = 0; i < 3 * theView->NbTimeStep; i++)
+    for(int i = 0; i < 3 * theView->getData()->getNumTimeSteps(); i++)
       values[i] = 0.0; 
   else
     for(int i = 0; i < 3; i++)
@@ -387,7 +397,7 @@ bool OctreePost::searchTensor(double x, double y, double z, double *values,
   double P[3] = {x, y, z};
 
   if(timestep < 0)
-    for(int i = 0; i < 9 * theView->NbTimeStep; i++)
+    for(int i = 0; i < 9 * theView->getData()->getNumTimeSteps(); i++)
       values[i] = 0.0; 
   else
     for(int i = 0; i < 9; i++)
diff --git a/Post/OctreePost.h b/Post/OctreePost.h
index e7960d984f14026a2d5e86f7377d7b5c37bf866c..ee50bca261d3fa69a73a98da5185465bed7e55fd 100644
--- a/Post/OctreePost.h
+++ b/Post/OctreePost.h
@@ -22,7 +22,7 @@
 
 #include "Octree.h"
 
-class  Post_View;
+class PView;
 
 class OctreePost 
 {
@@ -33,11 +33,11 @@ class OctreePost
   Octree *SH, *VH, *TH;
   Octree *SI, *VI, *TI;
   Octree *SY, *VY, *TY;
-  Post_View *theView;
+  PView *theView;
   bool getValue(void *in, int dim, int nbNod, int nbComp, 
 		double P[3], int timestep, double *values, double *size_elem);
  public :
-  OctreePost(Post_View *);
+  OctreePost(PView *);
   ~OctreePost();
   // search for the value of the View at point x, y, z. Values are
   // interpolated using standard first order shape functions in the
diff --git a/Post/PView.cpp b/Post/PView.cpp
index 5035042e0e59e12ddab7f1a28abd9f5e74c1fe64..b6b5e4ba327a74586efc3e5b6475d68cf427e4b3 100644
--- a/Post/PView.cpp
+++ b/Post/PView.cpp
@@ -1,4 +1,4 @@
-// $Id: PView.cpp,v 1.7 2007-09-08 21:26:04 geuzaine Exp $
+// $Id: PView.cpp,v 1.8 2007-09-10 04:47:08 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -29,35 +29,74 @@
 int PView::_globalNum = 0;
 std::vector<PView*> PView::list;
 
-PView::PView(bool allocate)
-  : _changed(true), _aliasOf(0), _links(0), _eye(0., 0., 0.), 
-    va_points(0), va_lines(0), va_triangles(0), va_vectors(0), 
-    normals(0)
+void PView::_init()
 {
   _num = ++_globalNum;
-  _data = new PViewDataList(allocate);
-  _options = new PViewOptions();
+  _changed = true;
+  _aliasOf = 0;
+  _links = 0;
+  _eye = SPoint3(0., 0., 0.);
+  va_points = va_lines = va_triangles = va_vectors = 0;
+  normals = 0;
   list.push_back(this);
-  // reset indices of all views
   for(unsigned int i = 0; i < list.size(); i++) list[i]->setIndex(i);
 }
 
+PView::PView(bool allocate)
+{
+  _init();
+  _data = new PViewDataList(allocate);
+  _options = new PViewOptions(PViewOptions::reference);
+}
+
+PView::PView(PViewData *data)
+{
+  _init();
+  _data = data;
+  _options = new PViewOptions(PViewOptions::reference);
+}
+
 PView::PView(PView *ref, bool copyOptions)
-  : _changed(true), _links(0), _eye(0., 0., 0.), 
-    va_points(0), va_lines(0), va_triangles(0), va_vectors(0), 
-    normals(0)
 {
-  _num = ++_globalNum;
+  _init();
   _aliasOf = ref->getNum();
   ref->getLinks()++;
   _data = ref->getData();
   if(copyOptions)
     _options = new PViewOptions(*ref->getOptions());
   else
-    _options = new PViewOptions();
-  list.push_back(this);
-  // reset indices of all views
-  for(unsigned int i = 0; i < list.size(); i++) list[i]->setIndex(i);
+    _options = new PViewOptions(PViewOptions::reference);
+}
+
+PView::PView(std::string xname, std::string yname,
+	     std::vector<double> &x, std::vector<double> &y)
+{
+  _init();
+  PViewDataList *data = new PViewDataList(true);
+  _data = data;
+  for(unsigned int i = 0; i < y.size(); i++){
+    double d;
+    if(x.size() == y.size()){
+      List_Add(data->SP, &x[i]);
+    }
+    else{
+      d = y.size() > 1 ? (double)i / (double)(y.size() - 1) : 0.;
+      List_Add(data->SP, &d);
+    }
+    d = 0.;
+    List_Add(data->SP, &d);
+    List_Add(data->SP, &d);
+    List_Add(data->SP, &y[i]);
+    data->NbSP++;
+  }
+  data->setName(yname);
+  data->setFileName(yname + ".pos");
+  data->finalize();
+
+  _options = new PViewOptions(PViewOptions::reference);
+  _options->Type = PViewOptions::Plot2DSpace;
+  _options->Axes = 2;
+  strcpy(_options->AxesLabel[0], xname.c_str());
 }
 
 PView::~PView()
@@ -96,6 +135,14 @@ PView::~PView()
   delete _data;
 }
 
+void PView::setOptions(PViewOptions *val)
+{
+  if(val)
+    _options = val;
+  else if(_options) // deep copy options from reference view
+    *_options = PViewOptions::reference;
+}
+
 void PView::setChanged(bool val)
 { 
   _changed = val; 
@@ -191,6 +238,7 @@ bool PView::read(std::string filename, int fileIndex)
   }
 
   fclose(fp);
+
   return true;
 }
 
@@ -250,3 +298,16 @@ void PView::combine(bool time, int how, bool remove)
     for(std::set<PView*>::iterator it = rm.begin(); it != rm.end(); it++)
       delete *it;
 }
+
+bool PView::write(std::string filename, int format, bool append)
+{
+  switch(format){
+  case 0: return _data->writePOS(filename, false, false, append); // ASCII
+  case 1: return _data->writePOS(filename, true, false, append); // binary
+  case 2: return _data->writePOS(filename, false, true, append); // parsed
+  case 3: return _data->writeSTL(filename); 
+  case 4: return _data->writeTXT(filename);
+  case 5: return _data->writeMSH(filename);
+  default: Msg(GERROR, "Unknown view format %d", format); return false;
+  }
+}
diff --git a/Post/PView.h b/Post/PView.h
index 4e6523adfe022df57ae2e53fb52f0b52180243e9..59fce43fb9e1cd6613d8843f28e20cd01eeea3c8 100644
--- a/Post/PView.h
+++ b/Post/PView.h
@@ -47,19 +47,28 @@ class PView{
   PViewOptions *_options;
   // the data
   PViewData *_data;
+  // initialize private stuff
+  void _init();
  public:
-  // default constructor
+  // creates a new view with list-based data, allocated or not
   PView(bool allocate=true);
-  // alias constructor
+  // constructs a new view using the given data
+  PView(PViewData *data);
+  // constructs a new view, alias of the view "ref"
   PView(PView *ref, bool copyOptions=true);
+  // constructs a new list-based view from a simple 2D dataset
+  PView(std::string xname, std::string yname,
+	std::vector<double> &x, std::vector<double> &y);
   // default destructor
   ~PView();
   PViewOptions *getOptions(){ return _options; }  
+  void setOptions(PViewOptions *val=0);  
   PViewData *getData(){ return _data; }
+  void setData(PViewData *val){ _data = val; }
   int getNum(){ return _num; }
   int getIndex(){ return _index; }
   void setIndex(int val){ _index = val; }
-  bool getChanged(){ return _changed; }
+  bool &getChanged(){ return _changed; }
   void setChanged(bool val);
   int &getLinks(){ return _links; }
   int getAliasOf(){ return _aliasOf; }
@@ -75,6 +84,9 @@ class PView{
   // combine view
   static void combine(bool time, int how, bool remove);
 
+  // write view to file in given format
+  bool write(std::string filename, int format, bool append=false);
+
   // vertex arrays to draw triangles and lines efficiently
   VertexArray *va_points, *va_lines, *va_triangles, *va_vectors;
   // smoothed normals
diff --git a/Post/PViewData.h b/Post/PViewData.h
index ec23f859940b47fdb3c9c9215dface8c28e2105d..9764e4b08883f67fa6e970338c948d5d6c8cc3bd 100644
--- a/Post/PViewData.h
+++ b/Post/PViewData.h
@@ -53,7 +53,7 @@ class PViewData {
   virtual ~PViewData(){}
   virtual bool getDirty(){ return _dirty; }
   virtual void setDirty(bool val){ _dirty = val; }
-  virtual void finalize(){ _dirty = false; }
+  virtual bool finalize(){ _dirty = false; return true; }
   virtual std::string getName(){ return _name; }
   virtual void setName(std::string val){ _name = val; }
   virtual std::string getFileName(){ return _filename; }
@@ -86,6 +86,7 @@ class PViewData {
   virtual void smooth(){}
   virtual bool combineTime(nameData &nd){ return false; }
   virtual bool combineSpace(nameData &nd){ return false; }
+  virtual bool isAdaptive(){ return false; }
   virtual void setGlobalResolutionLevel(int level){}
   virtual void setAdaptiveResolutionLevel(int level, GMSH_Post_Plugin *plugin=0){}
 
diff --git a/Post/PViewDataList.cpp b/Post/PViewDataList.cpp
index 92a4e00178289cac79539306b8b3d19de84b549a..9fd9fdfc4d36e761f2135aadb9fa3305f5f95fd8 100644
--- a/Post/PViewDataList.cpp
+++ b/Post/PViewDataList.cpp
@@ -1,4 +1,4 @@
-// $Id: PViewDataList.cpp,v 1.4 2007-09-09 00:18:04 geuzaine Exp $
+// $Id: PViewDataList.cpp,v 1.5 2007-09-10 04:47:08 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -89,8 +89,30 @@ PViewDataList::~PViewDataList()
   if(adaptive) delete adaptive;
 }
 
-void PViewDataList::finalize()
+bool PViewDataList::finalize()
 {
+
+  // sanity checks
+  /*
+  if(View->adaptive) return 0; // hope for the best :-)
+
+  char *name[8] = { "point", "line", "triangle", "quadrangle", 
+		    "tetrahedron", "hexahedron", "prism", "pyramid" };
+  char *type[3] = { "scalar", "vector", "tensor" };
+
+  if(8 * 3 != VIEW_NB_ELEMENT_TYPES){
+    Msg(GERROR, "Please upgrade CheckViewErrorFlags!");
+    return 0;
+  }
+  
+  for(int i = 0; i < VIEW_NB_ELEMENT_TYPES; i++)
+    if(ViewErrorFlags[i])
+      Msg(GERROR, "%d %s %s%s in View[%d] contain%s a wrong number of values",
+	  ViewErrorFlags[i], type[i%3], name[i/3], (ViewErrorFlags[i] > 1) ? "s" : "",
+	  v->Index, (ViewErrorFlags[i] > 1) ? "" : "s");
+  */
+
+
   // finalize text strings first, to get the max value of NbTimeStep
   // for strings-only views (strings are designed to degrade
   // gracefully when some have fewer time steps than others). If there
@@ -136,6 +158,8 @@ void PViewDataList::finalize()
   if(CTX.post.smooth) smooth();
   
   setDirty(false);
+
+  return true;
 }
 
 int PViewDataList::getNumScalars()
@@ -701,7 +725,7 @@ bool PViewDataList::combineSpace(nameData &nd)
 
   setName(name);
   setFileName(std::string(name) + ".pos");
-  finalize();
+  return finalize();
 }
 
 void PViewDataList::getRawData(int type, List_T **l, int **ne, int *nc, int *nn)
@@ -870,7 +894,7 @@ bool PViewDataList::combineTime(nameData &nd)
 
   setName(name);
   setFileName(std::string(name) + ".pos");
-  finalize();
+  return finalize();
 }
 
 void PViewDataList::setGlobalResolutionLevel(int level)
diff --git a/Post/PViewDataList.h b/Post/PViewDataList.h
index db580aa5f77d79fb7453090603f5fab6909b9f6c..8f8599f95329181ba73df3de9ab859784d414237 100644
--- a/Post/PViewDataList.h
+++ b/Post/PViewDataList.h
@@ -78,7 +78,7 @@ class PViewDataList : public PViewData {
  public:
   PViewDataList(bool allocate=true);
   ~PViewDataList();
-  void finalize();
+  bool finalize();
   int getNumTimeSteps(){ return NbTimeStep; }
   double getTime(int step);
   double getMin(int step=-1);
@@ -103,6 +103,7 @@ class PViewDataList : public PViewData {
   void smooth();
   bool combineTime(nameData &nd);
   bool combineSpace(nameData &nd);
+  bool isAdaptive(){ return adaptive ? true : false; }
   void setGlobalResolutionLevel(int level);
   void setAdaptiveResolutionLevel(int level, GMSH_Post_Plugin *plugin=0);
 
diff --git a/Post/PViewOptions.cpp b/Post/PViewOptions.cpp
index 2b3f669210c590e3726ebef98704b73e70a769df..7e3f8d0c326008e49e8b783a4f1a8b68f95a2558 100644
--- a/Post/PViewOptions.cpp
+++ b/Post/PViewOptions.cpp
@@ -1,4 +1,4 @@
-// $Id: PViewOptions.cpp,v 1.15 2007-09-01 14:27:55 geuzaine Exp $
+// $Id: PViewOptions.cpp,v 1.16 2007-09-10 04:47:08 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -29,92 +29,13 @@
 #include "matheval.h"
 #endif
 
+PViewOptions PViewOptions::reference;
+
 PViewOptions::PViewOptions()
 {
   for(int i = 0; i < 3; i++) GenRaise_f[i] = 0;
   ColorTable_InitParam(2, &CT);
   ColorTable_Recompute(&CT);
-
-  // FIXME: remove this once Options.cpp uses PViewOptions!
-
-  Type = Plot3D;
-  //Type = Plot2DTime;
-  //Type = Plot2DSpace;
-
-  AutoPosition = 1;
-  strcpy(Format, "%g");
-  Axes = 1;
-  AxesAutoPosition = 1;
-  for(int i = 0; i < 3; i++){
-    AxesTics[i] = 10;
-    strcpy(AxesFormat[i], "%g");
-    strcpy(AxesLabel[i], "");
-    Offset[i] = Raise[i] = 0.;
-    for(int j = 0; j < 3; j++){
-      Transform[i][j] = (i == j) ? 1. : 0.;
-    }
-  }
-  DisplacementFactor = 1.;
-  Explode = 1.;
-  ArrowSize = 60;
-  ArrowRelHeadRadius = 0.12;
-  ArrowRelStemRadius = 0.02;
-  ArrowRelStemLength = 0.56;
-  Normals = 0.;
-  Tangents = 0.;
-  Visible = 1;
-  IntervalsType = Continuous;
-  //IntervalsType = Discrete;
-  //IntervalsType = Iso;
-  //IntervalsType = Numeric;
-  NbIso = 15;
-  ArrowSizeProportional = 1;
-  Light = LightTwoSide = 1;
-  LightLines = 1;
-  SmoothNormals = 0;
-  AngleSmoothNormals = 30;
-  SaturateValues = 0;
-  FakeTransparency = 0;
-  ShowElement = 0;
-  ShowTime = ShowScale = 1;
-  ScaleType = Linear;
-  VectorType = Arrow3D;
-  //VectorType = Segment;
-  //VectorType = Displacement;
-  TensorType = VonMises;
-  GlyphLocation = COG;
-  CenterGlyphs = 0;
-  TimeStep = 0;
-  DrawStrings = DrawPoints = DrawLines = DrawTriangles = DrawQuadrangles =
-    DrawTetrahedra = DrawHexahedra = DrawPrisms = DrawPyramids =
-    DrawScalars = DrawVectors = DrawTensors = 1;
-  Boundary = 0;
-  PointType = LineType = 0;
-  PointSize = 6;
-  LineWidth = 2;
-  UseStipple = 0;
-  ExternalViewIndex = ViewIndexForGenRaise = -1;
-  UseGenRaise = 0;
-  GenRaiseFactor = 0.;
-  RangeType = Default;
-  RangeType = PerTimeStep;
-  //RangeType = Custom;
-  CustomMin = 0;
-  CustomMax = 1.;
-
-  color.point = 0;
-  color.line = 0;
-  color.triangle = 0;
-  color.quadrangle = 0;
-  color.tetrahedron = 0;
-  color.hexahedron = 0;
-  color.prism = 0;
-  color.pyramid = 0;
-  color.tangents = 0;
-  color.normals = 0;
-  color.text2d = 0;
-  color.text3d = 0;
-  color.axes = 0;
 }
 
 PViewOptions::~PViewOptions()
diff --git a/Post/PViewOptions.h b/Post/PViewOptions.h
index ab5bd7142f773c619cf3d79e2c90ddd46b958699..f20731893e2ccd1a85cf15c5c1cfb0d16418258e 100644
--- a/Post/PViewOptions.h
+++ b/Post/PViewOptions.h
@@ -27,15 +27,15 @@
 class PViewOptions {
  public:
   enum PlotType {
-    Plot3D,
-    Plot2DSpace,
-    Plot2DTime
+    Plot3D = 1,
+    Plot2DSpace = 2,
+    Plot2DTime = 3
   };
   enum IntervalsType {
-    Iso,
-    Continuous,
-    Discrete,
-    Numeric
+    Iso = 1,
+    Continuous = 2,
+    Discrete = 3,
+    Numeric = 4
   };
   enum VectorType {
     Segment = 1,
@@ -45,31 +45,21 @@ class PViewOptions {
     Displacement = 5
   };
   enum TensorType {
-    VonMises,
-    LMGC90,
-    LMGC90_TYPE,
-    LMGC90_COORD,
-    LMGC90_PRES,
-    LMGC90_SN,
-    LMGC90_DEPX,
-    LMGC90_DEPY,
-    LMGC90_DEPZ,
-    LMGC90_DEPAV,
-    LMGC90_DEPNORM
+    VonMises = 1
   };
   enum GlyphLocation {
-    COG,
-    Vertex
+    COG = 1,
+    Vertex = 2
   };
   enum RangeType {
-    Default,
-    Custom,
-    PerTimeStep
+    Default = 1,
+    Custom = 2,
+    PerTimeStep = 3
   };
   enum ScaleType {
-    Linear,
-    Logarithmic,
-    DoubleLogarithmic
+    Linear = 1,
+    Logarithmic = 2,
+    DoubleLogarithmic = 3
   };
 
   int Type;
diff --git a/Post/Views.cpp b/Post/Views.cpp
deleted file mode 100644
index 55bf252dd30d4226e8ab505f74fc9b9c93d51efa..0000000000000000000000000000000000000000
--- a/Post/Views.cpp
+++ /dev/null
@@ -1,1471 +0,0 @@
-// $Id: Views.cpp,v 1.2 2007-08-25 10:58:34 geuzaine Exp $
-//
-// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-// USA.
-// 
-// Please report all bugs and problems to <gmsh@geuz.org>.
-//
-// Contributor(s):
-//   Nicolas Tardieu
-
-#include <set>
-#include "Gmsh.h"
-#include "Numeric.h"
-#include "Views.h"
-#include "Context.h"
-#include "Options.h"
-#include "ColorTable.h"
-#include "SmoothData.h"
-#include "BackgroundMesh.h"
-
-#if defined(HAVE_MATH_EVAL)
-#include "matheval.h"
-#endif
-
-extern Context_T CTX;
-
-#if defined(HAVE_FLTK)
-void UpdateViewsInGUI();
-#endif
-
-// Static reference view
-
-Post_View *Post_ViewReference = NULL;
-
-// FIXME: the whole View interface should be rewritten in C++...
-
-int fcmpPostViewNum(const void *v1, const void *v2)
-{
-  return ((*(Post_View **) v1)->Num - (*(Post_View **) v2)->Num);
-}
-
-int fcmpPostViewAliasOf(const void *v1, const void *v2)
-{
-  return ((*(Post_View **) v1)->AliasOf - (*(Post_View **) v2)->AliasOf);
-}
-
-int fcmpPostViewName(const void *v1, const void *v2)
-{
-  return strcmp((*(Post_View **) v1)->Name, (*(Post_View **) v2)->Name);
-}
-
-int fcmpPostViewVisibility(const void *v1, const void *v2)
-{
-  return ((*(Post_View **) v2)->Visible - (*(Post_View **) v1)->Visible);
-}
-
-Post_View *BeginView(int allocate)
-{
-  Post_View *v = (Post_View *)Malloc(sizeof(Post_View));
-  static int UniqueNum = 0;
-
-  if(!CTX.post.list)
-    CTX.post.list = List_Create(100, 100, sizeof(Post_View *));
-
-  // Important notes:
-  // - each view *must* have a unique number
-  // - the view list is assumned to be sorted with increasing nums
-
-  if(!CTX.post.force_num) {
-    v->Num = ++UniqueNum;
-    List_Add(CTX.post.list, &v);
-  }
-  else {
-    v->Num = CTX.post.force_num;
-    List_Replace(CTX.post.list, &v, fcmpPostViewNum);
-    // FIXME: need to check here if the old view is used as a field in
-    // a background mesh (and if it is, remove that field). Until we
-    // do this, let's just invalidate all the lc fields
-    BGMReset();
-  }
-  
-  int i = List_ISearch(CTX.post.list, &v, fcmpPostViewNum);
-  List_Read(CTX.post.list, i, &v);
-
-  v->Index = i;
-  v->Dirty = 1;
-  v->TriVertexArray = NULL;
-  v->LinVertexArray = NULL;
-  v->NbTimeStep = 1;
-  v->TimeStepMin = NULL;
-  v->TimeStepMax = NULL;
-  v->NbSP = v->NbVP = v->NbTP = 0;
-  v->NbSL = v->NbVL = v->NbTL = v->NbSL2 = v->NbVL2 = v->NbTL2 = 0;
-  v->NbST = v->NbVT = v->NbTT = v->NbST2 = v->NbVT2 = v->NbTT2 = 0;
-  v->NbSQ = v->NbVQ = v->NbTQ = v->NbSQ2 = v->NbVQ2 = v->NbTQ2 = 0;
-  v->NbSS = v->NbVS = v->NbTS = v->NbSS2 = v->NbVS2 = v->NbTS2 = 0;
-  v->NbSH = v->NbVH = v->NbTH = v->NbSH2 = v->NbVH2 = v->NbTH2 = 0;
-  v->NbSI = v->NbVI = v->NbTI = v->NbSI2 = v->NbVI2 = v->NbTI2 = 0;
-  v->NbSY = v->NbVY = v->NbTY = v->NbSY2 = v->NbVY2 = v->NbTY2 = 0;
-  v->NbT2 = v->NbT3 = 0;
-
-  if(allocate) {
-    v->DataSize = sizeof(double);
-    v->Grains = new  std::map < int , List_T * > ;
-    v->DisplayListsOfGrains= new  std::map < int , int > ;
-
-#define LCD List_Create(1, 1000, sizeof(double))
-    v->Time = LCD;
-    v->SP = LCD; v->VP = LCD; v->TP = LCD;
-    v->SL = LCD; v->VL = LCD; v->TL = LCD; v->SL2 = LCD; v->VL2 = LCD; v->TL2 = LCD; 
-    v->ST = LCD; v->VT = LCD; v->TT = LCD; v->ST2 = LCD; v->VT2 = LCD; v->TT2 = LCD; 
-    v->SQ = LCD; v->VQ = LCD; v->TQ = LCD; v->SQ2 = LCD; v->VQ2 = LCD; v->TQ2 = LCD; 
-    v->SS = LCD; v->VS = LCD; v->TS = LCD; v->SS2 = LCD; v->VS2 = LCD; v->TS2 = LCD; 
-    v->SH = LCD; v->VH = LCD; v->TH = LCD; v->SH2 = LCD; v->VH2 = LCD; v->TH2 = LCD; 
-    v->SI = LCD; v->VI = LCD; v->TI = LCD; v->SI2 = LCD; v->VI2 = LCD; v->TI2 = LCD; 
-    v->SY = LCD; v->VY = LCD; v->TY = LCD; v->SY2 = LCD; v->VY2 = LCD; v->TY2 = LCD; 
-#undef LCD
-
-    v->T2D = List_Create(1, 100, sizeof(double));
-    v->T2C = List_Create(1, 100, sizeof(char));
-    v->T3D = List_Create(1, 100, sizeof(double));
-    v->T3C = List_Create(1, 100, sizeof(char));
-  }
-  else {
-    v->Time = NULL;
-    v->Grains = 0;
-    v->DisplayListsOfGrains = 0;
-    v->SP = v->VP = v->TP = NULL;
-    v->SL = v->VL = v->TL = v->SL2 = v->VL2 = v->TL2 = NULL;
-    v->ST = v->VT = v->TT = v->ST2 = v->VT2 = v->TT2 = NULL;
-    v->SQ = v->VQ = v->TQ = v->SQ2 = v->VQ2 = v->TQ2 = NULL;
-    v->SS = v->VS = v->TS = v->SS2 = v->VS2 = v->TS2 = NULL;
-    v->SH = v->VH = v->TH = v->SH2 = v->VH2 = v->TH2 = NULL;
-    v->SI = v->VI = v->TI = v->SI2 = v->VI2 = v->TI2 = NULL;
-    v->SY = v->VY = v->TY = v->SY2 = v->VY2 = v->TY2 = NULL;
-    v->T2D = v->T2C = NULL;
-    v->T3D = v->T3C = NULL;
-  }
-
-  // Copy all options from the reference view initialized in InitOptions()
-  CopyViewOptions(Post_ViewReference, v);
-  
-  v->Changed = 1;
-  v->Links = 0;
-  v->AliasOf = 0;
-  v->ScalarOnly = 1;
-  v->TextOnly = 1;
-  v->normals = new smooth_normals(v->AngleSmoothNormals);
-  v->Min = VAL_INF;
-  v->Max = -VAL_INF;
-  v->adaptive = 0;
-  for(i = 0; i < 3; i++) {
-    v->BBox[2 * i] = v->TmpBBox[2 * i] = VAL_INF;
-    v->BBox[2 * i + 1] = v->TmpBBox[2 * i + 1] = -VAL_INF;
-  }
-  for(i = 0; i < 3; i++)
-    v->GenRaise_f[i] = NULL;
-
-  return v;
-}
-
-void Post_View::reset_normals()
-{
-  if(normals)
-    delete normals;
-  normals = new smooth_normals(AngleSmoothNormals);
-}
-
-void Stat_Element(Post_View *v, int type, int nbnod, int N,
-                  double *X, double *Y, double *Z, double *V)
-{
-  int i;
-  double l0;
-
-  switch (type) {
-
-  case 0:      // scalar
-    if(v->Min == VAL_INF || v->Max == -VAL_INF) {
-      v->NbTimeStep = N / nbnod;
-      if(v->TimeStepMin) Free(v->TimeStepMin);
-      if(v->TimeStepMax) Free(v->TimeStepMax);
-      v->TimeStepMin = (double*)Malloc(v->NbTimeStep * sizeof(double));
-      v->TimeStepMax = (double*)Malloc(v->NbTimeStep * sizeof(double));
-      for(i = 0; i < v->NbTimeStep; i++){
-	v->TimeStepMin[i] = VAL_INF;
-	v->TimeStepMax[i] = -VAL_INF;
-      }
-    }
-    else if(N / nbnod < v->NbTimeStep){
-      // if some elts have less steps, reduce the total number!
-      v->NbTimeStep = N / nbnod;
-    }
-
-    for(i = 0; i < N; i++) {
-      l0 = V[i];
-      if(l0 < v->Min)
-        v->Min = l0;
-      if(l0 > v->Max)
-        v->Max = l0;
-      int ts = i / nbnod;
-      if(ts < v->NbTimeStep){ // security
-	if(l0 < v->TimeStepMin[ts])
-	  v->TimeStepMin[ts] = l0;
-	if(l0 > v->TimeStepMax[ts])
-	  v->TimeStepMax[ts] = l0;
-      }
-    }
-    break;
-
-  case 1:      // vector
-    if(v->Min == VAL_INF || v->Max == -VAL_INF) {
-      v->NbTimeStep = N / (3 * nbnod);
-      if(v->TimeStepMin) Free(v->TimeStepMin);
-      if(v->TimeStepMax) Free(v->TimeStepMax);
-      v->TimeStepMin = (double*)Malloc(v->NbTimeStep * sizeof(double));
-      v->TimeStepMax = (double*)Malloc(v->NbTimeStep * sizeof(double));
-      for(i = 0; i < v->NbTimeStep; i++){
-	v->TimeStepMin[i] = VAL_INF;
-	v->TimeStepMax[i] = -VAL_INF;
-      }
-    }
-    else if(N / (3 * nbnod) < v->NbTimeStep){
-      v->NbTimeStep = N / (3 * nbnod);
-    }
-
-    for(i = 0; i < N; i += 3) {
-      l0 = sqrt(DSQR(V[i]) + DSQR(V[i + 1]) + DSQR(V[i + 2]));
-      if(l0 < v->Min)
-        v->Min = l0;
-      if(l0 > v->Max)
-        v->Max = l0;
-      int ts = i / (3 * nbnod);
-      if(ts < v->NbTimeStep){ // security
-	if(l0 < v->TimeStepMin[ts])
-	  v->TimeStepMin[ts] = l0;
-	if(l0 > v->TimeStepMax[ts])
-	  v->TimeStepMax[ts] = l0;
-      }
-    }
-    v->ScalarOnly = 0;
-    break;
-
-  case 2:      // tensor
-    if(v->Min == VAL_INF || v->Max == -VAL_INF) {
-      v->NbTimeStep = N / (9 * nbnod);
-      if(v->TimeStepMin) Free(v->TimeStepMin);
-      if(v->TimeStepMax) Free(v->TimeStepMax);
-      v->TimeStepMin = (double*)Malloc(v->NbTimeStep * sizeof(double));
-      v->TimeStepMax = (double*)Malloc(v->NbTimeStep * sizeof(double));
-      for(i = 0; i < v->NbTimeStep; i++){
-	v->TimeStepMin[i] = VAL_INF;
-	v->TimeStepMax[i] = -VAL_INF;
-      }
-    }
-    else if(N / (9 * nbnod) < v->NbTimeStep){
-      v->NbTimeStep = N / (9 * nbnod);
-    }
-
-    for(i = 0; i < N; i += 9) {
-      // by lack of any current better solution, tensors are displayed
-      // as their Von Mises invariant (J2 invariant)
-      l0 = ComputeVonMises(V+i);
-      if(l0 < v->Min)
-        v->Min = l0;
-      if(l0 > v->Max)
-        v->Max = l0;
-      int ts = i / (9 * nbnod);
-      if(ts < v->NbTimeStep){ // security
-	if(l0 < v->TimeStepMin[ts])
-	  v->TimeStepMin[ts] = l0;
-	if(l0 > v->TimeStepMax[ts])
-	  v->TimeStepMax[ts] = l0;
-      }
-    }
-    v->ScalarOnly = 0;
-    break;
-
-  }
-
-  for(i = 0; i < nbnod; i++) {
-    if(X[i] < v->BBox[0]) v->BBox[0] = X[i];
-    if(X[i] > v->BBox[1]) v->BBox[1] = X[i];
-    if(Y[i] < v->BBox[2]) v->BBox[2] = Y[i];
-    if(Y[i] > v->BBox[3]) v->BBox[3] = Y[i];
-    if(Z[i] < v->BBox[4]) v->BBox[4] = Z[i];
-    if(Z[i] > v->BBox[5]) v->BBox[5] = Z[i];
-  }
-
-  v->TextOnly = 0;
-}
-
-void Stat_List(Post_View * v, List_T * listelm, int type, int nbelm,
-               int nbnod)
-{
-  int i, nb;
-  if(nbelm) {
-    nb = List_Nbr(listelm) / nbelm;
-    for(i = 0; i < List_Nbr(listelm); i += nb)
-      Stat_Element(v, type, nbnod, nb - 3 * nbnod,
-                   (double *)List_Pointer_Fast(listelm, i),
-                   (double *)List_Pointer_Fast(listelm, i + 1 * nbnod),
-                   (double *)List_Pointer_Fast(listelm, i + 2 * nbnod),
-                   (double *)List_Pointer_Fast(listelm, i + 3 * nbnod));
-  }
-}
-
-void Stat_Text(Post_View * v, List_T *D, List_T *C, int nb)
-{
-  for(int i = 0; i < List_Nbr(D); i += nb){
-    double beg, end;
-    List_Read(D, i+nb-1, &beg);
-    if(i > List_Nbr(D) - 2*nb)
-      end = (double)List_Nbr(C);
-    else
-      List_Read(D, i+nb+nb-1, &end);
-    char *c = (char*)List_Pointer(C, (int)beg);
-    int nbtime = 0;
-    for(int j = 0; j < (int)(end-beg); j++)
-      if(c[j] == '\0') nbtime++;
-    if(nbtime > v->NbTimeStep) 
-      v->NbTimeStep = nbtime;
-  }
-
-  if(nb == 5){
-    for(int i = 0; i < List_Nbr(D); i += nb){
-      double x, y, z;
-      List_Read(D, i, &x);
-      List_Read(D, i+1, &y);
-      List_Read(D, i+2, &z);
-      if(x < v->BBox[0]) v->BBox[0] = x;
-      if(x > v->BBox[1]) v->BBox[1] = x;
-      if(y < v->BBox[2]) v->BBox[2] = y;
-      if(y > v->BBox[3]) v->BBox[3] = y;
-      if(z < v->BBox[4]) v->BBox[4] = z;
-      if(z > v->BBox[5]) v->BBox[5] = z;
-    }
-  }
-}
-
-void EndView(Post_View * v, int add_in_gui, char *file_name, char *name)
-{
-  int i;
-  double d;
-
-  // Stat text strings first, to get the max value of NbTimeStep for
-  // srings-only (strings are designed to degrade gracefully when some
-  // have fewer time steps than others). If there are any elements in
-  // the view, this value will be replaced by the minimum number of
-  // time steps common to all elements.
-  Stat_Text(v, v->T2D, v->T2C, 4);
-  Stat_Text(v, v->T3D, v->T3C, 5);
-
-  // convert all curved (geometrically 2nd order) elements into linear
-  // elements *AND* free all the data associated with the curved
-  // elements
-  v->splitCurvedElements();
-  
-  // Points
-  Stat_List(v, v->SP, 0, v->NbSP, 1);
-  Stat_List(v, v->VP, 1, v->NbVP, 1);
-  Stat_List(v, v->TP, 2, v->NbTP, 1);
-
-  // Lines               
-  Stat_List(v, v->SL, 0, v->NbSL, 2);
-  Stat_List(v, v->VL, 1, v->NbVL, 2);
-  Stat_List(v, v->TL, 2, v->NbTL, 2);
-
-  // Triangles           
-  Stat_List(v, v->ST, 0, v->NbST, 3);
-  Stat_List(v, v->VT, 1, v->NbVT, 3);
-  Stat_List(v, v->TT, 2, v->NbTT, 3);
-
-  // Quadrangles  
-  Stat_List(v, v->SQ, 0, v->NbSQ, 4);
-  Stat_List(v, v->VQ, 1, v->NbVQ, 4);
-  Stat_List(v, v->TQ, 2, v->NbTQ, 4);
-
-  // Tetrahedra          
-  Stat_List(v, v->SS, 0, v->NbSS, 4);
-  Stat_List(v, v->VS, 1, v->NbVS, 4);
-  Stat_List(v, v->TS, 2, v->NbTS, 4);
-
-  // Hexahedra           
-  Stat_List(v, v->SH, 0, v->NbSH, 8);
-  Stat_List(v, v->VH, 1, v->NbVH, 8);
-  Stat_List(v, v->TH, 2, v->NbTH, 8);
-
-  // Prisms              
-  Stat_List(v, v->SI, 0, v->NbSI, 6);
-  Stat_List(v, v->VI, 1, v->NbVI, 6);
-  Stat_List(v, v->TI, 2, v->NbTI, 6);
-
-  // Pyramids            
-  Stat_List(v, v->SY, 0, v->NbSY, 5);
-  Stat_List(v, v->VY, 1, v->NbVY, 5);
-  Stat_List(v, v->TY, 2, v->NbTY, 5);
-
-  // Dummy time values if none (or too few) provided (e.g. using old
-  // parsed format)
-  if(v->Time && List_Nbr(v->Time) < v->NbTimeStep) {
-    for(i = List_Nbr(v->Time); i < v->NbTimeStep; i++) {
-      d = (double)i;
-      List_Add(v->Time, &d);
-    }
-  }
-
-  opt_view_name(v->Index, GMSH_SET | GMSH_GUI, name);
-  opt_view_filename(v->Index, GMSH_SET | GMSH_GUI, file_name);
-  opt_view_nb_timestep(v->Index, GMSH_GUI, 0);
-  opt_view_timestep(v->Index, GMSH_SET | GMSH_GUI, v->TimeStep);
-
-  if(CTX.post.smooth)
-    v->smooth();
-
-#if defined(HAVE_FLTK)
-  if(add_in_gui)
-    UpdateViewsInGUI();
-#endif
-
-  v->Dirty = 0; //the view is complete, we may draw it
-
-  Msg(DEBUG, "Added View[%d]", v->Index);
-}
-
-void AliasView(int index, int withoptions)
-{
-  if(index < 0 || index >= List_Nbr(CTX.post.list)) {
-    return;
-  }
-
-  Post_View v, *pv, **ppv;
-
-  Post_View *v1 = *(Post_View **) List_Pointer(CTX.post.list, index);
-
-  Post_View *v2 = BeginView(0);
-  EndView(v2, 0, v1->FileName, v1->Name);
-
-  if(!v1->AliasOf) {
-    v2->AliasOf = v1->Num;
-    v1->Links++;
-  }
-  else {
-    v.Num = v1->AliasOf;
-    pv = &v;
-    if(!(ppv = (Post_View **) List_PQuery(CTX.post.list, &pv, fcmpPostViewNum))) {
-      v2->AliasOf = v1->Num;
-      v1->Links++;
-    }
-    else {
-      v2->AliasOf = (*ppv)->Num;
-      (*ppv)->Links++;
-    }
-  }
-
-  // When we create an alias we just point to a reference view: we
-  // DON'T allocate a new data set!
-  v2->Time = v1->Time;
-  v2->TimeStepMin = v1->TimeStepMin;
-  v2->TimeStepMax = v1->TimeStepMax;
-
-  v2->NbSP = v1->NbSP; v2->SP = v1->SP; 
-  v2->NbVP = v1->NbVP; v2->VP = v1->VP; 
-  v2->NbTP = v1->NbTP; v2->TP = v1->TP;
-
-  v2->NbSL = v1->NbSL; v2->SL = v1->SL; 
-  v2->NbVL = v1->NbVL; v2->VL = v1->VL; 
-  v2->NbTL = v1->NbTL; v2->TL = v1->TL;
-
-  v2->NbST = v1->NbST; v2->ST = v1->ST; 
-  v2->NbVT = v1->NbVT; v2->VT = v1->VT; 
-  v2->NbTT = v1->NbTT; v2->TT = v1->TT;
-
-  v2->NbSQ = v1->NbSQ; v2->SQ = v1->SQ; 
-  v2->NbVQ = v1->NbVQ; v2->VQ = v1->VQ; 
-  v2->NbTQ = v1->NbTQ; v2->TQ = v1->TQ;
-
-  v2->NbSS = v1->NbSS; v2->SS = v1->SS; 
-  v2->NbVS = v1->NbVS; v2->VS = v1->VS; 
-  v2->NbTS = v1->NbTS; v2->TS = v1->TS;
-
-  v2->NbSH = v1->NbSH; v2->SH = v1->SH; 
-  v2->NbVH = v1->NbVH; v2->VH = v1->VH; 
-  v2->NbTH = v1->NbTH; v2->TH = v1->TH;
-
-  v2->NbSI = v1->NbSI; v2->SI = v1->SI; 
-  v2->NbVI = v1->NbVI; v2->VI = v1->VI; 
-  v2->NbTI = v1->NbTI; v2->TI = v1->TI;
-
-  v2->NbSY = v1->NbSY; v2->SY = v1->SY; 
-  v2->NbVY = v1->NbVY; v2->VY = v1->VY; 
-  v2->NbTY = v1->NbTY; v2->TY = v1->TY;
-
-  v2->NbT2 = v1->NbT2; v2->T2D = v1->T2D; v2->T2C = v1->T2C;
-  v2->NbT3 = v1->NbT3; v2->T3D = v1->T3D; v2->T3C = v1->T3C;
-
-  v2->DataSize    = v1->DataSize;
-  v2->ScalarOnly  = v1->ScalarOnly;
-  v2->TextOnly    = v1->TextOnly;
-  v2->Min         = v1->Min;       
-  v2->Max         = v1->Max;      
-  v2->NbTimeStep  = v1->NbTimeStep;
-  for(int i=0 ; i<6 ; i++)
-    v2->BBox[i]   = v1->BBox[i];
-
-  if(withoptions)
-    CopyViewOptions(v1, v2);
-
-#if defined(HAVE_FLTK)
-  UpdateViewsInGUI();
-#endif
-}
-
-bool RemoveViewByIndex(int index)
-{
-  if(index < 0 || index >= List_Nbr(CTX.post.list)) {
-    return false;
-  }
-
-  Post_View *v = *(Post_View **) List_Pointer(CTX.post.list, index);
-  FreeView(v);
-  List_PSuppress(CTX.post.list, index);
-
-  // recalculate the indices
-  for(int i = 0; i < List_Nbr(CTX.post.list); i++){
-    v = *(Post_View **) List_Pointer(CTX.post.list, i);
-    v->Index = i;
-  }
-
-  Msg(DEBUG, "Removed View[%d] (%d views left)", index, List_Nbr(CTX.post.list));
-  return true;
-}
-
-bool RemoveViewByNumber(int num)
-{
-  Post_View v, *pv;
-
-  v.Num = num;
-  pv = &v;
-  int i = List_ISearch(CTX.post.list, &pv, fcmpPostViewNum);
-  
-  return RemoveViewByIndex(i);
-}
-
-void FreeView(Post_View * v)
-{
-  Post_View vv, *pvv, **ppvv;
-  int i, numdup, free = 1;
-
-  if(v->AliasOf) {
-    vv.Num = v->AliasOf;
-    pvv = &vv;
-    Msg(DEBUG, "This view is a duplicata");
-    if(!(ppvv = (Post_View **) List_PQuery(CTX.post.list, &pvv, fcmpPostViewNum))) {
-      Msg(DEBUG, "  -the original view is gone");
-      numdup = 0;
-      for(i = 0; i < List_Nbr(CTX.post.list); i++)
-        numdup += ((*(Post_View **) List_Pointer(CTX.post.list, i))->AliasOf
-		   == v->AliasOf);
-      if(numdup == 1) {
-        Msg(DEBUG, "  -there are no other duplicata, so I can free");
-        free = 1;
-      }
-      else {
-        Msg(DEBUG, "  -there are still duplicata, so I cannot free");
-        free = 0;
-      }
-    }
-    else {
-      (*ppvv)->Links--;
-      free = 0;
-      Msg(DEBUG, "  -the original still exists, so I cannot free");
-    }
-  }
-
-  if(free && !v->Links) {
-    Msg(DEBUG, "Freeing View!");
-    List_Delete(v->Time);
-    Free(v->TimeStepMin);
-    Free(v->TimeStepMax);
-    List_Delete(v->SP); List_Delete(v->VP); List_Delete(v->TP);
-    List_Delete(v->SL); List_Delete(v->VL); List_Delete(v->TL);
-    List_Delete(v->ST); List_Delete(v->VT); List_Delete(v->TT);
-    List_Delete(v->SQ); List_Delete(v->VQ); List_Delete(v->TQ);
-    List_Delete(v->SS); List_Delete(v->VS); List_Delete(v->TS);
-    List_Delete(v->SH); List_Delete(v->VH); List_Delete(v->TH);
-    List_Delete(v->SI); List_Delete(v->VI); List_Delete(v->TI);
-    List_Delete(v->SY); List_Delete(v->VY); List_Delete(v->TY);
-    List_Delete(v->T2D); List_Delete(v->T2C);
-    List_Delete(v->T3D); List_Delete(v->T3C);
-    delete v->Grains;
-    delete v->DisplayListsOfGrains;
-    // Note: all the second order elements have already been freed in xxxx
-    if(v->normals) delete v->normals;
-    if(v->TriVertexArray) delete v->TriVertexArray;
-    if(v->LinVertexArray) delete v->LinVertexArray;
-    if(v->adaptive) delete v->adaptive;
-    FreeGeneralizedRaise(v);
-    Free(v);
-  }
-}
-
-void CopyViewOptions(Post_View * src, Post_View * dest)
-{
-  dest->Type = src->Type;
-  dest->AutoPosition = src->AutoPosition;
-  dest->AxesAutoPosition = src->AxesAutoPosition;
-  dest->Position[0] = src->Position[0];
-  dest->Position[1] = src->Position[1];
-  dest->Size[0] = src->Size[0];
-  dest->Size[1] = src->Size[1];
-  for(int i = 0; i < 6; i++) dest->AxesPosition[i] = src->AxesPosition[i];
-  for(int i = 0; i < 3; i++) dest->AxesTics[i] = src->AxesTics[i];
-  strcpy(dest->Format, src->Format);
-  for(int i = 0; i < 3; i++) strcpy(dest->AxesFormat[i], src->AxesFormat[i]);
-  for(int i = 0; i < 3; i++) strcpy(dest->AxesLabel[i], src->AxesLabel[i]);
-  dest->CustomMin = src->CustomMin;
-  dest->CustomMax = src->CustomMax;
-  dest->Offset[0] = src->Offset[0];
-  dest->Offset[1] = src->Offset[1];
-  dest->Offset[2] = src->Offset[2];
-  for(int i = 0; i < 3; i++)
-    for(int j = 0; j < 3; j++)
-      dest->Transform[i][j] = src->Transform[i][j];
-  dest->Raise[0] = src->Raise[0];
-  dest->Raise[1] = src->Raise[1];
-  dest->Raise[2] = src->Raise[2];
-  dest->ArrowSize = src->ArrowSize;
-  dest->ArrowSizeProportional = src->ArrowSizeProportional;
-  dest->ArrowRelHeadRadius = src->ArrowRelHeadRadius;
-  dest->ArrowRelStemLength = src->ArrowRelStemLength;
-  dest->ArrowRelStemRadius = src->ArrowRelStemRadius;
-  dest->Normals = src->Normals;
-  dest->Tangents = src->Tangents;
-  dest->DisplacementFactor = src->DisplacementFactor;
-  dest->Explode = src->Explode;
-  dest->Visible = src->Visible;
-  dest->IntervalsType = src->IntervalsType;
-  dest->SaturateValues = src->SaturateValues;
-  dest->Boundary = src->Boundary;
-  dest->NbIso = src->NbIso;
-  dest->Light = src->Light;
-  dest->LightTwoSide = src->LightTwoSide;
-  dest->LightLines = src->LightLines;
-  dest->SmoothNormals = src->SmoothNormals;
-  dest->AngleSmoothNormals = src->AngleSmoothNormals;
-  dest->ShowElement = src->ShowElement;
-  dest->ShowTime = src->ShowTime;
-  dest->ShowScale = src->ShowScale;
-  dest->DrawPoints = src->DrawPoints;
-  dest->DrawLines = src->DrawLines;
-  dest->DrawTriangles = src->DrawTriangles;
-  dest->DrawQuadrangles = src->DrawQuadrangles;
-  dest->DrawTetrahedra = src->DrawTetrahedra;
-  dest->DrawHexahedra = src->DrawHexahedra;
-  dest->DrawPrisms = src->DrawPrisms;
-  dest->DrawPyramids = src->DrawPyramids;
-  dest->DrawScalars = src->DrawScalars;
-  dest->DrawVectors = src->DrawVectors;
-  dest->DrawTensors = src->DrawTensors;
-  dest->DrawStrings = src->DrawStrings;
-  dest->ScaleType = src->ScaleType;
-  dest->RangeType = src->RangeType;
-  dest->VectorType = src->VectorType;
-  dest->GlyphLocation = src->GlyphLocation;
-  dest->TensorType = src->TensorType;
-  dest->TimeStep = src->TimeStep;
-  dest->PointSize = src->PointSize;
-  dest->LineWidth = src->LineWidth;
-  dest->PointType = src->PointType;
-  dest->LineType = src->LineType;
-  dest->Axes = src->Axes;
-  dest->ExternalViewIndex = src->ExternalViewIndex;
-  dest->ViewIndexForGenRaise = src->ViewIndexForGenRaise;
-  dest->UseGenRaise = src->UseGenRaise;
-  dest->FakeTransparency = src->FakeTransparency;
-  dest->GenRaiseFactor = src->GenRaiseFactor;
-  strcpy(dest->GenRaiseX, src->GenRaiseX);
-  strcpy(dest->GenRaiseY, src->GenRaiseY);
-  strcpy(dest->GenRaiseZ, src->GenRaiseZ);
-  dest->UseStipple = src->UseStipple;
-  for(int i = 0; i < 10; i++){
-    dest->Stipple[i][0] = src->Stipple[i][0];
-    dest->Stipple[i][1] = src->Stipple[i][1];
-    strcpy(dest->StippleString[i], src->StippleString[i]);
-  }
-  dest->color.point = src->color.point;
-  dest->color.line = src->color.line;
-  dest->color.triangle = src->color.triangle;
-  dest->color.quadrangle = src->color.quadrangle;
-  dest->color.tetrahedron = src->color.tetrahedron;
-  dest->color.hexahedron = src->color.hexahedron;
-  dest->color.prism = src->color.prism;
-  dest->color.pyramid = src->color.pyramid;
-  dest->color.tangents = src->color.tangents;
-  dest->color.normals = src->color.normals;
-  dest->color.text2d = src->color.text2d;
-  dest->color.text3d = src->color.text3d;
-  dest->color.axes = src->color.axes;
-  ColorTable_Copy(&src->CT);
-  ColorTable_Paste(&dest->CT);
-}
-
-GmshColorTable *Get_ColorTable(int num)
-{
-  Post_View *v;
-
-  if(!CTX.post.list){
-    v = Post_ViewReference;
-    if(!v) return NULL;
-  }
-  else{
-    Post_View **vv = (Post_View **) List_Pointer_Test(CTX.post.list, num);
-    if(!vv) return NULL;
-    v = *vv;
-  }
-  v->Changed = 1; // let's assume that if we get the ct we change it
-  return &v->CT;
-}
-
-void Print_ColorTable(int num, int diff, char *prefix, FILE * file)
-{
-  char tmp[1024];
-  Post_View *v;
-
-  if(!CTX.post.list){
-    v = Post_ViewReference;
-    if(!v) return;
-  }
-  else{
-    Post_View **vv = (Post_View **) List_Pointer_Test(CTX.post.list, num);
-    if(!vv) return;
-    v = *vv;
-  }
-
-  if(diff){
-    // compare the current colormap with a vanilla colormap having the
-    // parameters
-    GmshColorTable ref;
-    ColorTable_InitParam(v->CT.ipar[COLORTABLE_NUMBER], &ref); 
-    for(int i = 0; i < COLORTABLE_NBMAX_PARAM; i++){
-      ref.ipar[i] = v->CT.ipar[i];
-      ref.dpar[i] = v->CT.dpar[i];
-    }
-    ColorTable_Recompute(&ref);
-    if(!ColorTable_Diff(&ref, &v->CT))
-      return;
-  }
-
-  sprintf(tmp, "%s = {", prefix);
-  if(file)
-    fprintf(file, "%s\n", tmp);
-  else
-    Msg(DIRECT, tmp);
-  ColorTable_Print(&v->CT, file);
-  sprintf(tmp, "};");
-  if(file)
-    fprintf(file, "%s\n", tmp);
-  else
-    Msg(DIRECT, tmp);
-}
-
-Post_View *Create2DGraph(char *xname, char *yname,
-                         int nbdata, double *x, double *y)
-{
-  Post_View *v = BeginView(1);
-  for(int i = 0; i < nbdata; i++) {
-    double d;
-    if(x){
-      List_Add(v->SP, &x[i]);
-    }
-    else{
-      d = nbdata > 1 ? (double)i/(double)(nbdata - 1) : 0;
-      List_Add(v->SP, &d);
-    }
-    d = 0.;
-    List_Add(v->SP, &d);
-    List_Add(v->SP, &d);
-    List_Add(v->SP, &y[i]);
-    v->NbSP++;
-  }
-  char filename[1024];
-  sprintf(filename, "%s.pos", yname);
-  EndView(v, 1, filename, yname);
-  v->Type = DRAW_POST_2D_SPACE;
-  v->Axes = 2;
-  strcpy(v->AxesLabel[0], xname);
-  return v;
-}
-
-// Transform curved elements into linear ones and delete all the
-// curved element data. This is a temporary solution, until we can use
-// an Adaptive_Post_View on curved elements, too.
-
-void splitCurvedElement(List_T **in, int *nbin, List_T *out, int *nbout, 
-			int nodin, int nodout, int nbcomp, int nbsplit, int split[][8],
-			int remove=1)
-{
-  if(*nbin){
-    int nb = List_Nbr(*in) / *nbin;
-    int nbstep = (nb - 3 * nodin) / (nodin * nbcomp); // we don't know this yet for the view
-    for(int i = 0; i < List_Nbr(*in); i += nb) {
-      double *coord = (double *)List_Pointer_Fast(*in, i);
-      double *val = (double *)List_Pointer_Fast(*in, i + 3 * nodin);
-      for(int j = 0; j < nbsplit; j++){
-	for(int k = 0; k < nodout; k++)
-	  List_Add(out, &coord[split[j][k]]);
-	for(int k = 0; k < nodout; k++)
-	  List_Add(out, &coord[nodin + split[j][k]]);
-	for(int k = 0; k < nodout; k++)
-	  List_Add(out, &coord[2 * nodin + split[j][k]]);
-	for(int ts = 0; ts < nbstep; ts++){
-	  for(int k = 0; k < nodout; k++){
-	    for(int l = 0; l < nbcomp; l++){
-	      List_Add(out, &val[nodin * nbcomp * ts + nbcomp * split[j][k] + l]);
-	    }
-	  }
-	}
-	(*nbout)++;
-      }
-    }
-  }
-
-  if(remove){
-    *nbin = 0;
-    List_Delete(*in);
-    *in = NULL;
-  }
-}
-
-void Post_View::splitCurvedElements()
-{
-  // we could keep track of the starting index in SL, VL, ..., so that
-  // we could draw the boundaries correctly
-
-  int lin[2][8] = { // 2-split
-    {0,2}, {2,1}
-  };
-  splitCurvedElement(&SL2, &NbSL2, SL, &NbSL, 3,2, 1, 2, lin);
-  splitCurvedElement(&VL2, &NbVL2, VL, &NbVL, 3,2, 3, 2, lin);
-  splitCurvedElement(&TL2, &NbTL2, TL, &NbTL, 3,2, 9, 2, lin);
-
-  int tri[4][8] = { // 4-split
-    {0,3,5}, {1,4,3}, {2,5,4}, {3,4,5}
-  };
-  splitCurvedElement(&ST2, &NbST2, ST, &NbST, 6,3, 1, 4, tri);
-  splitCurvedElement(&VT2, &NbVT2, VT, &NbVT, 6,3, 3, 4, tri);
-  splitCurvedElement(&TT2, &NbTT2, TT, &NbTT, 6,3, 9, 4, tri);
-
-  int qua[4][8] = { // 4-split
-    {0,4,8,7}, {1,5,8,4}, {2,6,8,5}, {3,7,8,6}
-  };
-  splitCurvedElement(&SQ2, &NbSQ2, SQ, &NbSQ, 9,4, 1, 4, qua);
-  splitCurvedElement(&VQ2, &NbVQ2, VQ, &NbVQ, 9,4, 3, 4, qua);
-  splitCurvedElement(&TQ2, &NbTQ2, TQ, &NbTQ, 9,4, 9, 4, qua);
-
-  int tet[8][8] = { // 8-split
-    {0,4,6,7}, {1,5,4,9}, {2,6,5,8}, {3,9,7,8},
-    {4,6,7,8}, {4,6,5,8}, {4,5,9,8}, {4,7,9,8}
-  };
-  splitCurvedElement(&SS2, &NbSS2, SS, &NbSS, 10,4, 1, 8, tet);
-  splitCurvedElement(&VS2, &NbVS2, VS, &NbVS, 10,4, 3, 8, tet);
-  splitCurvedElement(&TS2, &NbTS2, TS, &NbTS, 10,4, 9, 8, tet);
-
-  int hex[8][8] = { // 8-split
-    {0,8,20,9, 10,21,26,22}, {8,1,11,20, 21,12,23,26},
-    {9,20,13,3, 22,26,24,15}, {20,11,2,13, 26,23,14,24},
-    {10,21,26,22, 4,16,25,17}, {21,12,23,26, 16,5,18,25},
-    {22,26,24,15, 17,25,19,7}, {26,23,14,24, 25,18,6,19}
-  };
-  splitCurvedElement(&SH2, &NbSH2, SH, &NbSH, 27,8, 1, 8, hex);
-  splitCurvedElement(&VH2, &NbVH2, VH, &NbVH, 27,8, 3, 8, hex);
-  splitCurvedElement(&TH2, &NbTH2, TH, &NbTH, 27,8, 9, 8, hex);
-
-  int pri[8][8] = { // 8-split
-    {0,6,7, 8,15,16}, {1,9,6, 10,17,15}, {2,7,9, 11,16,17}, {6,9,7, 15,17,16},
-    {8,15,16, 3,12,13}, {10,17,15, 4,14,12}, {11,16,17, 5,13,14}, {15,17,16, 12,14,13}
-  };
-  splitCurvedElement(&SI2, &NbSI2, SI, &NbSI, 18,6, 1, 8, pri);
-  splitCurvedElement(&VI2, &NbVI2, VI, &NbVI, 18,6, 3, 8, pri);
-  splitCurvedElement(&TI2, &NbTI2, TI, &NbTI, 18,6, 9, 8, pri);
-
-  int pyr[6][8] = { // 6 pyramids
-    {0,5,13,6, 7}, {5,1,8,13, 9}, {6,13,10,3, 12}, {13,8,2,10, 11},
-    {7,9,11,12, 4}, {7,12,11,9, 13}
-  };
-  splitCurvedElement(&SY2, &NbSY2, SY, &NbSY, 14,5, 1, 6, pyr, 0); // don't remove yet
-  splitCurvedElement(&VY2, &NbVY2, VY, &NbVY, 14,5, 3, 6, pyr, 0);
-  splitCurvedElement(&TY2, &NbTY2, TY, &NbTY, 14,5, 9, 6, pyr, 0);
-
-  int pyr2[4][8] = { // + 4 tets to fill the holes
-    {6,12,7,13}, {7,9,5,13}, {9,11,8,13}, {12,10,11,13}
-  };
-  splitCurvedElement(&SY2, &NbSY2, SS, &NbSS, 14,4, 1, 4, pyr2);
-  splitCurvedElement(&VY2, &NbVY2, VS, &NbVS, 14,4, 3, 4, pyr2);
-  splitCurvedElement(&TY2, &NbTY2, TS, &NbTS, 14,4, 9, 4, pyr2);
-}
-
-// Smoothing
-
-void generate_connectivities(List_T *list, int nbList, 
-			     int nbTimeStep, int nbVert, smooth_data &data)
-{
-  if(!nbList) return;
-
-  double *vals = new double[nbTimeStep];
-  int nb = List_Nbr(list) / nbList;
-  for(int i = 0; i < List_Nbr(list); i += nb) {
-    double *x = (double *)List_Pointer_Fast(list, i);
-    double *y = (double *)List_Pointer_Fast(list, i + nbVert);
-    double *z = (double *)List_Pointer_Fast(list, i + 2 * nbVert);
-    double *v = (double *)List_Pointer_Fast(list, i + 3 * nbVert);
-    for(int j = 0; j < nbVert; j++) {
-      for(int k = 0; k < nbTimeStep; k++)
-        vals[k] = v[j + k * nbVert];
-      data.add(x[j], y[j], z[j], nbTimeStep, vals);
-    }
-  }
-  delete [] vals;
-}
-
-void smooth_list(List_T *list, int nbList,
-		 double *min, double *max, double *tsmin, double *tsmax, 
-                 int nbTimeStep, int nbVert, smooth_data &data)
-{
-  if(!nbList)
-    return;
-
-  double *vals = new double[nbTimeStep];
-  int nb = List_Nbr(list)/nbList;
-  for(int i = 0; i < List_Nbr(list); i += nb) {
-    double *x = (double *)List_Pointer_Fast(list, i);
-    double *y = (double *)List_Pointer_Fast(list, i + nbVert);
-    double *z = (double *)List_Pointer_Fast(list, i + 2 * nbVert);
-    double *v = (double *)List_Pointer_Fast(list, i + 3 * nbVert);
-    for(int j = 0; j < nbVert; j++) {
-      if(data.get(x[j], y[j], z[j], nbTimeStep, vals)){
-	for(int k = 0; k < nbTimeStep; k++) {
-	  double dd = vals[k];
-          v[j + k * nbVert] = dd;
-          if(dd < *min) *min = dd;
-          if(dd > *max) *max = dd;
-	  if(dd < tsmin[k]) tsmin[k] = dd;
-	  if(dd > tsmax[k]) tsmax[k] = dd;
-        }
-      }
-    }
-  }
-  delete [] vals;
-}
-
-void Post_View::smooth()
-{
-  double old_eps = xyzv::eps;
-  xyzv::eps = CTX.lc * 1.e-8;
-  
-  if(NbSL || NbST || NbSQ || NbSS || NbSH || NbSI || NbSY) {
-    Msg(INFO, "Smoothing scalar primitives in View[%d]", Index);
-    Min = VAL_INF;
-    Max = -VAL_INF;
-    for(int k = 0; k < NbTimeStep; k++) {
-      TimeStepMin[k] = VAL_INF;
-      TimeStepMax[k] = -VAL_INF;
-    }
-    smooth_data data;
-    generate_connectivities(SL, NbSL, NbTimeStep, 2, data);
-    generate_connectivities(ST, NbST, NbTimeStep, 3, data);
-    generate_connectivities(SQ, NbSQ, NbTimeStep, 4, data);
-    generate_connectivities(SS, NbSS, NbTimeStep, 4, data);
-    generate_connectivities(SH, NbSH, NbTimeStep, 8, data);
-    generate_connectivities(SI, NbSI, NbTimeStep, 6, data);
-    generate_connectivities(SY, NbSY, NbTimeStep, 5, data);
-    smooth_list(SL, NbSL, &Min, &Max, TimeStepMin, TimeStepMax, NbTimeStep, 2, data);
-    smooth_list(ST, NbST, &Min, &Max, TimeStepMin, TimeStepMax, NbTimeStep, 3, data);
-    smooth_list(SQ, NbSQ, &Min, &Max, TimeStepMin, TimeStepMax, NbTimeStep, 4, data);
-    smooth_list(SS, NbSS, &Min, &Max, TimeStepMin, TimeStepMax, NbTimeStep, 4, data);
-    smooth_list(SH, NbSH, &Min, &Max, TimeStepMin, TimeStepMax, NbTimeStep, 8, data);
-    smooth_list(SI, NbSI, &Min, &Max, TimeStepMin, TimeStepMax, NbTimeStep, 6, data);
-    smooth_list(SY, NbSY, &Min, &Max, TimeStepMin, TimeStepMax, NbTimeStep, 5, data);
-    Changed = 1;
-  }
-
-  xyzv::eps = old_eps;  
-}
-
-// Combine views (merge elements or merge time steps)
-
-struct nameidx{
-  char name[256];
-  List_T *indices;
-};
-
-static int fcmp_name(const void *a, const void *b){
-  char *name1 = ((struct nameidx*)a)->name;
-  char *name2 = ((struct nameidx*)b)->name;
-  return strcmp(name1, name2);
-}
-
-static void combine(List_T * a, List_T * b)
-{
-  if(!a || !b)
-    return;
-  for(int i = 0; i < List_Nbr(a); i++) {
-    List_Add(b, List_Pointer(a, i));
-  }
-}
-
-static void combine_strings(Post_View *a, Post_View *b)
-{
-  for(int i = 0; i < List_Nbr(a->T2D); i+=4){
-    List_Add(b->T2D, List_Pointer(a->T2D, i));
-    List_Add(b->T2D, List_Pointer(a->T2D, i+1));
-    List_Add(b->T2D, List_Pointer(a->T2D, i+2)); 
-    double d = List_Nbr(b->T2C);
-    List_Add(b->T2D, &d);
-    double beg, end;
-    List_Read(a->T2D, i+3, &beg); 
-    if(i > List_Nbr(a->T2D) - 8)
-      end = (double)List_Nbr(a->T2C);
-    else
-      List_Read(a->T2D, i+3+4, &end); 
-    char *c = (char*)List_Pointer(a->T2C, (int)beg);
-    for(int j = 0; j < (int)(end-beg); j++)
-      List_Add(b->T2C, &c[j]); 
-    b->NbT2++;
-  }
-  for(int i = 0; i < List_Nbr(a->T3D); i+=5){
-    List_Add(b->T3D, List_Pointer(a->T3D, i));
-    List_Add(b->T3D, List_Pointer(a->T3D, i+1));
-    List_Add(b->T3D, List_Pointer(a->T3D, i+2)); 
-    List_Add(b->T3D, List_Pointer(a->T3D, i+3)); 
-    double d = List_Nbr(b->T3C);
-    List_Add(b->T3D, &d);
-    double beg, end;
-    List_Read(a->T3D, i+4, &beg); 
-    if(i > List_Nbr(a->T3D) - 10)
-      end = (double)List_Nbr(a->T3C);
-    else
-      List_Read(a->T3D, i+4+5, &end); 
-    char *c = (char*)List_Pointer(a->T3C, (int)beg);
-    for(int j = 0; j < (int)(end-beg); j++)
-      List_Add(b->T3C, &c[j]); 
-    b->NbT3++;
-  }
-}
-
-static void combine_space(struct nameidx *id, List_T *to_remove)
-{
-  int index;
-
-  // sanity check
-  int nbt = 0;
-  for(int i = 0; i < List_Nbr(id->indices); i++) {
-    List_Read(id->indices, i, &index);
-    Post_View *v = *(Post_View **)List_Pointer(CTX.post.list, index);
-    if(!i){
-      nbt = v->NbTimeStep;
-    }
-    else{
-      if(v->NbTimeStep != nbt){
-	Msg(GERROR, "Cannot combine views having different number of time steps");
-	return;
-      }
-    }
-  }
-
-  Post_View *vm = BeginView(1);
-  for(int i = 0; i < List_Nbr(id->indices); i++) {
-    List_Read(id->indices, i, &index);
-    Post_View *v = *(Post_View **)List_Pointer(CTX.post.list, index);
-    List_Insert(to_remove, &v->Num, fcmp_int);
-    combine(v->SP,vm->SP); vm->NbSP += v->NbSP;
-    combine(v->VP,vm->VP); vm->NbVP += v->NbVP; 
-    combine(v->TP,vm->TP); vm->NbTP += v->NbTP;
-    combine(v->SL,vm->SL); vm->NbSL += v->NbSL;
-    combine(v->VL,vm->VL); vm->NbVL += v->NbVL;
-    combine(v->TL,vm->TL); vm->NbTL += v->NbTL;
-    combine(v->ST,vm->ST); vm->NbST += v->NbST;
-    combine(v->VT,vm->VT); vm->NbVT += v->NbVT;
-    combine(v->TT,vm->TT); vm->NbTT += v->NbTT;
-    combine(v->SQ,vm->SQ); vm->NbSQ += v->NbSQ;
-    combine(v->VQ,vm->VQ); vm->NbVQ += v->NbVQ;
-    combine(v->TQ,vm->TQ); vm->NbTQ += v->NbTQ;
-    combine(v->SS,vm->SS); vm->NbSS += v->NbSS;
-    combine(v->VS,vm->VS); vm->NbVS += v->NbVS;
-    combine(v->TS,vm->TS); vm->NbTS += v->NbTS;
-    combine(v->SH,vm->SH); vm->NbSH += v->NbSH;
-    combine(v->VH,vm->VH); vm->NbVH += v->NbVH;
-    combine(v->TH,vm->TH); vm->NbTH += v->NbTH;
-    combine(v->SI,vm->SI); vm->NbSI += v->NbSI;
-    combine(v->VI,vm->VI); vm->NbVI += v->NbVI;
-    combine(v->TI,vm->TI); vm->NbTI += v->NbTI;
-    combine(v->SY,vm->SY); vm->NbSY += v->NbSY;
-    combine(v->VY,vm->VY); vm->NbVY += v->NbVY;
-    combine(v->TY,vm->TY); vm->NbTY += v->NbTY;
-    combine_strings(v,vm);
-  }
-
-#if 0
-  // debug strings:
-  for(int i=0; i<List_Nbr(vm->T2D); i++)
-    printf("%g ", *(double*)List_Pointer(vm->T2D, i));
-  printf("\n");
-  for(int i=0; i<List_Nbr(vm->T2C); i++)
-    printf("%c ", *(char*)List_Pointer(vm->T2C, i));
-  printf("\n");
-#endif
-
-  // finalize
-  char name[256], filename[256], tmp[256];
-  if(!strcmp(id->name, "__all__"))
-    strcpy(tmp, "all");
-  else if(!strcmp(id->name, "__vis__"))
-    strcpy(tmp, "visible");
-  else
-    strcpy(tmp, id->name);
-  sprintf(name, "%s_Combine", tmp);
-  sprintf(filename, "%s_Combine.pos", tmp);
-  EndView(vm, 0, filename, name);
-}
-
-static void combine_time(struct nameidx *id, List_T *to_remove)
-{
-  int index, *nbe=0, *nbe2=0, nbn, nbn2, nbc, nbc2;
-  List_T *list=0, *list2=0;
-  
-  if(List_Nbr(id->indices) < 2){
-    return; // nothing to do
-  }
-
-  Post_View *vm = BeginView(1);
-
-  // use the first view as the reference
-  List_Read(id->indices, 0, &index);
-  Post_View *v = *(Post_View **)List_Pointer(CTX.post.list, index);
-  for(int i = 0; i < VIEW_NB_ELEMENT_TYPES; i++){
-    vm->get_raw_data(i, &list, &nbe, &nbc, &nbn);
-    v->get_raw_data(i, &list2, &nbe2, &nbc2, &nbn2);
-    *nbe = *nbe2;
-  }
-  vm->NbT2 = v->NbT2;
-  vm->NbT3 = v->NbT3;
-
-  // merge values for all element types
-  for(int i = 0; i < VIEW_NB_ELEMENT_TYPES; i++){
-    vm->get_raw_data(i, &list, &nbe, &nbc, &nbn);
-    for(int j = 0; j < *nbe; j++){
-      for(int k = 0; k < List_Nbr(id->indices); k++){
-	List_Read(id->indices, k, &index);
-	v = *(Post_View **)List_Pointer(CTX.post.list, index);
-	v->get_raw_data(i, &list2, &nbe2, &nbc2, &nbn2);
-	if(*nbe && *nbe == *nbe2){
-	  List_Insert(to_remove, &v->Num, fcmp_int);
-	  int nb2 = List_Nbr(list2) / *nbe2;
-	  if(!k){ 
-	    // copy coordinates of elm j (we are always here as
-	    // expected, since the ref view is the first one!)
-	    for(int l = 0; l < 3*nbn2; l++){
-	      List_Add(list, List_Pointer(list2, j*nb2+l));
-	    }
-	  }
-	  // copy values of elm j
-	  for(int l = 0; l < v->NbTimeStep*nbc2*nbn2; l++){
-	    List_Add(list, List_Pointer(list2, j*nb2+3*nbn2+l));
-	  }
-	}
-      }
-    }
-  }
-
-  // and a bit of spaghetti code for you now:
-
-  // merge 2d strings
-  for(int j = 0; j < vm->NbT2; j++){
-    for(int k = 0; k < List_Nbr(id->indices); k++){
-      List_Read(id->indices, k, &index);
-      v = *(Post_View **)List_Pointer(CTX.post.list, index);
-      if(vm->NbT2 == v->NbT2){
-	List_Insert(to_remove, &v->Num, fcmp_int);
-	if(!k){
-	  // copy coordinates 
-	  List_Add(vm->T2D, List_Pointer(v->T2D, j*4));
-	  List_Add(vm->T2D, List_Pointer(v->T2D, j*4+1));
-	  List_Add(vm->T2D, List_Pointer(v->T2D, j*4+2));
-	  // index
-	  double d = List_Nbr(vm->T2C);
-	  List_Add(vm->T2D, &d);
-	}
-	// copy char values
-	double beg, end;
-	List_Read(v->T2D, j*4+3, &beg);
-	if(j == vm->NbT2 - 1)
-	  end = (double)List_Nbr(v->T2C);
-	else
-	  List_Read(v->T2D, j*4+4+3, &end);
-	char *c = (char*)List_Pointer(v->T2C, (int)beg);
-	for(int l = 0; l < (int)(end-beg); l++)
-	  List_Add(vm->T2C, &c[l]);
-      }
-    }
-  }
-
-  // merge 3d strings
-  for(int j = 0; j < vm->NbT3; j++){
-    for(int k = 0; k < List_Nbr(id->indices); k++){
-      List_Read(id->indices, k, &index);
-      v = *(Post_View **)List_Pointer(CTX.post.list, index);
-      if(vm->NbT3 == v->NbT3){
-	List_Insert(to_remove, &v->Num, fcmp_int);
-	if(!k){
-	  // copy coordinates 
-	  List_Add(vm->T3D, List_Pointer(v->T3D, j*5));
-	  List_Add(vm->T3D, List_Pointer(v->T3D, j*5+1));
-	  List_Add(vm->T3D, List_Pointer(v->T3D, j*5+2));
-	  List_Add(vm->T3D, List_Pointer(v->T3D, j*5+3));
-	  // index
-	  double d = List_Nbr(vm->T3C);
-	  List_Add(vm->T3D, &d);
-	}
-	// copy char values
-	double beg, end;
-	List_Read(v->T3D, j*5+4, &beg);
-	if(j == vm->NbT3 - 1)
-	  end = (double)List_Nbr(v->T3C);
-	else
-	  List_Read(v->T3D, j*5+5+4, &end);
-	char *c = (char*)List_Pointer(v->T3C, (int)beg);
-	for(int l = 0; l < (int)(end-beg); l++)
-	  List_Add(vm->T3C, &c[l]);
-      }
-    }
-  }
-
-  // create the time data
-  for(int i = 0; i < List_Nbr(id->indices); i++){
-    List_Read(id->indices, i, &index);
-    v = *(Post_View **)List_Pointer(CTX.post.list, index);
-    for(int j = 0; j < List_Nbr(v->Time); j++){
-      List_Add(vm->Time, List_Pointer(v->Time, j));
-    }
-  }
-
-  // if all the time values are the same, it probably means that the
-  // original views didn't have any time data: let's put some indices,
-  // then
-  double time0 = 0.0;
-  if(List_Nbr(vm->Time)) List_Read(vm->Time, 0, &time0);
-  int nbtime = List_Nbr(vm->Time), ok = 0;
-  for(int i = 1; i < nbtime; i++){
-    if(time0 != *(double*)List_Pointer(vm->Time, i)){
-      ok = 1;
-      break;
-    }
-  }
-  if(!ok){
-    List_Reset(vm->Time);
-    for(int i = 0; i < nbtime; i++){
-      double time = i;
-      List_Add(vm->Time, &time);
-    }
-  }
-
-  // finalize
-  char name[256], filename[256], tmp[256];
-  if(!strcmp(id->name, "__all__"))
-    strcpy(tmp, "all");
-  else if(!strcmp(id->name, "__vis__"))
-    strcpy(tmp, "visible");
-  else
-    strcpy(tmp, id->name);
-  sprintf(name, "%s_Combine", tmp);
-  sprintf(filename, "%s_Combine.pos", tmp);
-  EndView(vm, 0, filename, name);
-}
-
-void CombineViews(int time, int how, int remove)
-{
-  // time==0: combine the elements
-  // time==1: combine the timesteps
-
-  // how==0: try to combine all visible views
-  // how==1: try to combine all views
-  // how==2: try to combine all views having identical names
-
-  List_T *ids = List_Create(10, 10, sizeof(nameidx));
-  List_T *to_remove = List_Create(10, 10, sizeof(int));
-  struct nameidx *pid;
-
-  for(int i = 0; i < List_Nbr(CTX.post.list); i++) {
-    Post_View *v = *(Post_View **) List_Pointer(CTX.post.list, i);
-    if(how || v->Visible) {
-      nameidx id;
-      // this might potentially lead to unwanted results if there are
-      // views named "__all__" or "__vis__", but what the heck...
-      if(how == 2)
-	strcpy(id.name, v->Name);
-      else if(how == 1)
-	strcpy(id.name, "__all__");
-      else
-	strcpy(id.name, "__vis__");
-      if((pid = (struct nameidx*)List_PQuery(ids, &id, fcmp_name))){
-	List_Add(pid->indices, &i);
-      }
-      else{
-	id.indices = List_Create(10, 10, sizeof(int));
-	List_Add(id.indices, &i);
-	List_Add(ids, &id);
-      }
-    }
-  }
-
-  for(int i = 0; i < List_Nbr(ids); i++){
-    pid = (struct nameidx*)List_Pointer(ids, i);
-    if(time)
-      combine_time(pid, to_remove);
-    else
-      combine_space(pid, to_remove);
-    List_Delete(pid->indices);
-  }
-  List_Delete(ids);
-
-  // remove original view?
-  if(remove){
-    for(int i = 0; i < List_Nbr(to_remove); i++){
-      int num;
-      List_Read(to_remove, i, &num);
-      RemoveViewByNumber(num);
-    }
-  }
-  List_Delete(to_remove);
-
-#if defined(HAVE_FLTK)
-  UpdateViewsInGUI();
-#endif
-}
-
-// generic access functions
-
-int Post_View::empty(){
-  if(NbSP || NbVP || NbTP ||
-     NbSL || NbVL || NbTL ||
-     NbST || NbVT || NbTT ||
-     NbSQ || NbVQ || NbTQ ||
-     NbSS || NbVS || NbTS ||
-     NbSH || NbVH || NbTH ||
-     NbSI || NbVI || NbTI ||
-     NbSY || NbVY || NbTY ||
-     NbT2 || NbT3)
-    return 0;
-  else
-    return 1;
-}
-
-void Post_View::get_raw_data(int type, List_T **list, int **nbe, int *nbc, int *nbn){
-  switch(type){
-  case 0 : *list = SP; *nbe = &NbSP; *nbc = 1; *nbn = 1; break;
-  case 1 : *list = VP; *nbe = &NbVP; *nbc = 3; *nbn = 1; break;
-  case 2 : *list = TP; *nbe = &NbTP; *nbc = 9; *nbn = 1; break;
-  case 3 : *list = SL; *nbe = &NbSL; *nbc = 1; *nbn = 2; break;
-  case 4 : *list = VL; *nbe = &NbVL; *nbc = 3; *nbn = 2; break;
-  case 5 : *list = TL; *nbe = &NbTL; *nbc = 9; *nbn = 2; break;
-  case 6 : *list = ST; *nbe = &NbST; *nbc = 1; *nbn = 3; break;
-  case 7 : *list = VT; *nbe = &NbVT; *nbc = 3; *nbn = 3; break;
-  case 8 : *list = TT; *nbe = &NbTT; *nbc = 9; *nbn = 3; break;
-  case 9 : *list = SQ; *nbe = &NbSQ; *nbc = 1; *nbn = 4; break;
-  case 10: *list = VQ; *nbe = &NbVQ; *nbc = 3; *nbn = 4; break;
-  case 11: *list = TQ; *nbe = &NbTQ; *nbc = 9; *nbn = 4; break;
-  case 12: *list = SS; *nbe = &NbSS; *nbc = 1; *nbn = 4; break;
-  case 13: *list = VS; *nbe = &NbVS; *nbc = 3; *nbn = 4; break;
-  case 14: *list = TS; *nbe = &NbTS; *nbc = 9; *nbn = 4; break;
-  case 15: *list = SH; *nbe = &NbSH; *nbc = 1; *nbn = 8; break;
-  case 16: *list = VH; *nbe = &NbVH; *nbc = 3; *nbn = 8; break;
-  case 17: *list = TH; *nbe = &NbTH; *nbc = 9; *nbn = 8; break;
-  case 18: *list = SI; *nbe = &NbSI; *nbc = 1; *nbn = 6; break;
-  case 19: *list = VI; *nbe = &NbVI; *nbc = 3; *nbn = 6; break;
-  case 20: *list = TI; *nbe = &NbTI; *nbc = 9; *nbn = 6; break;
-  case 21: *list = SY; *nbe = &NbSY; *nbc = 1; *nbn = 5; break;
-  case 22: *list = VY; *nbe = &NbVY; *nbc = 3; *nbn = 5; break;
-  case 23: *list = TY; *nbe = &NbTY; *nbc = 9; *nbn = 5; break;
-  default: Msg(GERROR, "Wrong type in Post_View::get_raw_data"); break;
-  }
-}
-
-// Generalized raise
-
-void InitGeneralizedRaise(Post_View *v)
-{
-  FreeGeneralizedRaise(v);
-
-  char *expr[3] = { v->GenRaiseX, v->GenRaiseY, v->GenRaiseZ };
-#if defined(HAVE_MATH_EVAL)
-  for(int i = 0; i < 3; i++) {
-    if(strlen(expr[i])) {
-      if(!(v->GenRaise_f[i] = evaluator_create(expr[i])))
-        Msg(GERROR, "Invalid expression '%s'", expr[i]);
-    }
-  }
-#else
-  for(int i = 0; i < 3; i++) {
-    if(!strcmp(expr[i], "v0")) v->GenRaise_f[i] = (void*)0;
-    else if(!strcmp(expr[i], "v1")) v->GenRaise_f[i] = (void*)1;
-    else if(!strcmp(expr[i], "v2")) v->GenRaise_f[i] = (void*)2;
-    else if(!strcmp(expr[i], "v3")) v->GenRaise_f[i] = (void*)3;
-    else if(!strcmp(expr[i], "v4")) v->GenRaise_f[i] = (void*)4;
-    else if(!strcmp(expr[i], "v5")) v->GenRaise_f[i] = (void*)5;
-    else if(!strcmp(expr[i], "v6")) v->GenRaise_f[i] = (void*)6;
-    else if(!strcmp(expr[i], "v7")) v->GenRaise_f[i] = (void*)7;
-    else if(!strcmp(expr[i], "v8")) v->GenRaise_f[i] = (void*)8;
-    else if(strlen(expr[i])) {
-      Msg(GERROR, "Invalid expression '%s'", expr[i]);
-      return;
-    }
-  }
-#endif
-}
-
-void FreeGeneralizedRaise(Post_View *v)
-{
-  for(int i = 0; i < 3; i++){
-#if defined(HAVE_MATH_EVAL)
-    if(v->GenRaise_f[i])
-      evaluator_destroy(v->GenRaise_f[i]);
-    v->GenRaise_f[i] = NULL;
-#else
-    v->GenRaise_f[i] = (void*)-1;
-#endif
-  }
-}
-
-void ApplyGeneralizedRaise(Post_View * v, int numNodes, int numComp, double *vals,
-			   double *x, double *y, double *z)
-{
-  double *coords[3] = { x, y, z };
-
-  for(int k = 0; k < numNodes; k++) {
-    double d[9] = {0., 0., 0., 0., 0., 0., 0., 0., 0.};
-    for(int l = 0; l < numComp; l++)
-      d[l] = vals[numComp * k + l];
-#if defined(HAVE_MATH_EVAL)
-    char *names[] = { "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8" ,
-		      "x", "y", "z" };
-    double values[] = { d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], d[8],
-			x[k], y[k], z[k] };
-    for(int i = 0; i < 3; i++) {
-      if(v->GenRaise_f[i])
-        coords[i][k] += 
-	  evaluator_evaluate(v->GenRaise_f[i], sizeof(names) / 
-			     sizeof(names[0]), names, values) * v->GenRaiseFactor;
-    }
-#else
-    for(int i = 0; i < 3; i++){
-      int comp = (int)v->GenRaise_f[i];
-      if(comp >= 0)
-	coords[i][k] += d[comp] * v->GenRaiseFactor;
-    }
-#endif
-  }
-}
diff --git a/Post/Views.h b/Post/Views.h
index 8b6ff040eb0e868b45ef1d2d127016a7d8947e22..3e73693db2f38b9ff939bf40121b66103a93befd 100644
--- a/Post/Views.h
+++ b/Post/Views.h
@@ -202,28 +202,7 @@ class Post_View{
 
 // Public functions
 
-int fcmpPostViewNum(const void *v1, const void *v2);
-int fcmpPostViewAliasOf(const void *v1, const void *v2);
-
 Post_View *BeginView(int alloc);
 void EndView(Post_View *v, int AddInUI, char *FileName, char *Name);
-void AliasView(int num, int withoptions);
-void FreeView(Post_View *v);
-bool RemoveViewByIndex(int index);
-bool RemoveViewByNumber(int num);
-int ReadView(char *filename);
-void WriteView(Post_View *v, char *filename, int format, int append);
-void CopyViewOptions(Post_View *src, Post_View *dest);
-void CombineViews(int time, int how, int remove);
-
-Post_View *Create2DGraph(char *xname, char *yname, int nbdata, double *x, double *y);
-
-GmshColorTable *Get_ColorTable(int num);
-void Print_ColorTable(int num, int diff, char *prefix, FILE *file);
-
-void InitGeneralizedRaise(Post_View *v);
-void FreeGeneralizedRaise(Post_View *v);
-void ApplyGeneralizedRaise(Post_View * v, int numNodes, int numComp, double *vals,
-			   double *x, double *y, double *z);
 
 #endif
diff --git a/Post/ViewsIO.cpp b/Post/ViewsIO.cpp
deleted file mode 100644
index ee59d3b99b9c1088fb11cfe2c9c767be607f6bb0..0000000000000000000000000000000000000000
--- a/Post/ViewsIO.cpp
+++ /dev/null
@@ -1,837 +0,0 @@
-// $Id: ViewsIO.cpp,v 1.1 2007-07-09 13:54:37 geuzaine Exp $
-//
-// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-// USA.
-// 
-// Please report all bugs and problems to <gmsh@geuz.org>.
-
-#include <set>
-#include "Gmsh.h"
-#include "Numeric.h"
-#include "Views.h"
-#include "Context.h"
-
-extern Context_T CTX;
-
-#if defined(HAVE_FLTK)
-void UpdateViewsInGUI();
-#endif
-
-// Read view from file
-
-int ReadView(char *filename)
-{
-  FILE *fp = fopen(filename, "rb");
-  if(!fp){
-    Msg(GERROR, "Unable to open file '%s'", filename);
-    return 0;
-  }
-
-  char str[256], name[256];
-  int i, nb, format, size, testone, swap, t2l, t3l;
-  double version;
-  Post_View *v;
-
-  while(1) {
-
-    do {
-      if(!fgets(str, 256, fp) || feof(fp))
-        break;
-    } while(str[0] != '$');
-
-    if(feof(fp))
-      break;
-
-    if(!strncmp(&str[1], "PostFormat", 10)) {
-      if(!fscanf(fp, "%lf %d %d\n", &version, &format, &size)){
-        Msg(GERROR, "Read error");
-        return 0;
-      }
-      if(version < 1.0) {
-        Msg(GERROR, "This post-processing file is too old (version %g < 1.0)",
-            version);
-        return 0;
-      }
-      if(size == sizeof(double))
-        Msg(DEBUG, "Data is in double precision format (size==%d)", size);
-      else {
-        Msg(GERROR, "Unknown data size (%d) in post-processing file", size);
-        return 0;
-      }
-      if(format == 0)
-        format = LIST_FORMAT_ASCII;
-      else if(format == 1)
-        format = LIST_FORMAT_BINARY;
-      else {
-        Msg(GERROR, "Unknown format for view");
-        return 0;
-      }
-    }
-
-    if(!strncmp(&str[1], "View", 4)) {
-      v = BeginView(0);
-      if(version <= 1.0) {
-        Msg(DEBUG, "Detected post-processing view format <= 1.0");
-        if(!fscanf(fp, "%s %d %d %d %d %d %d %d %d %d %d %d %d %d\n",
-		   name, &v->NbTimeStep,
-		   &v->NbSP, &v->NbVP, &v->NbTP, &v->NbSL, &v->NbVL, &v->NbTL,
-		   &v->NbST, &v->NbVT, &v->NbTT, &v->NbSS, &v->NbVS, &v->NbTS)){
-	  Msg(GERROR, "Read error");
-	  return 0;
-	}
-        v->NbT2 = t2l = v->NbT3 = t3l = 0;
-      }
-      else if(version == 1.1) {
-        Msg(DEBUG, "Detected post-processing view format 1.1");
-        if(!fscanf(fp,
-		   "%s %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d\n",
-		   name, &v->NbTimeStep, &v->NbSP, &v->NbVP, &v->NbTP, &v->NbSL,
-		   &v->NbVL, &v->NbTL, &v->NbST, &v->NbVT, &v->NbTT, &v->NbSS,
-		   &v->NbVS, &v->NbTS, &v->NbT2, &t2l, &v->NbT3, &t3l)){
-	  Msg(GERROR, "Read error");
-	  return 0;
-	}
-      }
-      else if(version == 1.2 || version == 1.3) {
-        Msg(DEBUG, "Detected post-processing view format %g", version);
-        if(!fscanf(fp, "%s %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d "
-		   "%d %d %d %d %d %d %d %d %d %d %d %d %d\n",
-		   name, &v->NbTimeStep,
-		   &v->NbSP, &v->NbVP, &v->NbTP, &v->NbSL, &v->NbVL, &v->NbTL,
-		   &v->NbST, &v->NbVT, &v->NbTT, &v->NbSQ, &v->NbVQ, &v->NbTQ,
-		   &v->NbSS, &v->NbVS, &v->NbTS, &v->NbSH, &v->NbVH, &v->NbTH,
-		   &v->NbSI, &v->NbVI, &v->NbTI, &v->NbSY, &v->NbVY, &v->NbTY,
-		   &v->NbT2, &t2l, &v->NbT3, &t3l)){
-	  Msg(GERROR, "Read error");
-	  return 0;
-	}
-      }
-      else if(version == 1.4) {
-        Msg(DEBUG, "Detected post-processing view format 1.4");
-        if(!fscanf(fp, "%s %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d "
-		   "%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d "
-		   "%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d\n",
-		   name, &v->NbTimeStep,
-		   &v->NbSP, &v->NbVP, &v->NbTP, &v->NbSL, &v->NbVL, &v->NbTL,
-		   &v->NbST, &v->NbVT, &v->NbTT, &v->NbSQ, &v->NbVQ, &v->NbTQ,
-		   &v->NbSS, &v->NbVS, &v->NbTS, &v->NbSH, &v->NbVH, &v->NbTH,
-		   &v->NbSI, &v->NbVI, &v->NbTI, &v->NbSY, &v->NbVY, &v->NbTY,
-		   &v->NbSL2, &v->NbVL2, &v->NbTL2, &v->NbST2, &v->NbVT2, &v->NbTT2,
-		   &v->NbSQ2, &v->NbVQ2, &v->NbTQ2, &v->NbSS2, &v->NbVS2, &v->NbTS2,
-		   &v->NbSH2, &v->NbVH2, &v->NbTH2, &v->NbSI2, &v->NbVI2, &v->NbTI2,
-		   &v->NbSY2, &v->NbVY2, &v->NbTY2, &v->NbT2, &t2l, &v->NbT3, &t3l)){
-	  Msg(GERROR, "Read error");
-	  return 0;
-	}
-      }
-      else {
-        Msg(GERROR, "Unknown post-processing file format (version %g)",
-            version);
-        return 0;
-      }
-
-      for(i = 0; i < (int)strlen(name); i++)
-        if(name[i] == '^')
-          name[i] = ' ';
-
-      swap = 0;
-      if(format == LIST_FORMAT_BINARY) {
-        if(!fread(&testone, sizeof(int), 1, fp)){
-	  Msg(GERROR, "Read error");
-	  return 0;
-	}
-        if(testone != 1) {
-          Msg(INFO, "Swapping bytes from binary file");
-          swap = 1;
-        }
-      }
-
-      v->DataSize = size;
-
-      // Time values
-      v->Time = List_CreateFromFile(v->NbTimeStep, 100, size, fp, format, swap);
-
-      // Note: if nb==0, we still allocates the lists (so that they
-      // are ready to be filled later, e.g. in plugins)
-
-#define LCD List_CreateFromFile(nb, 1000, size, fp, format, swap)
-
-      // Points
-      nb = v->NbSP ? v->NbSP * (v->NbTimeStep * 1 + 3) : 0; v->SP = LCD;
-      nb = v->NbVP ? v->NbVP * (v->NbTimeStep * 3 + 3) : 0; v->VP = LCD;
-      nb = v->NbTP ? v->NbTP * (v->NbTimeStep * 9 + 3) : 0; v->TP = LCD;
-
-      // Lines
-      nb = v->NbSL ? v->NbSL * (v->NbTimeStep * 2 * 1 + 6) : 0; v->SL = LCD;
-      nb = v->NbVL ? v->NbVL * (v->NbTimeStep * 2 * 3 + 6) : 0; v->VL = LCD;
-      nb = v->NbTL ? v->NbTL * (v->NbTimeStep * 2 * 9 + 6) : 0; v->TL = LCD;
-
-      // Triangles
-      nb = v->NbST ? v->NbST * (v->NbTimeStep * 3 * 1 + 9) : 0; v->ST = LCD;
-      nb = v->NbVT ? v->NbVT * (v->NbTimeStep * 3 * 3 + 9) : 0; v->VT = LCD;
-      nb = v->NbTT ? v->NbTT * (v->NbTimeStep * 3 * 9 + 9) : 0; v->TT = LCD;
-
-      // Quadrangles
-      nb = v->NbSQ ? v->NbSQ * (v->NbTimeStep * 4 * 1 + 12) : 0; v->SQ = LCD;
-      nb = v->NbVQ ? v->NbVQ * (v->NbTimeStep * 4 * 3 + 12) : 0; v->VQ = LCD;
-      nb = v->NbTQ ? v->NbTQ * (v->NbTimeStep * 4 * 9 + 12) : 0; v->TQ = LCD;
-
-      // Tetrahedra
-      nb = v->NbSS ? v->NbSS * (v->NbTimeStep * 4 * 1 + 12) : 0; v->SS = LCD;
-      nb = v->NbVS ? v->NbVS * (v->NbTimeStep * 4 * 3 + 12) : 0; v->VS = LCD;
-      nb = v->NbTS ? v->NbTS * (v->NbTimeStep * 4 * 9 + 12) : 0; v->TS = LCD;
-
-      // Hexahedra
-      nb = v->NbSH ? v->NbSH * (v->NbTimeStep * 8 * 1 + 24) : 0; v->SH = LCD;
-      nb = v->NbVH ? v->NbVH * (v->NbTimeStep * 8 * 3 + 24) : 0; v->VH = LCD;
-      nb = v->NbTH ? v->NbTH * (v->NbTimeStep * 8 * 9 + 24) : 0; v->TH = LCD;
-
-      // Prisms
-      nb = v->NbSI ? v->NbSI * (v->NbTimeStep * 6 * 1 + 18) : 0; v->SI = LCD;
-      nb = v->NbVI ? v->NbVI * (v->NbTimeStep * 6 * 3 + 18) : 0; v->VI = LCD;
-      nb = v->NbTI ? v->NbTI * (v->NbTimeStep * 6 * 9 + 18) : 0; v->TI = LCD;
-
-      // Pyramids
-      nb = v->NbSY ? v->NbSY * (v->NbTimeStep * 5 * 1 + 15) : 0; v->SY = LCD;
-      nb = v->NbVY ? v->NbVY * (v->NbTimeStep * 5 * 3 + 15) : 0; v->VY = LCD;
-      nb = v->NbTY ? v->NbTY * (v->NbTimeStep * 5 * 9 + 15) : 0; v->TY = LCD;
-
-      // 2nd order Lines
-      nb = v->NbSL2 ? v->NbSL2 * (v->NbTimeStep * 3 * 1 + 9) : 0; v->SL2 = LCD;
-      nb = v->NbVL2 ? v->NbVL2 * (v->NbTimeStep * 3 * 3 + 9) : 0; v->VL2 = LCD;
-      nb = v->NbTL2 ? v->NbTL2 * (v->NbTimeStep * 3 * 9 + 9) : 0; v->TL2 = LCD;
-
-      // 2nd order Triangles
-      nb = v->NbST2 ? v->NbST2 * (v->NbTimeStep * 6 * 1 + 18) : 0; v->ST2 = LCD;
-      nb = v->NbVT2 ? v->NbVT2 * (v->NbTimeStep * 6 * 3 + 18) : 0; v->VT2 = LCD;
-      nb = v->NbTT2 ? v->NbTT2 * (v->NbTimeStep * 6 * 9 + 18) : 0; v->TT2 = LCD;
-
-      // 2nd order Quadrangles
-      nb = v->NbSQ2 ? v->NbSQ2 * (v->NbTimeStep * 9 * 1 + 27) : 0; v->SQ2 = LCD;
-      nb = v->NbVQ2 ? v->NbVQ2 * (v->NbTimeStep * 9 * 3 + 27) : 0; v->VQ2 = LCD;
-      nb = v->NbTQ2 ? v->NbTQ2 * (v->NbTimeStep * 9 * 9 + 27) : 0; v->TQ2 = LCD;
-
-      // 2nd order Tetrahedra
-      nb = v->NbSS2 ? v->NbSS2 * (v->NbTimeStep * 10 * 1 + 30) : 0; v->SS2 = LCD;
-      nb = v->NbVS2 ? v->NbVS2 * (v->NbTimeStep * 10 * 3 + 30) : 0; v->VS2 = LCD;
-      nb = v->NbTS2 ? v->NbTS2 * (v->NbTimeStep * 10 * 9 + 30) : 0; v->TS2 = LCD;
-
-      // 2nd order Hexahedra
-      nb = v->NbSH2 ? v->NbSH2 * (v->NbTimeStep * 27 * 1 + 81) : 0; v->SH2 = LCD;
-      nb = v->NbVH2 ? v->NbVH2 * (v->NbTimeStep * 27 * 3 + 81) : 0; v->VH2 = LCD;
-      nb = v->NbTH2 ? v->NbTH2 * (v->NbTimeStep * 27 * 9 + 81) : 0; v->TH2 = LCD;
-
-      // 2nd order Prisms
-      nb = v->NbSI2 ? v->NbSI2 * (v->NbTimeStep * 18 * 1 + 54) : 0; v->SI2 = LCD;
-      nb = v->NbVI2 ? v->NbVI2 * (v->NbTimeStep * 18 * 3 + 54) : 0; v->VI2 = LCD;
-      nb = v->NbTI2 ? v->NbTI2 * (v->NbTimeStep * 18 * 9 + 54) : 0; v->TI2 = LCD;
-
-      // 2nd order Pyramids
-      nb = v->NbSY2 ? v->NbSY2 * (v->NbTimeStep * 14 * 1 + 42) : 0; v->SY2 = LCD;
-      nb = v->NbVY2 ? v->NbVY2 * (v->NbTimeStep * 14 * 3 + 42) : 0; v->VY2 = LCD;
-      nb = v->NbTY2 ? v->NbTY2 * (v->NbTimeStep * 14 * 9 + 42) : 0; v->TY2 = LCD;
-
-#undef LCD
-
-      // 2D strings
-      nb = v->NbT2 ? v->NbT2 * 4 : 0;
-      v->T2D = List_CreateFromFile(nb, 100, size, fp, format, swap);
-      if(version <= 1.2)
-	v->T2C = List_CreateFromFileOld(t2l, 100, sizeof(char), fp, format, swap);
-      else
-	v->T2C = List_CreateFromFile(t2l, 100, sizeof(char), fp, format, swap);
-
-      // 3D strings
-      nb = v->NbT3 ? v->NbT3 * 5 : 0;
-      v->T3D = List_CreateFromFile(nb, 100, size, fp, format, swap);
-      if(version <= 1.2)
-	v->T3C = List_CreateFromFileOld(t3l, 100, sizeof(char), fp, format, swap);
-      else
-	v->T3C = List_CreateFromFile(t3l, 100, sizeof(char), fp, format, swap);
-
-      Msg(DEBUG,
-          "Read View '%s' (%d TimeSteps): "
-	  "SP(%d/%d) VP(%d/%d) TP(%d/%d) "
-	  "SL(%d/%d) VL(%d/%d) TL(%d/%d) "
-	  "ST(%d/%d) VT(%d/%d) TT(%d/%d) "
-	  "SQ(%d/%d) VQ(%d/%d) TQ(%d/%d) "
-	  "SS(%d/%d) VS(%d/%d) TS(%d/%d) "
-	  "SH(%d/%d) VH(%d/%d) TH(%d/%d) "
-	  "SI(%d/%d) VI(%d/%d) TI(%d/%d) "
-	  "SY(%d/%d) VY(%d/%d) TY(%d/%d) " 
-	  "SL2(%d/%d) VL2(%d/%d) TL2(%d/%d) "
-	  "ST2(%d/%d) VT2(%d/%d) TT2(%d/%d) "
-	  "SQ2(%d/%d) VQ2(%d/%d) TQ2(%d/%d) "
-	  "SS2(%d/%d) VS2(%d/%d) TS2(%d/%d) " 
-	  "SH2(%d/%d) VH2(%d/%d) TH2(%d/%d) "
-	  "SI2(%d/%d) VI2(%d/%d) TI2(%d/%d) "
-	  "SY2(%d/%d) VY2(%d/%d) TY2(%d/%d) "
-	  "T2(%d/%d/%d) T3(%d/%d/%d) ", 
-	  name, v->NbTimeStep,
-          v->NbSP, List_Nbr(v->SP), v->NbVP, List_Nbr(v->VP), v->NbTP, List_Nbr(v->TP),
-          v->NbSL, List_Nbr(v->SL), v->NbVL, List_Nbr(v->VL), v->NbTL, List_Nbr(v->TL),
-          v->NbST, List_Nbr(v->ST), v->NbVT, List_Nbr(v->VT), v->NbTT, List_Nbr(v->TT),
-          v->NbSQ, List_Nbr(v->SQ), v->NbVQ, List_Nbr(v->VQ), v->NbTQ, List_Nbr(v->TQ),
-          v->NbSS, List_Nbr(v->SS), v->NbVS, List_Nbr(v->VS), v->NbTS, List_Nbr(v->TS),
-          v->NbSH, List_Nbr(v->SH), v->NbVH, List_Nbr(v->VH), v->NbTH, List_Nbr(v->TH),
-          v->NbSI, List_Nbr(v->SI), v->NbVI, List_Nbr(v->VI), v->NbTI, List_Nbr(v->TI),
-          v->NbSY, List_Nbr(v->SY), v->NbVY, List_Nbr(v->VY), v->NbTY, List_Nbr(v->TY),
-          v->NbSL2, List_Nbr(v->SL2), v->NbVL2, List_Nbr(v->VL2), v->NbTL2, List_Nbr(v->TL2),
-          v->NbST2, List_Nbr(v->ST2), v->NbVT2, List_Nbr(v->VT2), v->NbTT2, List_Nbr(v->TT2),
-          v->NbSQ2, List_Nbr(v->SQ2), v->NbVQ2, List_Nbr(v->VQ2), v->NbTQ2, List_Nbr(v->TQ2),
-          v->NbSS2, List_Nbr(v->SS2), v->NbVS2, List_Nbr(v->VS2), v->NbTS2, List_Nbr(v->TS2),
-          v->NbSH2, List_Nbr(v->SH2), v->NbVH2, List_Nbr(v->VH2), v->NbTH2, List_Nbr(v->TH2),
-          v->NbSI2, List_Nbr(v->SI2), v->NbVI2, List_Nbr(v->VI2), v->NbTI2, List_Nbr(v->TI2),
-          v->NbSY2, List_Nbr(v->SY2), v->NbVY2, List_Nbr(v->VY2), v->NbTY2, List_Nbr(v->TY2),
-	  v->NbT2, List_Nbr(v->T2D), List_Nbr(v->T2C), 
-	  v->NbT3, List_Nbr(v->T3D), List_Nbr(v->T3C));
-      
-      // don't update the ui after each view, but only at the end
-      EndView(v, 0, filename, name); 
-    }
-
-    do {
-      if(!fgets(str, 256, fp) || feof(fp))
-        Msg(GERROR, "Prematured end of file");
-    } while(str[0] != '$');
-
-  }
-
-#if defined(HAVE_FLTK)
-  UpdateViewsInGUI();
-#endif
-
-  return 1;
-}
-
-// Write view to file in Parsed, ASCII or Binary format
-
-static void write_parsed_time(List_T *list, FILE *fp)
-{
-  if(List_Nbr(list) > 1) {
-    fprintf(fp, "TIME{");
-    for(int i = 0; i < List_Nbr(list); i ++) {
-      if(i) fprintf(fp, ",");
-      fprintf(fp, "%.16g", *(double *)List_Pointer(list, i));
-    }
-    fprintf(fp, "};\n");
-  }
-}
-
-static void write_parsed_elements(char *str, int nbnod, int nb, List_T *list, FILE *fp)
-{
-  if(nb) {
-    int n = List_Nbr(list) / nb;
-    for(int i = 0; i < List_Nbr(list); i += n) {
-      double *x = (double *)List_Pointer(list, i);
-      double *y = (double *)List_Pointer(list, i + nbnod);
-      double *z = (double *)List_Pointer(list, i + 2 * nbnod);
-      fprintf(fp, "%s(", str);
-      for(int j = 0; j < nbnod; j++) {
-	if(j) fprintf(fp, ",");
-	fprintf(fp, "%.16g,%.16g,%.16g", x[j], y[j], z[j]);
-      }
-      fprintf(fp, "){");
-      for(int j = 3 * nbnod; j < n; j++) {
-	if(j - 3 * nbnod) fprintf(fp, ",");
-	fprintf(fp, "%.16g", *(double *)List_Pointer(list, i + j));
-      }
-      fprintf(fp, "};\n");
-    }
-  }
-}
-
-static void write_parsed_strings(int nbc, int nb, List_T *TD, List_T *TC, FILE *fp)
-{
-  if(!nb || (nbc != 4 && nbc != 5)) return;
-  for(int j = 0; j < List_Nbr(TD); j += nbc){
-    double x, y, z, style, start, end;
-    List_Read(TD, j, &x);
-    List_Read(TD, j+1, &y);
-    if(nbc == 5)
-      List_Read(TD, j+2, &z);
-    List_Read(TD, j+nbc-2, &style);
-    if(nbc == 4)
-      fprintf(fp, "T2(%g,%g,%g){", x, y, style);
-    else
-      fprintf(fp, "T3(%g,%g,%g,%g){", x, y, z, style);
-    List_Read(TD, j+nbc-1, &start);
-    if(j+nbc*2-1 < List_Nbr(TD))
-      List_Read(TD, j+nbc*2-1, &end);
-    else
-      end = List_Nbr(TC);
-    int l = 0;
-    while(l < end-start){
-      char *str = (char*)List_Pointer(TC, (int)start + l);
-      if(l) fprintf(fp, ",");
-      fprintf(fp, "\"%s\"", str);
-      l += strlen(str)+1;
-    }
-    fprintf(fp, "};\n");
-  }
-}
-
-void WriteViewPOS(Post_View *v, FILE *file, int binary=0, int parsed=1, int append=0)
-{
-  char name[256];
-  int f, One = 1;
-
-  if(!parsed && !append){
-    fprintf(file, "$PostFormat /* Gmsh 1.3, %s */\n",
-	    binary ? "binary" : "ascii");
-    fprintf(file, "1.3 %d %d\n", binary, (int)sizeof(double));
-    fprintf(file, "$EndPostFormat\n");
-  }
-
-  strcpy(name, v->Name);
-  for(int i = 0; i < (int)strlen(name); i++)
-    if(name[i] == ' ') name[i] = '^';
-
-  if(!parsed){
-    fprintf(file, "$View /* %s */\n", v->Name);
-    fprintf(file, "%s ", name);
-    fprintf(file, "%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d "
-	    "%d %d %d %d %d %d %d %d %d %d %d %d\n",
-	    List_Nbr(v->Time),
-	    v->NbSP, v->NbVP, v->NbTP, v->NbSL, v->NbVL, v->NbTL,
-	    v->NbST, v->NbVT, v->NbTT, v->NbSQ, v->NbVQ, v->NbTQ,
-	    v->NbSS, v->NbVS, v->NbTS, v->NbSH, v->NbVH, v->NbTH,
-	    v->NbSI, v->NbVI, v->NbTI, v->NbSY, v->NbVY, v->NbTY,
-	    v->NbT2, List_Nbr(v->T2C), v->NbT3, List_Nbr(v->T3C));
-    if(binary) {
-      f = LIST_FORMAT_BINARY;
-      if(!fwrite(&One, sizeof(int), 1, file)){
-	Msg(GERROR, "Write error");
-	return;
-      }
-    }
-    else
-      f = LIST_FORMAT_ASCII;
-    List_WriteToFile(v->Time, file, f);
-    List_WriteToFile(v->SP, file, f);
-    List_WriteToFile(v->VP, file, f);
-    List_WriteToFile(v->TP, file, f);
-    List_WriteToFile(v->SL, file, f);
-    List_WriteToFile(v->VL, file, f);
-    List_WriteToFile(v->TL, file, f);
-    List_WriteToFile(v->ST, file, f);
-    List_WriteToFile(v->VT, file, f);
-    List_WriteToFile(v->TT, file, f);
-    List_WriteToFile(v->SQ, file, f);
-    List_WriteToFile(v->VQ, file, f);
-    List_WriteToFile(v->TQ, file, f);
-    List_WriteToFile(v->SS, file, f);
-    List_WriteToFile(v->VS, file, f);
-    List_WriteToFile(v->TS, file, f);
-    List_WriteToFile(v->SH, file, f);
-    List_WriteToFile(v->VH, file, f);
-    List_WriteToFile(v->TH, file, f);
-    List_WriteToFile(v->SI, file, f);
-    List_WriteToFile(v->VI, file, f);
-    List_WriteToFile(v->TI, file, f);
-    List_WriteToFile(v->SY, file, f);
-    List_WriteToFile(v->VY, file, f);
-    List_WriteToFile(v->TY, file, f);
-    List_WriteToFile(v->T2D, file, f);
-    List_WriteToFile(v->T2C, file, f);
-    List_WriteToFile(v->T3D, file, f);
-    List_WriteToFile(v->T3C, file, f);
-    fprintf(file, "\n");
-    fprintf(file, "$EndView\n");
-  }
-  else{
-    fprintf(file, "View \"%s\" {\n", v->Name);
-    write_parsed_time(v->Time, file);
-    write_parsed_elements("SP", 1, v->NbSP, v->SP, file);
-    write_parsed_elements("VP", 1, v->NbVP, v->VP, file);
-    write_parsed_elements("TP", 1, v->NbTP, v->TP, file);
-    write_parsed_elements("SL", 2, v->NbSL, v->SL, file);
-    write_parsed_elements("VL", 2, v->NbVL, v->VL, file);
-    write_parsed_elements("TL", 2, v->NbTL, v->TL, file);
-    write_parsed_elements("ST", 3, v->NbST, v->ST, file);
-    write_parsed_elements("VT", 3, v->NbVT, v->VT, file);
-    write_parsed_elements("TT", 3, v->NbTT, v->TT, file);
-    write_parsed_elements("SQ", 4, v->NbSQ, v->SQ, file);
-    write_parsed_elements("VQ", 4, v->NbVQ, v->VQ, file);
-    write_parsed_elements("TQ", 4, v->NbTQ, v->TQ, file);
-    write_parsed_elements("SS", 4, v->NbSS, v->SS, file);
-    write_parsed_elements("VS", 4, v->NbVS, v->VS, file);
-    write_parsed_elements("TS", 4, v->NbTS, v->TS, file);
-    write_parsed_elements("SH", 8, v->NbSH, v->SH, file);
-    write_parsed_elements("VH", 8, v->NbVH, v->VH, file);
-    write_parsed_elements("TH", 8, v->NbTH, v->TH, file);
-    write_parsed_elements("SI", 6, v->NbSI, v->SI, file);
-    write_parsed_elements("VI", 6, v->NbVI, v->VI, file);
-    write_parsed_elements("TI", 6, v->NbTI, v->TI, file);
-    write_parsed_elements("SY", 5, v->NbSY, v->SY, file);
-    write_parsed_elements("VY", 5, v->NbVY, v->VY, file);
-    write_parsed_elements("TY", 5, v->NbTY, v->TY, file);
-    write_parsed_strings(4, v->NbT2, v->T2D, v->T2C, file);
-    write_parsed_strings(5, v->NbT3, v->T3D, v->T3C, file);
-    fprintf(file, "};\n");
-  }
-}
-
-// Write view to file in STL format
-
-static void write_stl(FILE *file, int nbelm, List_T *list, int nbnod)
-{
-  if(nbelm){
-    int nb = List_Nbr(list) / nbelm;
-    for(int i = 0; i < List_Nbr(list); i+=nb){
-      double *x = (double*)List_Pointer(list, i);
-      double n[3];
-      normal3points(x[0], x[3], x[6],
-		    x[1], x[4], x[7],
-		    x[2], x[5], x[8], n);
-      if(nbnod == 3){
-	fprintf(file, "facet normal %g %g %g\n", n[0], n[1], n[2]);
-	fprintf(file, "  outer loop\n");
-	fprintf(file, "    vertex %g %g %g\n", x[0], x[3], x[6]);
-	fprintf(file, "    vertex %g %g %g\n", x[1], x[4], x[7]);
-	fprintf(file, "    vertex %g %g %g\n", x[2], x[5], x[8]);
-	fprintf(file, "  endloop\n");
-	fprintf(file, "endfacet\n");
-      }
-      else{
-	fprintf(file, "facet normal %g %g %g\n", n[0], n[1], n[2]);
-	fprintf(file, "  outer loop\n");
-	fprintf(file, "    vertex %g %g %g\n", x[0], x[4], x[8]);
-	fprintf(file, "    vertex %g %g %g\n", x[1], x[5], x[9]);
-	fprintf(file, "    vertex %g %g %g\n", x[2], x[6], x[10]);
-	fprintf(file, "  endloop\n");
-	fprintf(file, "endfacet\n");
-	fprintf(file, "facet normal %g %g %g\n", n[0], n[1], n[2]);
-	fprintf(file, "  outer loop\n");
-	fprintf(file, "    vertex %g %g %g\n", x[0], x[4], x[8]);
-	fprintf(file, "    vertex %g %g %g\n", x[2], x[6], x[10]);
-	fprintf(file, "    vertex %g %g %g\n", x[3], x[7], x[11]);
-	fprintf(file, "  endloop\n");
-	fprintf(file, "endfacet\n");
-      }
-    }
-  }
-}
-
-void WriteViewSTL(Post_View *v, FILE *file)
-{
-  if(!v->NbST && !v->NbVT && !v->NbTT &&
-     !v->NbSQ && !v->NbVQ && !v->NbTQ){
-    Msg(GERROR, "No surface elements to save");
-    return;
-  }
-
-  fprintf(file, "solid Created by Gmsh\n");
-  write_stl(file, v->NbST, v->ST, 3);
-  write_stl(file, v->NbVT, v->VT, 3);
-  write_stl(file, v->NbTT, v->TT, 3);
-  write_stl(file, v->NbSQ, v->SQ, 4);
-  write_stl(file, v->NbVQ, v->VQ, 4);
-  write_stl(file, v->NbTQ, v->TQ, 4);
-  fprintf(file, "endsolid Created by Gmsh\n");
-}
-
-// Write view to file in Text format (should change this to have 2
-// choices: "Tabular (By Element)" and "Tabular (By Time Step)")
-
-static void write_txt(FILE *file, int nbelm, List_T *list,
-		      int nbnod, int nbcomp, int nbtime)
-{
-  if(nbelm){
-    int nb = List_Nbr(list) / nbelm;
-    for(int i = 0; i < List_Nbr(list); i+=nb){
-      double *x = (double*)List_Pointer(list, i);
-      for(int j = 0; j < nbnod*(3+nbcomp*nbtime); j++)
-	fprintf(file, "%.16g ", x[j]);
-      fprintf(file, "\n");
-    }
-    fprintf(file, "\n");
-  }
-}
-
-void WriteViewTXT(Post_View *v, FILE *file)
-{
-  write_txt(file, v->NbSP, v->SP, 1, 1, v->NbTimeStep);
-  write_txt(file, v->NbVP, v->VP, 1, 3, v->NbTimeStep);
-  write_txt(file, v->NbTP, v->TP, 1, 9, v->NbTimeStep);
-  write_txt(file, v->NbSL, v->SL, 2, 1, v->NbTimeStep);
-  write_txt(file, v->NbVL, v->VL, 2, 3, v->NbTimeStep);
-  write_txt(file, v->NbTL, v->TL, 2, 9, v->NbTimeStep);
-  write_txt(file, v->NbST, v->ST, 3, 1, v->NbTimeStep);
-  write_txt(file, v->NbVT, v->VT, 3, 3, v->NbTimeStep);
-  write_txt(file, v->NbTT, v->TT, 3, 9, v->NbTimeStep);
-  write_txt(file, v->NbSQ, v->SQ, 4, 1, v->NbTimeStep);
-  write_txt(file, v->NbVQ, v->VQ, 4, 3, v->NbTimeStep);
-  write_txt(file, v->NbTQ, v->TQ, 4, 9, v->NbTimeStep);
-  write_txt(file, v->NbSS, v->SS, 4, 1, v->NbTimeStep);
-  write_txt(file, v->NbVS, v->VS, 4, 3, v->NbTimeStep);
-  write_txt(file, v->NbTS, v->TS, 4, 9, v->NbTimeStep);
-  write_txt(file, v->NbSH, v->SH, 8, 1, v->NbTimeStep);
-  write_txt(file, v->NbVH, v->VH, 8, 3, v->NbTimeStep);
-  write_txt(file, v->NbTH, v->TH, 8, 9, v->NbTimeStep);
-  write_txt(file, v->NbSI, v->SI, 6, 1, v->NbTimeStep);
-  write_txt(file, v->NbVI, v->VI, 6, 3, v->NbTimeStep);
-  write_txt(file, v->NbTI, v->TI, 6, 9, v->NbTimeStep);
-  write_txt(file, v->NbSY, v->SY, 5, 1, v->NbTimeStep);
-  write_txt(file, v->NbVY, v->VY, 5, 3, v->NbTimeStep);
-  write_txt(file, v->NbTY, v->TY, 5, 9, v->NbTimeStep);
-}
-
-// Write view to file in MSH format
-
-class Nod{
- public:
-  int Num;
-  double X, Y, Z;
-  Nod() : Num(0), X(0.), Y(0.), Z(0.) {}
-  Nod(double x, double y, double z) : Num(0), X(x), Y(y), Z(z) {}
-};
-
-class NodCompPos{
- public:
-  bool operator()(const Nod ent1, const Nod ent2) const
-  {
-    double tol = CTX.lc * 1.e-10 ;
-    if(ent1.X - ent2.X  >  tol) return true;
-    if(ent1.X - ent2.X  < -tol) return false;
-    if(ent1.Y - ent2.Y  >  tol) return true;
-    if(ent1.Y - ent2.Y  < -tol) return false;
-    if(ent1.Z - ent2.Z  >  tol) return true;
-    return false;
-  }
-};
-
-static void get_nod(int nbelm, List_T *list, int nbnod, int nbcomp, 
-		    std::set<Nod, NodCompPos> *nodes,
-		    int *numelm)
-{
-  if(nbelm){
-    int nb = List_Nbr(list) / nbelm;
-    for(int i = 0; i < List_Nbr(list); i+=nb){
-      double *x = (double *)List_Pointer_Fast(list, i);
-      double *y = (double *)List_Pointer_Fast(list, i + nbnod);
-      double *z = (double *)List_Pointer_Fast(list, i + 2 * nbnod);
-      for(int j = 0; j < nbnod; j++) {
-	Nod n(x[j], y[j], z[j]);
-	std::set<Nod, NodCompPos>::iterator it = nodes->find(n);
-	if(it == nodes->end()){
-	  n.Num = nodes->size() + 1;
-	  nodes->insert(n);
-	}
-      }
-      (*numelm)++;
-    }
-  }
-}
-
-static void print_elm(FILE *file, int num, int nbnod, Nod nod[8], 
-		      int nbcomp, double *vals, int dim)
-{
-  // compute average value in elm
-  double d = 0.;
-  for(int k = 0; k < nbnod; k++) {
-    double *v = &vals[nbcomp * k];
-    switch(nbcomp) {
-    case 1: // scalar
-      d += v[0];
-      break;
-    case 3 : // vector
-      d += sqrt(DSQR(v[0]) + DSQR(v[1]) + DSQR(v[2]));
-      break;
-    case 9 : // tensor
-      d += ComputeVonMises(v);
-      break;
-    }
-  }
-  d /= (double)nbnod;
-
-  // assign val as elementary region number
-  int ele = (int)fabs(d), phys = 1;
-
-  switch(dim){
-  case 0:
-    fprintf(file, "%d 15 %d %d 1 %d\n", num, phys, ele, nod[0].Num);
-    break;
-  case 1:
-    fprintf(file, "%d 1 %d %d 2 %d %d\n", num, phys, ele, nod[0].Num, nod[1].Num);
-    break;
-  case 2:
-    if(nbnod == 3)
-      fprintf(file, "%d 2 %d %d 3 %d %d %d\n", num, phys, ele, 
-	      nod[0].Num, nod[1].Num, nod[2].Num);
-    else
-      fprintf(file, "%d 3 %d %d 4 %d %d %d %d\n", num, phys, ele, 
-	      nod[0].Num, nod[1].Num, nod[2].Num, nod[3].Num);
-    break;
-  case 3:
-  default:
-    if(nbnod == 4)
-      fprintf(file, "%d 4 %d %d 4 %d %d %d %d\n", num, phys, ele, 
-	      nod[0].Num, nod[1].Num, nod[2].Num, nod[3].Num);
-    else if(nbnod == 5)
-      fprintf(file, "%d 7 %d %d 5 %d %d %d %d %d\n", num, phys, ele, 
-	      nod[0].Num, nod[1].Num, nod[2].Num, nod[3].Num, nod[4].Num);
-    else if(nbnod == 6)
-      fprintf(file, "%d 6 %d %d 6 %d %d %d %d %d %d\n", num, phys, ele, 
-	      nod[0].Num, nod[1].Num, nod[2].Num, nod[3].Num, nod[4].Num, 
-	      nod[5].Num);
-    else
-      fprintf(file, "%d 5 %d %d 8 %d %d %d %d %d %d %d %d\n", num, phys, ele, 
-	      nod[0].Num, nod[1].Num, nod[2].Num, nod[3].Num, nod[4].Num, 
-	      nod[5].Num, nod[6].Num, nod[7].Num);
-    break;
-  }
-}
-
-static void print_elms(FILE *file, int nbelm, List_T *list,
-		       int nbnod, int nbcomp, int dim, 
-		       std::set<Nod, NodCompPos> *nodes,
-		       int *numelm)
-{
-  Nod nod[8];
-
-  if(nbelm){
-    int nb = List_Nbr(list) / nbelm;
-    for(int i = 0; i < List_Nbr(list); i+=nb){
-      double *x = (double *)List_Pointer_Fast(list, i);
-      double *y = (double *)List_Pointer_Fast(list, i + nbnod);
-      double *z = (double *)List_Pointer_Fast(list, i + 2 * nbnod);
-      double *v = (double *)List_Pointer_Fast(list, i + 3 * nbnod);
-      for(int j = 0; j < nbnod; j++) {
-	Nod n(x[j], y[j], z[j]);
-	std::set<Nod, NodCompPos>::iterator it = nodes->find(n);
-	if(it == nodes->end()){
-	  Msg(GERROR, "Unknown node in element");
-	  return;
-	}
-	else{
-	  nod[j] = (Nod)(*it);
-	}
-      }
-      (*numelm)++;
-      print_elm(file, *numelm, nbnod, nod, nbcomp, v, dim);
-    }
-  }
-}
-
-void WriteViewMSH(Post_View *v, FILE *file)
-{
-  std::set<Nod, NodCompPos> nodes;
-  int numelm = 0;
-  get_nod(v->NbSP, v->SP, 1, 1, &nodes, &numelm);
-  get_nod(v->NbVP, v->VP, 1, 3, &nodes, &numelm);
-  get_nod(v->NbTP, v->TP, 1, 9, &nodes, &numelm);
-  get_nod(v->NbSL, v->SL, 2, 1, &nodes, &numelm);
-  get_nod(v->NbVL, v->VL, 2, 3, &nodes, &numelm);
-  get_nod(v->NbTL, v->TL, 2, 9, &nodes, &numelm);
-  get_nod(v->NbST, v->ST, 3, 1, &nodes, &numelm);
-  get_nod(v->NbVT, v->VT, 3, 3, &nodes, &numelm);
-  get_nod(v->NbTT, v->TT, 3, 9, &nodes, &numelm);
-  get_nod(v->NbSQ, v->SQ, 4, 1, &nodes, &numelm);
-  get_nod(v->NbVQ, v->VQ, 4, 3, &nodes, &numelm);
-  get_nod(v->NbTQ, v->TQ, 4, 9, &nodes, &numelm);
-  get_nod(v->NbSS, v->SS, 4, 1, &nodes, &numelm);
-  get_nod(v->NbVS, v->VS, 4, 3, &nodes, &numelm);
-  get_nod(v->NbTS, v->TS, 4, 9, &nodes, &numelm);
-  get_nod(v->NbSH, v->SH, 8, 1, &nodes, &numelm);
-  get_nod(v->NbVH, v->VH, 8, 3, &nodes, &numelm);
-  get_nod(v->NbTH, v->TH, 8, 9, &nodes, &numelm);
-  get_nod(v->NbSI, v->SI, 6, 1, &nodes, &numelm);
-  get_nod(v->NbVI, v->VI, 6, 3, &nodes, &numelm);
-  get_nod(v->NbTI, v->TI, 6, 9, &nodes, &numelm);
-  get_nod(v->NbSY, v->SY, 5, 1, &nodes, &numelm);
-  get_nod(v->NbVY, v->VY, 5, 3, &nodes, &numelm);
-  get_nod(v->NbTY, v->TY, 5, 9, &nodes, &numelm);
-
-  fprintf(file, "$NOD\n");
-  fprintf(file, "%d\n", (int)nodes.size());
-  std::set<Nod, NodCompPos>::const_iterator it = nodes.begin();
-  std::set<Nod, NodCompPos>::const_iterator ite = nodes.end();
-  for(; it != ite; ++it){
-    Nod n = (Nod)(*it);
-    fprintf(file, "%d %.16g %.16g %.16g\n", n.Num, n.X, n.Y, n.Z);
-  }
-  fprintf(file, "$ENDNOD\n");
-
-  fprintf(file, "$ELM\n");
-  fprintf(file, "%d\n", numelm);
-  numelm = 0;
-  print_elms(file, v->NbSP, v->SP, 1, 1, 0, &nodes, &numelm);
-  print_elms(file, v->NbVP, v->VP, 1, 3, 0, &nodes, &numelm);
-  print_elms(file, v->NbTP, v->TP, 1, 9, 0, &nodes, &numelm);
-  print_elms(file, v->NbSL, v->SL, 2, 1, 1, &nodes, &numelm);
-  print_elms(file, v->NbVL, v->VL, 2, 3, 1, &nodes, &numelm);
-  print_elms(file, v->NbTL, v->TL, 2, 9, 1, &nodes, &numelm);
-  print_elms(file, v->NbST, v->ST, 3, 1, 2, &nodes, &numelm);
-  print_elms(file, v->NbVT, v->VT, 3, 3, 2, &nodes, &numelm);
-  print_elms(file, v->NbTT, v->TT, 3, 9, 2, &nodes, &numelm);
-  print_elms(file, v->NbSQ, v->SQ, 4, 1, 2, &nodes, &numelm);
-  print_elms(file, v->NbVQ, v->VQ, 4, 3, 2, &nodes, &numelm);
-  print_elms(file, v->NbTQ, v->TQ, 4, 9, 2, &nodes, &numelm);
-  print_elms(file, v->NbSS, v->SS, 4, 1, 3, &nodes, &numelm);
-  print_elms(file, v->NbVS, v->VS, 4, 3, 3, &nodes, &numelm);
-  print_elms(file, v->NbTS, v->TS, 4, 9, 3, &nodes, &numelm);
-  print_elms(file, v->NbSH, v->SH, 8, 1, 3, &nodes, &numelm);
-  print_elms(file, v->NbVH, v->VH, 8, 3, 3, &nodes, &numelm);
-  print_elms(file, v->NbTH, v->TH, 8, 9, 3, &nodes, &numelm);
-  print_elms(file, v->NbSI, v->SI, 6, 1, 3, &nodes, &numelm);
-  print_elms(file, v->NbVI, v->VI, 6, 3, 3, &nodes, &numelm);
-  print_elms(file, v->NbTI, v->TI, 6, 9, 3, &nodes, &numelm);
-  print_elms(file, v->NbSY, v->SY, 5, 1, 3, &nodes, &numelm);
-  print_elms(file, v->NbVY, v->VY, 5, 3, 3, &nodes, &numelm);
-  print_elms(file, v->NbTY, v->TY, 5, 9, 3, &nodes, &numelm);
-  fprintf(file, "$ENDELM\n");
-}
-
-// Write view to file
-
-void WriteView(Post_View *v, char *filename, int format, int append)
-{
-  FILE *file;
-  int binary = (format == 1) ? 1 : 0;
-  int parsed = (format == 2);
-  int stl = (format == 3);
-  int txt = (format == 4);
-  int msh = (format == 5);
-
-  if(filename) {
-    file = fopen(filename, append ? (binary ? "ab" : "a") : (binary ? "wb" : "w"));
-    if(!file) {
-      Msg(GERROR, "Unable to open file '%s'", filename);
-      return;
-    }
-    if(!append)
-      Msg(STATUS2, "Writing '%s'", filename);
-  }
-  else
-    file = stdout;
-
-  if(stl)
-    WriteViewSTL(v, file);
-  else if(txt)
-    WriteViewTXT(v, file);
-  else if(msh)
-    WriteViewMSH(v, file);
-  else
-    WriteViewPOS(v, file, binary, parsed, append);
-  
-  if(filename) {
-    fclose(file);
-    Msg(STATUS2, "Wrote '%s'", filename);
-  }
- 
-}
diff --git a/benchmarks/3d/perforated1.geo b/benchmarks/3d/perforated1.geo
new file mode 100644
index 0000000000000000000000000000000000000000..b367b3594010e58d50b2504e2a87f58f391ba3d8
--- /dev/null
+++ b/benchmarks/3d/perforated1.geo
@@ -0,0 +1,339 @@
+Include "perforated_dat.pro";
+
+Mesh.CharacteristicLengthFactor = 1. ;
+Mesh.Algorithm3D = 4;
+
+nbrHolesCir = Floor[Pi*x_ps/dhole];
+bhole = (2*Pi*x_ps-nbrHolesCir*dhole)/nbrHolesCir;
+Phi = (dhole+bhole)/x_ps;
+
+//Phi = Pi/4;
+
+//rfar  = ((x_ps > h_ps/2) ?  1.6 * x_ps : .7*h_ps) ;
+//rfar2 = ((x_ps > h_ps/2) ?  1.9 * x_ps : .9*h_ps) ;
+
+
+
+
+
+
+// Characteristic lengths
+s = 1.; 
+
+// Workpiece
+lcwp = r/30*s ;
+
+// transfinite
+p_circ = Ceil[2*Pi*r/lcwp/20] ; //12 ; 
+p_cut  = Ceil[r/lcwp/2] ; //20 ; 
+nl     = Ceil[(h/2)/lcwp] + 1  ; //2 width divisions
+
+// Passive shield
+lc_hole = dhole/5*s ;
+
+p_ps   = 10e-3*s ;
+
+p_air  = rfar/15*s ;
+p_air2 = rfar2/15*s ;
+
+// Excitation coil
+p_ec  = h_ec/4*s ;
+p_wec = Ceil[w_ec/p_ec] ; //1 ;
+p_hec = Ceil[h_ec/2/p_ec] ; //3 ;
+
+// transfinite
+delta = Sqrt[1/(mu0*1000*sigmaW*Pi)];//Freq = 1e3;
+Printf("Skin depth workpiece = %g", delta);
+
+nbrdelta = 8 ;
+nsd = Ceil[nbrdelta*delta] ;
+//nsd = 3*Ceil[w_ps/delta]; //3
+
+
+//---------------------------------------------------------------------------------------
+//------------------------W 0 R K P I E C E---------------------------------------------
+//---------------------------------------------------------------------------------------
+
+p0 = newp ; Point(p0) = { 0, 0, 0, lcwp};
+p1 = newp ; Point(p1) = { r, 0, 0, lcwp};
+p2 = p1+4;
+p3 = p0+4;
+
+l1 = newl ; Line(l1) = {p0,p1};
+
+If(TRANS)
+Transfinite Line {l1} = p_cut Using Progression 0.85 ;
+EndIf
+
+sur[] = Extrude {{0,0,1} , {0,0,0} , Phi } { 
+  Line{l1}; Layers {p_circ,1} ; 
+};
+z0wp = sur[1]; 
+
+vol[] = Extrude {0,0,h/2} { 
+  Surface{z0wp}; Layers {nl,1} ; 
+};
+
+vWP[0] =vol[1];
+
+topwp = vol[0];
+phi0wp = vol[2]; 
+sidewp = vol[3]; 
+phi1wp = vol[4]; 
+
+l2 = 11 ; l2_ = 15 ;
+l3 = 6 ;  l3_ = 8  ;
+
+//For n In {0:(#vol[]-1)} 
+//Printf("n %g out of  %g", vol[n],#vol[]); EndFor
+
+
+//---------------------------------------------------------------------------------------
+// ------------------- EXCITATION COIL --------------------------------------------------
+//---------------------------------------------------------------------------------------
+
+pe[0] = newp ; Point(pe[0]) = { x_ec, 0, 0, p_ec};
+pe[1] = newp ; Point(pe[1]) = { x_ec + w_ec, 0, 0, p_ec};
+pe[2] = newp ; Point(pe[2]) = { x_ec + w_ec, 0, h_ec/2, p_ec};
+pe[3] = newp ; Point(pe[3]) = { x_ec, 0, h_ec/2, p_ec};
+
+le[0] = newl ; Line(le[0]) = {pe[0], pe[1]};
+le[1] = newl ; Line(le[1]) = {pe[1], pe[2]};
+le[2] = newl ; Line(le[2]) = {pe[2], pe[3]};
+le[3] = newl ; Line(le[3]) = {pe[3], pe[0]};
+
+lle = newl ; Line Loop(lle) = {le[]};
+phi0ec = news ;Plane Surface(phi0ec) = {lle};
+
+//Excitation Coil
+
+If(TRANS)
+Transfinite Line {le[0],le[2]}  = p_wec ;
+Transfinite Line {le[1],le[3]}  = p_hec ;
+Transfinite Surface{phi0ec} = {pe[]};
+EndIf
+
+nl_ec = 10 ;
+
+For n In {0:0}
+  vol[]=Extrude Surface { news-1, {0,0,1} , {0,0,0} , Phi } { Layers { nl_ec, 1 } ; };;
+  vEC[n]=vol[1];
+EndFor
+  
+phi1ec    = vol[0]; 
+z0ec      = vol[2];
+sideextec = vol[3]; 
+topec     = vol[4];
+sideinec  = vol[5]; 
+
+le_[] = {29,30,31,32};
+
+//For n In {0:(#vol[]-1)} 
+//Printf("n %g out of  %g", vol[n],#vol[]); EndFor
+
+
+//---------------------------------------------------------------------------------------
+//-----------------------------Passive shield--------------------------------------------
+//---------------------------------------------------------------------------------------
+
+ps1 = newp ; Point(ps1) = { x_ps, 0., 0, p_ps};
+ps2 = newp ; Point(ps2) = { x_ps, 0., h_ps/2, p_ps};
+lps  = newl; Line(lps)  = {ps1,ps2};
+
+sur[] = Extrude Line { lps, {0,0,1} , {0,0,0}, Phi };;
+sPSin[0] = sur[1];
+lps_ = sur[0]; 
+loopin = newl ; Line Loop(loopin) = {lps,sur[2],-sur[0],sur[3]};
+
+lpsin = sur[3];
+
+N = 10;
+x0 = 0 ;
+x1 = x_ps + 2 * w_ps ;
+
+loopshin[] = {};
+
+For ih In {1:nbrHoles/2}
+  auxlin[]={}; 
+  auxpnt[]={};
+
+  For i In {1:N}
+    angh = i * 2 * Pi / N;
+    cRoth = Cos(angh);
+    sRoth = Sin(angh);
+    auxpnt[] += newp;
+    Point(newp) = { x0, rh*cRoth, h_ps/2-(2*ih-1/2)*dhole + rh*sRoth, lc_hole};
+    auxpnt[] += newp;
+    Point(newp) = { x1, rh*cRoth, h_ps/2-(2*ih-1/2)*dhole + rh*sRoth, lc_hole};
+    auxlin[] += newl;
+    Line(auxlin[i-1]) = {newp-2, newp-1};
+    lin[]= Rotate {{0.,0.,1.},{0.,0.,0.},Phi/2} {Line{auxlin[i-1]}; };
+    Hide { Point{newp-2:newp-1}; }
+  EndFor
+
+  ppin[]  = Intersect Line {auxlin[0]:auxlin[N-1]} Surface {sPSin[0]};
+
+  hin[ih-1]  = newl ; Spline(hin[ih-1])  = {ppin[],   ppin[0]};
+
+  Delete { Line{auxlin[0]:auxlin[N-1]}; Point{auxpnt[0]:auxpnt[2*N-1]}; }
+
+  loopshin[]+= newl;
+  Line Loop(loopshin[ih-1]) = {hin[ih-1]};
+EndFor
+
+Delete { Surface{sPSin[0]}; }
+Ruled Surface(sPSin[0]) = {loopin, loopshin[]};
+
+
+//Boundary layers
+vol[] = Extrude {Surface{sPSin[0]}; Layers{3, -w_ps};};
+vPS[0] = vol[1];
+
+extPS  = vol[0];//top
+phi0PS = vol[2];//side phi0
+topPS  = vol[3];//side h=h_ps/2 
+phi1PS = vol[4];//side phi1
+z0PS   = vol[5];//side h=0
+
+holes[] = {};
+For ih In {1:nbrHoles/2}
+  holes[] += vol[6+ih-1];
+EndFor
+
+bndextPS[]= Boundary{Surface{extPS};};
+
+//For n In {0:(#bndextPS[]-1)} 
+//Printf("n %g out of  %g", bndextPS[n],#bndextPS[]); EndFor
+
+
+//---------------------------------------------------------------------------------------
+//----------------------------------  A I R ---------------------------------------------
+//---------------------------------------------------------------------------------------
+
+pa0 = newp ; Point(pa0) = { rfar, 0, 0, p_air};
+pa1 = newp ; Point(pa1) = { 0, 0, rfar, p_air};
+pnt[]= Rotate {{0.,0.,1.},{0.,0.,0.},Phi} { Duplicata{Point{pa0};} };
+pa3 = pnt[0];
+
+lacir1 = newl ; Circle(lacir1) = {pa0,p0,pa1};
+lacir2 = newl ; Circle(lacir2) = {pa0,p0,pa3};
+lacir3 = newl ; Circle(lacir3) = {pa3,p0,pa1};
+
+Line Loop(newl)={lacir2,lacir3,-lacir1};
+surair= newl ; Ruled Surface(surair) = {newl-1};
+
+pa0_ = newp ; Point(pa0_) = { rfar2, 0, 0, p_air2};
+pa1_ = newp ; Point(pa1_) = { 0, 0, rfar2, p_air2};
+pnt[]= Rotate {{0.,0.,1.},{0.,0.,0.},Phi} { Duplicata{Point{pa0_};} };
+pa3_ = pnt[0];
+
+lacir1_ = newl ; Circle(lacir1_) = {pa0_,p0,pa1_};
+lacir2_ = newl ; Circle(lacir2_) = {pa0_,p0,pa3_};
+lacir3_ = newl ; Circle(lacir3_) = {pa3_,p0,pa1_};
+
+Line Loop(newl)={lacir2_,lacir3_,-lacir1_};
+surairinf= newl ; Ruled Surface(surairinf) = {newl-1};
+
+la1 = newl ; Line(la1) = {p1,pe[0]};
+la2 = newl ; Line(la2) = {pe[1],ps1};
+
+pbl0 = ps1 + 3*N*nbrHoles/2 + 12 ;
+la3 = newl ; Line(la3) = {pbl0,pa0};
+pbl1 = pbl0 + 10 ;
+la3_ = newl ; Line(la3_) = {pbl1,pa3};
+
+lblayer0 = -lpsin + 20 + (nbrHoles/2-1)*12 ;
+lblayer1 = -lpsin + 20 + (nbrHoles/2-1)*12 - 3 ;
+lblayer2 = -lpsin + 20 + (nbrHoles/2-1)*12 + 3 + nbrHoles/2;
+
+lblayer1_ = lblayer1 + 2 ;
+lblayer2_ = lblayer2 + 4 ;
+
+la4 = newl ; Line(la4) = {p3,pa1};
+la5 = newl ; Line(la5) = {pa0,pa0_};
+la6 = newl ; Line(la6) = {pa1,pa1_};
+
+sur[] = Extrude Line { la1, {0,0,1} , {0,0,0}, Phi };;
+z0air0=sur[1];
+la1_=sur[0];
+sur[] = Extrude Line { la2, {0,0,1} , {0,0,0}, Phi };;
+z0air1=sur[1];
+la2_=sur[0];
+
+Line Loop(newl)={lblayer0,la3,lacir2,-la3_ };
+z0air2=news; Plane Surface(z0air2) = {newl-1};
+
+sur[] = Extrude Line { la5, {0,0,1} , {0,0,0}, Phi };;
+z0airinf=sur[1];
+la5_=sur[0];
+
+Line Loop(newl)={lacir1,la6,-lacir1_,-la5};
+surairphi0inf = newl ; Plane Surface(surairphi0inf) = {newl-1};
+Line Loop(newl) = {la5_,lacir3_,-la6,-lacir3};
+surairphi1inf = newl ; Plane Surface(surairphi1inf) = {newl-1};
+
+Surface Loop(news) = {surairinf,z0airinf,surairphi0inf,surair,surairphi1inf};
+volairinf = newv ; Volume(volairinf) = {news-1};
+
+
+Line Loop(newl) = {la4,-lacir1,-la3,lblayer1,-lblayer2,-lps,-la2,le[{1:3}],-la1,l2,-l3};
+surairphi0=news ; Plane Surface(surairphi0) = {news-1};
+
+
+Line Loop(newl) = {la4,-lacir3,-la3_,-lblayer1_,-lblayer2_,-lps_,-la2_,le_[{1:3}],-la1_,l2_,l3_};
+surairphi1=news ; Plane Surface(surairphi1) = {news-1};
+
+
+Surface Loop(news) = 
+{z0air2,surairphi0,surairphi1,z0air1,z0air0,extPS,topPS,sPSin[0],
+holes[],surair,sideextec,topec,sideinec,topwp,sidewp};
+volair = newv ; Volume(volair) = {news-1};
+
+
+Physical Volume(WORKPIECE)={vWP[]};
+Physical Surface(SKINWORKPIECE)={sidewp,topwp};
+Physical Surface(Z0WORKPIECE)={z0wp};
+Physical Surface(PHI0WORKPIECE)={phi0wp};
+Physical Surface(PHI1WORKPIECE)={phi1wp};
+
+Physical Volume(PASSIVESHIELD)={vPS[]};
+Physical Surface(SKINPASSIVESHIELD)={sPSin[0],topPS,extPS,holes[]};
+Physical Surface(SKINPASSIVESHIELD2)={sPSin[0]};
+Physical Surface(Z0PASSIVESHIELD)={z0PS};
+Physical Surface(PHI0PASSIVESHIELD)={phi0PS};
+Physical Surface(PHI1PASSIVESHIELD)={phi1PS};
+Physical Surface(CUTPASSIVESHIELD)={z0air1,z0ec,z0air0,z0wp};
+Physical Surface(SKINPASSIVESHIELDINT)={sPSin[0]};
+Physical Surface(SKINPASSIVESHIELDEXT)={extPS};
+
+
+Physical Line(LINPHI0SHELLINT) = {lps};
+Physical Line(LINPHI1SHELLINT) = {lps_};
+
+Physical Line(LINZ0SHELLINT) = {lpsin};
+
+
+Physical Volume(EC)={vEC[]};
+Physical Surface(SKINEC)={sideinec,topec,sideextec};
+Physical Surface(SKINEC2)={sideinec};
+Physical Surface(Z0EC)={z0ec};
+Physical Surface(PHI0EC)={phi0ec};
+Physical Surface(PHI1EC)={phi1ec};
+Physical Surface(CUTEC)={z0wp,z0air0};
+
+Physical Volume(AIR)   ={volair};
+Physical Surface(SURAIR)   ={surair};
+Physical Surface(Z0AIR0) = {z0air0};
+Physical Surface(Z0AIR1) = {z0air1};
+Physical Surface(Z0AIR2) = {z0air2};
+Physical Surface(PHI0AIR) = {surairphi0};
+Physical Surface(PHI1AIR) = {surairphi1};
+
+Physical Volume(AIRINF)={volairinf};
+Physical Surface(SURAIRINF) = {surairinf};
+Physical Surface(Z0AIRINF) = {z0airinf};
+Physical Surface(PHI0AIRINF) = {surairphi0inf};
+Physical Surface(PHI1AIRINF) = {surairphi1inf};
+
+
+
diff --git a/benchmarks/3d/perforated_dat.pro b/benchmarks/3d/perforated_dat.pro
new file mode 100644
index 0000000000000000000000000000000000000000..938375baefbbe2bd5f6e99e1a3c0a7cd094789e4
--- /dev/null
+++ b/benchmarks/3d/perforated_dat.pro
@@ -0,0 +1,91 @@
+TRANS = 1 ;
+SQUARES = 0 ;
+u = 1e-3 ;
+
+// Geometry of induction heater archetype
+nbrHoles = 8 ;
+
+dhole =  20 * u ;
+rh = dhole/2;
+
+h_ps = 2*nbrHoles*dhole+dhole ;
+
+// Workpiece: Al disk at (0,0)
+r = 191 * u ; 
+h = 10 * u ;
+
+mu0 = 4.e-7 * Pi ;
+sigmaW = 3.7e7 ;
+
+// Excitation Coil at (202,0)
+w_ec = 1.5 * u ;//cross section width
+h_ec = 16 * u ; //cross section height
+
+x_ec = 201.2 * u ; //inner radius
+
+//Passive shield at (300.3, 0)
+w_ps = 0.65 * u;//*40 ;
+//h_ps = 190 * u ;
+
+x_ps = 300  * u;//inner radius
+
+//Target area (500,0) (1500,800)
+
+rta = 0.50 ; 
+wta = 1. ;
+hta = .8 ;
+
+rfar = (rta+wta);
+rfar2 = rfar + 0.2*rfar;
+
+rfar  = ((x_ps > h_ps/2) ?  1.6 * x_ps : .7*h_ps) ;
+rfar2 = ((x_ps > h_ps/2) ?  1.9 * x_ps : .9*h_ps) ;
+
+
+
+//PHYSICAL REGIONS
+
+WORKPIECE     = 1000 ;
+SKINWORKPIECE = 1001 ;
+Z0WORKPIECE   = 1002 ;
+PHI0WORKPIECE = 1003 ;
+PHI1WORKPIECE = 1004 ;
+
+PASSIVESHIELD =     2000 ;
+SKINPASSIVESHIELD = 2001 ;
+SKINPASSIVESHIELD2= 2002 ;
+Z0PASSIVESHIELD   = 2003;
+PHI0PASSIVESHIELD = 2004 ;
+PHI1PASSIVESHIELD = 2005 ;
+
+LINPHI0SHELLINT   = 2006 ;
+LINPHI1SHELLINT   = 2007 ;
+LINZ0SHELLINT     = 2008 ;
+
+CUTPASSIVESHIELD = 2222 ;
+SKINPASSIVESHIELDINT = 2223 ;
+SKINPASSIVESHIELDEXT = 2224 ;
+
+//Coils
+EC  = 3000 ; 
+SKINEC = 3333 ; 
+SKINEC2 = 3334 ; 
+CUTEC = 3335 ;
+Z0EC = 3336;
+PHI0EC = 3337;
+PHI1EC = 3338;
+
+AIR    = 5000 ; 
+SURAIR = 5010 ;
+Z0AIR0 = 5001 ;
+Z0AIR1 = 5002 ;
+Z0AIR2 = 5003 ;
+PHI0AIR = 5004;
+PHI1AIR = 5005;
+
+AIRINF     = 6000 ;
+SURAIRINF  = 6010 ;
+Z0AIRINF   = 6001 ; 
+PHI0AIRINF = 6002 ;
+PHI1AIRINF = 6003 ;
+
diff --git a/doc/VERSIONS b/doc/VERSIONS
index 1e7c74e9dd07ed1d138e323f321490e31060c24f..448af73e7fe9b04e8ae2c0269bdbcaa4c2728681 100644
--- a/doc/VERSIONS
+++ b/doc/VERSIONS
@@ -1,5 +1,8 @@
-$Id: VERSIONS,v 1.390 2007-09-04 13:47:06 remacle Exp $
-2.0.9 (XX): temp fix for 'could not find extruded vertex' bug;
+$Id: VERSIONS,v 1.391 2007-09-10 04:47:09 geuzaine Exp $
+
+2.1.0 (XX): new post-processing database; complete rewrite of
+post-processing draing code; improved 2D mesh algorithms; fix for
+'could not find extruded vertex' bug;
 
 2.0.8 (Jul 13, 2007): unused vertices are not saved in mesh files
 anymore; new plugin GUI; automatic GUI font size selection; renamed
diff --git a/doc/texinfo/gmsh.texi b/doc/texinfo/gmsh.texi
index 10896884aca151d7f8e9e7faeb94adfcb8fd0989..80bf8a434380bf624bd201fdc8cc5a0ccc8d4a57 100644
--- a/doc/texinfo/gmsh.texi
+++ b/doc/texinfo/gmsh.texi
@@ -1,5 +1,5 @@
 \input texinfo.tex @c -*-texinfo-*-
-@c $Id: gmsh.texi,v 1.234 2007-09-05 10:11:32 geuzaine Exp $
+@c $Id: gmsh.texi,v 1.235 2007-09-10 04:47:10 geuzaine Exp $
 @c
 @c Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 @c
@@ -37,7 +37,7 @@
 @c =========================================================================
 @c %**start of header
 @setfilename        gmsh.info
-@set GMSH-VERSION   2.0
+@set GMSH-VERSION   2.1
 @set COPYRIGHT      @copyright{} 1997-2007 Christophe Geuzaine, Jean-Fran@,{c}ois Remacle
 @c
 @settitle Gmsh @value{GMSH-VERSION}