diff --git a/Box/Main.cpp b/Box/Main.cpp
index 99ad8a4ec4eed7e1d3573a9896fb3a0849a3998c..e12dd1121c54c0194ee171dcae0dddd8e8a21ff3 100644
--- a/Box/Main.cpp
+++ b/Box/Main.cpp
@@ -1,4 +1,4 @@
-// $Id: Main.cpp,v 1.10 2001-08-11 23:28:31 geuzaine Exp $
+// $Id: Main.cpp,v 1.11 2001-10-29 08:52:19 geuzaine Exp $
 
 #include <signal.h>
 #include "ParUtil.h"
@@ -109,8 +109,8 @@ int main(int argc, char *argv[]){
     for(i=1;i<nbf;i++) MergeProblem(TheFileNameTab[i]);
     if(TheBgmFileName){
       MergeProblem(TheBgmFileName);
-      if(List_Nbr(Post_ViewList))
-        BGMWithView((Post_View*)List_Pointer(Post_ViewList, List_Nbr(Post_ViewList)-1));
+      if(List_Nbr(CTX.post.list))
+        BGMWithView((Post_View*)List_Pointer(CTX.post.list, List_Nbr(CTX.post.list)-1));
       else
         fprintf(stderr, ERROR_STR "Invalid background mesh (no view)\n"); exit(1);
     }
diff --git a/Box/Makefile b/Box/Makefile
index 6a5828879bd297aeb027561a554fa2d97d27a031..4b5f9091bbfd159743f084f86ecdbd5081312d9d 100644
--- a/Box/Makefile
+++ b/Box/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.12 2001-08-20 08:25:23 geuzaine Exp $
+# $Id: Makefile,v 1.13 2001-10-29 08:52:19 geuzaine Exp $
 #
 # Makefile for "libBox.a"
 #
@@ -11,7 +11,7 @@ RM       = rm
 RANLIB   = ranlib
 LIB      = ../lib/libBox.a
 INCLUDE  = -I../Common -I../DataStr -I../Geo\
-           -I../Graphics -I../Mesh -I../Parser -I../Motif -I../Fltk -I../Plugin -I../Parallel
+           -I../Graphics -I../Mesh -I../Parser -I../Fltk -I../Plugin -I../Parallel
 
 OPT_FLAGS     = -g
 OS_FLAGS      = 
diff --git a/Common/Bitmaps.h b/Common/Bitmaps.h
index bb72a03dfbc78ad300c72b68c147113e52fa7be3..fa89f7c7a8e43fad4c771cac564a674bb5fcc22d 100644
--- a/Common/Bitmaps.h
+++ b/Common/Bitmaps.h
@@ -49,34 +49,6 @@ static char g2_bits[] = {
  0x00,0x00,0xfc,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0xfc};
 
-// 'Gmsh command' (Unix Motif) icon
-
-#ifdef _XMOTIF
-
-#define g3_width 66
-#define g3_height 29
-static char g3_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x03,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xfc,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x80,0x03,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0xfc,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xe0,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xfc,0x00,0x00,0x00,
- 0x00,0x00,0x10,0x30,0x00,0xfc,0x00,0x08,0x00,0x00,0x00,0x18,0x18,0x00,0xfc,
- 0x00,0x0c,0x00,0x04,0x00,0x3c,0x08,0x06,0xfc,0xc0,0x0f,0x04,0x8f,0x01,0x3e,
- 0x04,0x0f,0xfc,0x30,0x0e,0x8e,0xcf,0x03,0x7b,0x84,0x0f,0xfc,0x18,0x0e,0xcf,
- 0xe7,0x83,0x70,0x42,0x0f,0xfc,0x1c,0x8e,0x2f,0x97,0x43,0x70,0x22,0x0e,0xfd,
- 0x1e,0xcd,0x1e,0x8f,0x23,0x21,0x17,0x8e,0xfc,0xfe,0x68,0x8e,0x87,0x97,0x31,
- 0x0f,0x4e,0xfc,0x7e,0x38,0x87,0x83,0x8f,0x1b,0x07,0x2e,0xfc,0x1c,0x1c,0x83,
- 0x01,0x03,0x07,0x02,0x1e,0xfc,0x00,0x0e,0x00,0x00,0x00,0x00,0x00,0x0c,0xfc,
- 0x00,0x07,0xe0,0x01,0x00,0x00,0x00,0x00,0xfd,0x80,0x03,0x10,0x02,0x00,0x00,
- 0x00,0x00,0xfd,0xc0,0x03,0x10,0x70,0x6e,0x6e,0x4e,0x63,0xfd,0xe0,0x01,0x10,
- 0x88,0x92,0x92,0xd0,0x94,0xfd,0xf0,0x01,0x10,0x88,0x92,0x92,0x5c,0x14,0xfd,
- 0xf0,0x00,0x10,0x88,0x92,0x92,0x52,0x14,0xfd,0x78,0x00,0x10,0x8a,0x92,0x92,
- 0x52,0x94,0xfd,0x30,0x00,0xe0,0x71,0x92,0x92,0x6c,0x64,0xfd,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xfc};
-
-#endif
-
 // 'About Gmsh' bitmap
 
 #define about_width 49
diff --git a/Common/Context.cpp b/Common/Context.cpp
index 53a44aa1797961a50d78d72e727aa829eb5f0194..7abf5f45d4578c5f8877be1cea733dde2bef0707 100644
--- a/Common/Context.cpp
+++ b/Common/Context.cpp
@@ -1,4 +1,4 @@
-// $Id: Context.cpp,v 1.40 2001-08-11 23:28:31 geuzaine Exp $
+// $Id: Context.cpp,v 1.41 2001-10-29 08:52:19 geuzaine Exp $
 
 #include "Gmsh.h"
 #include "Numeric.h"
@@ -10,8 +10,6 @@
 #include "DefaultOptions.h"
 #include "trackball.c"
 
-extern Context_T  CTX ;
-
 /*
   3 rotations successives autour de x, y et z:
 
@@ -39,7 +37,7 @@ void Context_T::buildRotmatrix(void)
   double x, y, z;
   extern void set_r(int i, double val);
 
-  if(CTX.useTrackball){
+  if(useTrackball){
     build_rotmatrix(rot, quaternion);
     // get the position angles
     /*
diff --git a/Common/Context.h b/Common/Context.h
index d3497d8e080908d0d54b5cddff0867eaca301fab..ce595dad42553d7294bc32a6baf3983f4f18e4dc 100644
--- a/Common/Context.h
+++ b/Common/Context.h
@@ -1,6 +1,8 @@
 #ifndef _CONTEXT_H_
 #define _CONTEXT_H_
 
+#include "List.h"
+
 // How RGBA values are packed and unpacked into/from a 4-byte integer 
 
 #  ifdef _LITTLE_ENDIAN
@@ -17,7 +19,7 @@
 #    define UNPACK_ALPHA(X)       ( (X) & 0xff )
 #  endif
 
-// Interface-independant context 
+// Interface-independent context 
 
 class Context_T {
 
@@ -76,22 +78,13 @@ public :
   int command_win;            // command window? 
   int display_lists;          // use display lists? 
   int axes, small_axes;       // draw axes? 
+  int small_axes_pos[2];      // small axes position 
   int threads, threads_lock;  // threads?, lock (should be a mutex...) 
   int alpha;                  // enable alpha blending 
-  int flash;                  // authorize colormap flashing (beek) 
-  int same_visual;            // force same visual for GUI and Graphics 
   double zoom_factor;         // mouse2 zoom coefficient
 
-  //only used for Motif
-  int font_base;              // display list index for the font 
-  char *font;                 // main font
-  char *fixed_font;           // font for colorbar 
-  //end(only used for Motif)
-
   int fontsize;               // font size for fltk UI
   int gl_fontsize;            // font size for opengl graphics
-  int gl_fontheight;          // font height
-  int gl_fontascent;          // height of the font above the reference point
 
   int viewport[4];            // current viewport 
   double vxmin, vxmax, vymin, vymax; // current viewport in real coordinates 
@@ -115,7 +108,7 @@ public :
     int point_sel_size, line_sel_width;
     int hidden, shade;
     int highlight;
-    int level, old_circle;
+    int level, old_circle, old_newreg;
     double normals, tangents;
     double scaling_factor;
     int color_scheme ;
@@ -154,9 +147,10 @@ public :
 
   // post processing options 
   struct{
+    List_T *list ;
+    int force_num, compute_bb;
     int draw, scales, link ;
     int smooth ;
-    int nb_views ;
     double anim_delay ;
   }post;
 
diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h
index 545f5bad52f15eaed835f7624ac3fd8803ea8624..77737c46b918fce650b0915a64937cd3b754ce82 100644
--- a/Common/DefaultOptions.h
+++ b/Common/DefaultOptions.h
@@ -157,6 +157,10 @@ StringXNumber GeneralOptions_Number[] = {
     "Display the axes linked to the model" },
   { F|O, "SmallAxes" , opt_general_small_axes , 1. ,
     "Display the small axes" },
+  { F|O, "SmallAxesPositionX" , opt_general_small_axes_position0 , -45. ,
+    "X position of small axes (negative values for right alignment)" },
+  { F|O, "SmallAxesPositionY" , opt_general_small_axes_position1 , -35. ,
+    "Y position of small axes (negative values for bottom alignment)" },
   { F|O, "DoubleBuffer" , opt_general_double_buffer , 1. ,
     "Use a double buffered graphic window (on Unix, should be set to 0 when working on a remote host without GLX)" },
   { F|O, "DisplayLists" , opt_general_display_lists , 0. ,
@@ -319,6 +323,8 @@ StringXNumber GeometryOptions_Number[] = {
     "Not used" },
   { F|O, "OldCircle" , opt_geometry_old_circle , 0. , 
     "Use old circle description (compatibility option for old Gmsh geometries)" },
+  { F|O, "OldNewReg" , opt_geometry_old_newreg , 1. , 
+    "Use old newreg definition for geometrical transformations (compatibility option for old Gmsh geometries)" },
   { F|O, "ScalingFactor" , opt_geometry_scaling_factor , 1.0 , 
     "Global geometry scaling factor" },
   { F|O, "ColorScheme" , opt_geometry_color_scheme , 0. , 
@@ -469,6 +475,16 @@ StringXNumber ViewOptions_Number[] = {
     "Type of interval display (1=iso, 2=continuous, 3=discrete, 4=numeric)" },
   { F|O, "SaturateValues" , opt_view_saturate_values , 0 ,
     "Saturate the view values to custom min and max (1=true, 0=false)" },
+  { F|O, "GraphType" , opt_view_graph_type , DRAW_POST_3D ,
+    "Graph type (1=3D, 2=2D-space, 3=2D-time)" },
+  { F|O, "GraphPositionX" , opt_view_graph_position0 , 100. , 
+    "Horizontal position (in pixels) of the upper left corner of a 2D graph" }, 
+  { F|O, "GraphPositionY" , opt_view_graph_position1 , 100. , 
+    "Vertical position (in pixels) of the upper left corner of a 2D graph" }, 
+  { F|O, "GraphWidth" , opt_view_graph_size0 , 300. , 
+    "Width (in pixels) of a 2D graph" }, 
+  { F|O, "GraphHeight" , opt_view_graph_size1 , 200. , 
+    "Height (in pixels) of a 2D graph" }, 
   { F|O, "NbIso" , opt_view_nb_iso , 15. ,
     "Number of intervals" },
   { F|O, "Boundary" , opt_view_boundary , 0 ,
diff --git a/Common/GetOptions.cpp b/Common/GetOptions.cpp
index 01e0fd6bde8d75f930dbbc64a8ebc143880082f7..5a2f0813e42b9bf73306dd90fe61d485819370b9 100644
--- a/Common/GetOptions.cpp
+++ b/Common/GetOptions.cpp
@@ -1,4 +1,4 @@
-// $Id: GetOptions.cpp,v 1.40 2001-09-05 19:14:05 geuzaine Exp $
+// $Id: GetOptions.cpp,v 1.41 2001-10-29 08:52:19 geuzaine Exp $
 
 #include <unistd.h>
 #include "Gmsh.h"
@@ -60,13 +60,7 @@ void Print_Usage(char *name){
   Msg(DIRECT, "  -convert file file    convert an ascii view into a binary one");
   Msg(DIRECT, "Display options:");    
   Msg(DIRECT, "  -nodb                 disable double buffering");
-#ifdef _XMOTIF
-  Msg(DIRECT, "  -noov                 disable overlay visual");
-  Msg(DIRECT, "  -flash                allow colormap flashing");
-  Msg(DIRECT, "  -samevisual           force same visual for graphics and GUI");
-#else
   Msg(DIRECT, "  -fontsize int         specify the font size for the GUI (default: 12)");
-#endif
   Msg(DIRECT, "  -alpha                enable alpha blending");
   Msg(DIRECT, "  -notrack              don't use trackball mode for rotations");
   Msg(DIRECT, "  -display string       specify display");
@@ -78,9 +72,6 @@ void Print_Usage(char *name){
   Msg(DIRECT, "                        post-processing mode (default: automatic)");
 #endif
   Msg(DIRECT, "  -v int                set verbosity level (default: 2)");
-#ifdef _XMOTIF
-  Msg(DIRECT, "  -nothreads            disable threads");
-#endif
   Msg(DIRECT, "  -opt \"string\"         parse string before project file");
   Msg(DIRECT, "  -version              show version number");
   Msg(DIRECT, "  -info                 show detailed version information");
@@ -182,8 +173,8 @@ void Get_Options (int argc, char *argv[], int *nbfiles) {
 	CTX.terminal = 1;
 	if(argv[i] && argv[i+1]){
 	  ParseFile(argv[i]);
-	  if(List_Nbr(Post_ViewList))
-	    Write_View(1,(Post_View*)List_Pointer(Post_ViewList, 0),argv[i+1]);
+	  if(List_Nbr(CTX.post.list))
+	    Write_View(1,(Post_View*)List_Pointer(CTX.post.list, 0),argv[i+1]);
 	  else
 	    fprintf(stderr, ERROR_STR "No view to convert\n");
 	}
@@ -325,9 +316,7 @@ void Get_Options (int argc, char *argv[], int *nbfiles) {
               !strcmp(argv[i]+1, "-info")){
         fprintf(stderr, "%s%.2f\n", gmsh_version, GMSH_VERSION);
         fprintf(stderr, "%s\n", gmsh_os);
-#if _XMOTIF
-        fprintf(stderr, "%s%s\n", gmsh_gui, XmVERSION_STRING);
-#elif _FLTK
+#if _FLTK
         fprintf(stderr, "%sFLTK %d.%d.%d\n", gmsh_gui, FL_MAJOR_VERSION, 
 		FL_MINOR_VERSION, FL_PATCH_VERSION);
 #else
@@ -369,15 +358,9 @@ void Get_Options (int argc, char *argv[], int *nbfiles) {
       else if(!strcmp(argv[i]+1, "notrack")){ 
         CTX.useTrackball = 0; i++;
       }
-      else if(!strcmp(argv[i]+1, "flash")){ 
-        CTX.flash = 1; i++;
-      }
       else if(!strcmp(argv[i]+1, "dual")){ 
         CTX.mesh.dual = 1; i++;
       }
-      else if(!strcmp(argv[i]+1, "samevisual")){ 
-        CTX.same_visual = 1; i++;
-      }
       else if(!strcmp(argv[i]+1, "interactive")){ 
         CTX.mesh.interactive = 1; i++;
       }
diff --git a/Common/GmshUI.h b/Common/GmshUI.h
index 2e75a82dc7e68745c92b09e9bef9623b0ceda09e..4440f4669f54bb31908116a902153149404dcbf9 100644
--- a/Common/GmshUI.h
+++ b/Common/GmshUI.h
@@ -7,21 +7,11 @@
 #include <GL/glu.h>
 #endif
 
-#if _XMOTIF // X11 Motif for Unix
-
-#include <X11/keysym.h>
-#include <Xm/XmAll.h>
-#include <GL/gl.h>
-#include <GL/glu.h>
-#include <GL/glx.h>
-#include <GLwMDrawA.h>
-
-#elif _FLTK // FLTK for both Unix and Windows
-
+#ifdef _FLTK
 #include <FL/Fl.H>
 #include <FL/gl.h>
 #include <GL/glu.h>
-
 #endif
 
+
 #endif
diff --git a/Common/Makefile b/Common/Makefile
index 968e95f58f56b0b967d43724c6808ef6c4b717a7..6fb6383146cd73d6e0b651c768909886ff11dfaf 100644
--- a/Common/Makefile
+++ b/Common/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.28 2001-08-20 08:25:23 geuzaine Exp $
+# $Id: Makefile,v 1.29 2001-10-29 08:52:19 geuzaine Exp $
 #
 # Makefile for "libCommon.a"
 #
@@ -12,7 +12,7 @@ RM      = rm
 
 LIB     = ../lib/libCommon.a
 INCLUDE = -I../includes -I../Common -I../DataStr -I../Geo -I../Graphics\
-          -I../Mesh -I../Parser -I../Motif -I../Fltk
+          -I../Mesh -I../Parser -I../Fltk
 
 OPT_FLAGS     = -g -Wall
 OS_FLAGS      = -D_LITTLE_ENDIAN
@@ -20,7 +20,7 @@ VERSION_FLAGS = -D_FLTK
 
 GL_INCLUDE    = -I$(HOME)/SOURCES/Mesa-3.1/include\
                 -I$(HOME)/SOURCES/Mesa-3.1/include/GL
-GUI_INCLUDE   = -I/usr/X11R6/LessTif/Motif1.2/include
+GUI_INCLUDE   = 
 
 RMFLAGS = -f
 CFLAGS  = $(OPT_FLAGS) $(OS_FLAGS) $(VERSION_FLAGS) $(INCLUDE)\
diff --git a/Common/Options.cpp b/Common/Options.cpp
index 5b21af7a7ace02ea2b3d3a0df23bf76231cf957d..fc9c2d9ce74092a2f9caf190331b606d69d3c871 100644
--- a/Common/Options.cpp
+++ b/Common/Options.cpp
@@ -1,4 +1,4 @@
-// $Id: Options.cpp,v 1.49 2001-10-05 15:25:35 geuzaine Exp $
+// $Id: Options.cpp,v 1.50 2001-10-29 08:52:19 geuzaine Exp $
 
 #include "Gmsh.h"
 #include "GmshUI.h"
@@ -16,6 +16,8 @@ extern Context_T   CTX ;
 extern GUI        *WID ;
 #endif
 
+extern Post_View  *Post_ViewReference;
+
 // ************** General routines ****************************************
 
 void Init_Options(int num){
@@ -77,8 +79,6 @@ void Init_Options(int num){
   CTX.output_filename = NULL ;
   CTX.expose = 0 ;
   CTX.stream = TO_SCREEN ;
-  CTX.gl_fontheight = 12;
-  CTX.gl_fontascent = 8;
   CTX.lc = 1.0 ;
   CTX.viewport[0] = CTX.viewport[1] = 0 ;
   CTX.min[0] = CTX.min[1] = CTX.min[2] = 0.0 ;
@@ -92,17 +92,12 @@ void Init_Options(int num){
   CTX.mesh.vis_type = 0 ;
   CTX.mesh.draw = 1 ;  
   CTX.post.draw = 1 ;
+  CTX.post.list = NULL ;
+  CTX.post.force_num = 0 ;
   CTX.threads_lock = 0 ; //very primitive locking during mesh generation
   CTX.mesh.histogram = 0 ;
   CTX.mesh.oldxtrude = CTX.mesh.oldxtrude_recombine = 0; //old extrusion mesh generator
   CTX.mesh.check_duplicates = 0; //check for duplicate nodes in Read_Mesh
-
-  // For motif versions only:
-  CTX.overlay = 1 ;
-  CTX.command_win = 0 ;
-  CTX.threads = 1 ;
-  CTX.font = "-*-helvetica-medium-r-*-*-*-*-*-*-*-*-*-*" ;
-  CTX.fixed_font = "fixed" ;
 }
 
 void Init_Options_GUI(int num){
@@ -204,7 +199,7 @@ void Print_Options(int num, int level, char *filename){
   Print_ColorOptions(num, level, PostProcessingOptions_Color, "PostProcessing.", file);
   Print_OptionCategory(level, "View options", file);
   if(level & GMSH_FULLRC){
-    for(i=0; i<List_Nbr(Post_ViewList) ; i++){
+    for(i=0; i<List_Nbr(CTX.post.list) ; i++){
       sprintf(tmp, "View[%d].", i);
       Print_StringOptions(i, level, ViewOptions_String, tmp, file);
       Print_NumberOptions(i, level, ViewOptions_Number, tmp, file);
@@ -427,10 +422,10 @@ int Get_ColorForString(StringX4Int SX4I[], int alpha,
 
 #define GET_VIEW(error_val)						\
   Post_View *v;								\
-  if(!Post_ViewList)							\
+  if(!CTX.post.list)							\
     v = Post_ViewReference ;						\
   else{									\
-    if(!(v = (Post_View*)List_Pointer_Test(Post_ViewList, num))){	\
+    if(!(v = (Post_View*)List_Pointer_Test(CTX.post.list, num))){	\
       Msg(WARNING, "View[%d] does not exist", num) ;			\
       return (error_val) ;						\
     }									\
@@ -739,13 +734,23 @@ double opt_general_small_axes(OPT_ARGS_NUM){
 #endif
   return CTX.small_axes;
 }
+double opt_general_small_axes_position0(OPT_ARGS_NUM){
+  if(action & GMSH_SET) 
+    CTX.small_axes_pos[0] = (int)val;
+  return CTX.small_axes_pos[0];
+}
+double opt_general_small_axes_position1(OPT_ARGS_NUM){
+  if(action & GMSH_SET) 
+    CTX.small_axes_pos[1] = (int)val;
+  return CTX.small_axes_pos[1];
+}
 double opt_general_display_lists(OPT_ARGS_NUM){
   int i;
   if(action & GMSH_SET){
     CTX.display_lists = (int)val;
     if(CTX.display_lists)
-      for(i=0 ; i<List_Nbr(Post_ViewList) ; i++)
-	((Post_View*)List_Pointer_Test(Post_ViewList, i))->Changed = 1;
+      for(i=0 ; i<List_Nbr(CTX.post.list) ; i++)
+	((Post_View*)List_Pointer_Test(CTX.post.list, i))->Changed = 1;
   }
 #ifdef _FLTK
   if(WID && (action & GMSH_GUI))
@@ -1194,6 +1199,11 @@ double opt_geometry_old_circle(OPT_ARGS_NUM){
     CTX.geom.old_circle = (int)val;
   return CTX.geom.old_circle;
 }
+double opt_geometry_old_newreg(OPT_ARGS_NUM){
+  if(action & GMSH_SET) 
+    CTX.geom.old_newreg = (int)val;
+  return CTX.geom.old_newreg;
+}
 double opt_geometry_scaling_factor(OPT_ARGS_NUM){
   if(action & GMSH_SET) 
     CTX.geom.scaling_factor = (int)val;
@@ -1600,9 +1610,7 @@ double opt_post_anim_delay(OPT_ARGS_NUM){
   return CTX.post.anim_delay;
 }
 double opt_post_nb_views(OPT_ARGS_NUM){
-  if(action & GMSH_SET) 
-    CTX.post.nb_views = (int)val;
-  return CTX.post.nb_views;
+  return List_Nbr(CTX.post.list);
 }
 
 
@@ -1817,6 +1825,51 @@ double opt_view_saturate_values(OPT_ARGS_NUM){
   return v->SaturateValues;
 }
 
+double opt_view_graph_type(OPT_ARGS_NUM){
+  GET_VIEW(0.) ;
+  if(action & GMSH_SET){
+    v->GraphType = (int)val;
+    v->Changed = 1;
+  }
+  return v->GraphType;
+}
+
+double opt_view_graph_position0(OPT_ARGS_NUM){
+  GET_VIEW(0.) ;
+  if(action & GMSH_SET){
+    v->GraphPosition[0] = (int)val;
+    v->Changed = 1;
+  }
+  return v->GraphPosition[0];
+}
+
+double opt_view_graph_position1(OPT_ARGS_NUM){
+  GET_VIEW(0.) ;
+  if(action & GMSH_SET){
+    v->GraphPosition[1] = (int)val;
+    v->Changed = 1;
+  }
+  return v->GraphPosition[1];
+}
+
+double opt_view_graph_size0(OPT_ARGS_NUM){
+  GET_VIEW(0.) ;
+  if(action & GMSH_SET){
+    v->GraphSize[0] = (int)val;
+    v->Changed = 1;
+  }
+  return v->GraphSize[0];
+}
+
+double opt_view_graph_size1(OPT_ARGS_NUM){
+  GET_VIEW(0.) ;
+  if(action & GMSH_SET){
+    v->GraphSize[1] = (int)val;
+    v->Changed = 1;
+  }
+  return v->GraphSize[1];
+}
+
 double opt_view_nb_iso(OPT_ARGS_NUM){
   GET_VIEW(0.) ;
   if(action & GMSH_SET){
diff --git a/Common/Options.h b/Common/Options.h
index 562e348c2d71f3d29d5fc84dbb1fb26a8da5966e..7d4b24ec389ff85978d8429703fe552a904f2552 100644
--- a/Common/Options.h
+++ b/Common/Options.h
@@ -69,6 +69,8 @@ double opt_general_orthographic(OPT_ARGS_NUM);
 double opt_general_fast_redraw(OPT_ARGS_NUM);
 double opt_general_axes(OPT_ARGS_NUM);
 double opt_general_small_axes(OPT_ARGS_NUM);
+double opt_general_small_axes_position0(OPT_ARGS_NUM);
+double opt_general_small_axes_position1(OPT_ARGS_NUM);
 double opt_general_display_lists(OPT_ARGS_NUM);
 double opt_general_double_buffer(OPT_ARGS_NUM);
 double opt_general_alpha_blending(OPT_ARGS_NUM);
@@ -148,6 +150,7 @@ double opt_geometry_line_sel_width(OPT_ARGS_NUM);
 double opt_geometry_aspect(OPT_ARGS_NUM);
 double opt_geometry_highlight(OPT_ARGS_NUM);
 double opt_geometry_old_circle(OPT_ARGS_NUM);
+double opt_geometry_old_newreg(OPT_ARGS_NUM);
 double opt_geometry_scaling_factor(OPT_ARGS_NUM);
 double opt_geometry_color_scheme(OPT_ARGS_NUM);
 double opt_mesh_quality(OPT_ARGS_NUM);
@@ -216,6 +219,11 @@ double opt_view_explode(OPT_ARGS_NUM);
 double opt_view_visible(OPT_ARGS_NUM);
 double opt_view_intervals_type(OPT_ARGS_NUM);
 double opt_view_saturate_values(OPT_ARGS_NUM);
+double opt_view_graph_type(OPT_ARGS_NUM);
+double opt_view_graph_position0(OPT_ARGS_NUM);
+double opt_view_graph_position1(OPT_ARGS_NUM);
+double opt_view_graph_size0(OPT_ARGS_NUM);
+double opt_view_graph_size1(OPT_ARGS_NUM);
 double opt_view_nb_iso(OPT_ARGS_NUM);
 double opt_view_boundary(OPT_ARGS_NUM);
 double opt_view_light(OPT_ARGS_NUM);
diff --git a/Common/Static.h b/Common/Static.h
index 44a4156f41ce53b42d0daa56e4b9162d030e5bd9..9ca7faf8ccf2e4621841d62cf6dd19873c9888f5 100644
--- a/Common/Static.h
+++ b/Common/Static.h
@@ -7,8 +7,6 @@
 char        yyname[256];
 int         yyerrorstate;
 
-int         CurrentNodeNumber, CurrentSimplexNumber;
-
 Context_T   CTX ;
 Mesh        M, *THEM, *LOCAL;
 
diff --git a/Common/Views.cpp b/Common/Views.cpp
index 2d6f1905ccae6f87e0815fca790ac2450ee9d245..e428b94116efae4f2ec3b0e6ec838e4323780c39 100644
--- a/Common/Views.cpp
+++ b/Common/Views.cpp
@@ -1,4 +1,4 @@
-// $Id: Views.cpp,v 1.54 2001-09-26 08:28:12 geuzaine Exp $
+// $Id: Views.cpp,v 1.55 2001-10-29 08:52:19 geuzaine Exp $
 
 #include <set>
 #include "Gmsh.h"
@@ -12,10 +12,8 @@ extern Context_T   CTX ;
 
 #define INFINITY 1.e200
 
-// this static stuff should be removed
-List_T     *Post_ViewList = NULL;
+//static reference view
 Post_View  *Post_ViewReference = NULL;
-int         Post_ViewForceNumber = 0;
 
 /* ------------------------------------------------------------------------ */
 /*  V i e w s                                                               */
@@ -34,21 +32,19 @@ Post_View * BeginView(int allocate){
   static int  UniqueNum=0;
   int i;
 
-  if(!Post_ViewList) Post_ViewList = List_Create(100,1,sizeof(Post_View));
+  if(!CTX.post.list) CTX.post.list = List_Create(100,1,sizeof(Post_View));
 
-  if(!Post_ViewForceNumber){
+  if(!CTX.post.force_num){
     vv.Num = ++UniqueNum; // each view _must_ have a unique number
-    List_Add(Post_ViewList, &vv);
+    List_Add(CTX.post.list, &vv);
   }
   else{
-    vv.Num = Post_ViewForceNumber;    
-    List_Replace(Post_ViewList,&vv,fcmpPostViewNum);
+    vv.Num = CTX.post.force_num;    
+    List_Replace(CTX.post.list,&vv,fcmpPostViewNum);
   }
 
-  CTX.post.nb_views = List_Nbr(Post_ViewList);
-
-  i = List_ISearch(Post_ViewList, &vv, fcmpPostViewNum);
-  v = (Post_View*)List_Pointer(Post_ViewList, i);
+  i = List_ISearch(CTX.post.list, &vv, fcmpPostViewNum);
+  v = (Post_View*)List_Pointer(CTX.post.list, i);
 
   v->Index = i;
   v->Dirty = 1;
@@ -320,8 +316,8 @@ void EndView(Post_View *v, int add_in_gui, char *file_name, char *name){
 
   if(CTX.post.smooth) v->smooth();
 
-  if(!Post_ViewForceNumber && add_in_gui)
-    AddViewInUI(List_Nbr(Post_ViewList), v->Name, v->Num);
+  if(!CTX.post.force_num && add_in_gui)
+    AddViewInUI(List_Nbr(CTX.post.list), v->Name, v->Num);
 
   v->Dirty = 0; //the view is complete, we may draw it
 }
@@ -331,15 +327,14 @@ bool FreeView(int num){
 
   Msg(DEBUG, "Trying to free view %d",num);
   
-  if(num < 0 || num >= List_Nbr(Post_ViewList)){
+  if(num < 0 || num >= List_Nbr(CTX.post.list)){
     return false ;
   }
-  v = (Post_View*)List_Pointer(Post_ViewList, num);
+  v = (Post_View*)List_Pointer(CTX.post.list, num);
   FreeView(v);
-  List_PSuppress(Post_ViewList, num);
-  CTX.post.nb_views = List_Nbr(Post_ViewList);
+  List_PSuppress(CTX.post.list, num);
 
-  Msg(INFO, "View %d deleted (%d views left)",num, List_Nbr(Post_ViewList));
+  Msg(INFO, "View %d deleted (%d views left)",num, List_Nbr(CTX.post.list));
   return true;
 }
 
@@ -351,11 +346,11 @@ void FreeView(Post_View *v){
   if(v->DuplicateOf){
     vv.Num = v->DuplicateOf ;
     Msg(DEBUG, "This view is a duplicata");
-    if(!(v2 = (Post_View*)List_PQuery(Post_ViewList, &vv, fcmpPostViewNum))){
+    if(!(v2 = (Post_View*)List_PQuery(CTX.post.list, &vv, fcmpPostViewNum))){
       Msg(DEBUG, "  -the original view is gone");
       numdup = 0;
-      for(i=0 ; i<List_Nbr(Post_ViewList); i++)
-	numdup += (((Post_View*)List_Pointer(Post_ViewList, i))->DuplicateOf == v->DuplicateOf);
+      for(i=0 ; i<List_Nbr(CTX.post.list); i++)
+	numdup += (((Post_View*)List_Pointer(CTX.post.list, i))->DuplicateOf == v->DuplicateOf);
       if(numdup == 1){
         Msg(DEBUG, "  -there are no other duplicata, so I can free");
         free = 1 ;
@@ -399,6 +394,11 @@ void CopyViewOptions(Post_View *src, Post_View *dest){
   dest->Visible = src->Visible;
   dest->IntervalsType = src->IntervalsType;
   dest->SaturateValues = src->SaturateValues;
+  dest->GraphType = src->GraphType;
+  dest->GraphPosition[0] = src->GraphPosition[0];
+  dest->GraphPosition[1] = src->GraphPosition[1];
+  dest->GraphSize[0] = src->GraphSize[0];
+  dest->GraphSize[1] = src->GraphSize[1];
   dest->Boundary = src->Boundary ;
   dest->NbIso = src->NbIso;
   dest->Light = src->Light ;
@@ -429,10 +429,10 @@ void CopyViewOptions(Post_View *src, Post_View *dest){
 ColorTable *Get_ColorTable(int num){
   Post_View *v;
 
-  if(!Post_ViewList)
+  if(!CTX.post.list)
     v = Post_ViewReference ;
   else
-    v = (Post_View*)List_Pointer_Test(Post_ViewList, num);
+    v = (Post_View*)List_Pointer_Test(CTX.post.list, num);
   if(v)
     return &v->CT ;
   else
@@ -442,10 +442,10 @@ ColorTable *Get_ColorTable(int num){
 void Print_ColorTable(int num, char *prefix, FILE *file){
   char tmp[1024];
   Post_View *v;
-  if(!Post_ViewList)
+  if(!CTX.post.list)
     v = Post_ViewReference ;
   else
-    v = (Post_View*)List_Pointer_Test(Post_ViewList, num);
+    v = (Post_View*)List_Pointer_Test(CTX.post.list, num);
   if(!v) return;
   sprintf(tmp, "%s = {", prefix);
   if(file) fprintf(file, "%s\n", tmp); else Msg(DIRECT, tmp);
diff --git a/Common/Views.h b/Common/Views.h
index 6c9f43abf7d54d8e00ed2ffb4cdc18f6aa967ecc..29dbbe57c96245832c596411e308b3189abc49f6 100644
--- a/Common/Views.h
+++ b/Common/Views.h
@@ -40,6 +40,7 @@ class Post_View{
   int DrawScalars, DrawVectors, DrawTensors;
   int Boundary, PointSize, LineWidth;
   ColorTable CT;
+  int GraphType, GraphPosition[2], GraphSize[2];
 
   // dynamic
   double (*GVFI) (double min, double max, int nb, int index);
@@ -57,16 +58,10 @@ class Post_View{
   void transform(double mat[3][3]);
 };
 
-// The static list with pointers to all views
-
-extern List_T *Post_ViewList;
-
-// Reference view storing default options and the static options
-
-extern Post_View *Post_ViewReference;
-extern int        Post_ViewForceNumber, Post_ViewComputeBBox;
-
-
+// GraphType
+#define DRAW_POST_3D       1
+#define DRAW_POST_2D_SPACE 2
+#define DRAW_POST_2D_TIME  3
 
 // IntervalsType
 #define DRAW_POST_ISO          1
diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp
index d1e97bd522b601d6b5c862a81eaf13dbe28b0dba..cbf5e2955c62548dcce14b4304f6dd8b7b69e8da 100644
--- a/Fltk/Callbacks.cpp
+++ b/Fltk/Callbacks.cpp
@@ -1,4 +1,4 @@
-// $Id: Callbacks.cpp,v 1.85 2001-10-10 11:15:38 geuzaine Exp $
+// $Id: Callbacks.cpp,v 1.86 2001-10-29 08:52:19 geuzaine Exp $
 
 #include <sys/types.h>
 #include <signal.h>
@@ -156,7 +156,7 @@ void status_play_cb(CALLBACK_ARGS){
     if(stop_anim) break ;
     if(GetTime() - anim_time > 1.e6*CTX.post.anim_delay){
       anim_time = GetTime();
-      for(i=0 ; i<List_Nbr(Post_ViewList) ; i++)
+      for(i=0 ; i<List_Nbr(CTX.post.list) ; i++)
 	opt_view_timestep(i, GMSH_SET|GMSH_GUI, opt_view_timestep(i, GMSH_GET, 0)+1);
       Draw();
     }
@@ -176,25 +176,25 @@ void status_cancel_cb(CALLBACK_ARGS){
 
 void file_open_cb(CALLBACK_ARGS) {
   char *newfile;
-  int n = List_Nbr(Post_ViewList);
+  int n = List_Nbr(CTX.post.list);
   newfile = fl_file_chooser("Open file", "*", NULL);
   if (newfile != NULL) {
     OpenProblem(newfile); 
     Draw(); 
   }
-  if(n != List_Nbr(Post_ViewList))
+  if(n != List_Nbr(CTX.post.list))
     WID->set_context(menu_post, 0);
 }
 
 void file_merge_cb(CALLBACK_ARGS) {
   char *newfile;
-  int n = List_Nbr(Post_ViewList);
+  int n = List_Nbr(CTX.post.list);
   newfile = fl_file_chooser("Merge file", "*", NULL);
   if (newfile != NULL) {
     MergeProblem(newfile); 
     Draw(); 
   }
-  if(n != List_Nbr(Post_ViewList))
+  if(n != List_Nbr(CTX.post.list))
     WID->set_context(menu_post, 0);
 }
 
@@ -1531,18 +1531,18 @@ void view_toggle_cb(CALLBACK_ARGS){
 static int RELOAD_ALL_VIEWS = 0 ;
 
 void view_reload_all_cb(CALLBACK_ARGS) {
-  if(!Post_ViewList) return;
+  if(!CTX.post.list) return;
   RELOAD_ALL_VIEWS = 1;
-  for(int i = 0 ; i<List_Nbr(Post_ViewList) ; i++)
+  for(int i = 0 ; i<List_Nbr(CTX.post.list) ; i++)
     view_reload_cb(NULL, (void *)i);
   RELOAD_ALL_VIEWS = 0;
   Draw();
 }
 
 void view_reload_visible_cb(CALLBACK_ARGS) {
-  if(!Post_ViewList) return;
+  if(!CTX.post.list) return;
   RELOAD_ALL_VIEWS = 1;
-  for(int i = 0 ; i<List_Nbr(Post_ViewList) ; i++)
+  for(int i = 0 ; i<List_Nbr(CTX.post.list) ; i++)
     if(opt_view_visible(i, GMSH_GET, 0))
       view_reload_cb(NULL, (void *)i);
   RELOAD_ALL_VIEWS = 0;
@@ -1553,18 +1553,18 @@ void view_reload_cb(CALLBACK_ARGS){
   Post_View tmp ;
   char filename[256];
 
-  if(!Post_ViewList) return;
+  if(!CTX.post.list) return;
 
-  Post_View *v = (Post_View*)List_Pointer(Post_ViewList,(int)data);
+  Post_View *v = (Post_View*)List_Pointer(CTX.post.list,(int)data);
   strcpy(filename, v->FileName);
   CopyViewOptions(v, &tmp);
 
-  Post_ViewForceNumber = v->Num ;
+  CTX.post.force_num = v->Num ;
   FreeView(v);
   MergeProblem(filename);
-  Post_ViewForceNumber = 0 ;
+  CTX.post.force_num = 0 ;
   
-  v = (Post_View*)List_Pointer(Post_ViewList,(int)data);
+  v = (Post_View*)List_Pointer(CTX.post.list,(int)data);
   CopyViewOptions(&tmp, v);
 
   // In case the reloaded view has a different number of time steps
@@ -1577,9 +1577,9 @@ void view_reload_cb(CALLBACK_ARGS){
 static int REMOVE_ALL_VIEWS = 0 ;
 
 void view_remove_all_cb(CALLBACK_ARGS) {
-  if(!Post_ViewList) return;
+  if(!CTX.post.list) return;
   REMOVE_ALL_VIEWS = 1;
-  while(List_Nbr(Post_ViewList))
+  while(List_Nbr(CTX.post.list))
     view_remove_cb(NULL, (void*)0);
   REMOVE_ALL_VIEWS = 0;
   Draw();
@@ -1587,9 +1587,9 @@ void view_remove_all_cb(CALLBACK_ARGS) {
 
 void view_remove_visible_cb(CALLBACK_ARGS) {
   int i;
-  if(!Post_ViewList) return;
+  if(!CTX.post.list) return;
   REMOVE_ALL_VIEWS = 1;
-  for(i=List_Nbr(Post_ViewList)-1 ; i>=0 ; i--)
+  for(i=List_Nbr(CTX.post.list)-1 ; i>=0 ; i--)
     if(opt_view_visible(i, GMSH_GET, 0))
       view_remove_cb(NULL, (void*)i);
   REMOVE_ALL_VIEWS = 0;
@@ -1601,8 +1601,8 @@ void view_remove_cb(CALLBACK_ARGS){
 
   FreeView((int)data);
 
-  for(i=0 ; i<List_Nbr(Post_ViewList) ; i++)
-    if(((Post_View*)List_Pointer(Post_ViewList,i))->NbTimeStep > 1){
+  for(i=0 ; i<List_Nbr(CTX.post.list) ; i++)
+    if(((Post_View*)List_Pointer(CTX.post.list,i))->NbTimeStep > 1){
       play = 1 ; 
       break ;
     }
@@ -1618,21 +1618,21 @@ void view_remove_cb(CALLBACK_ARGS){
 void view_save_ascii_cb(CALLBACK_ARGS){
   char *newfile;
   if((newfile = fl_file_chooser("Save view in ASCII format", "*", NULL)))
-    Write_View(0, (Post_View*)List_Pointer(Post_ViewList,(int)data), newfile); 
+    Write_View(0, (Post_View*)List_Pointer(CTX.post.list,(int)data), newfile); 
 }
 
 void view_save_binary_cb(CALLBACK_ARGS){
   char *newfile;
   if((newfile = fl_file_chooser("Save view in binary format", "*", NULL)))
-    Write_View(1, (Post_View*)List_Pointer(Post_ViewList,(int)data), newfile); 
+    Write_View(1, (Post_View*)List_Pointer(CTX.post.list,(int)data), newfile); 
 }
 
 static void _duplicate_view(int num, int options){
   Post_View  v, *v1, *v2, *v3 ;
 
-  if(!Post_ViewList) return;
+  if(!CTX.post.list) return;
 
-  v1 = (Post_View*)List_Pointer(Post_ViewList,num);
+  v1 = (Post_View*)List_Pointer(CTX.post.list,num);
 
   v2 = BeginView(0);
   EndView(v2, 0, v1->FileName, v1->Name);
@@ -1643,7 +1643,7 @@ static void _duplicate_view(int num, int options){
   }
   else{
     v.Num = v1->DuplicateOf ;
-    if(!(v3 = (Post_View*)List_PQuery(Post_ViewList, &v, fcmpPostViewNum))){
+    if(!(v3 = (Post_View*)List_PQuery(CTX.post.list, &v, fcmpPostViewNum))){
       v2->DuplicateOf = v1->Num ;
       v1->Links++ ;
     }
@@ -1672,7 +1672,7 @@ static void _duplicate_view(int num, int options){
   v2->NbTimeStep  = v1->NbTimeStep;
 
   if(options) CopyViewOptions(v1, v2);
-  AddViewInUI(List_Nbr(Post_ViewList), v2->Name, v2->Num);
+  AddViewInUI(List_Nbr(CTX.post.list), v2->Name, v2->Num);
   Draw();
 }
 void view_duplicate_cb(CALLBACK_ARGS){
@@ -1683,7 +1683,7 @@ void view_duplicate_with_options_cb(CALLBACK_ARGS){
 }
 
 void view_applybgmesh_cb(CALLBACK_ARGS){
-  Post_View *v = (Post_View*)List_Pointer(Post_ViewList,(int)data);
+  Post_View *v = (Post_View*)List_Pointer(CTX.post.list,(int)data);
   if(!v->ScalarOnly){
     Msg(GERROR, "Background mesh generation impossible with non-scalar view");
     return;
@@ -1712,7 +1712,7 @@ void view_plugin_cb(CALLBACK_ARGS){
   }
 
   try{
-    Post_View *v = (Post_View*)List_Pointer(Post_ViewList,iView);
+    Post_View *v = (Post_View*)List_Pointer(CTX.post.list,iView);
     p->execute(v);
     Draw();
   }
@@ -1749,7 +1749,7 @@ void view_options_custom_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(Post_ViewList) ; i++){
+  for(int i=0 ; i<List_Nbr(CTX.post.list) ; i++){
     if((links == 2 || links == 4) ||
        ((links == 1 || links == 3) && opt_view_visible(i, GMSH_GET, 0)) ||
        (links == 0 && i == (int)data)){
@@ -1764,7 +1764,7 @@ void view_options_ok_cb(CALLBACK_ARGS){
 
   links = (int)opt_post_link(0, GMSH_GET, 0);
 
-  for(i=0 ; i<List_Nbr(Post_ViewList) ; i++){
+  for(i=0 ; i<List_Nbr(CTX.post.list) ; i++){
     if((links == 2 || links == 4) ||
        ((links == 1 || links == 3) && opt_view_visible(i, GMSH_GET, 0)) ||
        (links == 0 && i == (int)data)){
@@ -1910,8 +1910,8 @@ void view_options_ok_cb(CALLBACK_ARGS){
       // colorbar window
 
       if(force || (WID->view_colorbar_window->changed() && i!=(int)data)){
-	ColorTable_Copy(&((Post_View*)List_Pointer(Post_ViewList,(int)data))->CT);
-	ColorTable_Paste(&((Post_View*)List_Pointer(Post_ViewList,i))->CT);
+	ColorTable_Copy(&((Post_View*)List_Pointer(CTX.post.list,(int)data))->CT);
+	ColorTable_Paste(&((Post_View*)List_Pointer(CTX.post.list,i))->CT);
       }
     }
   }
diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp
index 59e1bf5df823678bf001bbfa7c5a9e406335de4b..8dab48453f04b8b0ff6c7edc1ef0a44d506d6060 100644
--- a/Fltk/GUI.cpp
+++ b/Fltk/GUI.cpp
@@ -1,4 +1,4 @@
-// $Id: GUI.cpp,v 1.117 2001-10-10 19:28:09 geuzaine Exp $
+// $Id: GUI.cpp,v 1.118 2001-10-29 08:52:19 geuzaine Exp $
 
 // To make the interface as visually consistent as possible, please:
 // - use the BH, BW, WB, IW values for button heights/widths, window borders, etc.
@@ -441,7 +441,7 @@ int GUI::global_shortcuts(int event){
     return 1;
   }
   else if(Fl::test_shortcut(FL_ALT+'t')){
-    for(i=0 ; i<List_Nbr(Post_ViewList) ; i++){
+    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);
 	opt_view_intervals_type(i, GMSH_SET|GMSH_GUI, 
@@ -455,7 +455,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(Post_ViewList) ; i++)
+    for(i=0 ; i<List_Nbr(CTX.post.list) ; i++)
       opt_view_visible(i, GMSH_SET|GMSH_GUI, show);
     redraw_opengl();
     show = !show;
@@ -726,17 +726,17 @@ void GUI::set_context(Context_Item *menu_asked, int flag){
   
   switch(m_module_butt->value()){
   case 3 : // post-processing contexts
-    for(i = 0 ; i < List_Nbr(Post_ViewList) ; i++) {
+    for(i = 0 ; i < List_Nbr(CTX.post.list) ; i++) {
       if(i == NB_BUTT_MAX) break;
       nb++ ;
-      v = (Post_View*)List_Pointer(Post_ViewList,i);
+      v = (Post_View*)List_Pointer(CTX.post.list,i);
       m_push_butt[i]->hide();
       m_toggle_butt[i]->show();
       m_toggle_butt[i]->value(v->Visible);
       m_toggle_butt[i]->label(v->Name);
       m_popup_butt[i]->show();
     }
-    for(i = List_Nbr(Post_ViewList) ; i < NB_BUTT_MAX ; i++) {
+    for(i = List_Nbr(CTX.post.list) ; i < NB_BUTT_MAX ; i++) {
       m_push_butt[i]->hide();
       m_toggle_butt[i]->hide();
       m_popup_butt[i]->hide();
@@ -1686,11 +1686,11 @@ void GUI::set_statistics(){
                                     stat_value[num]->value(label[num]); num++;
 
   // post
-  p[0] = List_Nbr(Post_ViewList) ;
+  p[0] = List_Nbr(CTX.post.list) ;
   sprintf(label[num], "%g", p[0]); stat_value[num]->value(label[num]); num++;
   p[1] = p[2] = p[3] = p[4] = p[5] = p[6] = p[7] = p[8] = 0 ;
-  for(i=0 ; i<List_Nbr(Post_ViewList) ; i++){
-    Post_View *v = (Post_View*)List_Pointer(Post_ViewList, i);
+  for(i=0 ; i<List_Nbr(CTX.post.list) ; i++){
+    Post_View *v = (Post_View*)List_Pointer(CTX.post.list, i);
     p[1] += v->NbSP + v->NbVP + v->NbTP;
     p[2] += v->NbSL + v->NbVL + v->NbTL;
     p[3] += v->NbST + v->NbVT + v->NbTT;
@@ -2261,7 +2261,7 @@ void GUI::update_view_window(int num){
   double val;
 
   view_number = num ;
-  Post_View *v = (Post_View*)List_Pointer(Post_ViewList, num);
+  Post_View *v = (Post_View*)List_Pointer(CTX.post.list, num);
 
   static char buffer[1024];
   sprintf(buffer, "Options for \"%s\" (\"%s\")", v->Name, v->FileName);
diff --git a/Fltk/Main.cpp b/Fltk/Main.cpp
index ddc68207480b82bc1cf631d271db468609b4f659..495a0aa651b0d3f8ac5782068876b83c3f8493be 100644
--- a/Fltk/Main.cpp
+++ b/Fltk/Main.cpp
@@ -1,4 +1,4 @@
-// $Id: Main.cpp,v 1.32 2001-08-03 14:58:04 geuzaine Exp $
+// $Id: Main.cpp,v 1.33 2001-10-29 08:52:19 geuzaine Exp $
 
 #include <signal.h>
 #include <time.h>
@@ -96,8 +96,8 @@ int main(int argc, char *argv[]){
       for(i=1;i<nbf;i++) MergeProblem(TheFileNameTab[i]);
       if(TheBgmFileName){
         MergeProblem(TheBgmFileName);
-        if(List_Nbr(Post_ViewList))
-          BGMWithView((Post_View*)List_Pointer(Post_ViewList, List_Nbr(Post_ViewList)-1));
+        if(List_Nbr(CTX.post.list))
+          BGMWithView((Post_View*)List_Pointer(CTX.post.list, List_Nbr(CTX.post.list)-1));
         else
           Msg(GERROR, "Invalid background mesh (no view)");
       }
@@ -175,7 +175,7 @@ int main(int argc, char *argv[]){
     WID->set_context(menu_post, 0); 
     break;
   default : // automatic
-    if(List_Nbr(Post_ViewList))
+    if(List_Nbr(CTX.post.list))
       WID->set_context(menu_post, 0);
     else
       WID->set_context(menu_geometry, 0); 
@@ -186,12 +186,14 @@ int main(int argc, char *argv[]){
 
   if(TheBgmFileName){
     MergeProblem(TheBgmFileName);
-    if(List_Nbr(Post_ViewList))
-      BGMWithView((Post_View*)List_Pointer(Post_ViewList, List_Nbr(Post_ViewList)-1));
+    if(List_Nbr(CTX.post.list))
+      BGMWithView((Post_View*)List_Pointer(CTX.post.list, List_Nbr(CTX.post.list)-1));
     else
       Msg(GERROR, "Invalid background mesh (no view)");
   }
 
+  gl_font(FL_HELVETICA, CTX.gl_fontsize);
+
   // Draw the actual scene
   Draw();
   CTX.expose = 1 ;
diff --git a/Fltk/Opengl.cpp b/Fltk/Opengl.cpp
index aa45a063808849008c94150ec291b34787c5f360..24ee0d39179343b5363d9c6e5d0e8e456ea7475a 100644
--- a/Fltk/Opengl.cpp
+++ b/Fltk/Opengl.cpp
@@ -1,4 +1,4 @@
-// $Id: Opengl.cpp,v 1.21 2001-09-25 08:21:14 geuzaine Exp $
+// $Id: Opengl.cpp,v 1.22 2001-10-29 08:52:19 geuzaine Exp $
 
 #include "Gmsh.h"
 #include "GmshUI.h"
@@ -59,9 +59,6 @@ void Draw_String(char *s){
     }
   }
 
-  gl_font(FL_HELVETICA, CTX.gl_fontsize);
-  CTX.gl_fontheight = gl_height() ;
-  CTX.gl_fontascent = gl_height()-gl_descent() ;
   gl_draw(s);
 
 }
diff --git a/Fltk/Solvers.cpp b/Fltk/Solvers.cpp
index 36850d2b11853d1fc66a48c247aaa819f37dc1ba..0613e84e95940de72bcb6c19a7abbcd37edfbdcf 100644
--- a/Fltk/Solvers.cpp
+++ b/Fltk/Solvers.cpp
@@ -1,4 +1,4 @@
-// $Id: Solvers.cpp,v 1.7 2001-05-21 13:01:13 geuzaine Exp $
+// $Id: Solvers.cpp,v 1.8 2001-10-29 08:52:19 geuzaine Exp $
 
 #include "Gmsh.h"
 
@@ -69,10 +69,10 @@ int GetDP(char *args){
       break ;
     case GETDP_LOAD_VIEW :
       if(GetDP_Info.mergeviews){
-	n = List_Nbr(Post_ViewList);
+	n = List_Nbr(CTX.post.list);
 	MergeProblem(str);
 	Draw(); 
-	if(n != List_Nbr(Post_ViewList))
+	if(n != List_Nbr(CTX.post.list))
 	  WID->set_context(menu_post, 0);
       }
       break ;
diff --git a/Geo/CAD.cpp b/Geo/CAD.cpp
index 26328aef8d8d9319c3d016bb96643687f5272e56..2a025135eb519bbd5d9ee2c4cee96f8e9a7f67e6 100644
--- a/Geo/CAD.cpp
+++ b/Geo/CAD.cpp
@@ -1,4 +1,4 @@
-// $Id: CAD.cpp,v 1.32 2001-10-05 15:25:35 geuzaine Exp $
+// $Id: CAD.cpp,v 1.33 2001-10-29 08:52:19 geuzaine Exp $
 
 #include "Gmsh.h"
 #include "Numeric.h"
@@ -13,11 +13,68 @@
                                     
 extern Mesh      *THEM;
 extern Context_T  CTX;
-extern int        CurrentNodeNumber;
 
-static int      MAXREG,MAXPOINT;
 static List_T  *ListOfTransformedPoints=NULL;
 
+
+int NEWPOINT(void){
+  return (THEM->MaxPointNum + 1);
+}
+
+int NEWLINE(void){
+  if(CTX.geom.old_newreg)
+    return NEWREG();
+  else
+    return (THEM->MaxLineNum + 1);
+}
+
+int NEWLINELOOP(void){
+  if(CTX.geom.old_newreg)
+    return NEWREG();
+  else
+    return (THEM->MaxLineLoopNum + 1);
+}
+
+int NEWSURFACE(void){
+  if(CTX.geom.old_newreg)
+    return NEWREG();
+  else
+    return (THEM->MaxSurfaceNum + 1);
+}
+
+int NEWSURFACELOOP(void){
+  if(CTX.geom.old_newreg)
+    return NEWREG();
+  else
+    return (THEM->MaxSurfaceLoopNum + 1);
+}
+
+int NEWVOLUME(void){
+  if(CTX.geom.old_newreg)
+    return NEWREG();
+  else
+    return (THEM->MaxVolumeNum + 1);
+}
+
+int NEWPHYSICAL(void){
+  if(CTX.geom.old_newreg)
+    return NEWREG();
+  else
+    return (THEM->MaxPhysicalNum + 1);
+}
+
+int NEWREG(void){
+  return (IMAX(THEM->MaxLineNum,
+	       IMAX(THEM->MaxLineLoopNum,
+		    IMAX(THEM->MaxSurfaceNum,
+			 IMAX(THEM->MaxSurfaceLoopNum,
+			      IMAX(THEM->MaxVolumeNum, THEM->MaxPhysicalNum)))))
+	  + 1);
+}
+
+
+
+
 int compare2Lists (List_T *List1, List_T *List2,
                    int (*fcmp)(const void *a, const void *b)){
   int i,found;
@@ -45,31 +102,6 @@ int compare2Lists (List_T *List1, List_T *List2,
   return 0;
 }
 
-void MaxNumCurve(void *a, void *b){
-  Curve *c = *(Curve**)a;
-  MAXREG = (c->Num>MAXREG)?c->Num:MAXREG;
-}
-
-void MaxNumSurface(void *a, void *b){
-  Surface *s = *(Surface**)a;
-  MAXREG = (s->Num>MAXREG)?s->Num:MAXREG;
-}
-
-void MaxNumEdgeLoop(void *a, void *b){
-  EdgeLoop *s = *(EdgeLoop**)a;
-  MAXREG = (s->Num>MAXREG)?s->Num:MAXREG;
-}
-
-void MaxNumSurfaceLoop(void *a, void *b){
-  SurfaceLoop *s = *(SurfaceLoop**)a;
-  MAXREG = (s->Num>MAXREG)?s->Num:MAXREG;
-}
-
-void MaxNumPoint(void *a, void *b){
-  Vertex *v = *(Vertex**)a;
-  MAXPOINT = (v->Num>MAXPOINT)?v->Num:MAXPOINT;
-}
-
 void dist_ddg(double x1,double y1,double z1,
               double x2,double y2,double z2,
               double x3,double y3,double z3,
@@ -95,26 +127,6 @@ void dist_ddg(double x1,double y1,double z1,
 }
 
 
-int NEWREG(void){
-  MAXREG = 0;
-  PhysicalGroup *p;
-  Tree_Action(THEM->Curves,MaxNumCurve);
-  Tree_Action(THEM->Surfaces,MaxNumSurface);
-  Tree_Action(THEM->EdgeLoops,MaxNumEdgeLoop);
-  Tree_Action(THEM->SurfaceLoops,MaxNumSurfaceLoop);
-  for(int i=0;i<List_Nbr(THEM->PhysicalGroups);i++){
-    List_Read( THEM->PhysicalGroups , i, &p);
-    MAXREG = IMAX(MAXREG,p->Num);
-  }
-  return MAXREG+1;
-}
-
-int NEWPOINT(void){
-  MAXPOINT = 0;
-  Tree_Action(THEM->Points,MaxNumPoint);
-  return MAXPOINT+1;
-}
-
 Vertex *FindPoint(int inum, Mesh *M){
   Vertex  C,*pc;
   pc = &C;
@@ -493,10 +505,8 @@ void CopyVertex (Vertex *v, Vertex *vv){
 
 Vertex *DuplicateVertex (Vertex *v){
   Vertex *pv;
-  pv = Create_Vertex(MAXPOINT++,0,0,0,0,0);
-  
+  pv = Create_Vertex(NEWPOINT(),0,0,0,0,0);
   CopyVertex (v,pv);
-  CurrentNodeNumber = (CurrentNodeNumber>pv->Num)?CurrentNodeNumber:pv->Num;
   Tree_Insert(THEM->Points,&pv);
   return pv;
 }
@@ -525,7 +535,7 @@ void CopyCurve (Curve *c, Curve *cc){
 Curve *DuplicateCurve (Curve *c){
   Curve *pc;
   Vertex *v,*newv;
-  pc = Create_Curve(MAXREG++,0,1,NULL,NULL,-1,-1,0.,1.);
+  pc = Create_Curve(NEWLINE(),0,1,NULL,NULL,-1,-1,0.,1.);
   CopyCurve(c,pc);
   for(int i=0;i<List_Nbr(c->Control_Points);i++){
     List_Read(pc->Control_Points,i,&v);
@@ -565,13 +575,13 @@ void CopySurface (Surface *s, Surface *ss){
   Tree_Insert(THEM->Surfaces,&ss);
 }
 
-Surface *DuplicateSurface (Surface *s, int addthesurf){
+Surface *DuplicateSurface (Surface *s){
   Surface *ps;
   Curve *c,*newc;
   Vertex *v,*newv;
   int i;
 
-  ps = Create_Surface(addthesurf?MAXREG++:-MAXREG,0,0);
+  ps = Create_Surface(NEWSURFACE(),0,0);
   CopySurface(s,ps);
   for(i=0;i<List_Nbr(ps->Generatrices);i++){
     List_Read(ps->Generatrices,i,&c);
@@ -731,61 +741,6 @@ void SetRotationMatrix( double matrix[4][4],double Axe[3], double alpha){
   matrix[3][3] = 1.0;
 }
 
-void SetRotationMatrixs(double matrix[4][4],double Axe[3], double alpha){
-  double phi,C,S,C2,S2;
-  double teta;
-  double a,b,c,d,e,f,g,h,ii;
-  double Ax=Axe[0],Ay=Axe[1],Az=Axe[2];
-  if(Ax != 0.0){
-    phi = atan2(Ay,Ax);
-    teta = atan2(Az,myhypot(Ax,Ay));
-    C = cos(phi);
-    S = sin(phi);
-    C2= cos(teta);
-    S2= sin(teta);
-  }
-  else if(Ay != 0.0){
-    teta = atan2(Az,myhypot(Ax,Ay));
-    C = 0.0;
-    S = 1.0;
-    C2= cos(teta);
-    S2= sin(teta);
-  }
-  else{
-    C = 1.0;
-    S = 0.0;
-    C2= 0.0;
-    S2= 1.0;
-  }
-
-  a = C2*C;
-  b = -C2*S;
-  c = S2;
-  d = cos(alpha)*S + sin(alpha)*S2*C;
-  e = cos(alpha)*C - sin(alpha)*S*S2;
-  f = -sin(alpha)*C2;
-  g = sin(alpha)*S - cos(alpha)*S2*C;
-  h = sin(alpha)*C + cos(alpha)*S*S2;
-  ii=cos(alpha)*C2;
-
-  matrix[0][0] = a*a + S*d -C*S2*g;
-  matrix[0][1] = a*b+S*e-C*S2*h;
-  matrix[0][2] = a*c+S*f-C*S2*ii;
-  matrix[0][3] = 0.0;
-  matrix[1][0] = -S*C2*a+C*d+S*S2*g;
-  matrix[1][1] = -S*C2*b+C*e+S*S2*h;
-  matrix[1][2] = -S*C2*c+C*f+S*S2*ii;
-  matrix[1][3] = 0.0;
-  matrix[2][0] = S2*a+C2*g;
-  matrix[2][1] = S2*b+C2*h;
-  matrix[2][2] = S2*c+C2*ii;
-  matrix[2][3] = 0.0;
-  matrix[3][0] = 0.;
-  matrix[3][1] = 0.;
-  matrix[3][2] = 0.;
-  matrix[3][3] = 1.0;
-}
-
 void ApplyTransformationToCurve (double matrix[4][4],Curve *c){
   Vertex *v;
   
@@ -809,18 +764,6 @@ void printCurve(Curve *c){
   }
 }
 
-void printSurface(Surface*s){
-  Curve *c;
-  int N = List_Nbr(s->Generatrices);
-
-  Msg(DEBUG,"Surface %d, %d generatrices",s->Num,N);
-  for(int i=0;i<N;i++){
-    List_Read(s->Generatrices,i,&c);
-    printCurve(c);
-  }
-}
-
-
 void ApplyTransformationToSurface (double matrix[4][4],Surface *s){
   Curve *c;
   Vertex *v;
@@ -837,6 +780,16 @@ void ApplyTransformationToSurface (double matrix[4][4],Surface *s){
   End_Surface(s);
 }
 
+void printSurface(Surface*s){
+  Curve *c;
+  int N = List_Nbr(s->Generatrices);
+
+  Msg(DEBUG,"Surface %d, %d generatrices",s->Num,N);
+  for(int i=0;i<N;i++){
+    List_Read(s->Generatrices,i,&c);
+    printCurve(c);
+  }
+}
 
 void ProtudeXYZ ( double &x, double &y, double &z, ExtrudeParams *e){
   double matrix[4][4];
@@ -868,9 +821,6 @@ void Extrude_ProtudePoint(int ep, int ip, double A, double B, double C,
   Vertex V,*pv, *chapeau;
   Curve *c;
   
-  MAXREG = NEWREG();
-  MAXPOINT = NEWPOINT();
-  
   pv= &V;
   pv->Num = ip;
   *pc = *prc = NULL;
@@ -905,7 +855,7 @@ void Extrude_ProtudePoint(int ep, int ip, double A, double B, double C,
 
   if(!comparePosition(&pv,&chapeau)) return ;
 
-  c = Create_Curve(MAXREG++,(ep)?MSH_SEGM_LINE:MSH_SEGM_CIRC,1,NULL,NULL,-1,-1,0.,1.);
+  c = Create_Curve(NEWLINE(),(ep)?MSH_SEGM_LINE:MSH_SEGM_CIRC,1,NULL,NULL,-1,-1,0.,1.);
   c->Control_Points = List_Create((ep)?2:3,1,sizeof(Vertex*));
 
   // je me souviens
@@ -953,9 +903,6 @@ Surface *Extrude_ProtudeCurve(int ep, int ic,
   Curve *pc, *revpc, *chapeau;
   Surface *s;
   
-  MAXREG = NEWREG();
-  MAXPOINT = NEWPOINT();
-  
   pc    = FindCurve(ic,THEM);
   revpc = FindCurve(-ic,THEM);
   
@@ -1000,9 +947,9 @@ Surface *Extrude_ProtudeCurve(int ep, int ic,
   if(!CurveBeg && !CurveEnd) return NULL;
 
   if(!CurveBeg || !CurveEnd)
-    s = Create_Surface(MAXREG++,MSH_SURF_TRIC,0);
+    s = Create_Surface(NEWSURFACE(),MSH_SURF_TRIC,0);
   else
-    s = Create_Surface(MAXREG++,MSH_SURF_REGL,0);
+    s = Create_Surface(NEWSURFACE(),MSH_SURF_REGL,0);
 
   s->Generatrices = List_Create(4,1,sizeof(Curve*));
   
@@ -1051,20 +998,8 @@ void Extrude_ProtudeSurface(int ep, int is,
   if(!(ps = FindSurface(is,THEM)) )return;
 
   Msg(DEBUG, "Extrude Surface %d", is);
-  
-  if(NewVolume){
-    pv = Create_Volume(NewVolume,0,0);
-    pv->Extrude = new ExtrudeParams;
-    pv->Extrude->fill(ep,A,B,C,X,Y,Z,alpha);
-    pv->Extrude->geo.Source = is;
-    if(e)pv->Extrude->mesh = e->mesh;
-    if(pv)List_Add(pv->Surfaces,&ps);
-  }
-  
-  MAXREG = NEWREG();
-  MAXPOINT = NEWPOINT();
-  
-  chapeau = DuplicateSurface(ps,1);
+
+  chapeau = DuplicateSurface(ps);
   chapeau->Extrude = new ExtrudeParams(COPIED_ENTITY);
   chapeau->Extrude->fill(ep,A,B,C,X,Y,Z,alpha);
   chapeau->Extrude->geo.Source = ps->Num;
@@ -1085,6 +1020,17 @@ void Extrude_ProtudeSurface(int ep, int is,
     if(e)c->Extrude->mesh = e->mesh;
   }
   
+  if(NewVolume){
+    pv = Create_Volume(NewVolume,0,0);
+    //if(CTX.geom.old_newreg){//dirty compatibility trick...
+      //THEM->MaxVolumeNum--;
+    //}
+    pv->Extrude = new ExtrudeParams;
+    pv->Extrude->fill(ep,A,B,C,X,Y,Z,alpha);
+    pv->Extrude->geo.Source = is;
+    if(e)pv->Extrude->mesh = e->mesh;
+    if(pv)List_Add(pv->Surfaces,&ps);
+  }
   if(pv)List_Add(pv->Surfaces,&chapeau);
 
   // filling extrude params
@@ -1118,19 +1064,22 @@ void Extrude_ProtudeSurface(int ep, int is,
     List_Reset(ListOfTransformedPoints);
   }
   Tree_Suppress(THEM->Surfaces,&chapeau);
-  chapeau->Num = NEWREG();
+
+  chapeau->Num = NEWSURFACE();
+  THEM->MaxSurfaceNum = chapeau->Num;
+
   Tree_Add(THEM->Surfaces,&chapeau);
   
   if(pv)Tree_Add(THEM->Volumes,&pv);
   
   if(CTX.geom.auto_coherence) ReplaceAllDuplicates ( THEM );
   List_Reset(ListOfTransformedPoints);
-  
+
 }
 
 void DivideCurve (Curve *c , double u, Vertex *v, Curve **c1, Curve **c2){
-  (*c1) = Create_Curve(MAXREG++,c->Typ,1,NULL,NULL,-1,-1,0.,1.);
-  (*c2) = Create_Curve(MAXREG++,c->Typ,1,NULL,NULL,-1,-1,0.,1.);
+  (*c1) = Create_Curve(NEWLINE(),c->Typ,1,NULL,NULL,-1,-1,0.,1.);
+  (*c2) = Create_Curve(NEWLINE(),c->Typ,1,NULL,NULL,-1,-1,0.,1.);
   CopyCurve(c,*c1);
   CopyCurve(c,*c2);
   (*c1)->uend = u;
@@ -1144,7 +1093,6 @@ bool IntersectCurves (Curve *c1, Curve *c2,
                       Curve **c21, Curve **c22, Vertex **v){
   float x[3];
   Vertex v1,v2;
-  Vertex V,*pv;
   int check;
   
   if(!compareVertex(&c1->beg,&c2->beg))return false;
@@ -1164,10 +1112,8 @@ bool IntersectCurves (Curve *c1, Curve *c2,
   if(x[2] <= c2->ubeg)return false;
   if(x[2] >= c2->uend)return false;
   if(fabs(v1.Pos.Z - v2.Pos.Z) > 1.e-06 * CTX.lc)return false;
-  pv = &V;
-  pv->Num = MAXPOINT++;
-  Cdbpts101(pv->Num,v1.Pos.X,v1.Pos.Y,v1.Pos.Z,v1.lc,x[1]);
-  v = (Vertex**)Tree_PQuery(THEM->Points,&pv);
+  *v = Create_Vertex(NEWPOINT(), v1.Pos.X,v1.Pos.Y,v1.Pos.Z,v1.lc,x[1]);
+  Tree_Insert(THEM->Points,v);
   DivideCurve(c1,x[1],*v,c11,c12);
   DivideCurve(c2,x[2],*v,c21,c22);
   return true;
@@ -1371,7 +1317,6 @@ void ReplaceAllDuplicates ( Mesh *m ){
       List_Write(s->Generatrices,j,
                  Tree_PQuery( allNonDulpicatedCurves,
                               List_Pointer(s->Generatrices,j)));
-
       // Arghhh. Revoir compareTwoCurves !
       End_Curve(*(Curve**)List_Pointer(s->Generatrices,j));
     }
@@ -1525,9 +1470,6 @@ void CopyShape(int Type, int Num, int *New){
   Curve *c, *newc;
   Vertex *v,*newv;
   
-  MAXREG = NEWREG();
-  MAXPOINT = NEWPOINT();
-
   switch(Type){
   case MSH_POINT:
     if(!(v = FindPoint(Num,THEM))){
@@ -1559,7 +1501,7 @@ void CopyShape(int Type, int Num, int *New){
       Msg(GERROR, "Unknown Surface %d", Num);
       return;
     }
-    news = DuplicateSurface(s,1);
+    news = DuplicateSurface(s);
     *New = news->Num;
     break;
   default:
diff --git a/Geo/CAD.h b/Geo/CAD.h
index 05ec3e9bf48f18b719624a23c110fe832db7e12f..3c0d502903fae370b465b137bef3bf18b61bc31f 100644
--- a/Geo/CAD.h
+++ b/Geo/CAD.h
@@ -3,8 +3,14 @@
 
 #include "Mesh.h"
 
-int NEWREG(void);
 int NEWPOINT(void);
+int NEWLINE(void);
+int NEWLINELOOP(void);
+int NEWSURFACE(void);
+int NEWSURFACELOOP(void);
+int NEWVOLUME(void);
+int NEWPHYSICAL(void);
+int NEWREG(void);
 
 Vertex *FindPoint(int inum, Mesh *M);
 Vertex *FindVertex(int inum, Mesh *M);
diff --git a/Geo/DataBase.cpp b/Geo/DataBase.cpp
index f8316ba966203cf6dc6701f3ba2520a3f7b5c43b..dbce637eb56518edfd41d3f954a5667fb30227bd 100644
--- a/Geo/DataBase.cpp
+++ b/Geo/DataBase.cpp
@@ -1,4 +1,4 @@
-// $Id: DataBase.cpp,v 1.16 2001-08-11 23:28:31 geuzaine Exp $
+// $Id: DataBase.cpp,v 1.17 2001-10-29 08:52:19 geuzaine Exp $
 
 #include "Gmsh.h"
 #include "Numeric.h"
@@ -9,16 +9,13 @@
 #include "Verif.h"
 #include "Context.h"
 
-
 extern Context_T  CTX ;
-extern int        CurrentNodeNumber;
 extern Mesh      *THEM;
 
 /* POINTS */
 
 void Cdbpts101(int ip, double x, double y, double z, double l, double w){
   Vertex *v;
-  CurrentNodeNumber = IMAX(CurrentNodeNumber, ip);
   v = Create_Vertex(ip,
 		    CTX.geom.scaling_factor*x,
 		    CTX.geom.scaling_factor*y,
@@ -327,7 +324,6 @@ void Cdbz101(int izon, int typzon,int o1, int o2, int nbu, int nbv,
     }
     printf("}\n");
     */
-
     Add_EdgeLoop(izon,templist,THEM);
   }
   else  if(typzon == MSH_VOLUME){
diff --git a/Geo/Geo.cpp b/Geo/Geo.cpp
index 74dd149932d5272aacba0ea3d1ea696bad70aa07..beafedeee0c25b92c09668ab5d6810f8c1e181c1 100644
--- a/Geo/Geo.cpp
+++ b/Geo/Geo.cpp
@@ -1,4 +1,4 @@
-// $Id: Geo.cpp,v 1.22 2001-08-12 14:24:50 geuzaine Exp $
+// $Id: Geo.cpp,v 1.23 2001-10-29 08:52:19 geuzaine Exp $
 
 #include "Gmsh.h"
 #include "Numeric.h"
@@ -12,8 +12,7 @@ extern Context_T CTX ;
 
 #define BUFFSIZE 32000
 
-// Ceci, c'est horrible. Des que Motif est completement zingle, je
-// vire et je refais une routine generique.
+// Ceci, c'est horrible. 
 
 char x_text[100]  = "0.0", y_text[100]  = "0.0", z_text[100]  = "0.0";
 char l_text[100] = "1.0" ;
@@ -216,21 +215,21 @@ void add_line(int p1, int p2, char *fich){
   }
   List_Delete(list);
   
-  sprintf(text,"Line(%d) = {%d,%d};",NEWREG(),p1,p2);
+  sprintf(text,"Line(%d) = {%d,%d};",NEWLINE(),p1,p2);
   add_infile(text,fich);
 }
 
 void add_circ(int p1, int p2, int p3, char *fich){
   char text[BUFFSIZE];
 
-  sprintf(text,"Circle(%d) = {%d,%d,%d};",NEWREG(),p1,p2,p3);
+  sprintf(text,"Circle(%d) = {%d,%d,%d};",NEWLINE(),p1,p2,p3);
   add_infile(text,fich);
 }
 
 void add_ell(int p1, int p2, int p3, int p4, char *fich){
   char text[BUFFSIZE];
 
-  sprintf(text,"Ellipsis(%d) = {%d,%d,%d,%d};",NEWREG(),p1,p2,p3,p4);
+  sprintf(text,"Ellipsis(%d) = {%d,%d,%d,%d};",NEWLINE(),p1,p2,p3,p4);
   add_infile(text,fich);
 }
 
@@ -239,7 +238,7 @@ void add_spline(int N, int *p, char *fich){
   char text2[BUFFSIZE];
   int i;
 
-  sprintf(text,"CatmullRom(%d) = {",NEWREG());
+  sprintf(text,"CatmullRom(%d) = {",NEWLINE());
   for(i=0;i<N;i++){
     if(i != N-1)
       sprintf(text2,"%d,",p[i]);
@@ -255,7 +254,7 @@ void add_bezier(int N, int *p, char *fich){
   char text2[BUFFSIZE];
   int i;
 
-  sprintf(text,"Bezier(%d) = {",NEWREG());
+  sprintf(text,"Bezier(%d) = {",NEWLINE());
   for(i=0;i<N;i++){
     if(i != N-1)
       sprintf(text2,"%d,",p[i]);
@@ -272,7 +271,7 @@ void add_bspline(int N, int *p, char *fich){
   char text2[BUFFSIZE];
   int i;
 
-  sprintf(text,"BSpline(%d) = {",NEWREG());
+  sprintf(text,"BSpline(%d) = {",NEWLINE());
   for(i=0;i<N;i++){
     if(i != N-1)
       sprintf(text2,"%d,",p[i]);
@@ -298,7 +297,7 @@ void add_multline(int N, int *p, char *fich){
   }
   List_Delete(list);
 
-  sprintf(text,"Line(%d) = {",NEWREG());
+  sprintf(text,"Line(%d) = {",NEWLINE());
   for(i=0;i<N;i++){
     if(i != N-1)
       sprintf(text2,"%d,",p[i]);
@@ -316,8 +315,8 @@ void add_loop(List_T *list, char *fich, int *numloop){
 
   if((recognize_loop(list,numloop))) return;
 
-  *numloop = NEWREG();
-  sprintf(text,"Line Loop(%d) = {",NEWREG());
+  *numloop = NEWLINELOOP();
+  sprintf(text,"Line Loop(%d) = {",*numloop);
   for(i=0;i<List_Nbr(list);i++){
       List_Read(list,i,&seg);
     if(i != List_Nbr(list)-1)
@@ -336,14 +335,14 @@ void add_surf(List_T *list, char *fich, int support, int typ){
   int i,seg;
 
   if(typ ==1){
-    sprintf(text,"Ruled Surface(%d) = {",NEWREG());
+    sprintf(text,"Ruled Surface(%d) = {",NEWSURFACE());
   }
   else if (typ == 2){
-    sprintf(text,"Plane Surface(%d) = {",NEWREG());
+    sprintf(text,"Plane Surface(%d) = {",NEWSURFACE());
   }
   else
   {
-    sprintf(text,"Trimmed Surface(%d) = %d {",NEWREG(),support);
+    sprintf(text,"Trimmed Surface(%d) = %d {",NEWSURFACE(),support);
   }
   for(i=0;i<List_Nbr(list);i++){
       List_Read(list,i,&seg);
@@ -363,7 +362,7 @@ void add_vol(List_T *list, char *fich, int *numvol){
 
   if((recognize_surfloop(list,numvol))) return;
 
-  *numvol = NEWREG();
+  *numvol = NEWSURFACELOOP();
   sprintf(text,"Surface Loop(%d) = {",*numvol);
   for(i=0;i<List_Nbr(list);i++){
     List_Read(list,i,&seg);
@@ -381,7 +380,7 @@ void add_multvol(List_T *list, char *fich){
   char text2[BUFFSIZE];
   int i,seg;
 
-  sprintf(text,"Volume(%d) = {",NEWREG());
+  sprintf(text,"Volume(%d) = {",NEWVOLUME());
   for(i=0;i<List_Nbr(list);i++){
     List_Read(list,i,&seg);
     if(i != List_Nbr(list)-1)
@@ -413,7 +412,7 @@ void add_physical(List_T *list, char *fich, int type, int *num){
   char text[BUFFSIZE], text2[BUFFSIZE];
   int  i, elementary_entity;
 
-  *num = NEWREG();
+  *num = NEWPHYSICAL();
   switch(type){
   case ENT_POINT : sprintf(text, "Physical Point(%d) = {", *num); break;
   case ENT_LINE : sprintf(text, "Physical Line(%d) = {", *num); break;
diff --git a/Geo/Makefile b/Geo/Makefile
index 69fc1322234b01356617f9a64003b3add98abbb8..d809e7ea2fda378a7abab5d306842920e5caf30a 100644
--- a/Geo/Makefile
+++ b/Geo/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.25 2001-08-20 08:25:23 geuzaine Exp $
+# $Id: Makefile,v 1.26 2001-10-29 08:52:19 geuzaine Exp $
 #
 # Makefile for "libGeo.a"
 #
@@ -12,7 +12,7 @@ RM      = rm
 
 LIB       = ../lib/libGeo.a
 INCLUDE   = -I../Common -I../DataStr -I../Geo -I../Mesh -I../Parser\
-            -I../Motif -I../Fltk
+            -I../Fltk
 
 OPT_FLAGS     = -g -Wall
 OS_FLAGS      = 
diff --git a/Graphics/Axes.cpp b/Graphics/Axes.cpp
index cba38f8fb282f10ae88ef5ad9401c1c37aa4c233..af76da96c064c68a4c642481e6258243f4124a4d 100644
--- a/Graphics/Axes.cpp
+++ b/Graphics/Axes.cpp
@@ -1,4 +1,4 @@
-// $Id: Axes.cpp,v 1.7 2001-09-25 10:12:26 geuzaine Exp $
+// $Id: Axes.cpp,v 1.8 2001-10-29 08:52:19 geuzaine Exp $
 
 #include "Gmsh.h"
 #include "GmshUI.h"
@@ -101,8 +101,16 @@ void Draw_SmallAxes(void){
 
   l  = 30  ;
   o  = 2  ;
-  cx = CTX.viewport[2] - 45;
-  cy = CTX.viewport[1] + 35;
+
+  if(CTX.small_axes_pos[0]>0)
+    cx = CTX.viewport[0] + CTX.small_axes_pos[0];
+  else
+    cx = CTX.viewport[2] + CTX.small_axes_pos[0];
+
+  if(CTX.small_axes_pos[1]>0)
+    cy = CTX.viewport[3] - CTX.small_axes_pos[1];    
+  else
+    cy = CTX.viewport[1] - CTX.small_axes_pos[1];    
 
   xx = l*CTX.rot[0][0] ; xy = l*CTX.rot[0][1] ;
   yx = l*CTX.rot[1][0] ; yy = l*CTX.rot[1][1] ;
diff --git a/Graphics/CreateFile.cpp b/Graphics/CreateFile.cpp
index e0e6ba6b5d1eeb9a029fac6500860df7a8188a69..5252103b4d00e8fd7414a43f49e319922a8b4479 100644
--- a/Graphics/CreateFile.cpp
+++ b/Graphics/CreateFile.cpp
@@ -1,4 +1,4 @@
-// $Id: CreateFile.cpp,v 1.20 2001-07-25 13:11:07 geuzaine Exp $
+// $Id: CreateFile.cpp,v 1.21 2001-10-29 08:52:19 geuzaine Exp $
 
 #include "Gmsh.h"
 #include "GmshUI.h"
@@ -10,15 +10,6 @@
 extern Context_T   CTX;
 extern Mesh        M;
 
-#ifdef _XMOTIF
-#include <unistd.h>
-#include "Widgets.h"
-#include "XContext.h"
-#include "XDump.h"
-extern Widgets_T   WID;
-extern XContext_T  XCTX;
-#endif
-
 #include "gl2ps.h"
 #include "gl2gif.h"
 #include "gl2jpeg.h"
@@ -38,11 +29,6 @@ void CreateOutputFile (char *name, int format) {
   char     ext[256];
   int      res, i;
 
-#ifdef _XMOTIF
-  FILE    *tmp;
-  char     cmd[1000], *tmpFileName="tmp.xwd";
-#endif
-
   if(!name || !strlen(name)) return;
 
   CTX.print.gl_fonts = 1;
@@ -90,19 +76,6 @@ void CreateOutputFile (char *name, int format) {
     Print_Mesh(&M, name, FORMAT_GREF); 
     break;
 
-#ifdef _XMOTIF
-  case FORMAT_XPM :
-    if(!(fp = fopen(name,"wb"))) {
-      Msg(WARNING, "Unable to open file '%s'", name); 
-      return;
-    }
-    Window_Dump(XCTX.display, XCTX.scrnum, XtWindow(WID.G.glw), fp);    
-    Msg(INFO, "XPM creation complete '%s'", name);
-    Msg(STATUS2, "Wrote '%s'", name);
-    fclose(fp);
-    break;
-#endif
-
   case FORMAT_JPEG :
     if(!(fp = fopen(name,"wb"))) {
       Msg(WARNING, "Unable to open file '%s'", name); 
@@ -164,58 +137,29 @@ void CreateOutputFile (char *name, int format) {
     break;
 
   case FORMAT_EPS :
-
-    switch(CTX.print.eps_quality){
-
-#ifdef _XMOTIF
-    case 0 : // Bitmap EPS
-      if(!(fp = fopen(name,"w"))) {
-	Msg(WARNING, "Unable to open file '%s'", name); 
-	return;
-      }
-      if(!(tmp = fopen(tmpFileName,"w"))){
-	Msg(WARNING, "Unable to open file '%s'", tmpFileName); 
-	return;
-      }
-      Window_Dump(XCTX.display, XCTX.scrnum, XtWindow(WID.G.glw), tmp);
-      fclose(tmp);
-      sprintf(cmd, "xpr -device ps -gray 4 %s >%s", tmpFileName, name);
-      Msg(INFO, "Executing '%s'", cmd);
-      system(cmd);
-      unlink(tmpFileName);
-      Msg(INFO, "Bitmap EPS creation complete '%s'", name);
-      Msg(STATUS2, "Wrote '%s'", name);
-      fclose(fp);
-      break;
-#endif
-      
-    default : // Vector EPS
-      if(!(fp = fopen(name,"w"))) {
-	Msg(WARNING, "Unable to open file '%s'", name); 
-	return;
-      }
-      CTX.print.gl_fonts = 0;
-      size3d = 0 ;
-      res = GL2PS_OVERFLOW ;
-      while(res == GL2PS_OVERFLOW){
-	size3d += 2048*2048 ;
-	gl2psBeginPage(CTX.base_filename, "Gmsh", 
-		       (CTX.print.eps_quality == 1 ? GL2PS_SIMPLE_SORT : GL2PS_BSP_SORT),
-		       GL2PS_SIMPLE_LINE_OFFSET | 
-		       (CTX.print.eps_background ? GL2PS_DRAW_BACKGROUND : 0),
-		       GL_RGBA, 0, NULL, size3d, fp);
-	CTX.stream = TO_FILE ;
-	FillBuffer();
-	CTX.stream = TO_SCREEN ;
-	res = gl2psEndPage();
-      }
-      Msg(INFO, "EPS creation complete '%s'", name);
-      Msg(STATUS2, "Wrote '%s'", name);
-      fclose(fp);
-      CTX.print.gl_fonts = 1;
-      break;
-      
+    if(!(fp = fopen(name,"w"))) {
+      Msg(WARNING, "Unable to open file '%s'", name); 
+      return;
+    }
+    CTX.print.gl_fonts = 0;
+    size3d = 0 ;
+    res = GL2PS_OVERFLOW ;
+    while(res == GL2PS_OVERFLOW){
+      size3d += 2048*2048 ;
+      gl2psBeginPage(CTX.base_filename, "Gmsh", 
+		     (CTX.print.eps_quality == 1 ? GL2PS_SIMPLE_SORT : GL2PS_BSP_SORT),
+		     GL2PS_SIMPLE_LINE_OFFSET | 
+		     (CTX.print.eps_background ? GL2PS_DRAW_BACKGROUND : 0),
+		     GL_RGBA, 0, NULL, size3d, fp);
+      CTX.stream = TO_FILE ;
+      FillBuffer();
+      CTX.stream = TO_SCREEN ;
+      res = gl2psEndPage();
     }
+    Msg(INFO, "EPS creation complete '%s'", name);
+    Msg(STATUS2, "Wrote '%s'", name);
+    fclose(fp);
+    CTX.print.gl_fonts = 1;
     break ;
     
   default :
diff --git a/Graphics/Draw.cpp b/Graphics/Draw.cpp
index d9b9b50cf8de8b953dec6f8d683d468813a11fc5..1854e84429866a15050c449ba56dc89b4ec309b7 100644
--- a/Graphics/Draw.cpp
+++ b/Graphics/Draw.cpp
@@ -1,4 +1,4 @@
-// $Id: Draw.cpp,v 1.26 2001-08-14 13:23:40 geuzaine Exp $
+// $Id: Draw.cpp,v 1.27 2001-10-29 08:52:19 geuzaine Exp $
 
 #include "Gmsh.h"
 #include "GmshUI.h"
@@ -67,6 +67,7 @@ void Draw2d(void){
   glLoadIdentity();
 
   glPushMatrix();
+  Draw_Graph2D();
   if(CTX.post.draw && CTX.post.scales) Draw_Scales();
   if(CTX.small_axes) Draw_SmallAxes();
   glPopMatrix();
diff --git a/Graphics/Draw.h b/Graphics/Draw.h
index c06258d3a7260365e912162eda3fab435988485a..d4dc8d8f4456ba52e32417c667bed3accca14f8a 100644
--- a/Graphics/Draw.h
+++ b/Graphics/Draw.h
@@ -49,6 +49,7 @@ void Draw_String(char *s);
 void Draw_Geom (Mesh *m);
 void Draw_Mesh(Mesh *M);
 void Draw_Post(void);
+void Draw_Graph2D(void);
 void Draw_Scales(void);
 void Draw_Axes (double s);
 void Draw_SmallAxes(void);
diff --git a/Graphics/Geom.cpp b/Graphics/Geom.cpp
index 294c182dc7c2cf31f9abc5c6e7c8d7ac8c7ad4eb..4e9131e65a0f4aaecc462977b9a19960bfe586b4 100644
--- a/Graphics/Geom.cpp
+++ b/Graphics/Geom.cpp
@@ -1,4 +1,4 @@
-// $Id: Geom.cpp,v 1.29 2001-09-25 08:20:50 geuzaine Exp $
+// $Id: Geom.cpp,v 1.30 2001-10-29 08:52:19 geuzaine Exp $
 
 #include "Gmsh.h"
 #include "GmshUI.h"
@@ -649,9 +649,6 @@ void BeginHighlight(void){
     Highlighted = 1;
     glPushMatrix();
     InitPosition();    
-#ifdef _XMOTIF
-    if(CTX.db) glDrawBuffer(GL_FRONT);
-#endif
   }
 }
 
@@ -663,9 +660,6 @@ void EndHighlight(int permanent){
   else{
     if(CTX.geom.highlight) {
       glPopMatrix();
-#ifdef _XMOTIF
-      if(CTX.db) glDrawBuffer(GL_BACK);
-#endif
     }
   }
 }
diff --git a/Graphics/Graph2D.cpp b/Graphics/Graph2D.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..17e803a6438040d208117826b3e07192fcc16178
--- /dev/null
+++ b/Graphics/Graph2D.cpp
@@ -0,0 +1,158 @@
+// $Id: Graph2D.cpp,v 1.1 2001-10-29 08:52:19 geuzaine Exp $
+
+#include "Gmsh.h"
+#include "GmshUI.h"
+#include "Context.h"
+#include "Numeric.h"
+#include "Mesh.h"
+#include "Draw.h"
+#include "Views.h"
+#include "gl2ps.h"
+
+extern Context_T   CTX;
+
+#define TIC 3
+
+void Draw_Graph2D(Post_View *v){
+  int font_h = gl_height() ; // hauteur totale de la fonte
+  int font_a = gl_height()-gl_descent() ; // hauteur de la fonte au dessus de pt de ref
+  char label[1024] ;
+  int i;
+  double dx, dy, dv;
+  double xtop = v->GraphPosition[0];
+  double ytop = CTX.viewport[3]-v->GraphPosition[1];
+  double ybot = ytop-v->GraphSize[1];
+  double ValMin, ValMax;
+
+  switch(v->RangeType){
+  case DRAW_POST_DEFAULT : ValMin = v->Min ; ValMax = v->Max ; break;
+  case DRAW_POST_CUSTOM  : ValMin = v->CustomMin ; ValMax = v->CustomMax ; break;
+  }
+
+  if(!v->TransparentScale){
+    glColor4ubv((GLubyte*)&CTX.color.bg);
+    glBegin(GL_QUADS);
+    glVertex2d(xtop,ytop);
+    glVertex2d(xtop+v->GraphSize[0],ytop);
+    glVertex2d(xtop+v->GraphSize[0],ybot);
+    glVertex2d(xtop,ybot);
+    glEnd();    
+  }
+  
+  if(v->ShowScale){
+    glPointSize(CTX.geom.point_size); 
+    gl2psPointSize(CTX.geom.point_size * CTX.print.eps_point_size_factor);
+
+    glLineWidth(CTX.geom.line_width); 
+    gl2psLineWidth(CTX.geom.line_width * CTX.print.eps_line_width_factor);
+
+    // 2 axes
+    glColor4ubv((GLubyte*)&CTX.color.fg);
+    glBegin(GL_LINE_STRIP);
+    glVertex2d(xtop,ytop);
+    glVertex2d(xtop,ytop-v->GraphSize[1]);
+    glVertex2d(xtop+v->GraphSize[0],ybot);
+    glEnd();
+
+    // y tics + labels
+    dy = v->GraphSize[1]/(double)v->NbIso;
+    dv = (ValMax-ValMin)/(double)v->NbIso;
+    for(i=0; i<v->NbIso+1; i++){
+      glBegin(GL_LINES);
+      glVertex2d(xtop,ytop-i*dy);
+      glVertex2d(xtop+TIC,ytop-i*dy);
+      glEnd();
+      sprintf(label, v->Format, ValMax-i*dv);
+      glRasterPos2d(xtop-gl_width(label)-TIC,ytop-i*dy-font_a/3.);
+      Draw_String(label);
+    }
+
+    if(v->GraphType==DRAW_POST_2D_SPACE && List_Nbr(v->Time)>1 && v->ShowTime)
+      sprintf(label, "%s (%g)", v->Name, *(double*)List_Pointer(v->Time,v->TimeStep));
+    else
+      sprintf(label, "%s", v->Name);
+    glRasterPos2d(xtop-gl_width(label)/2.,ytop+1.5*font_h);
+    Draw_String(label);
+
+    // x tics + labels
+    if(v->GraphType==DRAW_POST_2D_SPACE){
+      dx = v->GraphSize[0]/(double)v->NbIso;
+      for(i=0; i<v->NbIso+1; i++){
+	glBegin(GL_LINES);
+	glVertex2d(xtop+i*dx,ybot);
+	glVertex2d(xtop+i*dx,ybot+TIC);
+	glEnd();
+	sprintf(label, v->Format, 1.);
+	glRasterPos2d(xtop+i*dx-gl_width(label)/2.,ybot-1.5*font_h);
+	Draw_String(label);
+      }
+    }
+    else{
+      dx = v->GraphSize[0]/(double)v->NbTimeStep;
+      for(i=0; i<v->NbTimeStep; i++){
+	glBegin(GL_LINES);
+	glVertex2d(xtop+i*dx,ybot);
+	glVertex2d(xtop+i*dx,ybot+TIC);
+	glEnd();
+	sprintf(label, v->Format, *(double*)List_Pointer(v->Time,i));
+	glRasterPos2d(xtop+i*dx-gl_width(label)/2.,ybot-1.5*font_h);
+	Draw_String(label);
+      }
+    }
+  }
+
+
+  glPointSize(v->PointSize); 
+  gl2psPointSize(v->PointSize * CTX.print.eps_point_size_factor);
+
+  glLineWidth(v->LineWidth); 
+  gl2psLineWidth(v->LineWidth * CTX.print.eps_line_width_factor);
+
+  // curve
+  if(v->GraphType==DRAW_POST_2D_SPACE){
+    int nb = List_Nbr(v->SP) / v->NbSP ;
+    if(v->IntervalsType == DRAW_POST_ISO)
+      glBegin(GL_POINTS);
+    else
+      glBegin(GL_LINE_STRIP);
+    for(i=0; i<v->NbIso+1; i++){
+      double *V = (double*)List_Pointer_Fast(v->SP,i*nb+3);
+      double d = V[v->TimeStep];
+      if(v->SaturateValues){
+	if(d > ValMax) d = ValMax;
+	else if(d < ValMin) d = ValMin;
+      }
+      if(d>=ValMin && d<=ValMax){      
+	Palette2(v,ValMin,ValMax,d);
+	glVertex2d(xtop+i*dx,ybot+(d-ValMin)/(ValMax-ValMin)*v->GraphSize[1]);
+	if(v->IntervalsType == DRAW_POST_NUMERIC){
+	  glRasterPos2d(xtop+i*dx+2,ybot+(d-ValMin)/(ValMax-ValMin)*v->GraphSize[1]+2);
+	  sprintf(label, v->Format, d);
+	  Draw_String(label);
+	}
+      }
+    }
+    glEnd();
+  }
+  else{
+    
+    
+  }
+  
+}
+
+
+
+void Draw_Graph2D(void){
+  int i;
+  Post_View *v;
+
+  if(!CTX.post.list) return;
+
+  for(i=0;i<List_Nbr(CTX.post.list);i++){
+    v = (Post_View*)List_Pointer(CTX.post.list,i);
+    if(v->Visible && v->NbSP && v->GraphType!=DRAW_POST_3D) Draw_Graph2D(v);
+  }
+
+}
+
diff --git a/Graphics/Makefile b/Graphics/Makefile
index dd022b574d246af93630957e873966ac5b9f883a..7a19e07813e4093b490cb0d29274c2b951389e9b 100644
--- a/Graphics/Makefile
+++ b/Graphics/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.31 2001-08-20 08:25:23 geuzaine Exp $
+# $Id: Makefile,v 1.32 2001-10-29 08:52:19 geuzaine Exp $
 #
 # Makefile for "libGraphics.a"
 #
@@ -11,15 +11,15 @@ RANLIB   = ranlib
 RM       = rm
 LIB      = ../lib/libGraphics.a
 INCLUDE  = -I../Common -I../DataStr -I../Geo -I../Graphics\
-           -I../Motif -I../Fltk -I../Mesh -I../Parser -I../jpeg
+           -I../Fltk -I../Mesh -I../Parser -I../jpeg
 
 OPT_FLAGS     = -g -Wall
 OS_FLAGS      = -D_LITTLE_ENDIAN
-VERSION_FLAGS = -D_XMOTIF
+VERSION_FLAGS = 
 
 GL_INCLUDE    = -I$(HOME)/SOURCES/Mesa-3.1/include\
                 -I$(HOME)/SOURCES/Mesa-3.1/include/GL
-GUI_INCLUDE   = -I/usr/X11R6/LessTif/Motif1.2/include
+GUI_INCLUDE   = 
 
 RMFLAGS  = -f
 CFLAGS   = $(OPT_FLAGS) $(OS_FLAGS) $(VERSION_FLAGS) $(INCLUDE)\
@@ -33,9 +33,9 @@ SRC = Draw.cpp \
       IsoSimplex.cpp \
       Entity.cpp \
       Scale.cpp \
+      Graph2D.cpp \
       Axes.cpp \
       CreateFile.cpp \
-      XDump.cpp\
       gl2ps.cpp\
       gl2gif.cpp\
       gl2jpeg.cpp\
@@ -122,8 +122,7 @@ Scale.o: Scale.cpp ../Common/Gmsh.h ../Common/Message.h \
  ../DataStr/avl.h ../DataStr/Tools.h ../Common/GmshUI.h \
  ../Common/Numeric.h ../Mesh/Mesh.h ../Mesh/Vertex.h ../Mesh/Simplex.h \
  ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/Metric.h Draw.h \
- ../Common/Views.h ../Common/ColorTable.h ../Common/Context.h \
- ../Motif/XContext.h
+ ../Common/Views.h ../Common/ColorTable.h ../Common/Context.h
 Axes.o: Axes.cpp ../Common/Gmsh.h ../Common/Message.h \
  ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
  ../DataStr/avl.h ../DataStr/Tools.h ../Common/GmshUI.h \
@@ -136,9 +135,8 @@ CreateFile.o: CreateFile.cpp ../Common/Gmsh.h ../Common/Message.h \
  ../Mesh/Vertex.h ../Mesh/Simplex.h ../Mesh/Edge.h \
  ../Geo/ExtrudeParams.h ../Mesh/Metric.h ../Parser/OpenFile.h Draw.h \
  ../Common/Views.h ../Common/ColorTable.h ../Common/Context.h \
- ../Motif/Widgets.h ../Motif/XContext.h XDump.h gl2ps.h gl2gif.h \
+ gl2ps.h gl2gif.h \
  gl2jpeg.h gl2ppm.h gl2yuv.h
-XDump.o: XDump.cpp
 gl2ps.o: gl2ps.cpp ../Common/Gmsh.h ../Common/Message.h \
  ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
  ../DataStr/avl.h ../DataStr/Tools.h ../Common/GmshUI.h gl2ps.h
diff --git a/Graphics/Post.cpp b/Graphics/Post.cpp
index cd8cebab48b6c7cf777dd5012295bb8d56679be2..15cd4cc722d78894349cef16fc73da6b0056a542 100644
--- a/Graphics/Post.cpp
+++ b/Graphics/Post.cpp
@@ -1,4 +1,4 @@
-// $Id: Post.cpp,v 1.25 2001-09-26 08:28:12 geuzaine Exp $
+// $Id: Post.cpp,v 1.26 2001-10-29 08:52:19 geuzaine Exp $
 
 #include "Gmsh.h"
 #include "GmshUI.h"
@@ -97,8 +97,8 @@ void RaiseFill(int i, double Val, double ValMin, double Raise[3][5]){
 
 void Free_DisplayLists(void){
   Post_View     *v;
-  for(int iView=0 ; iView<List_Nbr(Post_ViewList) ; iView++){
-    v = (Post_View*)List_Pointer(Post_ViewList,iView);
+  for(int iView=0 ; iView<List_Nbr(CTX.post.list) ; iView++){
+    v = (Post_View*)List_Pointer(CTX.post.list,iView);
     if(glIsList(v->Num)) glDeleteLists(v->Num,1);
   }
 }
@@ -139,12 +139,12 @@ void Draw_Post (void) {
   double         ValMin,ValMax,AbsMax,X[4],Y[4],Z[4];
   Post_View     *v;
 
-  if(!Post_ViewList) return;
+  if(!CTX.post.list) return;
 
   if(!CTX.post.draw){ // draw only the bbox of the visible views
-    for(iView=0 ; iView<List_Nbr(Post_ViewList) ; iView++){
-      v = (Post_View*)List_Pointer(Post_ViewList,iView);
-      if(v->Visible){ 
+    for(iView=0 ; iView<List_Nbr(CTX.post.list) ; iView++){
+      v = (Post_View*)List_Pointer(CTX.post.list,iView);
+      if(v->Visible && v->GraphType==DRAW_POST_3D){ 
 	glColor4ubv((GLubyte*)&CTX.color.fg);
 	glBegin(GL_LINE_LOOP);
 	glVertex3d(v->BBox[0], v->BBox[2], v->BBox[4]);
@@ -173,9 +173,9 @@ void Draw_Post (void) {
     return;
   }
   
-  for(iView=0 ; iView<List_Nbr(Post_ViewList) ; iView++){
+  for(iView=0 ; iView<List_Nbr(CTX.post.list) ; iView++){
 
-    v = (Post_View*)List_Pointer(Post_ViewList,iView);
+    v = (Post_View*)List_Pointer(CTX.post.list,iView);
 
     if(v->Visible && !v->Dirty){ 
 
@@ -245,7 +245,7 @@ void Draw_Post (void) {
 
 	// Points
 
-	if(v->NbSP && v->DrawPoints && v->DrawScalars){
+	if(v->GraphType==DRAW_POST_3D && v->NbSP && v->DrawPoints && v->DrawScalars){
 	  nb = List_Nbr(v->SP) / v->NbSP ;
 	  for(i = 0 ; i < List_Nbr(v->SP) ; i+=nb){
 	    Get_Coords(1., v->Offset, 1, 
diff --git a/Graphics/Scale.cpp b/Graphics/Scale.cpp
index cdd30c6f41882a58a4b97bbb4f17cddefba1e4de..8acfd093c0af759523aee4a1bb9485f65fcc0bd3 100644
--- a/Graphics/Scale.cpp
+++ b/Graphics/Scale.cpp
@@ -1,4 +1,4 @@
-// $Id: Scale.cpp,v 1.22 2001-09-26 08:28:12 geuzaine Exp $
+// $Id: Scale.cpp,v 1.23 2001-10-29 08:52:20 geuzaine Exp $
 
 #include "Gmsh.h"
 #include "GmshUI.h"
@@ -11,17 +11,7 @@
 
 extern Context_T   CTX;
 
-#if _XMOTIF
-
-#include "XContext.h"
-extern XContext_T  XCTX;
-static int          dir,ascent, descent;
-static XCharStruct  overall;
-#define CHECK_W                                                                         \
-  XTextExtents(XCTX.xfont.helve, label, strlen(label), &dir,&ascent,&descent,&overall); \
-  if(overall.width > cv_w) cv_w=overall.width
-
-#elif _FLTK
+#if _FLTK
 static double overall ; 
 #define CHECK_W  overall=gl_width(label) ; if(overall > cv_w) cv_w=overall
 
@@ -51,8 +41,8 @@ void draw_scale(Post_View *v, double xmin, double ymin, double *width, double he
   char      label[1024] ;
   double    Val, ValMin, ValMax;
 
-  font_h  = CTX.gl_fontheight ;       /* hauteur totale de la fonte */
-  font_a  = CTX.gl_fontascent ;       /* hauteur de la fonte au dessus de pt de ref */
+  font_h  = gl_height() ;             /* hauteur totale de la fonte */
+  font_a  = gl_height()-gl_descent() ;/* hauteur de la fonte au dessus de pt de ref */
   label_h = 1.8*font_h ;              /* hauteur du label */
 
   cs_xmin = xmin ;                    /* colorscale xmin */
@@ -220,7 +210,7 @@ void Draw_Scales(void){
   double      oldwidth, totalwidth;
   Post_View  *v;
 
-  if(!Post_ViewList) return;
+  if(!CTX.post.list) return;
 
   /* scales to draw ? */
   
@@ -229,9 +219,9 @@ void Draw_Scales(void){
   else
     List_Reset(todraw);
 
-  for(i=0;i<List_Nbr(Post_ViewList);i++){
-    v = (Post_View*)List_Pointer(Post_ViewList,i);
-    if(v->Visible && v->ShowScale) List_Add(todraw,&v);
+  for(i=0;i<List_Nbr(CTX.post.list);i++){
+    v = (Post_View*)List_Pointer(CTX.post.list,i);
+    if(v->Visible && v->ShowScale && v->GraphType==DRAW_POST_3D) List_Add(todraw,&v);
   }
   
   if(!List_Nbr(todraw)){
diff --git a/Graphics/XDump.cpp b/Graphics/XDump.cpp
deleted file mode 100644
index 6a7e1c9795d6ed877fba7429439751f660a416c6..0000000000000000000000000000000000000000
--- a/Graphics/XDump.cpp
+++ /dev/null
@@ -1,458 +0,0 @@
-// $Id: XDump.cpp,v 1.5 2001-01-11 14:15:09 geuzaine Exp $
-
-/* This is a modified version for Gmsh (mainly for c++ compliance) */
-
-/* Dump the image in an X xindow to a .xwd file.
- * This code was extracted by Brian Paul from the xwd program which is
- * included with X11.  The OMIT preprocessor identifier denotes regions
- * of code I've had to omit.
- */
-
-/* from xwd.c: */
-
-/* $XConsortium: xwd.c,v 1.56 91/07/25 18:00:15 rws Exp $ */
-
-/* Copyright 1987 Massachusetts Institute of Technology */
-
-/*
- * xwd.c MIT Project Athena, X Window system window raster image dumper.
- *
- * This program will dump a raster image of the contents of a window into a 
- * file for output on graphics printers or for other uses.
- *
- *  Author:        Tony Della Fera, DEC
- *                17-Jun-85
- * 
- *  Modification history:
- *
- *  11/14/86 Bill Wyatt, Smithsonian Astrophysical Observatory
- *    - Removed Z format option, changing it to an XY option. Monochrome 
- *      windows will always dump in XY format. Color windows will dump
- *      in Z format by default, but can be dumped in XY format with the
- *      -xy option.
- *
- *  11/18/86 Bill Wyatt
- *    - VERSION 6 is same as version 5 for monchrome. For colors, the 
- *      appropriate number of Color structs are dumped after the header,
- *      which has the number of colors (=0 for monochrome) in place of the
- *      V5 padding at the end. Up to 16-bit displays are supported. I
- *      don't yet know how 24- to 32-bit displays will be handled under
- *      the Version 11 protocol.
- *
- *  6/15/87 David Krikorian, MIT Project Athena
- *    - VERSION 7 runs under the X Version 11 servers, while the previous
- *      versions of xwd were are for X Version 10.  This version is based
- *      on xwd version 6, and should eventually have the same color
- *      abilities. (Xwd V7 has yet to be tested on a color machine, so
- *      all color-related code is commented out until color support
- *      becomes practical.)
- */
-
-
-/*
- * The following XCOLOR struct is to be used in place of X's XColor
- * struct because on 32-bit systems, sizeof(XColor)=12 while on 64-bit
- * systems, sizeof(XColor)=16.  We MUST have an XColor struct of size
- * 12 so a correct file is written.  BEP July-21-95
- */
-
-#ifdef _XMOTIF
-
-typedef struct {
-        unsigned int /*long*/ pixel;
-        unsigned short red, green, blue;
-        char flags;  /* do_red, do_green, do_blue */
-        char pad;
-} XCOLOR;
-
-
-#include <assert.h>
-#include <X11/Xlib.h>
-#include <X11/Xmd.h>
-#include <X11/Xutil.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <X11/XWDFile.h>
-
-static Bool debug = False;
-static Bool nobdrs = False;
-static Bool on_root = False;
-static Bool use_installed = False;
-static long add_pixel_value = 0;
-static int format = ZPixmap;
-
-static Display *dpy;
-static char *program_name = "xdump";
-static int screen;
-
-typedef unsigned long Pixel;
-
-
-
-/*
- * outl: a debugging routine.  Flushes stdout then prints a message on stderr
- *       and flushes stderr.  Used to print messages when past certain points
- *       in code so we can tell where we are.  Outl may be invoked like
- *       printf with up to 7 arguments.
- */
-/* VARARGS1 */
-static void outl( char *msg )
-{
-        fflush(stdout);
-        fprintf(stderr, "%s\n", msg );
-        fflush(stderr);
-}
-
-
-/*
- * Standard fatal error routine - call like printf but maximum of 7 arguments.
- * Does not require dpy or screen defined.
- */
-/* VARARGS1 */
-static void Fatal_Error( char *msg )
-{
-        fflush(stdout);
-        fflush(stderr);
-        fprintf(stderr, "%s: error: %s\n", program_name, msg);
-        exit(1);
-}
-
-
-/*
- * Determine the pixmap size.
- */
-
-static int Image_Size( XImage *image )
-{
-    if (image->format != ZPixmap)
-      return(image->bytes_per_line * image->height * image->depth);
-
-    return(image->bytes_per_line * image->height);
-}
-
-
-
-#define lowbit(x) ((x) & (~(x) + 1))
-
-/*
- * Get the XColors of all pixels in image - returns # of colors
- */
-static int Get_XColors( XWindowAttributes *win_info, XColor **colors )
-{
-    int i, ncolors;
-    Colormap cmap = win_info->colormap;
-
-    if (use_installed)
-        /* assume the visual will be OK ... */
-        cmap = XListInstalledColormaps(dpy, win_info->root, &i)[0];
-    if (!cmap)
-        return(0);
-
-    ncolors = win_info->visual->map_entries;
-    if (!(*colors = (XColor *) malloc (sizeof(XColor) * ncolors)))
-      Fatal_Error("Out of memory!");
-
-#if defined(__cplusplus) || defined(c_plusplus)
-    if (win_info->visual->c_class == DirectColor ||
-        win_info->visual->c_class == TrueColor) {
-#else
-    if (win_info->visual->class == DirectColor ||
-        win_info->visual->class == TrueColor) {
-#endif
-
-        Pixel red, green, blue, red1, green1, blue1;
-
-        red = green = blue = 0;
-        red1 = lowbit(win_info->visual->red_mask);
-        green1 = lowbit(win_info->visual->green_mask);
-        blue1 = lowbit(win_info->visual->blue_mask);
-        for (i=0; i<ncolors; i++) {
-          (*colors)[i].pixel = red|green|blue;
-          (*colors)[i].pad = 0;
-          red += red1;
-          if (red > win_info->visual->red_mask)
-            red = 0;
-          green += green1;
-          if (green > win_info->visual->green_mask)
-            green = 0;
-          blue += blue1;
-          if (blue > win_info->visual->blue_mask)
-            blue = 0;
-        }
-    } else {
-        for (i=0; i<ncolors; i++) {
-          (*colors)[i].pixel = i;
-          (*colors)[i].pad = 0;
-        }
-    }
-
-    XQueryColors(dpy, cmap, *colors, ncolors);
-    
-    return(ncolors);
-}
-
-
-
-static void _swapshort( char *bp, unsigned n )
-{
-    register char c;
-    register char *ep = bp + n;
-
-    while (bp < ep) {
-        c = *bp;
-        *bp = *(bp + 1);
-        bp++;
-        *bp++ = c;
-    }
-}
-
-static void _swaplong ( char *bp, unsigned n )
-{
-    register char c;
-    register char *ep = bp + n;
-    register char *sp;
-
-    while (bp < ep) {
-        sp = bp + 3;
-        c = *sp;
-        *sp = *bp;
-        *bp++ = c;
-        sp = bp + 1;
-        c = *sp;
-        *sp = *bp;
-        *bp++ = c;
-        bp += 2;
-    }
-}
-
-
-
-
-
-
-/*
- * Window_Dump: dump a window to a file which must already be open for
- *              writting.
- */
-
-
-void Window_Dump(Display *display, int scr, Window window, FILE *out){
-    unsigned long swaptest = 1;
-    XColor *colors;
-    unsigned buffer_size;
-    int win_name_size;
-    int header_size;
-    int ncolors, i;
-    char *win_name;
-    Bool got_win_name;
-    XWindowAttributes win_info;
-    XImage *image;
-    int absx, absy, x, y;
-    int width, height; /* unsigned */
-    int dwidth, dheight;
-    int bw;
-    Window dummywin;
-    XWDFileHeader header;
-
-    dpy = display;
-    screen = scr;
-
-    /*
-     * Inform the user not to alter the screen.
-     */
-#ifdef OMIT
-    Beep();
-#endif
-
-    /*
-     * Get the parameters of the window being dumped.
-     */
-    if (debug) outl("xwd: Getting target window information.\n");
-    if(!XGetWindowAttributes(dpy, window, &win_info)) 
-      Fatal_Error("Can't get target window attributes.");
-
-    /* handle any frame window */
-    if (!XTranslateCoordinates (dpy, window, RootWindow (dpy, screen), 0, 0,
-                                &absx, &absy, &dummywin)) {
-        fprintf (stderr, 
-                 "%s:  unable to translate window coordinates (%d,%d)\n",
-                 program_name, absx, absy);
-        exit (1);
-    }
-    win_info.x = absx;
-    win_info.y = absy;
-    width = win_info.width;
-    height = win_info.height;
-    bw = 0;
-
-    if (!nobdrs) {
-        absx -= win_info.border_width;
-        absy -= win_info.border_width;
-        bw = win_info.border_width;
-        width += (2 * bw);
-        height += (2 * bw);
-    }
-    dwidth = DisplayWidth (dpy, screen);
-    dheight = DisplayHeight (dpy, screen);
-
-
-    /* clip to window */
-    if (absx < 0) width += absx, absx = 0;
-    if (absy < 0) height += absy, absy = 0;
-    if (absx + width > dwidth) width = dwidth - absx;
-    if (absy + height > dheight) height = dheight - absy;
-
-    XFetchName(dpy, window, &win_name);
-    if (!win_name || !win_name[0]) {
-        win_name = "xwdump";
-        got_win_name = False;
-    } else {
-        got_win_name = True;
-    }
-
-    /* sizeof(char) is included for the null string terminator. */
-    win_name_size = strlen(win_name) + sizeof(char);
-
-    /*
-     * Snarf the pixmap with XGetImage.
-     */
-
-    x = absx - win_info.x;
-    y = absy - win_info.y;
-    if (on_root)
-        image = XGetImage (dpy, RootWindow(dpy, screen), absx, absy, width, height, AllPlanes, format);
-    else
-        image = XGetImage (dpy, window, x, y, width, height, AllPlanes, format);
-    if (!image) {
-        fprintf (stderr, "%s:  unable to get image at %dx%d+%d+%d\n",
-                 program_name, width, height, x, y);
-        exit (1);
-    }
-
-    if (add_pixel_value != 0) XAddPixel (image, add_pixel_value);
-
-    /*
-     * Determine the pixmap size.
-     */
-    buffer_size = Image_Size(image);
-
-    if (debug) outl("xwd: Getting Colors.\n");
-
-    ncolors = Get_XColors(&win_info, &colors);
-
-    /*
-     * Inform the user that the image has been retrieved.
-     */
-#ifdef OMIT
-    XBell(dpy, FEEP_VOLUME);
-    XBell(dpy, FEEP_VOLUME);
-#endif
-    XFlush(dpy);
-
-    /*
-     * Calculate header size.
-     */
-    if (debug) outl("xwd: Calculating header size.\n");
-    header_size = sizeof(header) + win_name_size;
-
-    /*
-     * Write out header information.
-     */
-    if (debug) outl("xwd: Constructing and dumping file header.\n");
-    header.header_size = (CARD32) header_size;
-    header.file_version = (CARD32) XWD_FILE_VERSION;
-    header.pixmap_format = (CARD32) format;
-    header.pixmap_depth = (CARD32) image->depth;
-    header.pixmap_width = (CARD32) image->width;
-    header.pixmap_height = (CARD32) image->height;
-    header.xoffset = (CARD32) image->xoffset;
-    header.byte_order = (CARD32) image->byte_order;
-    header.bitmap_unit = (CARD32) image->bitmap_unit;
-    header.bitmap_bit_order = (CARD32) image->bitmap_bit_order;
-    header.bitmap_pad = (CARD32) image->bitmap_pad;
-    header.bits_per_pixel = (CARD32) image->bits_per_pixel;
-    header.bytes_per_line = (CARD32) image->bytes_per_line;
-#if defined(__cplusplus) || defined(c_plusplus)
-    header.visual_class = (CARD32) win_info.visual->c_class;
-#else
-    header.visual_class = (CARD32) win_info.visual->class;
-#endif
-    header.red_mask = (CARD32) win_info.visual->red_mask;
-    header.green_mask = (CARD32) win_info.visual->green_mask;
-    header.blue_mask = (CARD32) win_info.visual->blue_mask;
-    header.bits_per_rgb = (CARD32) win_info.visual->bits_per_rgb;
-    header.colormap_entries = (CARD32) win_info.visual->map_entries;
-    header.ncolors = ncolors;
-    header.window_width = (CARD32) win_info.width;
-    header.window_height = (CARD32) win_info.height;
-    header.window_x = absx;
-    header.window_y = absy;
-    header.window_bdrwidth = (CARD32) win_info.border_width;
-
-    if (*(char *) &swaptest) {
-        _swaplong((char *) &header, sizeof(header));
-        for (i = 0; i < ncolors; i++) {
-            _swaplong((char *) &colors[i].pixel, sizeof(long));
-            _swapshort((char *) &colors[i].red, 3 * sizeof(short));
-         }
-    }
-
-    (void) fwrite((char *)&header, sizeof(header), 1, out);
-    (void) fwrite(win_name, win_name_size, 1, out);
-
-    /*
-     * Write out the color maps, if any
-     */
-
-    /*if (debug) outl("xwd: Dumping %d colors.\n", ncolors);*/
-    for (i=0;i<ncolors;i++) {
-       XCOLOR xc;
-       assert( sizeof(xc)==12 );
-       xc.pixel = colors[i].pixel;
-       xc.red   = colors[i].red;
-       xc.green = colors[i].green;
-       xc.blue  = colors[i].blue;
-       xc.flags = colors[i].flags;
-       xc.pad   = colors[i].pad;
-       (void) fwrite( (char *) &xc, sizeof(XCOLOR), 1, out );
-    } 
-/* OLD:
-    (void) fwrite((char *) colors, sizeof(XColor), ncolors, out);
-*/
-
-    /*
-     * Write out the buffer.
-     */
-    /*if (debug) outl("xwd: Dumping pixmap.  bufsize=%d\n",buffer_size);*/
-
-    /*
-     *    This copying of the bit stream (data) to a file is to be replaced
-     *  by an Xlib call which hasn't been written yet.  It is not clear
-     *  what other functions of xwd will be taken over by this (as yet)
-     *  non-existant X function.
-     */
-    (void) fwrite(image->data, (int) buffer_size, 1, out);
-
-    /*
-     * free the color buffer.
-     */
-
-    if(debug && ncolors > 0) outl("xwd: Freeing colors.\n");
-    if(ncolors > 0) free(colors);
-
-    /*
-     * Free window name string.
-     */
-    if (debug) outl("xwd: Freeing window name string.\n");
-    if (got_win_name) XFree(win_name);
-
-    /*
-     * Free image
-     */
-    XDestroyImage(image);
-}
-
-#endif //_XMOTIF
-
-
diff --git a/Graphics/XDump.h b/Graphics/XDump.h
deleted file mode 100644
index 981d0be2b0da033f15a9b0ed528f686526b1336c..0000000000000000000000000000000000000000
--- a/Graphics/XDump.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _XDUMP_H_
-#define _XDUMP_H_
-
-void Window_Dump(Display *display, int scr, Window window, FILE *out);
-
-#endif
diff --git a/Makefile b/Makefile
index 2bede61c24712f57720523f6c04bb794ecdde86d..9ac2412de07ca3f1f7f1b80fd97e8790aea59222 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.157 2001-10-10 11:15:38 geuzaine Exp $
+# $Id: Makefile,v 1.158 2001-10-29 08:52:19 geuzaine Exp $
 
 GMSH_RELEASE = 1.27
 
@@ -19,7 +19,7 @@ X11_LIB = -lX11
 GMSH_COMMON_DIR = Adapt Common DataStr Geo Mesh Parallel Parser Plugin Triangle
 GMSH_BOX_DIR =$(GMSH_COMMON_DIR) Box
 GMSH_FLTK_DIR = $(GMSH_COMMON_DIR) Graphics Fltk jpeg
-GMSH_DIR = $(GMSH_COMMON_DIR) Box Graphics Motif Fltk jpeg utils
+GMSH_DIR = $(GMSH_COMMON_DIR) Box Graphics Fltk jpeg utils
 GMSH_BIN_DIR = bin
 GMSH_LIB_DIR = lib
 GMSH_DOC_DIR = doc
diff --git a/Mesh/1D_Mesh.cpp b/Mesh/1D_Mesh.cpp
index 024c4780983d52c95ec66ee02c1d6811cedde6e7..83b0b4cd45842ea3941104132fd74064b590365a 100644
--- a/Mesh/1D_Mesh.cpp
+++ b/Mesh/1D_Mesh.cpp
@@ -1,4 +1,4 @@
-// $Id: 1D_Mesh.cpp,v 1.22 2001-10-09 14:41:06 geuzaine Exp $
+// $Id: 1D_Mesh.cpp,v 1.23 2001-10-29 08:52:20 geuzaine Exp $
 
 #include "Gmsh.h"
 #include "Numeric.h"
@@ -10,7 +10,6 @@
 
 extern Mesh      *THEM;
 extern Context_T  CTX;
-extern int        CurrentNodeNumber;
 
 Curve *THEC;
 
@@ -179,8 +178,7 @@ void Maillage_Curve (void *data, void *dummy){
         dp = P2.p - P1.p;
         t = P1.t + dt / dp * (d - P1.p);
         V = InterpolateCurve (c, t, 0);
-        pV = Create_Vertex (++CurrentNodeNumber, 
-                            V.Pos.X, V.Pos.Y, V.Pos.Z, V.lc, t);
+        pV = Create_Vertex (++THEM->MaxPointNum, V.Pos.X, V.Pos.Y, V.Pos.Z, V.lc, t);
         pV->w = V.w;
         pV->ListCurves = List_Create (1, 1, sizeof (Curve *));
         List_Add (pV->ListCurves, &c);
diff --git a/Mesh/2D_Elliptic.cpp b/Mesh/2D_Elliptic.cpp
index 57bcdeca76aa35fff40721a0e395bc24a7c4e6dc..d23c0777e2206728357c0a09a49a8a357bb84130 100644
--- a/Mesh/2D_Elliptic.cpp
+++ b/Mesh/2D_Elliptic.cpp
@@ -1,4 +1,4 @@
-// $Id: 2D_Elliptic.cpp,v 1.7 2001-08-11 23:28:32 geuzaine Exp $
+// $Id: 2D_Elliptic.cpp,v 1.8 2001-10-29 08:52:20 geuzaine Exp $
 
 #include "Gmsh.h"
 #include "Numeric.h"
@@ -7,7 +7,6 @@
 #include "Mesh.h"
 
 extern Mesh *THEM;
-extern int CurrentNodeNumber;
 
 int MeshEllipticSurface (Surface * sur){
 
@@ -158,7 +157,7 @@ int MeshEllipticSurface (Surface * sur){
                      (S[2]->lc * (1 - u) * (1. - v)) +
                      (S[3]->lc * (1 + u) * (1. - v)));
         
-        list[i + N1 * j] = Create_Vertex (++CurrentNodeNumber, x, y, z, lc, 0.0);
+        list[i + N1 * j] = Create_Vertex (++THEM->MaxPointNum, x, y, z, lc, 0.0);
       }
     }
   }
diff --git a/Mesh/2D_Mesh.cpp b/Mesh/2D_Mesh.cpp
index 85ed6f432a85b52b33bb8db2dac618c5d2100a88..69e2d25cf2364a0f8c3a9cd81861e13d2f6c7af2 100644
--- a/Mesh/2D_Mesh.cpp
+++ b/Mesh/2D_Mesh.cpp
@@ -1,4 +1,4 @@
-// $Id: 2D_Mesh.cpp,v 1.36 2001-10-03 06:59:37 geuzaine Exp $
+// $Id: 2D_Mesh.cpp,v 1.37 2001-10-29 08:52:20 geuzaine Exp $
 
 /*
    Maillage Delaunay d'une surface (Point insertion Technique)
@@ -27,7 +27,6 @@
 
 extern Mesh       *THEM;
 extern Context_T   CTX;
-extern int         CurrentNodeNumber;
 
 PointRecord   *gPointArray;
 DocRecord     *BGMESH, *FGMESH;
@@ -715,7 +714,7 @@ void Maillage_Automatique_VieuxCode (Surface * pS, Mesh * m, int ori){
 
   for (i = 0; i < M.numpoints; i++){
     if (gPointArray[i].initial < 0){
-      gPointArray[i].initial = ++CurrentNodeNumber;
+      gPointArray[i].initial = ++THEM->MaxPointNum;
       v = Create_Vertex (gPointArray[i].initial, gPointArray[i].where.h,
                          gPointArray[i].where.v, 0.0, gPointArray[i].quality, 0.0);
       if (!Tree_Search (pS->Vertices, &v))
diff --git a/Mesh/2D_Mesh_Aniso.cpp b/Mesh/2D_Mesh_Aniso.cpp
index e30d4a5b28b9f65d91c37b3dc521ac512627c261..96274405dad724bbf84ff243ad46483eae54e645 100644
--- a/Mesh/2D_Mesh_Aniso.cpp
+++ b/Mesh/2D_Mesh_Aniso.cpp
@@ -1,4 +1,4 @@
-// $Id: 2D_Mesh_Aniso.cpp,v 1.21 2001-08-28 22:15:15 geuzaine Exp $
+// $Id: 2D_Mesh_Aniso.cpp,v 1.22 2001-10-29 08:52:20 geuzaine Exp $
 
 /*
    Jean-Francois Remacle
@@ -33,7 +33,6 @@ MeshParameters:: MeshParameters ():
 
 extern Simplex MyNewBoundary;
 extern Mesh *THEM;
-extern int CurrentNodeNumber;
 extern double MAXIMUM_LC_FOR_SURFACE;
 extern int Alerte_Point_Scabreux;
 extern PointRecord *gPointArray;
@@ -212,7 +211,7 @@ void Box_2_Triangles (List_T * P, Surface * s){
     
     V[i].Freeze.Z = V[i].Pos.Z = 0.0;
     
-    V[i].Num = -(++CurrentNodeNumber);
+    V[i].Num = -(++THEM->MaxPointNum);
     V[i].ListSurf = NULL;
     pv = &V[i];
     pv->lc = 1.0;
@@ -867,14 +866,14 @@ Vertex * NewVertex_2D (Simplex * s){
 
   //lc = DMIN(MAXIMUM_LC_FOR_SURFACE,lc);
 
-  /*v = Create_Vertex(  ++CurrentNodeNumber,
+  /*v = Create_Vertex(  ++THEM->MaxPointNum,
      (s->V[0]->Pos.X + s->V[1]->Pos.X + s->V[2]->Pos.X)/3.,
      (s->V[0]->Pos.Y + s->V[1]->Pos.Y + s->V[2]->Pos.Y)/3.,
      0.0, lc, 0.0);
    */
 
   if (THEM->MeshParams.DelaunayInsertionMethod == INSERTION_CENTROID)
-    v = Create_Vertex (++CurrentNodeNumber, s->Center.X, s->Center.Y, 0.0, lc, 0.0);
+    v = Create_Vertex (++THEM->MaxPointNum, s->Center.X, s->Center.Y, 0.0, lc, 0.0);
   else if (THEM->MeshParams.DelaunayInsertionMethod == INSERTION_EDGE) {
     Vertex *vv[2];
     double l = THEM->Metric->getWorstEdge (s, PARAMETRIC, vv);
@@ -886,9 +885,9 @@ Vertex * NewVertex_2D (Simplex * s){
       f = 1. - (vv[1]->lc / l);
     
     if (f >= 1)
-      v = Create_Vertex (++CurrentNodeNumber, s->Center.X, s->Center.Y, 0.0, lc, 0.0);
+      v = Create_Vertex (++THEM->MaxPointNum, s->Center.X, s->Center.Y, 0.0, lc, 0.0);
     else
-      v = Create_Vertex (++CurrentNodeNumber,
+      v = Create_Vertex (++THEM->MaxPointNum,
                          f * vv[0]->Pos.X + (1. - f) * vv[1]->Pos.X,
                          f * vv[0]->Pos.Y + (1. - f) * vv[1]->Pos.Y, 0.0, lc, 0.0);
   }
diff --git a/Mesh/2D_Mesh_Shewchuk.cpp b/Mesh/2D_Mesh_Shewchuk.cpp
index 670cd5cf17a91f3d647e4dd8bc3a4763a1f62178..0c780491fc1ba579bd39189d249956af02c9a53f 100644
--- a/Mesh/2D_Mesh_Shewchuk.cpp
+++ b/Mesh/2D_Mesh_Shewchuk.cpp
@@ -1,4 +1,4 @@
-// $Id: 2D_Mesh_Shewchuk.cpp,v 1.6 2001-09-04 16:25:05 geuzaine Exp $
+// $Id: 2D_Mesh_Shewchuk.cpp,v 1.7 2001-10-29 08:52:20 geuzaine Exp $
 
 #include "Gmsh.h"
 #include "Mesh.h"
@@ -12,8 +12,8 @@ extern "C" {
 #include "triangle.h"
 }
 
-extern int         CurrentNodeNumber;
 extern Context_T   CTX;
+extern Mesh * THEM;
 
 void AddInMesh(Surface *sur, int nbbound, Vertex **vertexbound,
 	       struct triangulateio *out){
@@ -29,7 +29,7 @@ void AddInMesh(Surface *sur, int nbbound, Vertex **vertexbound,
   Free(vertexbound);
   
   for (i = nbbound; i < out->numberofpoints; i++) {
-    vtable[i] = Create_Vertex (++CurrentNodeNumber, 
+    vtable[i] = Create_Vertex (++(THEM->MaxPointNum), 
 			       out->pointlist[i * 2], out->pointlist[i * 2 + 1], 0.0, 
 			       out->pointattributelist[i], 0.0);
     Tree_Add (sur->Vertices, &vtable[i]);
diff --git a/Mesh/2D_SMesh.cpp b/Mesh/2D_SMesh.cpp
index a5360db3b6425d12374c3c58d7e7c1483fef3dd1..62d507b47256e879259f1238f74929edf2c20b16 100644
--- a/Mesh/2D_SMesh.cpp
+++ b/Mesh/2D_SMesh.cpp
@@ -1,4 +1,4 @@
-// $Id: 2D_SMesh.cpp,v 1.7 2001-06-03 11:21:02 geuzaine Exp $
+// $Id: 2D_SMesh.cpp,v 1.8 2001-10-29 08:52:20 geuzaine Exp $
 
 /*  
   Maillage transfini surfacique                                                 
@@ -27,7 +27,6 @@
 #include "Interpolation.h"
 
 extern Mesh  *THEM;
-extern int    CurrentNodeNumber;
 
 int index1d (int flag, int N, int n){
   switch(flag){    
@@ -168,7 +167,7 @@ int MeshTransfiniteSurface (Surface *sur) {
             V = TransfiniteTri(*C[0],*C[1],*C[2],*S[0],*S[1],*S[2],u,v);
           if(issphere) 
             TransfiniteSph(*C[0],*c1,&V);
-          list[i+N1*j] = Create_Vertex(++CurrentNodeNumber,V.Pos.X,V.Pos.Y,V.Pos.Z,V.lc,0.0);
+          list[i+N1*j] = Create_Vertex(++THEM->MaxPointNum,V.Pos.X,V.Pos.Y,V.Pos.Z,V.lc,0.0);
         }
         else if(!i) 
           list[i+N1*j] = (nb == 4)?C[3]:C[2];
diff --git a/Mesh/3D_Coherence.cpp b/Mesh/3D_Coherence.cpp
index c2c94e65b58931c3effee0400fed0ff1b9daf695..3d41e007824472bad7897cdca8c32befa45bf5f8 100644
--- a/Mesh/3D_Coherence.cpp
+++ b/Mesh/3D_Coherence.cpp
@@ -1,4 +1,4 @@
-// $Id: 3D_Coherence.cpp,v 1.22 2001-09-04 16:25:05 geuzaine Exp $
+// $Id: 3D_Coherence.cpp,v 1.23 2001-10-29 08:52:20 geuzaine Exp $
 
 #include "Gmsh.h"
 #include "Numeric.h"
@@ -8,7 +8,7 @@
 #include "Create.h"
 
 extern Mesh *THEM;
-extern int CurrentNodeNumber, FACE_DIMENSION;
+extern int FACE_DIMENSION;
 extern Simplex MyNewBoundary;
 
 static Volume *THEVOL;
@@ -555,7 +555,7 @@ Vertex *Edge_Face (Edge * e, Face * f){
     Msg(DEBUG3, "%g %g %g", res[0], res[1], res[2]);
   }
 
-  v = Create_Vertex (++CurrentNodeNumber,
+  v = Create_Vertex (++THEM->MaxPointNum,
                      (1. - res[2]) * e->V[0]->Pos.X + res[2] * e->V[1]->Pos.X,
                      (1. - res[2]) * e->V[0]->Pos.Y + res[2] * e->V[1]->Pos.Y,
                      (1. - res[2]) * e->V[0]->Pos.Z + res[2] * e->V[1]->Pos.Z,
@@ -740,7 +740,7 @@ Vertex *Edge_Edge (Edge * e, Vertex * v1, Vertex * v2){
   }
   if (fabs (val / lc) > 1.e-08 /*08 */ )
     return NULL;
-  v = Create_Vertex (++CurrentNodeNumber,
+  v = Create_Vertex (++THEM->MaxPointNum,
                      (1. - res[0]) * e->V[0]->Pos.X + res[0] * e->V[1]->Pos.X,
                      (1. - res[0]) * e->V[0]->Pos.Y + res[0] * e->V[1]->Pos.Y,
                      (1. - res[0]) * e->V[0]->Pos.Z + res[0] * e->V[1]->Pos.Z,
diff --git a/Mesh/3D_Divide.cpp b/Mesh/3D_Divide.cpp
index 9cf415d478be7e682011d9ff76a11cc60dd75850..6f2c33e1890348c49310b21656073218c6028242 100644
--- a/Mesh/3D_Divide.cpp
+++ b/Mesh/3D_Divide.cpp
@@ -1,4 +1,4 @@
-// $Id: 3D_Divide.cpp,v 1.13 2001-09-04 16:25:05 geuzaine Exp $
+// $Id: 3D_Divide.cpp,v 1.14 2001-10-29 08:52:20 geuzaine Exp $
 
 /* Routine de division des elements tetraedriques
    ou triangulaires
@@ -13,8 +13,8 @@
 #include "Numeric.h"
 #include "Mesh.h"
 
+extern Mesh * THEM;
 extern int    edges_tetra[6][2];
-extern int    CurrentNodeNumber; 
 
 static Tree_T *New_Edges = NULL;
 static int    IENT;
@@ -216,7 +216,7 @@ void cut_prism (Vertex * v1, Vertex * v2, Vertex * v3,
     Msg(INFO, "Found steiner prism 1!");
     
     e1 = Create_Vertex 
-      (++CurrentNodeNumber,
+      (++THEM->MaxPointNum,
        (v1->Pos.X + v2->Pos.X + v3->Pos.X + v4->Pos.X + v5->Pos.X + v6->Pos.X) / 6.,
        (v1->Pos.Y + v2->Pos.Y + v3->Pos.Y + v4->Pos.Y + v5->Pos.Y + v6->Pos.Y) / 6.,
        (v1->Pos.Z + v2->Pos.Z + v3->Pos.Z + v4->Pos.Z + v5->Pos.Z + v6->Pos.Z) / 6.,
@@ -249,7 +249,7 @@ void cut_prism (Vertex * v1, Vertex * v2, Vertex * v3,
     Msg(INFO, "Found steiner prism 2!");
 
     e1 = Create_Vertex 
-      (++CurrentNodeNumber,
+      (++THEM->MaxPointNum,
        (v1->Pos.X + v2->Pos.X + v3->Pos.X + v4->Pos.X + v5->Pos.X + v6->Pos.X) / 6.,
        (v1->Pos.Y + v2->Pos.Y + v3->Pos.Y + v4->Pos.Y + v5->Pos.Y + v6->Pos.Y) / 6.,
        (v1->Pos.Z + v2->Pos.Z + v3->Pos.Z + v4->Pos.Z + v5->Pos.Z + v6->Pos.Z) / 6.,
diff --git a/Mesh/3D_Extrude.cpp b/Mesh/3D_Extrude.cpp
index 48afa6bd59c8edde31791031a9fa97746ff301ac..3cd81601a2164bcda4154021d764962c7c176e51 100644
--- a/Mesh/3D_Extrude.cpp
+++ b/Mesh/3D_Extrude.cpp
@@ -1,4 +1,4 @@
-// $Id: 3D_Extrude.cpp,v 1.48 2001-09-27 15:00:50 geuzaine Exp $
+// $Id: 3D_Extrude.cpp,v 1.49 2001-10-29 08:52:20 geuzaine Exp $
 
 #include "Gmsh.h"
 #include "Numeric.h"
@@ -10,7 +10,6 @@
 
 extern Context_T  CTX ;
 extern Mesh      *THEM;
-extern int        CurrentNodeNumber;
 
 static int DIM, NUM; // current dimension of parent entity
 
@@ -559,7 +558,7 @@ void Extrude_Vertex (void *data, void *dum){
 
   for (i = 0; i < ep->mesh.NbLayer; i++){
     for (j = 0; j < ep->mesh.NbElmLayer[i]; j++){
-      newv = Create_Vertex (++CurrentNodeNumber, v->Pos.X,
+      newv = Create_Vertex (++THEM->MaxPointNum, v->Pos.X,
                             v->Pos.Y, v->Pos.Z, v->lc, v->u);
       ep->Extrude (i, j + 1, newv->Pos.X, newv->Pos.Y, newv->Pos.Z);
 
@@ -705,7 +704,7 @@ void copy_mesh (Curve * from, Curve * to, int direction){
       List_Read (list, List_Nbr(list)-1-i, &v);
     else
       List_Read (list, i, &v);
-    vi = Create_Vertex (++CurrentNodeNumber, v->Pos.X,
+    vi = Create_Vertex (++THEM->MaxPointNum, v->Pos.X,
 			v->Pos.Y, v->Pos.Z, v->lc, (direction>0)?v->u:(1.-v->u));
     ep->Extrude (ep->mesh.NbLayer - 1, ep->mesh.NbElmLayer[ep->mesh.NbLayer - 1],
 		 vi->Pos.X, vi->Pos.Y, vi->Pos.Z);
@@ -822,7 +821,7 @@ void copy_mesh (Surface * from, Surface * to){
     for (int j = 0; j < 4; j++){
       if(s->V[j]){
 	v = s->V[j];
-	vi[j] = Create_Vertex (++CurrentNodeNumber, v->Pos.X,
+	vi[j] = Create_Vertex (++THEM->MaxPointNum, v->Pos.X,
 			       v->Pos.Y, v->Pos.Z, v->lc, v->u);
 	ep->Extrude (ep->mesh.NbLayer - 1, ep->mesh.NbElmLayer[ep->mesh.NbLayer - 1],
 		     vi[j]->Pos.X, vi[j]->Pos.Y, vi[j]->Pos.Z);
diff --git a/Mesh/3D_Extrude_Old.cpp b/Mesh/3D_Extrude_Old.cpp
index 4776d710614bdbb5b59728077f5a7a519ceaa9c6..075e8a09cecd348b52cacdf4d9676ed63a96851f 100644
--- a/Mesh/3D_Extrude_Old.cpp
+++ b/Mesh/3D_Extrude_Old.cpp
@@ -1,4 +1,4 @@
-// $Id: 3D_Extrude_Old.cpp,v 1.13 2001-08-14 16:10:47 geuzaine Exp $
+// $Id: 3D_Extrude_Old.cpp,v 1.14 2001-10-29 08:52:20 geuzaine Exp $
 
 // This is the old extrusion mesh generator -> only available through
 // the command line option -extrude (w/o -recombine). This mesh
@@ -38,7 +38,6 @@
 
 extern Context_T CTX ;
 extern Mesh   *LOCAL, *THEM;
-extern int     CurrentNodeNumber; 
 
 static Tree_T *Tree_Ares, *Tree_Swaps;
 
@@ -392,7 +391,7 @@ static void Extrude_Vertex (void *data , void *dum){
       
       h += a*pow(parLayer[i],j);
 
-      newv = Create_Vertex(++CurrentNodeNumber,v->Pos.X,v->Pos.Y,v->Pos.Z + h, v->lc , v->u );
+      newv = Create_Vertex(++THEM->MaxPointNum,v->Pos.X,v->Pos.Y,v->Pos.Z + h, v->lc , v->u );
       Tree_Add(THEM->Vertices,&newv);
       List_Add(v->Extruded_Points,&newv);
     }
diff --git a/Mesh/3D_Mesh.cpp b/Mesh/3D_Mesh.cpp
index 546f3fa42da1745cc129e06a41591221c73709d8..86d642bbbb125a80e33544a8b4dd9e6cdd4ee2bf 100644
--- a/Mesh/3D_Mesh.cpp
+++ b/Mesh/3D_Mesh.cpp
@@ -1,4 +1,4 @@
-// $Id: 3D_Mesh.cpp,v 1.30 2001-09-04 13:27:00 geuzaine Exp $
+// $Id: 3D_Mesh.cpp,v 1.31 2001-10-29 08:52:20 geuzaine Exp $
 
 /*
  
@@ -25,7 +25,7 @@
 
 extern Mesh       *THEM, *LOCAL;
 extern Context_T   CTX;
-extern int         CurrentNodeNumber, FACE_DIMENSION;
+extern int         FACE_DIMENSION;
 
 static Tree_T *Tsd, *Sim_Sur_Le_Bord, *POINTS_TREE;
 static List_T *Simplexes_Destroyed, *Simplexes_New, *Suppress;
@@ -103,7 +103,7 @@ double Interpole_lcTetraedre (Simplex * s, Vertex * v){
 Vertex *NewVertex (Simplex * s){
   Vertex *v;
 
-  v = Create_Vertex (++CurrentNodeNumber, s->Center.X, s->Center.Y, s->Center.Z, 1., 0.0);
+  v = Create_Vertex (++THEM->MaxPointNum, s->Center.X, s->Center.Y, s->Center.Z, 1., 0.0);
   v->lc = Interpole_lcTetraedre (s, v);
 
   return (v);
@@ -345,7 +345,7 @@ void Box_6_Tetraedron (List_T * P, Mesh * m){
     else
       V[i].Pos.Z = ZM + LOIN * Zc;
     
-    V[i].Num = -(++CurrentNodeNumber);
+    V[i].Num = -(++THEM->MaxPointNum);
     pv = &V[i];
     pv->lc = 1.0;
     pv->Mov = NULL;
diff --git a/Mesh/3D_SMesh.cpp b/Mesh/3D_SMesh.cpp
index 77d893b4925f25eef2f5297f7b03597115c7f9d9..066577d7cf7561b4ec9fc708a301f27a1760bfe9 100644
--- a/Mesh/3D_SMesh.cpp
+++ b/Mesh/3D_SMesh.cpp
@@ -1,4 +1,4 @@
-// $Id: 3D_SMesh.cpp,v 1.10 2001-08-13 09:38:14 geuzaine Exp $
+// $Id: 3D_SMesh.cpp,v 1.11 2001-10-29 08:52:20 geuzaine Exp $
 
 /*  
   Maillage transfini volumique
@@ -29,7 +29,6 @@
 #include "Create.h"
 
 extern Mesh  *THEM;
-extern int    CurrentNodeNumber;
 
 int index2d (int flag, int M, int N, int m, int n){
   switch(flag){    
@@ -299,7 +298,7 @@ int MeshTransfiniteVolume (Volume *vol) {
                              *C[6],*C[7],*C[8],*C[9],*C[10],*C[11],
                              *S[0],*S[1],*S[2],*S[3],*S[4],*S[5],*S[6],*S[7],
                              u,v,w);
-          list[i+N1*j+N1*N2*k] = Create_Vertex(++CurrentNodeNumber,
+          list[i+N1*j+N1*N2*k] = Create_Vertex(++THEM->MaxPointNum,
                                                V.Pos.X,V.Pos.Y,V.Pos.Z,V.lc,0.0);
           /*
             printf(" NEW node : %f %f %f\n", list[i+N1*j+N1*N2*k]->Pos.X, 
diff --git a/Mesh/Create.cpp b/Mesh/Create.cpp
index ef85dabf5152b572b651753e3f4fa6479bceaf23..4b294ae9f68bdefd98544eedae5c4457189ce6d6 100644
--- a/Mesh/Create.cpp
+++ b/Mesh/Create.cpp
@@ -1,4 +1,4 @@
-// $Id: Create.cpp,v 1.25 2001-08-28 20:40:21 geuzaine Exp $
+// $Id: Create.cpp,v 1.26 2001-10-29 08:52:20 geuzaine Exp $
 
 #include "Gmsh.h"
 #include "Numeric.h"
@@ -11,7 +11,6 @@
 
 extern Mesh      *THEM;
 extern Context_T  CTX;
-extern int        CurrentSimplexNumber;
 
 //static double CIRC_GRAN = 2.2;
 
@@ -146,6 +145,7 @@ void Add_SurfaceLoop (int Num, List_T * intlist, Mesh * M){
   pSL = (SurfaceLoop *) Malloc (sizeof (SurfaceLoop));
   pSL->Surfaces = List_Create (List_Nbr (intlist), 1, sizeof (int));
   pSL->Num = Num;
+  THEM->MaxSurfaceLoopNum = IMAX(THEM->MaxSurfaceLoopNum,Num);
   for (i = 0; i < List_Nbr (intlist); i++){
     List_Read (intlist, i, &j);
     List_Add (pSL->Surfaces, &j);
@@ -159,6 +159,7 @@ void Add_PhysicalGroup (int Num, int typ, List_T * intlist, Mesh * M){
   pSL = (PhysicalGroup *) Malloc (sizeof (PhysicalGroup));
   pSL->Entities = List_Create (List_Nbr (intlist), 1, sizeof (int));
   pSL->Num = Num;
+  THEM->MaxPhysicalNum = IMAX(THEM->MaxPhysicalNum,Num);
   pSL->Typ = typ;
   for (i = 0; i < List_Nbr (intlist); i++){
     List_Read (intlist, i, &j);
@@ -173,6 +174,7 @@ void Add_EdgeLoop (int Num, List_T * intlist, Mesh * M){
   pEL = (EdgeLoop *) Malloc (sizeof (EdgeLoop));
   pEL->Curves = List_Create (List_Nbr (intlist), 1, sizeof (int));
   pEL->Num = Num;
+  THEM->MaxLineLoopNum = IMAX(THEM->MaxLineLoopNum,Num);
   for (i = 0; i < List_Nbr (intlist); i++){
     List_Read (intlist, i, &j);
     List_Add (pEL->Curves, &j);
@@ -437,6 +439,7 @@ Curve *Create_Curve (int Num, int Typ, int Order, List_T * Liste,
   pC->Extrude = NULL;
   pC->Typ = Typ;
   pC->Num = Num;
+  THEM->MaxLineNum = IMAX(THEM->MaxLineNum,Num);
   pC->Simplexes = Tree_Create (sizeof (Simplex *), compareSimplex);
   pC->TrsfSimplexes = List_Create (1, 10, sizeof (Simplex *));
   pC->Circle.done = 0;
@@ -544,6 +547,7 @@ Surface * Create_Surface (int Num, int Typ, int Mat){
   pS = (Surface *) Malloc (sizeof (Surface));
   pS->Dirty = 0;
   pS->Num = Num;
+  THEM->MaxSurfaceNum = IMAX(THEM->MaxSurfaceNum,Num);
   pS->Typ = Typ;
   pS->Mat = Mat;
   pS->Method = LIBRE;
@@ -592,6 +596,7 @@ Volume * Create_Volume (int Num, int Typ, int Mat){
   pV = (Volume *) Malloc (sizeof (Volume));
   pV->Dirty = 0;
   pV->Num = Num;
+  THEM->MaxVolumeNum = IMAX(THEM->MaxVolumeNum,Num);
   pV->Typ = Typ;
   pV->Mat = Mat;
   pV->Method = LIBRE;
@@ -637,7 +642,7 @@ Hexahedron * Create_Hexahedron (Vertex * v1, Vertex * v2, Vertex * v3, Vertex *
 
   h = (Hexahedron *) Malloc (sizeof (Hexahedron));
   h->iEnt = -1;
-  h->Num = ++CurrentSimplexNumber;
+  h->Num = ++THEM->MaxSimplexNum;
   h->V[0] = v1;
   h->V[1] = v2;
   h->V[2] = v3;
@@ -665,7 +670,7 @@ Prism * Create_Prism (Vertex * v1, Vertex * v2, Vertex * v3,
 
   p = (Prism *) Malloc (sizeof (Prism));
   p->iEnt = -1;
-  p->Num = ++CurrentSimplexNumber;
+  p->Num = ++THEM->MaxSimplexNum;
   p->V[0] = v1;
   p->V[1] = v2;
   p->V[2] = v3;
@@ -691,7 +696,7 @@ Pyramid * Create_Pyramid (Vertex * v1, Vertex * v2, Vertex * v3,
 
   p = (Pyramid *) Malloc (sizeof (Pyramid));
   p->iEnt = -1;
-  p->Num = ++CurrentSimplexNumber;
+  p->Num = ++THEM->MaxSimplexNum;
   p->V[0] = v1;
   p->V[1] = v2;
   p->V[2] = v3;
diff --git a/Mesh/Generator.cpp b/Mesh/Generator.cpp
index 3bcfd898ab14ac1d8e4ba7fca4c9c801c3c7dec2..cf052be67b8f50cbc0a7806f751e6d8ecc617bb1 100644
--- a/Mesh/Generator.cpp
+++ b/Mesh/Generator.cpp
@@ -1,4 +1,4 @@
-// $Id: Generator.cpp,v 1.27 2001-08-28 20:40:21 geuzaine Exp $
+// $Id: Generator.cpp,v 1.28 2001-10-29 08:52:20 geuzaine Exp $
 
 #include "Gmsh.h"
 #include "Numeric.h"
@@ -9,7 +9,6 @@
 
 extern Mesh     *THEM;
 extern Context_T CTX;
-extern int       CurrentNodeNumber, CurrentSimplexNumber;
 
 static List_T *Curves;
 
@@ -132,6 +131,15 @@ void Maillage_Dimension_3 (Mesh * M){
 void Init_Mesh (Mesh * M, int all){
   THEM = M;
 
+  M->MaxPointNum = 0;
+  M->MaxLineNum = 0;
+  M->MaxLineLoopNum = 0;
+  M->MaxSurfaceNum = 0;
+  M->MaxSurfaceLoopNum = 0;
+  M->MaxVolumeNum = 0;
+  M->MaxPhysicalNum = 0;
+  M->MaxSimplexNum = 0;
+
   ExitExtrude();
   
   if (M->Vertices){
@@ -194,8 +202,7 @@ void Init_Mesh (Mesh * M, int all){
   M->PhysicalGroups = List_Create (5, 5, sizeof (PhysicalGroup *));
   M->Metric = new GMSHMetric;
   M->BGM.bgm = NULL;
-  CurrentNodeNumber = 1;
-  CurrentSimplexNumber = 0;
+
   M->status = 0;
 }
 
diff --git a/Mesh/Makefile b/Mesh/Makefile
index 77ad68a23c4ccb484d4b1692fe75786724382964..50329491df1f5bb746d88e2795c1b41cc9909cf3 100644
--- a/Mesh/Makefile
+++ b/Mesh/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.31 2001-08-20 08:25:23 geuzaine Exp $
+# $Id: Makefile,v 1.32 2001-10-29 08:52:20 geuzaine Exp $
 #
 # Makefile for "libMesh.a"
 #
@@ -12,7 +12,7 @@ RANLIB  = ranlib
 
 LIB     = ../lib/libMesh.a
 INCLUDE = -I../Adapt -I../Common -I../DataStr -I../Geo -I../Mesh\
-          -I../Graphics -I../Motif -I../Parser -I../Fltk -I../Triangle
+          -I../Graphics -I../Parser -I../Fltk -I../Triangle
 
 OPT_FLAGS     = -g -Wall
 OS_FLAGS      = -D_LITTLE_ENDIAN
diff --git a/Mesh/Mesh.h b/Mesh/Mesh.h
index de4d7fb8d94bc76b8ef64d0adfc1a93b115a4930..363e0d127e69da0dabe0b304c9a9a1337dd08818 100644
--- a/Mesh/Mesh.h
+++ b/Mesh/Mesh.h
@@ -389,6 +389,9 @@ struct _Mesh{
   int Histogram[3][NB_HISTOGRAM]; /* Quality histograms                 */
   GMSHMetric *Metric;           /* Metric                                */
   MeshParameters MeshParams;
+  int MaxPointNum, MaxLineNum, MaxLineLoopNum, MaxSurfaceNum;
+  int MaxSurfaceLoopNum, MaxVolumeNum, MaxPhysicalNum;
+  int MaxSimplexNum;
 };
 
 typedef struct {
diff --git a/Mesh/SecondOrder.cpp b/Mesh/SecondOrder.cpp
index b893ed481a42988f831bbb7c4d58ad80e6c9710a..a00df881c4490c31332102b25ebe88eeccc7298e 100644
--- a/Mesh/SecondOrder.cpp
+++ b/Mesh/SecondOrder.cpp
@@ -1,4 +1,4 @@
-// $Id: SecondOrder.cpp,v 1.6 2001-08-11 23:28:32 geuzaine Exp $
+// $Id: SecondOrder.cpp,v 1.7 2001-10-29 08:52:20 geuzaine Exp $
 
 #include "Gmsh.h"
 #include "Geo.h"
@@ -7,7 +7,7 @@
 #include "Interpolation.h"
 #include "Numeric.h"
 
-extern int CurrentNodeNumber;
+extern Mesh *THEM;
 
 static Surface *THES;
 static Curve *THEC;
@@ -27,7 +27,7 @@ Vertex *middlecurve (Vertex * v1, Vertex * v2){
   else
     v = InterpolateCurve (THEC, 0.5 * (v1->u + v2->u), 0);
 
-  pv = Create_Vertex (++CurrentNodeNumber, v.Pos.X, v.Pos.Y, v.Pos.Z, v.lc, v.u);
+  pv = Create_Vertex (++THEM->MaxPointNum, v.Pos.X, v.Pos.Y, v.Pos.Z, v.lc, v.u);
 
   if (!pv->ListCurves){
     pv->ListCurves = List_Create (1, 1, sizeof (Curve *));
@@ -51,7 +51,7 @@ Vertex *middleface (Vertex * v1, Vertex * v2){
   U = 0.5 *(U1+U2);
   V = 0.5 *(V1+V2);
   v = InterpolateSurface(THES,U,V,0,0);
-  pv = Create_Vertex(++CurrentNodeNumber,v.Pos.X,v.Pos.Y,v.Pos.Z,v.lc,v.u);
+  pv = Create_Vertex(++THEM->MaxPointNum,v.Pos.X,v.Pos.Y,v.Pos.Z,v.lc,v.u);
   return pv;
 }
 
@@ -74,7 +74,7 @@ void PutMiddlePoint (void *a, void *b){
   else if ((v = middlecurve (ed->V[0], ed->V[1])));
   else if ((v = middleface (ed->V[0], ed->V[1])));
   else
-    v = Create_Vertex (++CurrentNodeNumber,
+    v = Create_Vertex (++THEM->MaxPointNum,
                        0.5 * (ed->V[0]->Pos.X + ed->V[1]->Pos.X),
                        0.5 * (ed->V[0]->Pos.Y + ed->V[1]->Pos.Y),
                        0.5 * (ed->V[0]->Pos.Z + ed->V[1]->Pos.Z),
diff --git a/Mesh/Simplex.cpp b/Mesh/Simplex.cpp
index df9fd88999e58ecfaff1d7db720634ac8018aed6..76c488358c24b6225858e9cbc76bc812a3de3eb5 100644
--- a/Mesh/Simplex.cpp
+++ b/Mesh/Simplex.cpp
@@ -1,4 +1,4 @@
-// $Id: Simplex.cpp,v 1.18 2001-10-03 06:59:37 geuzaine Exp $
+// $Id: Simplex.cpp,v 1.19 2001-10-29 08:52:20 geuzaine Exp $
 
 #include "Gmsh.h"
 #include "Numeric.h"
@@ -8,6 +8,7 @@
 #include "Context.h"
 
 extern Context_T   CTX;
+extern Mesh *THEM;
 
 int Simplex::TotalAllocated = 0;
 int Simplex::TotalNumber = 0;
@@ -35,6 +36,7 @@ Simplex::Simplex (Vertex * v1, Vertex * v2, Vertex * v3, Vertex * v4){
   Quality = 0. ;
   Fourre_Simplexe (v1, v2, v3, v4);
   Num = TotalNumber;
+  THEM->MaxSimplexNum = IMAX(THEM->MaxSimplexNum,Num);
   iEnt = -1;
 }
 
diff --git a/Mesh/Vertex.cpp b/Mesh/Vertex.cpp
index 2a55d5762fe009824037c95bd6abdd719ff8c2fa..371cbee2b9619e9265d03298ebe0ba8ad2c7bc81 100644
--- a/Mesh/Vertex.cpp
+++ b/Mesh/Vertex.cpp
@@ -1,10 +1,13 @@
-// $Id: Vertex.cpp,v 1.10 2001-08-30 08:55:49 geuzaine Exp $
+// $Id: Vertex.cpp,v 1.11 2001-10-29 08:52:20 geuzaine Exp $
 
 #include "Gmsh.h"
+#include "Numeric.h"
 #include "Vertex.h"
+#include "Mesh.h"
 #include "Context.h"
 
 extern Context_T CTX ;
+extern Mesh *THEM ;
 
 Vertex::Vertex (){
   Frozen = 0;
@@ -74,6 +77,7 @@ Vertex *Create_Vertex (int Num, double X, double Y, double Z, double lc, double
   pV = new Vertex (X, Y, Z, lc);
   pV->w = 1.0;
   pV->Num = Num;
+  THEM->MaxPointNum = IMAX(THEM->MaxPointNum,Num);
   pV->u = u;
   return pV;
 }
diff --git a/Parser/Gmsh.l b/Parser/Gmsh.l
index 7e84efe2b03e1191b93d77383caeb5f1d95976df..3fd3b7c143bc329d433a12f74fd7102e3210d55b 100644
--- a/Parser/Gmsh.l
+++ b/Parser/Gmsh.l
@@ -1,6 +1,6 @@
 %{
 
-// $Id: Gmsh.l,v 1.36 2001-08-17 08:31:31 geuzaine Exp $
+// $Id: Gmsh.l,v 1.37 2001-10-29 08:52:20 geuzaine Exp $
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -70,6 +70,9 @@ stepid  {dieze}({digit})*
 "\'"			{parsestring('\''); return tBIGSTR;}
 "newreg"		{yylval.d = NEWREG(); return tDOUBLE;}
 "newp"  		{yylval.d = NEWPOINT(); return tDOUBLE;}
+"newc"  		{yylval.d = NEWLINE(); return tDOUBLE;}
+"news"  		{yylval.d = NEWSURFACE(); return tDOUBLE;}
+"newv"  		{yylval.d = NEWVOLUME(); return tDOUBLE;}
 "="                     return tAFFECT;
 "+="                    return tAFFECTPLUS ;
 "-="                    return tAFFECTMINUS ;
diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp
index f21871f4ef2e95fbc8a20cc9c11cc1471c9105bf..0a91a9c6f1c36febbb77b3bba271f4b622ded2c3 100644
--- a/Parser/Gmsh.tab.cpp
+++ b/Parser/Gmsh.tab.cpp
@@ -175,7 +175,7 @@
 #line 1 "Gmsh.y"
  
 
-// $Id: Gmsh.tab.cpp,v 1.118 2001-10-04 14:32:11 geuzaine Exp $
+// $Id: Gmsh.tab.cpp,v 1.119 2001-10-29 08:52:20 geuzaine Exp $
 
 #include <stdarg.h>
 #ifndef _NOPLUGIN
diff --git a/Parser/Gmsh.yy.cpp b/Parser/Gmsh.yy.cpp
index 46efad4b0bf7e6838574cc24740e1328d287179a..816605a1785e982a61c93c4d5ec7ab4c8ca7ee85 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.118 2001-10-04 14:32:12 geuzaine Exp $
+ * $Header: /cvsroot/gmsh/Parser/Gmsh.yy.cpp,v 1.119 2001-10-29 08:52:21 geuzaine Exp $
  */
 
 #define FLEX_SCANNER
@@ -283,122 +283,122 @@ static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
 	*yy_cp = '\0'; \
 	yy_c_buf_p = yy_cp;
 
-#define YY_NUM_RULES 186
-#define YY_END_OF_BUFFER 187
-static yyconst short int yy_accept[1014] =
+#define YY_NUM_RULES 189
+#define YY_END_OF_BUFFER 190
+static yyconst short int yy_accept[1017] =
     {   0,
-        0,    0,  187,  185,    1,    1,  185,    5,  179,  185,
-        6,  185,  185,  185,  185,  185,  180,   14,    2,  185,
-        9,  185,  184,  184,  184,  184,  184,  184,  184,  184,
-      184,  184,  184,  184,  184,  184,  184,  184,  184,  184,
-      184,  184,  184,  184,  184,  184,  184,  184,  184,  184,
-      184,  185,  185,    0,    0,   22,  179,   18,   12,   19,
-       10,   20,   11,    0,  182,    0,    0,    0,    0,    3,
-        4,   13,   16,  181,  180,    0,   24,   21,   25,  184,
-      184,  184,  184,  184,  184,  184,  184,  184,  184,  184,
-      184,  184,  184,  184,  184,  184,  184,  184,  184,  184,
-
-      184,  184,  184,  184,  184,  184,  184,  184,  184,  184,
-      184,  184,  184,  184,  184,  184,  184,  184,  184,  184,
-      184,  184,  184,  184,  184,  184,   69,   68,  184,  184,
-      184,  184,  184,  184,  184,  184,  184,  184,  184,  184,
-      184,  184,  184,  184,  184,   85,  184,  184,  184,  184,
-      184,  184,  184,  184,  121,  124,  115,  118,  184,  184,
-      184,  184,  184,  184,  123,  184,  126,  184,  117,  120,
-      184,  184,  184,  184,  122,  125,  116,  119,  184,  184,
-      184,  184,  184,  184,  184,  184,  184,  184,   17,   23,
-        0,    0,   15,    0,  132,  133,  134,  135,  181,    0,
-
-        0,  183,  184,  184,  184,  184,  184,  184,  184,  184,
-      184,  184,  184,  184,  184,  184,  184,  184,  184,  184,
-      184,  184,  184,  184,  184,  184,  184,  184,  184,  184,
-       41,  184,  184,  184,  184,  184,  184,  184,  184,  184,
-      184,  184,  184,   54,  184,  184,  184,  184,  184,  184,
-       65,  184,  184,  184,  184,  184,  184,  184,  184,  184,
-      184,  184,   75,  184,  184,  184,  184,  184,  184,  184,
-      184,  184,  184,  184,  184,  184,  184,  184,  184,  184,
-      184,  184,  184,  184,  184,  184,  184,   99,  184,  184,
-      184,  184,  184,  184,  184,  184,  110,  184,  184,  184,
-
-      184,  184,  184,  184,  184,  184,  184,  184,  184,  184,
-      184,  184,    0,    0,    0,  182,    0,    0,  181,  184,
-      184,  184,  184,   26,  184,  184,  184,   28,   30,  184,
-      184,  184,  184,  184,   36,  184,  184,  184,  184,  184,
-      184,   49,  184,   39,  184,  184,  184,  184,  184,   40,
-      149,  184,  184,  184,   53,  184,  184,  184,    0,  184,
-      184,  184,  184,   61,  184,  184,  184,   62,  184,   64,
-      184,  184,  184,  184,    0,  184,  184,  143,  184,  184,
-       73,  184,   74,  184,  184,  184,  184,  184,  184,  184,
-      184,  184,  184,  184,  184,  184,  184,  184,  184,  184,
-
-       96,  184,  184,  184,  184,  184,  100,  184,  184,   98,
-      184,  184,  184,  184,  184,  184,  109,  184,  184,  184,
-      184,  184,  184,  114,  184,  184,  184,  184,  174,    8,
-      184,  184,  184,  184,  184,    0,    0,    0,  181,  184,
-      184,  184,  184,  184,  184,  184,   32,  184,  184,  184,
-      184,  184,  184,  184,  184,  184,  184,  184,  184,  184,
-      184,  184,   46,  184,  184,  184,  184,  184,  184,  184,
-        0,  184,  184,  184,   60,  184,  184,  184,   63,  184,
-      184,  184,   67,    0,  184,   71,  184,  184,   76,  184,
-      184,  184,  184,  184,   82,  184,   83,  147,  184,  184,
-
-      184,   86,  184,   87,   88,  184,  184,  184,  184,  184,
-       95,  184,  184,  184,  184,  184,  184,  184,  184,  184,
-      184,  184,  112,  184,  184,  184,  184,  184,  184,  171,
-      184,  184,  173,  178,  184,    0,    0,  184,  184,  184,
-      184,   27,   29,   31,  184,  184,  184,   35,   38,  184,
-      162,  184,  184,  184,  184,  184,  184,   43,  184,  184,
-      184,  184,   50,   51,  184,  184,  184,  184,    0,  155,
-      184,  184,   59,  184,  184,  184,  184,  184,  184,  184,
-      184,  148,    0,  184,   77,   72,  184,  184,  184,   79,
-       78,  184,  184,  184,  184,   92,   91,  184,  184,   97,
-
-       94,  184,  101,  184,  105,  184,  184,  184,  184,  184,
-      184,  184,  184,  144,  184,  113,  184,  184,  184,    7,
-      172,  170,    0,    0,  184,  184,  184,  184,   33,  184,
-       37,  184,  184,  184,  184,  184,  184,  184,  184,  184,
-      184,   45,  184,  184,  184,  184,   58,    0,  184,  184,
-       56,  184,  184,  184,  184,  184,  184,  184,    0,  184,
-      184,  184,  184,  184,  184,  184,  184,  184,  184,  184,
-      104,  184,  102,  184,  184,  184,  184,  184,  111,  184,
-      184,  175,  184,    0,    0,  184,  184,  184,  184,  184,
-      184,  184,  184,  184,  184,  184,  184,  184,  184,  184,
-
-      184,  184,  184,  184,    0,   55,   57,  184,  184,  184,
-      184,  184,   66,  184,    0,  184,  184,   80,   81,  184,
-      184,  184,   84,  184,  184,  184,  184,  103,  184,  184,
-      184,  184,  184,  176,  177,    0,    0,  184,  184,  184,
-      184,   34,  184,  184,  184,  184,  184,  184,  184,  184,
-       44,  184,  145,   52,  184,  138,    0,  184,  184,  184,
-      151,  184,  184,    0,   70,  184,  184,  184,  184,  184,
-       93,  184,  106,  184,  184,  184,  108,  184,    0,    0,
-      184,  184,  184,  184,  184,  184,  184,  184,  184,  184,
-      184,  184,   48,  184,   47,  137,    0,  141,  184,  184,
-
-      184,  184,    0,  184,  184,  184,   90,  184,  184,  184,
-      184,  184,  184,    0,    0,  184,  184,  184,  184,  184,
-      184,  184,  184,  184,  184,  184,  184,  184,    0,  184,
-      184,  150,  184,    0,  184,  184,  184,   89,  184,  184,
-      184,  107,  184,  131,    0,  131,  184,  184,  184,  184,
-      184,  184,  184,  156,  184,  184,  184,  184,    0,  184,
-      184,  184,  153,  184,  184,  184,  184,  184,  184,  139,
-      130,  184,  142,  130,  184,  184,  184,  184,  184,  184,
-      184,  184,    0,  184,  184,  164,  184,  136,  184,  184,
-      184,  163,  184,  184,  184,  184,  184,  184,  184,  184,
-
-       42,    0,  184,  184,  184,  184,  184,  184,  184,  184,
-      184,  184,  127,  166,  160,  184,    0,  184,  184,  184,
-      184,  184,  184,  184,  184,  184,  184,  184,  184,  154,
-      140,  152,  184,  184,  184,  161,  184,  184,  184,  184,
-      184,  184,  184,  184,  184,  184,  146,  184,  184,  184,
-      184,  184,  167,  184,  184,  184,  184,  184,  159,  158,
-      184,  184,  184,  184,  184,  184,  184,  184,  184,  184,
-      184,  184,  184,  184,  184,  184,  184,  184,  184,  184,
-      184,  184,  184,  165,  184,  184,  184,  184,  184,  168,
-      184,  184,  129,  184,  184,  184,  184,  184,  184,  128,
-
-      184,  184,  184,  184,  184,  184,  184,  184,  169,  184,
-      184,  157,    0
+        0,    0,  190,  188,    1,    1,  188,    5,  182,  188,
+        6,  188,  188,  188,  188,  188,  183,   17,    2,  188,
+       12,  188,  187,  187,  187,  187,  187,  187,  187,  187,
+      187,  187,  187,  187,  187,  187,  187,  187,  187,  187,
+      187,  187,  187,  187,  187,  187,  187,  187,  187,  187,
+      187,  188,  188,    0,    0,   25,  182,   21,   15,   22,
+       13,   23,   14,    0,  185,    0,    0,    0,    0,    3,
+        4,   16,   19,  184,  183,    0,   27,   24,   28,  187,
+      187,  187,  187,  187,  187,  187,  187,  187,  187,  187,
+      187,  187,  187,  187,  187,  187,  187,  187,  187,  187,
+
+      187,  187,  187,  187,  187,  187,  187,  187,  187,  187,
+      187,  187,  187,  187,  187,  187,  187,  187,  187,  187,
+      187,  187,  187,  187,  187,  187,   72,   71,  187,  187,
+      187,  187,  187,  187,  187,  187,  187,  187,  187,  187,
+      187,  187,  187,  187,  187,   88,  187,  187,  187,  187,
+      187,  187,  187,  187,  124,  127,  118,  121,  187,  187,
+      187,  187,  187,  187,  126,  187,  129,  187,  120,  123,
+      187,  187,  187,  187,  125,  128,  119,  122,  187,  187,
+      187,  187,  187,  187,  187,  187,  187,  187,   20,   26,
+        0,    0,   18,    0,  135,  136,  137,  138,  184,    0,
+
+        0,  186,  187,  187,  187,  187,  187,  187,  187,  187,
+      187,  187,  187,  187,  187,  187,  187,  187,  187,  187,
+      187,  187,  187,  187,  187,  187,  187,  187,  187,  187,
+       44,  187,  187,  187,  187,  187,  187,  187,  187,  187,
+      187,  187,  187,   57,  187,  187,  187,  187,  187,  187,
+       68,  187,  187,  187,  187,  187,  187,  187,  187,  187,
+      187,  187,   78,  187,  187,  187,  187,  187,  187,  187,
+      187,  187,  187,  187,  187,  187,  187,  187,  187,  187,
+      187,  187,  187,  187,  187,  187,  187,  102,  187,  187,
+      187,  187,  187,  187,  187,  187,  113,  187,  187,  187,
+
+      187,  187,  187,  187,  187,  187,  187,  187,  187,  187,
+      187,  187,    0,    0,    0,  185,    0,    0,  184,  187,
+      187,  187,  187,   29,  187,  187,  187,   31,   33,  187,
+      187,  187,  187,  187,   39,  187,  187,  187,  187,  187,
+      187,   52,  187,   42,  187,  187,  187,  187,  187,   43,
+      152,  187,  187,  187,   56,  187,  187,  187,    0,  187,
+      187,  187,  187,   64,  187,  187,  187,   65,  187,   67,
+      187,  187,  187,  187,    0,  187,  187,  146,  187,  187,
+       76,  187,   77,  187,  187,  187,  187,  187,  187,  187,
+      187,  187,  187,  187,  187,  187,  187,  187,  187,  187,
+
+       99,  187,  187,  187,  187,  187,  103,  187,  187,  101,
+      187,  187,  187,  187,  187,  187,  112,  187,  187,  187,
+      187,  187,  187,  117,  187,  187,  187,  187,  177,    9,
+        8,  187,   10,   11,  187,  187,  187,  187,    0,    0,
+        0,  184,  187,  187,  187,  187,  187,  187,  187,   35,
+      187,  187,  187,  187,  187,  187,  187,  187,  187,  187,
+      187,  187,  187,  187,  187,   49,  187,  187,  187,  187,
+      187,  187,  187,    0,  187,  187,  187,   63,  187,  187,
+      187,   66,  187,  187,  187,   70,    0,  187,   74,  187,
+      187,   79,  187,  187,  187,  187,  187,   85,  187,   86,
+
+      150,  187,  187,  187,   89,  187,   90,   91,  187,  187,
+      187,  187,  187,   98,  187,  187,  187,  187,  187,  187,
+      187,  187,  187,  187,  187,  115,  187,  187,  187,  187,
+      187,  187,  174,  187,  187,  176,  181,  187,    0,    0,
+      187,  187,  187,  187,   30,   32,   34,  187,  187,  187,
+       38,   41,  187,  165,  187,  187,  187,  187,  187,  187,
+       46,  187,  187,  187,  187,   53,   54,  187,  187,  187,
+      187,    0,  158,  187,  187,   62,  187,  187,  187,  187,
+      187,  187,  187,  187,  151,    0,  187,   80,   75,  187,
+      187,  187,   82,   81,  187,  187,  187,  187,   95,   94,
+
+      187,  187,  100,   97,  187,  104,  187,  108,  187,  187,
+      187,  187,  187,  187,  187,  187,  147,  187,  116,  187,
+      187,  187,    7,  175,  173,    0,    0,  187,  187,  187,
+      187,   36,  187,   40,  187,  187,  187,  187,  187,  187,
+      187,  187,  187,  187,   48,  187,  187,  187,  187,   61,
+        0,  187,  187,   59,  187,  187,  187,  187,  187,  187,
+      187,    0,  187,  187,  187,  187,  187,  187,  187,  187,
+      187,  187,  187,  107,  187,  105,  187,  187,  187,  187,
+      187,  114,  187,  187,  178,  187,    0,    0,  187,  187,
+      187,  187,  187,  187,  187,  187,  187,  187,  187,  187,
+
+      187,  187,  187,  187,  187,  187,  187,    0,   58,   60,
+      187,  187,  187,  187,  187,   69,  187,    0,  187,  187,
+       83,   84,  187,  187,  187,   87,  187,  187,  187,  187,
+      106,  187,  187,  187,  187,  187,  179,  180,    0,    0,
+      187,  187,  187,  187,   37,  187,  187,  187,  187,  187,
+      187,  187,  187,   47,  187,  148,   55,  187,  141,    0,
+      187,  187,  187,  154,  187,  187,    0,   73,  187,  187,
+      187,  187,  187,   96,  187,  109,  187,  187,  187,  111,
+      187,    0,    0,  187,  187,  187,  187,  187,  187,  187,
+      187,  187,  187,  187,  187,   51,  187,   50,  140,    0,
+
+      144,  187,  187,  187,  187,    0,  187,  187,  187,   93,
+      187,  187,  187,  187,  187,  187,    0,    0,  187,  187,
+      187,  187,  187,  187,  187,  187,  187,  187,  187,  187,
+      187,    0,  187,  187,  153,  187,    0,  187,  187,  187,
+       92,  187,  187,  187,  110,  187,  134,    0,  134,  187,
+      187,  187,  187,  187,  187,  187,  159,  187,  187,  187,
+      187,    0,  187,  187,  187,  156,  187,  187,  187,  187,
+      187,  187,  142,  133,  187,  145,  133,  187,  187,  187,
+      187,  187,  187,  187,  187,    0,  187,  187,  167,  187,
+      139,  187,  187,  187,  166,  187,  187,  187,  187,  187,
+
+      187,  187,  187,   45,    0,  187,  187,  187,  187,  187,
+      187,  187,  187,  187,  187,  130,  169,  163,  187,    0,
+      187,  187,  187,  187,  187,  187,  187,  187,  187,  187,
+      187,  187,  157,  143,  155,  187,  187,  187,  164,  187,
+      187,  187,  187,  187,  187,  187,  187,  187,  187,  149,
+      187,  187,  187,  187,  187,  170,  187,  187,  187,  187,
+      187,  162,  161,  187,  187,  187,  187,  187,  187,  187,
+      187,  187,  187,  187,  187,  187,  187,  187,  187,  187,
+      187,  187,  187,  187,  187,  187,  168,  187,  187,  187,
+      187,  187,  171,  187,  187,  132,  187,  187,  187,  187,
+
+      187,  187,  131,  187,  187,  187,  187,  187,  187,  187,
+      187,  172,  187,  187,  160,    0
     } ;
 
 static yyconst int yy_ec[256] =
@@ -445,239 +445,241 @@ static yyconst int yy_meta[77] =
         3,    3,    3,    3,    1,    1
     } ;
 
-static yyconst short int yy_base[1019] =
+static yyconst short int yy_base[1022] =
     {   0,
-        0,    0, 1277,   51,   52, 1278,   57,   54,   70,   75,
+        0,    0, 1280,   51,   52, 1281,   57,   54,   70,   75,
        55,   67,   80,   81,  113,   95,  132,   73,   79,   89,
       111,  119,  125,  133,  179,  140,  181,  189,  135,  184,
       204,   83,  127,  222,  141,  208,  220,  238,  249,  293,
       267,  212,  311,  257,  268,  147,  297,  301,  218,  300,
-      271,  241,  197, 1238, 1238, 1278,  353, 1278, 1278, 1278,
-     1278, 1278, 1278, 1262,  361, 1261, 1260,  188, 1259, 1278,
-     1278, 1278, 1278,  366,  381,  390, 1278, 1278, 1278,    0,
-     1232, 1225, 1231, 1235, 1203, 1213, 1206,  131, 1199, 1221,
-     1187, 1191, 1198, 1218, 1217, 1218,   83, 1220,  160, 1196,
-
-     1203, 1186,  281, 1209, 1210, 1189, 1188, 1197, 1182, 1215,
-     1209, 1216, 1182, 1188,  353, 1214, 1204, 1187, 1174, 1173,
-     1169, 1172, 1195, 1208, 1167, 1192,    0, 1161, 1165, 1190,
-     1153, 1163, 1162,  206, 1186, 1190, 1154, 1167, 1153, 1186,
-     1164, 1192, 1177, 1148, 1140,    0,  119,  301,   77, 1150,
-      133, 1143, 1150, 1185,    0,    0,    0,    0, 1146,  208,
-     1141, 1140, 1139, 1143,    0, 1163,    0, 1170,    0,    0,
-     1139,  232, 1142,  230,    0,    0,    0,    0, 1139, 1130,
-     1144, 1144, 1132, 1123, 1127, 1124, 1131, 1124, 1278, 1278,
-     1152, 1147, 1278,  408, 1278, 1278, 1278, 1278,  413,  422,
-
-      428,  433, 1150, 1162, 1144, 1143, 1116,  361, 1120, 1119,
-     1114, 1119, 1139, 1119, 1114, 1111, 1132, 1147, 1131, 1132,
-     1138, 1137, 1108, 1106, 1106, 1099, 1112, 1109, 1099, 1097,
-     1103, 1135, 1130, 1103, 1106, 1084, 1094, 1125, 1120,  280,
-     1093,  356, 1082,    0, 1083, 1120, 1119, 1079, 1082, 1091,
-        0, 1091, 1106, 1114, 1077, 1128, 1084, 1069, 1108, 1081,
-     1078, 1079, 1117, 1067, 1098, 1080, 1071, 1058, 1075, 1097,
-     1070, 1086, 1095, 1071, 1053, 1057, 1062, 1055, 1062, 1053,
-     1058, 1060, 1049, 1042, 1060, 1055, 1069, 1050, 1048, 1047,
-     1036,  347, 1048, 1041, 1063, 1064, 1042, 1036, 1036, 1034,
-
-     1053, 1052, 1024, 1035,  397, 1037, 1026,   48, 1028, 1034,
-     1029, 1018, 1043, 1045,  444,  454,  463,  468,  473, 1041,
-     1045, 1042, 1064,    0, 1016, 1020, 1027,    0, 1060, 1025,
-     1016, 1038, 1018, 1018,    0, 1042, 1034, 1040, 1029, 1040,
-     1028,    0,  995,    0, 1013, 1002,  995,  994,  999,    0,
-        0, 1032,  989,  988,    0,  997, 1005, 1014, 1020, 1023,
-      986,  986,  993,    0,  978,  997,  996,    0,  978,    0,
-      975, 1014, 1013,  972, 1024,  972,  970,    0,  970,  967,
-        0, 1020,    0, 1004,  350,  978,  971,  963,  992,  962,
-      999,  983,  964,  966,  969,  964,  953,  954,  951,  952,
-
-        0,  956,  950,  947,  961,  985,    0,  950,  949,    0,
-      960,  943,  958,  953,  974,  969,    0,  937,  942,  946,
-      963,  972,  938,    0,  948,  934,  933,  927,    0,    0,
-      940,  943,  926,  938,  936,  957,  960,  478,  483,  955,
-      960,  957,  935,  916,  920,  919,    0,  928,  917,  946,
-      911,  909,  934,  946,  946,  931,  947,  943,  909,  916,
-      913,  912,  923,  910,  921,  908,  907,  908,  287,  918,
-      917,  931,  345,  890,    0,  902,  428,  475,    0,  896,
-      911,  912,    0,  937,  883,    0,  882,  891,    0,  909,
-      896,  887,  877,  880,    0,  900,    0,    0,  915,  886,
-
-      887,    0,  876,    0,    0,  882,  882,  884,  872,  879,
-        0,  883,  877,  862,  861,  874,  875,  858,  898,  896,
-      448,  869,    0,  882,  875,  866,  867,  855,  857,    0,
-      860,  855,    0,    0,  842,  876,  886,  874,  882,  883,
-      869,    0,    0,  891,  838,  851,  867,    0,    0,  871,
-        0,  853,  869,  865,  859,  838,  829,    0,  834,  845,
-      822,  861,    0,    0,  842,  848,  852,  861,  850,    0,
-      829,  828,    0,  831,  846,  840,  854,  857,  854,  816,
-      838,    0,  860,  822,    0,    0,  840,  812,  799,    0,
-        0,  844,  829,  802,  819,    0,    0,  801,  809,    0,
-
-        0,  839,    0,  810,    0,  809,  809,  796,  837,  833,
-      801,  808,  804,    0,  807,    0,  801,  790,  795,    0,
-        0,    0,  809,  819,  807,  822,  816,  812,    0,  783,
-        0,  817,  820,  802,  800,  792,  808,  799,  784,  785,
-      785,    0,  797,  766,  793,  794,    0,  820,  763,  777,
-        0,  785,  785,  785,  789,  793,  761,  790,  807,  768,
-      792,  759,  763,  789,  766,  748,  753,  745,  749,  782,
-        0,  751,    0,  735,  772,  757,  743,  736,    0,  764,
-      734,    0,  748,  762,  770,  760,  748,  767,  771,  728,
-      744,  755,  760,  762,  748,  762,  724,  720,  731,  724,
-
-      746,  731,  734,  736,  757,    0,    0,   54,  106,  110,
-      151,  203,    0,  209,  254,  221,  271,    0,    0,  280,
-      304,  287,    0,  289,  295,  327,  293,    0,  343,  384,
-      356,  362,  396,    0,    0,  411,  423,  413,  480,  431,
-      439,    0,  478,  426,  448,  457,  464,  486,  450,  455,
-        0,  460,    0,    0,  487,    0,  503,  491,  480,  481,
-        0,  486,  474,  513,    0,  484,  498,  499,  476,  466,
-        0,  498,    0,  490,  489,  465,    0,  502,  494,  508,
-      496,  498,  515,  512,  513,  499,  500,  505,  510,  520,
-      507,  513,    0,  482,    0,    0,  533,    0,  502,  520,
-
-      529,  513,  539,  518,  530,  529,    0,  497,  523,  518,
-      522,  509,  527,    0,  538,  565,  540,  553,  553,  545,
-      542,  543,  551,  555,  548,  563,  544,  526,  581,  571,
-      558,    0,  570,  584,  565,  571,  570,    0,  571,  564,
-      561,    0,  564, 1278,    0,    0,  568,  580,  641,  581,
-      566,  582,  580,    0,  574,  591,  575,  559,  601,  581,
-      578,  579, 1278,  590,  595,  587,  583,  597,  599,    0,
-     1278,  579,    0,    0,  592,  602,  607,  595,  589,  608,
-      592,  584,  626,  595,  607,    0,  617,    0,  623,  624,
-      633,    0,  617,  617,  616,  640,  625,  640,  641,  630,
-
-        0,  655,  635,  635,  625,  633,  638,  651,  647,  630,
-      635,  653,    0,  633,    0,  654,  669,  658,  649,  662,
-      656,  653,  663,  668,  676,  662,  646,  655,  673, 1278,
-        0,    0,  658,  661,  651,    0,  662,  675,  661,  659,
-      677,  680,  679,  671,  669,  682,    0,  680,  680,  683,
-      686,  676,  669,  691,  671,  672,  680,  687,    0,    0,
-      683,  686,  686,  693,  697,  701,  699,  691,  704,  696,
-      685,  698,  712,  709,  699,  701,  706,  699,  703,  702,
-      704,  703,  709,    0,  719,  720,  721,  709,  713,    0,
-      715,  712,    0,  712,  713,  728,  716,  734,  722,    0,
-
-      718,  719,  730,  739,  726,  723,  729,  735,    0,  730,
-      732,    0, 1278,  767,  770,  773,  776,  779
+      271,  241,  197, 1241, 1241, 1281,  353, 1281, 1281, 1281,
+     1281, 1281, 1281, 1265,  361, 1264, 1263,  188, 1262, 1281,
+     1281, 1281, 1281,  366,  381,  390, 1281, 1281, 1281,    0,
+     1235, 1228, 1234, 1238, 1206, 1216, 1209,  131, 1202, 1224,
+     1190, 1194, 1201, 1221, 1220, 1221,   83, 1223,  160, 1199,
+
+     1206, 1189,  281, 1212, 1213, 1192, 1191, 1200, 1185, 1218,
+     1212, 1219, 1185, 1191,  353, 1217, 1207, 1190, 1177, 1176,
+     1172, 1175, 1198, 1211, 1170, 1195,    0, 1164, 1168, 1193,
+     1156, 1166, 1165,  206, 1189, 1193, 1157, 1170, 1156, 1189,
+     1167, 1195, 1180, 1151, 1143,    0,  119,  301,   77, 1153,
+      133, 1146, 1153, 1188,    0,    0,    0,    0, 1149,  208,
+     1144, 1143, 1142, 1146,    0, 1166,    0, 1173,    0,    0,
+     1142,  232, 1145,  230,    0,    0,    0,    0, 1142, 1133,
+     1147, 1147, 1135, 1126, 1130, 1127, 1134, 1127, 1281, 1281,
+     1155, 1150, 1281,  408, 1281, 1281, 1281, 1281,  413,  422,
+
+      428,  433, 1153, 1165, 1147, 1146, 1119,  361, 1123, 1122,
+     1117, 1122, 1142, 1122, 1117, 1114, 1135, 1150, 1134, 1135,
+     1141, 1140, 1111, 1109, 1109, 1102, 1115, 1112, 1102, 1100,
+     1106, 1138, 1133, 1106, 1109, 1087, 1097, 1128, 1123,  280,
+     1096,  356, 1085,    0, 1086, 1123, 1122, 1082, 1085, 1094,
+        0, 1094, 1109, 1117, 1080, 1131, 1087, 1072, 1111, 1084,
+     1081, 1082, 1120, 1070, 1101, 1083, 1074, 1061, 1078, 1100,
+     1073, 1089, 1098, 1074, 1056, 1060, 1065, 1058, 1065, 1056,
+     1061, 1063, 1052, 1045, 1063, 1058, 1072, 1053, 1051, 1050,
+     1039,  347, 1051, 1044, 1066, 1067, 1045, 1039, 1039, 1037,
+
+     1056, 1055, 1027, 1038,  397, 1040, 1029,  402, 1031, 1037,
+     1032, 1021, 1046, 1048,  444,  459,  468,  473,  478, 1044,
+     1048, 1045, 1067,    0, 1019, 1023, 1030,    0, 1063, 1028,
+     1019, 1041, 1021, 1021,    0, 1045, 1037, 1043, 1032, 1043,
+     1031,    0,  998,    0, 1016, 1005,  998,  997, 1002,    0,
+        0, 1035,  992,  991,    0, 1000, 1008, 1017, 1023, 1026,
+      989,  989,  996,    0,  981, 1000,  999,    0,  981,    0,
+      978, 1017, 1016,  975, 1027,  975,  973,    0,  973,  970,
+        0, 1023,    0, 1007,  350,  981,  974,  966,  995,  965,
+     1002,  986,  967,  969,  972,  967,  956,  957,  954,  955,
+
+        0,  959,  953,  950,  964,  988,    0,  953,  952,    0,
+      963,  946,  961,  956,  977,  972,    0,  940,  945,  949,
+      966,  975,  941,    0,  951,  937,  936,  930,    0,    0,
+        0,  943,    0,    0,  946,  929,  941,  939,  960,  963,
+      483,  488,  958,  963,  960,  938,  919,  923,  922,    0,
+      931,  920,  949,  914,  912,  937,  949,  949,  934,  950,
+      946,  912,  919,  916,  915,  926,  913,  924,  911,  910,
+      911,  287,  921,  920,  934,  345,  893,    0,  905,  482,
+      481,    0,  899,  914,  915,    0,  940,  886,    0,  885,
+      894,    0,  912,  899,  890,  880,  883,    0,  903,    0,
+
+        0,  918,  889,  890,    0,  879,    0,    0,  885,  885,
+      887,  875,  882,    0,  886,  880,  865,  864,  877,  878,
+      861,  901,  899,  410,  872,    0,  885,  878,  869,  870,
+      858,  860,    0,  863,  858,    0,    0,  845,  879,  889,
+      877,  885,  886,  872,    0,    0,  894,  841,  854,  870,
+        0,    0,  874,    0,  856,  872,  868,  862,  841,  832,
+        0,  837,  848,  825,  864,    0,    0,  845,  851,  855,
+      864,  853,    0,  832,  831,    0,  834,  849,  843,  857,
+      860,  857,  819,  841,    0,  863,  825,    0,    0,  843,
+      815,  802,    0,    0,  847,  832,  805,  822,    0,    0,
+
+      804,  812,    0,    0,  842,    0,  813,    0,  812,  812,
+      799,  840,  836,  804,  811,  807,    0,  810,    0,  804,
+      793,  798,    0,    0,    0,  812,  822,  810,  825,  819,
+      815,    0,  786,    0,  820,  823,  805,  803,  795,  811,
+      802,  787,  788,  788,    0,  800,  769,  796,  797,    0,
+      823,  766,  780,    0,  788,  788,  788,  792,  796,  764,
+      793,  810,  771,  795,  762,  766,  792,  769,  751,  756,
+      748,  752,  785,    0,  754,    0,  738,  775,  760,  746,
+      739,    0,  767,  737,    0,  751,  765,  773,  763,  751,
+      770,  774,  731,  747,  758,  763,  765,  751,  765,  727,
+
+      723,  734,  727,  749,  734,  737,  739,  760,    0,    0,
+       54,   84,   88,  106,  108,    0,  153,  214,  167,  222,
+        0,    0,  240,  293,  271,    0,  273,  291,  318,  277,
+        0,  307,  339,  334,  356,  376,    0,    0,  373,  402,
+      410,  484,  423,  430,    0,  484,  414,  443,  431,  438,
+      487,  451,  456,    0,  461,    0,    0,  488,    0,  503,
+      492,  481,  483,    0,  488,  477,  516,    0,  487,  501,
+      502,  479,  469,    0,  501,    0,  493,  492,  468,    0,
+      505,  497,  511,  499,  501,  518,  515,  516,  502,  503,
+      508,  513,  523,  510,  516,    0,  485,    0,    0,  536,
+
+        0,  505,  523,  532,  516,  542,  521,  533,  532,    0,
+      500,  526,  521,  525,  512,  530,    0,  541,  568,  543,
+      556,  556,  548,  545,  546,  554,  558,  551,  566,  547,
+      529,  584,  574,  561,    0,  573,  587,  568,  574,  573,
+        0,  574,  567,  564,    0,  567, 1281,    0,    0,  571,
+      583,  644,  584,  569,  585,  583,    0,  577,  594,  578,
+      562,  604,  584,  581,  582, 1281,  593,  598,  590,  586,
+      600,  602,    0, 1281,  582,    0,    0,  595,  605,  610,
+      598,  592,  611,  595,  587,  629,  598,  610,    0,  620,
+        0,  626,  627,  636,    0,  620,  620,  619,  643,  628,
+
+      643,  644,  633,    0,  658,  638,  638,  628,  636,  641,
+      654,  650,  633,  638,  656,    0,  636,    0,  657,  672,
+      661,  652,  665,  659,  656,  666,  671,  679,  665,  649,
+      658,  676, 1281,    0,    0,  661,  664,  654,    0,  665,
+      678,  664,  662,  680,  683,  682,  674,  672,  685,    0,
+      683,  683,  686,  689,  679,  672,  694,  674,  675,  683,
+      690,    0,    0,  686,  689,  689,  696,  700,  704,  702,
+      694,  707,  699,  688,  701,  715,  712,  702,  704,  709,
+      702,  706,  705,  707,  706,  712,    0,  722,  723,  724,
+      712,  716,    0,  718,  715,    0,  715,  716,  731,  719,
+
+      737,  725,    0,  721,  722,  733,  742,  729,  726,  732,
+      738,    0,  733,  735,    0, 1281,  770,  773,  776,  779,
+      782
     } ;
 
-static yyconst short int yy_def[1019] =
+static yyconst short int yy_def[1022] =
     {   0,
-     1013,    1, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013,
-     1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013,
-     1013, 1013, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013,
-     1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013,
-     1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1013, 1013,
-     1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013,
-
-     1013, 1013, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1013, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1013, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1013, 1013, 1013, 1013, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1013, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1013, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1013, 1013, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1013, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1013, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1013, 1013, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1013, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1013, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1013, 1013, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-
-     1014, 1014, 1014, 1014, 1013, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1013, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1013, 1013, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1013, 1014, 1014, 1014,
-     1014, 1014, 1014, 1013, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1013, 1013,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1013, 1014, 1014, 1014,
-
-     1014, 1014, 1013, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1015, 1013, 1016, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1013, 1014,
-     1014, 1014, 1014, 1013, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1013, 1017, 1014, 1014, 1014, 1018, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1013, 1014,
-     1014, 1014, 1013, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1013, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1013, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-
-     1014, 1013, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1013, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1013,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-
-     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
-     1014, 1014,    0, 1013, 1013, 1013, 1013, 1013
+     1016,    1, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016,
+     1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016,
+     1016, 1016, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016,
+     1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016,
+     1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1016, 1016,
+     1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016,
+
+     1016, 1016, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1016, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1016, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1016, 1016,
+     1016, 1016, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1016, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1016, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1016, 1016,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1016, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1016, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1016, 1016, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1016, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1016, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1016, 1016, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1016, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1016, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1016, 1016,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1016,
+     1017, 1017, 1017, 1017, 1017, 1017, 1016, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1016, 1016, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1016,
+
+     1017, 1017, 1017, 1017, 1017, 1016, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1018, 1016, 1019, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1016, 1017, 1017, 1017, 1017, 1016, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1016, 1020, 1017, 1017,
+     1017, 1021, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1016, 1017, 1017, 1017, 1016, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1016, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1016, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+
+     1017, 1017, 1017, 1017, 1016, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1016,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1016, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+
+     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
+     1017, 1017, 1017, 1017, 1017,    0, 1016, 1016, 1016, 1016,
+     1016
     } ;
 
-static yyconst short int yy_nxt[1355] =
+static yyconst short int yy_nxt[1358] =
     {   0,
         4,    5,    6,    7,    8,    9,   10,   11,   12,   13,
        14,   15,   16,   17,   17,   17,   17,   17,   18,   19,
@@ -688,149 +690,149 @@ static yyconst short int yy_nxt[1355] =
        32,   48,   49,   32,   32,   32,   50,   32,   32,   51,
        32,   32,   32,   32,   52,   53,   54,   54,   56,   54,
        54,   58,   54,   57,   57,   57,   57,   57,   59,   60,
-      758,   62,   54,   55,   55,   54,   55,   55,   54,   55,
+      761,   62,   54,   55,   55,   54,   55,   55,   54,   55,
 
        54,   61,   63,   70,   54,   54,   54,   71,   81,   55,
-       77,  430,   55,  431,   54,   55,   72,   55,  220,  221,
+       77,  762,   55,  763,   54,   55,   72,   55,  220,  221,
        54,   55,   55,   55,   64,   83,   65,   65,   65,   65,
-       65,   55,   78,  759,  280,  760,   54,   55,   54,  281,
+       65,   55,   78,  764,  280,  765,   54,   55,   54,  281,
        79,   66,   73,   74,   54,   75,   75,   75,   75,   75,
        81,   82,   81,   55,   67,   68,   69,   54,   81,   76,
        81,   55,  123,  104,  135,   81,   81,   83,  276,   83,
-       84,  105,   81,   89,   55,   83,   85,   83,  761,  136,
+       84,  105,   81,   89,   55,   83,   85,   83,  766,  136,
       210,   90,   83,   83,  283,   76,   91,  277,  129,   83,
        86,   87,   88,  106,  137,   92,  182,  107,  211,  197,
 
       284,   93,   94,  138,   81,  108,   81,  110,  109,   81,
        95,  124,  116,   96,   81,  111,   97,  112,  190,  223,
       117,   83,   54,   83,  192,   98,   83,  224,   99,   81,
-      762,   83,  100,   81,  763,  101,  102,   81,  118,   55,
+      767,   83,  100,   81,  768,  101,  102,   81,  118,   55,
       113,  103,  114,   81,  126,   81,   83,   81,  119,  120,
        83,  121,  115,  130,   83,  301,  125,  122,  127,  140,
        83,  263,   83,   81,   83,  128,   54,  289,  264,  302,
-      764,  131,  142,  290,   81,  132,  139,  143,  173,  133,
-       83,  298,   81,   55,  134,  141,  186,  144,  765,  299,
+      769,  131,  142,  290,   81,  132,  139,  143,  173,  133,
+       83,  298,   81,   55,  134,  141,  186,  144,  770,  299,
       359,   83,   81,   81,  145,  146,   81,  147,  150,   83,
 
       148,  165,  151,  149,  166,  167,  168,  169,  170,   83,
-       83,  152,  566,   83,  180,  189,  171,  153,   81,  766,
-      360,  567,   81,  154,  188,   81,   81,  155,  767,  181,
-      768,  156,  172,  157,  158,   83,   81,  228,  174,   83,
-      229,  230,   83,   83,  769,  175,  770,  231,  771,  176,
-      159,  177,  178,   83,  184,  772,  160,  161,  278,  183,
-      162,  163,  187,  185,  773,  164,   57,   57,   57,   57,
+       83,  152,  569,   83,  180,  189,  171,  153,   81,  771,
+      360,  570,   81,  154,  188,   81,   81,  155,  772,  181,
+      773,  156,  172,  157,  158,   83,   81,  228,  174,   83,
+      229,  230,   83,   83,  774,  175,  775,  231,  776,  176,
+      159,  177,  178,   83,  184,  777,  160,  161,  278,  183,
+      162,  163,  187,  185,  778,  164,   57,   57,   57,   57,
        57,  279,  411,  179,   65,   65,   65,   65,   65,  199,
-      199,  199,  199,  199,  362,  412,  325,  363,  194,  491,
-      492,  774,   74,  200,   75,   75,   75,   75,   75,  201,
+      199,  199,  199,  199,  362,  412,  325,  363,  194,  494,
+      495,  779,   74,  200,   75,   75,   75,   75,   75,  201,
 
-      201,  326,  327,  202,  202,  202,  202,  202,   76,  775,
-      243,  571,  572,  776,  194,  777,  244,  315,  315,  200,
+      201,  326,  327,  202,  202,  202,  202,  202,   76,  780,
+      243,  574,  575,  781,  194,  782,  244,  315,  315,  200,
       245,  316,  316,  316,  316,  316,  199,  199,  199,  199,
-      199,  318,  318,  778,   76,  319,  319,  319,  319,  319,
+      199,  318,  318,  783,   76,  319,  319,  319,  319,  319,
       317,  202,  202,  202,  202,  202,  202,  202,  202,  202,
-      202,  425,  575,  779,  780,  781,  426,  316,  316,  316,
-      316,  316,  784,  427,  785,  576,  317,  316,  316,  316,
-      316,  316,  438,  438,  788,  789,  439,  439,  439,  439,
-      439,  319,  319,  319,  319,  319,  319,  319,  319,  319,
-      319,  439,  439,  439,  439,  439,  439,  439,  439,  439,
-
-      439,  577,  611,  786,  782,  790,  791,  612,  783,  792,
-      793,  578,  794,  795,  796,  579,  797,  798,  787,  799,
-      800,  801,  802,  803,  804,  805,  806,  807,  808,  809,
+      202,  425,  784,  430,  787,  788,  426,  316,  316,  316,
+      316,  316,  791,  427,  614,  431,  317,  432,  433,  615,
+      792,  434,  316,  316,  316,  316,  316,  441,  441,  793,
+      794,  442,  442,  442,  442,  442,  319,  319,  319,  319,
+      319,  319,  319,  319,  319,  319,  442,  442,  442,  442,
+
+      442,  442,  442,  442,  442,  442,  578,  580,  785,  789,
+      795,  796,  786,  797,  798,  799,  800,  581,  801,  579,
+      802,  582,  803,  804,  790,  805,  806,  807,  808,  809,
       810,  811,  812,  813,  814,  815,  816,  817,  818,  819,
       820,  821,  822,  823,  824,  825,  826,  827,  828,  829,
       830,  831,  832,  833,  834,  835,  836,  837,  838,  839,
-      840,  841,  842,  843,  845,  844,  844,  847,  844,  844,
-      844,  844,  844,  844,  844,  844,  844,  844,  848,  849,
-      850,  851,  852,  844,  844,  844,  844,  844,  853,  854,
-      855,  856,  857,  858,  859,  860,  861,  862,  863,  864,
+      840,  841,  842,  843,  844,  845,  846,  848,  847,  847,
+      850,  847,  847,  847,  847,  847,  847,  847,  847,  847,
+      847,  851,  852,  853,  854,  855,  847,  847,  847,  847,
+      847,  856,  857,  858,  859,  860,  861,  862,  863,  864,
 
-      865,  866,  867,  868,  869,  870,  872,  873,  875,  876,
-      877,  878,  844,  879,  880,  881,  882,  883,  884,  885,
+      865,  866,  867,  868,  869,  870,  871,  872,  873,  875,
+      876,  878,  879,  880,  881,  847,  882,  883,  884,  885,
       886,  887,  888,  889,  890,  891,  892,  893,  894,  895,
-      896,  897,  898,  899,  900,  901,  902,  903,  904,  844,
-      844,  871,  871,  905,  871,  871,  871,  871,  871,  871,
-      871,  871,  871,  871,  906,  907,  908,  909,  910,  871,
-      871,  871,  871,  871,  911,  912,  913,  914,  915,  916,
+      896,  897,  898,  899,  900,  901,  902,  903,  904,  905,
+      906,  907,  847,  847,  874,  874,  908,  874,  874,  874,
+      874,  874,  874,  874,  874,  874,  874,  909,  910,  911,
+      912,  913,  874,  874,  874,  874,  874,  914,  915,  916,
       917,  918,  919,  920,  921,  922,  923,  924,  925,  926,
-      927,  928,  929,  930,  931,  932,  933,  934,  871,  935,
-      936,  937,  938,  939,  940,  941,  942,  943,  944,  945,
+      927,  928,  929,  930,  931,  932,  933,  934,  935,  936,
+      937,  874,  938,  939,  940,  941,  942,  943,  944,  945,
 
       946,  947,  948,  949,  950,  951,  952,  953,  954,  955,
-      956,  957,  958,  959,  960,  871,  871,  961,  962,  963,
+      956,  957,  958,  959,  960,  961,  962,  963,  874,  874,
       964,  965,  966,  967,  968,  969,  970,  971,  972,  973,
       974,  975,  976,  977,  978,  979,  980,  981,  982,  983,
       984,  985,  986,  987,  988,  989,  990,  991,  992,  993,
       994,  995,  996,  997,  998,  999, 1000, 1001, 1002, 1003,
-     1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012,   80,
-      844,  757,  844,  846,  756,  846,  871,  755,  871,  874,
-      754,  874,  753,  752,  751,  750,  749,  748,  747,  746,
-      745,  744,  743,  742,  741,  740,  739,  738,  737,  736,
-
-      735,  734,  733,  732,  731,  730,  729,  728,  727,  726,
-      725,  724,  723,  722,  721,  720,  719,  718,  717,  716,
-      715,  714,  713,  712,  711,  710,  709,  708,  707,  706,
-      705,  704,  703,  702,  701,  700,  699,  698,  697,  696,
-      695,  694,  693,  692,  691,  690,  689,  688,  687,  686,
-      685,  684,  683,  682,  681,  680,  679,  678,  677,  676,
-      675,  674,  673,  672,  671,  670,  669,  668,  667,  666,
-      665,  664,  663,  662,  661,  660,  659,  658,  657,  656,
-      655,  654,  653,  652,  651,  650,  649,  648,  647,  646,
-      645,  644,  643,  642,  641,  640,  639,  638,  637,  636,
-
-      635,  634,  633,  632,  631,  630,  629,  628,  627,  626,
-      625,  624,  623,  622,  621,  620,  619,  618,  617,  616,
-      615,  614,  613,  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,  574,  573,  570,  569,  568,  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,  490,  489,  488,  487,  486,  485,  484,  483,
-      482,  481,  480,  479,  478,  477,  476,  475,  474,  473,
-      472,  471,  470,  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,  440,  437,  436,  435,  434,  433,  432,  429,
-      428,  424,  423,  422,  421,  420,  419,  418,  417,  416,
-
-      415,  414,  413,  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,  374,
-      373,  372,  371,  370,  369,  368,  367,  366,  365,  364,
-      361,  358,  357,  356,  355,  354,  353,  352,  351,  350,
-      349,  348,  347,  346,  345,  344,  343,  342,  341,  340,
-      339,  338,  337,  336,  335,  334,  333,  332,  331,  330,
-      329,  328,  324,  323,  322,  321,  320,  314,  313,  312,
-      311,  310,  309,  308,  307,  306,  305,  304,  303,  300,
-
-      297,  296,  295,  294,  293,  292,  291,  288,  287,  286,
-      285,  282,  275,  274,  273,  272,  271,  270,  269,  268,
-      267,  266,  265,  262,  261,  260,  259,  258,  257,  256,
-      255,  254,  253,  252,  251,  250,  249,  248,  247,  246,
-      242,  241,  240,  239,  238,  237,  236,  235,  234,  233,
-      232,  227,  226,  225,  222,  219,  218,  217,  216,  215,
-      214,  213,  212,  209,  208,  207,  206,  205,  204,  203,
-      198,  196,  195,  193,  192,  191, 1013,    3, 1013, 1013,
-     1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013,
-     1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013,
-
-     1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013,
-     1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013,
-     1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013,
-     1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013,
-     1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013,
-     1013, 1013, 1013, 1013
+     1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013,
+     1014, 1015,   80,  847,  760,  847,  849,  759,  849,  874,
+      758,  874,  877,  757,  877,  756,  755,  754,  753,  752,
+      751,  750,  749,  748,  747,  746,  745,  744,  743,  742,
+
+      741,  740,  739,  738,  737,  736,  735,  734,  733,  732,
+      731,  730,  729,  728,  727,  726,  725,  724,  723,  722,
+      721,  720,  719,  718,  717,  716,  715,  714,  713,  712,
+      711,  710,  709,  708,  707,  706,  705,  704,  703,  702,
+      701,  700,  699,  698,  697,  696,  695,  694,  693,  692,
+      691,  690,  689,  688,  687,  686,  685,  684,  683,  682,
+      681,  680,  679,  678,  677,  676,  675,  674,  673,  672,
+      671,  670,  669,  668,  667,  666,  665,  664,  663,  662,
+      661,  660,  659,  658,  657,  656,  655,  654,  653,  652,
+      651,  650,  649,  648,  647,  646,  645,  644,  643,  642,
+
+      641,  640,  639,  638,  637,  636,  635,  634,  633,  632,
+      631,  630,  629,  628,  627,  626,  625,  624,  623,  622,
+      621,  620,  619,  618,  617,  616,  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,  577,  576,  573,
+      572,  571,  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,  489,
+      488,  487,  486,  485,  484,  483,  482,  481,  480,  479,
+      478,  477,  476,  475,  474,  473,  472,  471,  470,  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,  440,  439,  438,  437,
+      436,  435,  429,  428,  424,  423,  422,  421,  420,  419,
+
+      418,  417,  416,  415,  414,  413,  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,  374,  373,  372,  371,  370,  369,  368,  367,
+      366,  365,  364,  361,  358,  357,  356,  355,  354,  353,
+      352,  351,  350,  349,  348,  347,  346,  345,  344,  343,
+      342,  341,  340,  339,  338,  337,  336,  335,  334,  333,
+      332,  331,  330,  329,  328,  324,  323,  322,  321,  320,
+      314,  313,  312,  311,  310,  309,  308,  307,  306,  305,
+
+      304,  303,  300,  297,  296,  295,  294,  293,  292,  291,
+      288,  287,  286,  285,  282,  275,  274,  273,  272,  271,
+      270,  269,  268,  267,  266,  265,  262,  261,  260,  259,
+      258,  257,  256,  255,  254,  253,  252,  251,  250,  249,
+      248,  247,  246,  242,  241,  240,  239,  238,  237,  236,
+      235,  234,  233,  232,  227,  226,  225,  222,  219,  218,
+      217,  216,  215,  214,  213,  212,  209,  208,  207,  206,
+      205,  204,  203,  198,  196,  195,  193,  192,  191, 1016,
+        3, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016,
+     1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016,
+
+     1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016,
+     1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016,
+     1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016,
+     1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016,
+     1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016,
+     1016, 1016, 1016, 1016, 1016, 1016, 1016
     } ;
 
-static yyconst short int yy_chk[1355] =
+static yyconst short int yy_chk[1358] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -841,146 +843,146 @@ static yyconst short int yy_chk[1355] =
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    4,    5,    7,    8,
        11,   10,    7,    9,    9,    9,    9,    9,   12,   13,
-      708,   14,   12,    4,    5,    9,    8,   11,   18,    7,
+      711,   14,   12,    4,    5,    9,    8,   11,   18,    7,
 
        10,   13,   14,   16,   19,   13,   14,   16,   32,   12,
-       20,  308,    9,  308,   20,   18,   16,   10,   97,   97,
+       20,  712,    9,  713,   20,   18,   16,   10,   97,   97,
        16,   19,   13,   14,   15,   32,   15,   15,   15,   15,
-       15,   20,   21,  709,  149,  710,   21,   16,   15,  149,
+       15,   20,   21,  714,  149,  715,   21,   16,   15,  149,
        22,   15,   16,   17,   22,   17,   17,   17,   17,   17,
        23,   23,   33,   21,   15,   15,   15,   17,   24,   17,
        29,   22,   29,   26,   35,   26,   35,   23,  147,   33,
-       23,   26,   46,   24,   17,   24,   23,   29,  711,   35,
+       23,   26,   46,   24,   17,   24,   23,   29,  717,   35,
        88,   24,   26,   35,  151,   17,   24,  147,   33,   46,
        23,   23,   23,   26,   35,   24,   46,   26,   88,   68,
 
       151,   24,   25,   35,   25,   26,   27,   27,   26,   30,
        25,   30,   28,   25,   28,   27,   25,   27,   53,   99,
        28,   25,   53,   27,   68,   25,   30,   99,   25,   31,
-      712,   28,   25,   36,  714,   25,   25,   42,   28,   53,
+      718,   28,   25,   36,  719,   25,   25,   42,   28,   53,
        27,   25,   27,   49,   31,   37,   31,   34,   28,   28,
        36,   28,   27,   34,   42,  174,   30,   28,   31,   37,
        49,  134,   37,   38,   34,   31,   52,  160,  134,  174,
-      715,   34,   38,  160,   39,   34,   36,   38,   42,   34,
-       38,  172,   44,   52,   34,   37,   49,   38,  716,  172,
+      720,   34,   38,  160,   39,   34,   36,   38,   42,   34,
+       38,  172,   44,   52,   34,   37,   49,   38,  723,  172,
       240,   39,   41,   45,   38,   38,   51,   38,   39,   44,
 
        38,   41,   39,   38,   41,   41,   41,   41,   41,   41,
-       45,   39,  469,   51,   44,   52,   41,   39,   40,  717,
-      240,  469,   47,   40,   51,   50,   48,   40,  720,   45,
-      721,   40,   41,   40,   40,   40,   43,  103,   43,   47,
-      103,  103,   50,   48,  722,   43,  724,  103,  725,   43,
-       40,   43,   43,   43,   48,  726,   40,   40,  148,   47,
-       40,   40,   50,   48,  727,   40,   57,   57,   57,   57,
+       45,   39,  472,   51,   44,   52,   41,   39,   40,  724,
+      240,  472,   47,   40,   51,   50,   48,   40,  725,   45,
+      727,   40,   41,   40,   40,   40,   43,  103,   43,   47,
+      103,  103,   50,   48,  728,   43,  729,  103,  730,   43,
+       40,   43,   43,   43,   48,  732,   40,   40,  148,   47,
+       40,   40,   50,   48,  733,   40,   57,   57,   57,   57,
        57,  148,  292,   43,   65,   65,   65,   65,   65,   74,
        74,   74,   74,   74,  242,  292,  208,  242,   65,  385,
-      385,  729,   75,   74,   75,   75,   75,   75,   75,   76,
+      385,  734,   75,   74,   75,   75,   75,   75,   75,   76,
 
-       76,  208,  208,   76,   76,   76,   76,   76,   75,  730,
-      115,  473,  473,  731,   65,  732,  115,  194,  194,   74,
+       76,  208,  208,   76,   76,   76,   76,   76,   75,  735,
+      115,  476,  476,  736,   65,  739,  115,  194,  194,   74,
       115,  194,  194,  194,  194,  194,  199,  199,  199,  199,
-      199,  200,  200,  733,   75,  200,  200,  200,  200,  200,
+      199,  200,  200,  740,   75,  200,  200,  200,  200,  200,
       199,  201,  201,  201,  201,  201,  202,  202,  202,  202,
-      202,  305,  477,  736,  737,  738,  305,  315,  315,  315,
-      315,  315,  740,  305,  741,  477,  199,  316,  316,  316,
-      316,  316,  317,  317,  744,  745,  317,  317,  317,  317,
-      317,  318,  318,  318,  318,  318,  319,  319,  319,  319,
-      319,  438,  438,  438,  438,  438,  439,  439,  439,  439,
-
-      439,  478,  521,  743,  739,  746,  747,  521,  739,  748,
-      749,  478,  750,  752,  755,  478,  757,  758,  743,  759,
-      760,  762,  763,  764,  766,  767,  768,  769,  770,  772,
-      774,  775,  776,  778,  779,  780,  781,  782,  783,  784,
-      785,  786,  787,  788,  789,  790,  791,  792,  794,  797,
-      799,  800,  801,  802,  803,  804,  805,  806,  808,  809,
-      810,  811,  812,  813,  815,  816,  816,  817,  816,  816,
-      816,  816,  816,  816,  816,  816,  816,  816,  818,  819,
-      820,  821,  822,  816,  816,  816,  816,  816,  823,  824,
-      825,  826,  827,  828,  829,  830,  831,  833,  834,  835,
-
-      836,  837,  839,  840,  841,  843,  847,  848,  850,  851,
-      852,  853,  816,  855,  856,  857,  858,  859,  860,  861,
-      862,  864,  865,  866,  867,  868,  869,  872,  875,  876,
-      877,  878,  879,  880,  881,  882,  883,  884,  885,  816,
-      816,  849,  849,  887,  849,  849,  849,  849,  849,  849,
-      849,  849,  849,  849,  889,  890,  891,  893,  894,  849,
-      849,  849,  849,  849,  895,  896,  897,  898,  899,  900,
-      902,  903,  904,  905,  906,  907,  908,  909,  910,  911,
-      912,  914,  916,  917,  918,  919,  920,  921,  849,  922,
-      923,  924,  925,  926,  927,  928,  929,  933,  934,  935,
-
-      937,  938,  939,  940,  941,  942,  943,  944,  945,  946,
-      948,  949,  950,  951,  952,  849,  849,  953,  954,  955,
-      956,  957,  958,  961,  962,  963,  964,  965,  966,  967,
+      202,  305,  741,  308,  743,  744,  305,  315,  315,  315,
+      315,  315,  747,  305,  524,  308,  199,  308,  308,  524,
+      748,  308,  316,  316,  316,  316,  316,  317,  317,  749,
+      750,  317,  317,  317,  317,  317,  318,  318,  318,  318,
+      318,  319,  319,  319,  319,  319,  441,  441,  441,  441,
+
+      441,  442,  442,  442,  442,  442,  480,  481,  742,  746,
+      751,  752,  742,  753,  755,  758,  760,  481,  761,  480,
+      762,  481,  763,  765,  746,  766,  767,  769,  770,  771,
+      772,  773,  775,  777,  778,  779,  781,  782,  783,  784,
+      785,  786,  787,  788,  789,  790,  791,  792,  793,  794,
+      795,  797,  800,  802,  803,  804,  805,  806,  807,  808,
+      809,  811,  812,  813,  814,  815,  816,  818,  819,  819,
+      820,  819,  819,  819,  819,  819,  819,  819,  819,  819,
+      819,  821,  822,  823,  824,  825,  819,  819,  819,  819,
+      819,  826,  827,  828,  829,  830,  831,  832,  833,  834,
+
+      836,  837,  838,  839,  840,  842,  843,  844,  846,  850,
+      851,  853,  854,  855,  856,  819,  858,  859,  860,  861,
+      862,  863,  864,  865,  867,  868,  869,  870,  871,  872,
+      875,  878,  879,  880,  881,  882,  883,  884,  885,  886,
+      887,  888,  819,  819,  852,  852,  890,  852,  852,  852,
+      852,  852,  852,  852,  852,  852,  852,  892,  893,  894,
+      896,  897,  852,  852,  852,  852,  852,  898,  899,  900,
+      901,  902,  903,  905,  906,  907,  908,  909,  910,  911,
+      912,  913,  914,  915,  917,  919,  920,  921,  922,  923,
+      924,  852,  925,  926,  927,  928,  929,  930,  931,  932,
+
+      936,  937,  938,  940,  941,  942,  943,  944,  945,  946,
+      947,  948,  949,  951,  952,  953,  954,  955,  852,  852,
+      956,  957,  958,  959,  960,  961,  964,  965,  966,  967,
       968,  969,  970,  971,  972,  973,  974,  975,  976,  977,
-      978,  979,  980,  981,  982,  983,  985,  986,  987,  988,
-      989,  991,  992,  994,  995,  996,  997,  998,  999, 1001,
-     1002, 1003, 1004, 1005, 1006, 1007, 1008, 1010, 1011, 1014,
-     1015,  705, 1015, 1016,  704, 1016, 1017,  703, 1017, 1018,
-      702, 1018,  701,  700,  699,  698,  697,  696,  695,  694,
-      693,  692,  691,  690,  689,  688,  687,  686,  685,  684,
-
-      683,  681,  680,  678,  677,  676,  675,  674,  672,  670,
-      669,  668,  667,  666,  665,  664,  663,  662,  661,  660,
-      659,  658,  657,  656,  655,  654,  653,  652,  650,  649,
-      648,  646,  645,  644,  643,  641,  640,  639,  638,  637,
-      636,  635,  634,  633,  632,  630,  628,  627,  626,  625,
-      624,  623,  619,  618,  617,  615,  613,  612,  611,  610,
-      609,  608,  607,  606,  604,  602,  599,  598,  595,  594,
-      593,  592,  589,  588,  587,  584,  583,  581,  580,  579,
-      578,  577,  576,  575,  574,  572,  571,  569,  568,  567,
-      566,  565,  562,  561,  560,  559,  557,  556,  555,  554,
-
-      553,  552,  550,  547,  546,  545,  544,  541,  540,  539,
-      538,  537,  536,  535,  532,  531,  529,  528,  527,  526,
-      525,  524,  522,  520,  519,  518,  517,  516,  515,  514,
-      513,  512,  510,  509,  508,  507,  506,  503,  501,  500,
-      499,  496,  494,  493,  492,  491,  490,  488,  487,  485,
-      484,  482,  481,  480,  476,  474,  472,  471,  470,  468,
-      467,  466,  465,  464,  463,  462,  461,  460,  459,  458,
-      457,  456,  455,  454,  453,  452,  451,  450,  449,  448,
-      446,  445,  444,  443,  442,  441,  440,  437,  436,  435,
-      434,  433,  432,  431,  428,  427,  426,  425,  423,  422,
-
-      421,  420,  419,  418,  416,  415,  414,  413,  412,  411,
-      409,  408,  406,  405,  404,  403,  402,  400,  399,  398,
-      397,  396,  395,  394,  393,  392,  391,  390,  389,  388,
-      387,  386,  384,  382,  380,  379,  377,  376,  375,  374,
-      373,  372,  371,  369,  367,  366,  365,  363,  362,  361,
-      360,  359,  358,  357,  356,  354,  353,  352,  349,  348,
-      347,  346,  345,  343,  341,  340,  339,  338,  337,  336,
-      334,  333,  332,  331,  330,  329,  327,  326,  325,  323,
-      322,  321,  320,  314,  313,  312,  311,  310,  309,  307,
-      306,  304,  303,  302,  301,  300,  299,  298,  297,  296,
-
-      295,  294,  293,  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,  265,
-      264,  263,  262,  261,  260,  259,  258,  257,  256,  255,
-      254,  253,  252,  250,  249,  248,  247,  246,  245,  243,
-      241,  239,  238,  237,  236,  235,  234,  233,  232,  231,
-      230,  229,  228,  227,  226,  225,  224,  223,  222,  221,
-      220,  219,  218,  217,  216,  215,  214,  213,  212,  211,
-      210,  209,  207,  206,  205,  204,  203,  192,  191,  188,
-      187,  186,  185,  184,  183,  182,  181,  180,  179,  173,
-
-      171,  168,  166,  164,  163,  162,  161,  159,  154,  153,
-      152,  150,  145,  144,  143,  142,  141,  140,  139,  138,
-      137,  136,  135,  133,  132,  131,  130,  129,  128,  126,
-      125,  124,  123,  122,  121,  120,  119,  118,  117,  116,
-      114,  113,  112,  111,  110,  109,  108,  107,  106,  105,
-      104,  102,  101,  100,   98,   96,   95,   94,   93,   92,
-       91,   90,   89,   87,   86,   85,   84,   83,   82,   81,
-       69,   67,   66,   64,   55,   54,    3, 1013, 1013, 1013,
-     1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013,
-     1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013,
-
-     1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013,
-     1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013,
-     1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013,
-     1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013,
-     1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013,
-     1013, 1013, 1013, 1013
+      978,  979,  980,  981,  982,  983,  984,  985,  986,  988,
+      989,  990,  991,  992,  994,  995,  997,  998,  999, 1000,
+     1001, 1002, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011,
+     1013, 1014, 1017, 1018,  708, 1018, 1019,  707, 1019, 1020,
+      706, 1020, 1021,  705, 1021,  704,  703,  702,  701,  700,
+      699,  698,  697,  696,  695,  694,  693,  692,  691,  690,
+
+      689,  688,  687,  686,  684,  683,  681,  680,  679,  678,
+      677,  675,  673,  672,  671,  670,  669,  668,  667,  666,
+      665,  664,  663,  662,  661,  660,  659,  658,  657,  656,
+      655,  653,  652,  651,  649,  648,  647,  646,  644,  643,
+      642,  641,  640,  639,  638,  637,  636,  635,  633,  631,
+      630,  629,  628,  627,  626,  622,  621,  620,  618,  616,
+      615,  614,  613,  612,  611,  610,  609,  607,  605,  602,
+      601,  598,  597,  596,  595,  592,  591,  590,  587,  586,
+      584,  583,  582,  581,  580,  579,  578,  577,  575,  574,
+      572,  571,  570,  569,  568,  565,  564,  563,  562,  560,
+
+      559,  558,  557,  556,  555,  553,  550,  549,  548,  547,
+      544,  543,  542,  541,  540,  539,  538,  535,  534,  532,
+      531,  530,  529,  528,  527,  525,  523,  522,  521,  520,
+      519,  518,  517,  516,  515,  513,  512,  511,  510,  509,
+      506,  504,  503,  502,  499,  497,  496,  495,  494,  493,
+      491,  490,  488,  487,  485,  484,  483,  479,  477,  475,
+      474,  473,  471,  470,  469,  468,  467,  466,  465,  464,
+      463,  462,  461,  460,  459,  458,  457,  456,  455,  454,
+      453,  452,  451,  449,  448,  447,  446,  445,  444,  443,
+      440,  439,  438,  437,  436,  435,  432,  428,  427,  426,
+
+      425,  423,  422,  421,  420,  419,  418,  416,  415,  414,
+      413,  412,  411,  409,  408,  406,  405,  404,  403,  402,
+      400,  399,  398,  397,  396,  395,  394,  393,  392,  391,
+      390,  389,  388,  387,  386,  384,  382,  380,  379,  377,
+      376,  375,  374,  373,  372,  371,  369,  367,  366,  365,
+      363,  362,  361,  360,  359,  358,  357,  356,  354,  353,
+      352,  349,  348,  347,  346,  345,  343,  341,  340,  339,
+      338,  337,  336,  334,  333,  332,  331,  330,  329,  327,
+      326,  325,  323,  322,  321,  320,  314,  313,  312,  311,
+      310,  309,  307,  306,  304,  303,  302,  301,  300,  299,
+
+      298,  297,  296,  295,  294,  293,  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,  265,  264,  263,  262,  261,  260,  259,  258,
+      257,  256,  255,  254,  253,  252,  250,  249,  248,  247,
+      246,  245,  243,  241,  239,  238,  237,  236,  235,  234,
+      233,  232,  231,  230,  229,  228,  227,  226,  225,  224,
+      223,  222,  221,  220,  219,  218,  217,  216,  215,  214,
+      213,  212,  211,  210,  209,  207,  206,  205,  204,  203,
+      192,  191,  188,  187,  186,  185,  184,  183,  182,  181,
+
+      180,  179,  173,  171,  168,  166,  164,  163,  162,  161,
+      159,  154,  153,  152,  150,  145,  144,  143,  142,  141,
+      140,  139,  138,  137,  136,  135,  133,  132,  131,  130,
+      129,  128,  126,  125,  124,  123,  122,  121,  120,  119,
+      118,  117,  116,  114,  113,  112,  111,  110,  109,  108,
+      107,  106,  105,  104,  102,  101,  100,   98,   96,   95,
+       94,   93,   92,   91,   90,   89,   87,   86,   85,   84,
+       83,   82,   81,   69,   67,   66,   64,   55,   54,    3,
+     1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016,
+     1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016,
+
+     1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016,
+     1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016,
+     1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016,
+     1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016,
+     1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016,
+     1016, 1016, 1016, 1016, 1016, 1016, 1016
     } ;
 
 static yy_state_type yy_last_accepting_state;
@@ -998,7 +1000,7 @@ char *yytext;
 #define INITIAL 0
 #line 2 "Gmsh.l"
 
-// $Id: Gmsh.yy.cpp,v 1.118 2001-10-04 14:32:12 geuzaine Exp $
+// $Id: Gmsh.yy.cpp,v 1.119 2001-10-29 08:52:21 geuzaine Exp $
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -1041,7 +1043,7 @@ void   skipline(void);
 	     && ferror( yyin ) )					\
      YY_FATAL_ERROR( "input in flex scanner failed" );
 
-#line 1045 "Gmsh.yy.cpp"
+#line 1047 "Gmsh.yy.cpp"
 
 /* Macros after this point can all be overridden by user definitions in
  * section 1.
@@ -1195,7 +1197,7 @@ YY_DECL
 #line 63 "Gmsh.l"
 
 
-#line 1199 "Gmsh.yy.cpp"
+#line 1201 "Gmsh.yy.cpp"
 
 	if ( yy_init )
 		{
@@ -1246,13 +1248,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 >= 1014 )
+				if ( yy_current_state >= 1017 )
 					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] != 1278 );
+		while ( yy_base[yy_current_state] != 1281 );
 
 yy_find_action:
 		yy_act = yy_accept[yy_current_state];
@@ -1321,885 +1323,900 @@ YY_RULE_SETUP
 case 9:
 YY_RULE_SETUP
 #line 73 "Gmsh.l"
-return tAFFECT;
+{yylval.d = NEWLINE(); return tDOUBLE;}
 	YY_BREAK
 case 10:
 YY_RULE_SETUP
 #line 74 "Gmsh.l"
-return tAFFECTPLUS ;
+{yylval.d = NEWSURFACE(); return tDOUBLE;}
 	YY_BREAK
 case 11:
 YY_RULE_SETUP
 #line 75 "Gmsh.l"
-return tAFFECTMINUS ;
+{yylval.d = NEWVOLUME(); return tDOUBLE;}
 	YY_BREAK
 case 12:
 YY_RULE_SETUP
 #line 76 "Gmsh.l"
-return tAFFECTTIMES ;
+return tAFFECT;
 	YY_BREAK
 case 13:
 YY_RULE_SETUP
 #line 77 "Gmsh.l"
-return tAFFECTDIVIDE ;
+return tAFFECTPLUS ;
 	YY_BREAK
 case 14:
 YY_RULE_SETUP
 #line 78 "Gmsh.l"
-return tDOTS;
+return tAFFECTMINUS ;
 	YY_BREAK
 case 15:
 YY_RULE_SETUP
 #line 79 "Gmsh.l"
-return tDOTS;
+return tAFFECTTIMES ;
 	YY_BREAK
 case 16:
 YY_RULE_SETUP
 #line 80 "Gmsh.l"
-return tCROSSPRODUCT ;
+return tAFFECTDIVIDE ;
 	YY_BREAK
 case 17:
 YY_RULE_SETUP
 #line 81 "Gmsh.l"
-return tOR ;
+return tDOTS;
 	YY_BREAK
 case 18:
 YY_RULE_SETUP
 #line 82 "Gmsh.l"
-return tAND ;
+return tDOTS;
 	YY_BREAK
 case 19:
 YY_RULE_SETUP
 #line 83 "Gmsh.l"
-return tPLUSPLUS ;
+return tCROSSPRODUCT ;
 	YY_BREAK
 case 20:
 YY_RULE_SETUP
 #line 84 "Gmsh.l"
-return tMINUSMINUS ;
+return tOR ;
 	YY_BREAK
 case 21:
 YY_RULE_SETUP
 #line 85 "Gmsh.l"
-return tEQUAL ;
+return tAND ;
 	YY_BREAK
 case 22:
 YY_RULE_SETUP
 #line 86 "Gmsh.l"
-return tNOTEQUAL ;
+return tPLUSPLUS ;
 	YY_BREAK
 case 23:
 YY_RULE_SETUP
 #line 87 "Gmsh.l"
-return tAPPROXEQUAL ;
+return tMINUSMINUS ;
 	YY_BREAK
 case 24:
 YY_RULE_SETUP
 #line 88 "Gmsh.l"
-return tLESSOREQUAL ;
+return tEQUAL ;
 	YY_BREAK
 case 25:
 YY_RULE_SETUP
 #line 89 "Gmsh.l"
-return tGREATEROREQUAL ;
+return tNOTEQUAL ;
 	YY_BREAK
 case 26:
 YY_RULE_SETUP
-#line 91 "Gmsh.l"
-return tAcos ;
+#line 90 "Gmsh.l"
+return tAPPROXEQUAL ;
 	YY_BREAK
 case 27:
 YY_RULE_SETUP
-#line 92 "Gmsh.l"
-return tAcos ;
+#line 91 "Gmsh.l"
+return tLESSOREQUAL ;
 	YY_BREAK
 case 28:
 YY_RULE_SETUP
-#line 93 "Gmsh.l"
-return tAsin;
+#line 92 "Gmsh.l"
+return tGREATEROREQUAL ;
 	YY_BREAK
 case 29:
 YY_RULE_SETUP
 #line 94 "Gmsh.l"
-return tAsin;
+return tAcos ;
 	YY_BREAK
 case 30:
 YY_RULE_SETUP
 #line 95 "Gmsh.l"
-return tAtan ;
+return tAcos ;
 	YY_BREAK
 case 31:
 YY_RULE_SETUP
 #line 96 "Gmsh.l"
-return tAtan ;
+return tAsin;
 	YY_BREAK
 case 32:
 YY_RULE_SETUP
 #line 97 "Gmsh.l"
-return tAtan2 ;
+return tAsin;
 	YY_BREAK
 case 33:
 YY_RULE_SETUP
 #line 98 "Gmsh.l"
-return tAtan2 ;
+return tAtan ;
 	YY_BREAK
 case 34:
 YY_RULE_SETUP
 #line 99 "Gmsh.l"
-return tAttractor;
+return tAtan ;
 	YY_BREAK
 case 35:
 YY_RULE_SETUP
-#line 101 "Gmsh.l"
-return tBezier;
+#line 100 "Gmsh.l"
+return tAtan2 ;
 	YY_BREAK
 case 36:
 YY_RULE_SETUP
-#line 102 "Gmsh.l"
-return tBump;
+#line 101 "Gmsh.l"
+return tAtan2 ;
 	YY_BREAK
 case 37:
 YY_RULE_SETUP
-#line 103 "Gmsh.l"
-return tBSpline;
+#line 102 "Gmsh.l"
+return tAttractor;
 	YY_BREAK
 case 38:
 YY_RULE_SETUP
 #line 104 "Gmsh.l"
-return tBounds;
+return tBezier;
 	YY_BREAK
 case 39:
 YY_RULE_SETUP
-#line 106 "Gmsh.l"
-return tCeil ;
+#line 105 "Gmsh.l"
+return tBump;
 	YY_BREAK
 case 40:
 YY_RULE_SETUP
-#line 107 "Gmsh.l"
-return tCosh ;
+#line 106 "Gmsh.l"
+return tBSpline;
 	YY_BREAK
 case 41:
 YY_RULE_SETUP
-#line 108 "Gmsh.l"
-return tCos ;
+#line 107 "Gmsh.l"
+return tBounds;
 	YY_BREAK
 case 42:
 YY_RULE_SETUP
 #line 109 "Gmsh.l"
-return tCharacteristic;
+return tCeil ;
 	YY_BREAK
 case 43:
 YY_RULE_SETUP
 #line 110 "Gmsh.l"
-return tCircle;
+return tCosh ;
 	YY_BREAK
 case 44:
 YY_RULE_SETUP
 #line 111 "Gmsh.l"
-return tCoherence;
+return tCos ;
 	YY_BREAK
 case 45:
 YY_RULE_SETUP
 #line 112 "Gmsh.l"
-return tComplex;
+return tCharacteristic;
 	YY_BREAK
 case 46:
 YY_RULE_SETUP
 #line 113 "Gmsh.l"
-return tColor;
+return tCircle;
 	YY_BREAK
 case 47:
 YY_RULE_SETUP
 #line 114 "Gmsh.l"
-return tColorTable;
+return tCoherence;
 	YY_BREAK
 case 48:
 YY_RULE_SETUP
 #line 115 "Gmsh.l"
-return tSpline;
+return tComplex;
 	YY_BREAK
 case 49:
 YY_RULE_SETUP
 #line 116 "Gmsh.l"
-return tCall;
+return tColor;
 	YY_BREAK
 case 50:
 YY_RULE_SETUP
-#line 118 "Gmsh.l"
-return tDelete;
+#line 117 "Gmsh.l"
+return tColorTable;
 	YY_BREAK
 case 51:
 YY_RULE_SETUP
-#line 119 "Gmsh.l"
-return tDilate;
+#line 118 "Gmsh.l"
+return tSpline;
 	YY_BREAK
 case 52:
 YY_RULE_SETUP
-#line 120 "Gmsh.l"
-return tDuplicata;
+#line 119 "Gmsh.l"
+return tCall;
 	YY_BREAK
 case 53:
 YY_RULE_SETUP
 #line 121 "Gmsh.l"
-return tDraw;
+return tDelete;
 	YY_BREAK
 case 54:
 YY_RULE_SETUP
-#line 123 "Gmsh.l"
-return tExp ;
+#line 122 "Gmsh.l"
+return tDilate;
 	YY_BREAK
 case 55:
 YY_RULE_SETUP
-#line 124 "Gmsh.l"
-return tEllipsis;
+#line 123 "Gmsh.l"
+return tDuplicata;
 	YY_BREAK
 case 56:
 YY_RULE_SETUP
-#line 125 "Gmsh.l"
-return tExtrude;
+#line 124 "Gmsh.l"
+return tDraw;
 	YY_BREAK
 case 57:
 YY_RULE_SETUP
 #line 126 "Gmsh.l"
-return tElliptic;
+return tExp ;
 	YY_BREAK
 case 58:
 YY_RULE_SETUP
 #line 127 "Gmsh.l"
-return tELLIPSE;
+return tEllipsis;
 	YY_BREAK
 case 59:
 YY_RULE_SETUP
 #line 128 "Gmsh.l"
-return tEndFor;
+return tExtrude;
 	YY_BREAK
 case 60:
 YY_RULE_SETUP
 #line 129 "Gmsh.l"
-return tEndIf;
+return tElliptic;
 	YY_BREAK
 case 61:
 YY_RULE_SETUP
 #line 130 "Gmsh.l"
-return tExit;
+return tELLIPSE;
 	YY_BREAK
 case 62:
 YY_RULE_SETUP
-#line 132 "Gmsh.l"
-return tFabs ;
+#line 131 "Gmsh.l"
+return tEndFor;
 	YY_BREAK
 case 63:
 YY_RULE_SETUP
-#line 133 "Gmsh.l"
-return tFloor ;
+#line 132 "Gmsh.l"
+return tEndIf;
 	YY_BREAK
 case 64:
 YY_RULE_SETUP
-#line 134 "Gmsh.l"
-return tFmod ;
+#line 133 "Gmsh.l"
+return tExit;
 	YY_BREAK
 case 65:
 YY_RULE_SETUP
 #line 135 "Gmsh.l"
-return tFor;
+return tFabs ;
 	YY_BREAK
 case 66:
 YY_RULE_SETUP
 #line 136 "Gmsh.l"
-return tFunction;
+return tFloor ;
 	YY_BREAK
 case 67:
 YY_RULE_SETUP
-#line 138 "Gmsh.l"
-return tHypot ;
+#line 137 "Gmsh.l"
+return tFmod ;
 	YY_BREAK
 case 68:
 YY_RULE_SETUP
-#line 140 "Gmsh.l"
-return tIn;
+#line 138 "Gmsh.l"
+return tFor;
 	YY_BREAK
 case 69:
 YY_RULE_SETUP
-#line 141 "Gmsh.l"
-return tIf;
+#line 139 "Gmsh.l"
+return tFunction;
 	YY_BREAK
 case 70:
 YY_RULE_SETUP
-#line 142 "Gmsh.l"
-return tIntersect;
+#line 141 "Gmsh.l"
+return tHypot ;
 	YY_BREAK
 case 71:
 YY_RULE_SETUP
-#line 144 "Gmsh.l"
-return tKnots;
+#line 143 "Gmsh.l"
+return tIn;
 	YY_BREAK
 case 72:
 YY_RULE_SETUP
-#line 146 "Gmsh.l"
-return tLength;
+#line 144 "Gmsh.l"
+return tIf;
 	YY_BREAK
 case 73:
 YY_RULE_SETUP
-#line 147 "Gmsh.l"
-return tLine;
+#line 145 "Gmsh.l"
+return tIntersect;
 	YY_BREAK
 case 74:
 YY_RULE_SETUP
-#line 148 "Gmsh.l"
-return tLoop;
+#line 147 "Gmsh.l"
+return tKnots;
 	YY_BREAK
 case 75:
 YY_RULE_SETUP
 #line 149 "Gmsh.l"
-return tLog ;
+return tLength;
 	YY_BREAK
 case 76:
 YY_RULE_SETUP
 #line 150 "Gmsh.l"
-return tLog10 ;
+return tLine;
 	YY_BREAK
 case 77:
 YY_RULE_SETUP
 #line 151 "Gmsh.l"
-return tLayers;
+return tLoop;
 	YY_BREAK
 case 78:
 YY_RULE_SETUP
-#line 153 "Gmsh.l"
-return tModulo ;
+#line 152 "Gmsh.l"
+return tLog ;
 	YY_BREAK
 case 79:
 YY_RULE_SETUP
-#line 154 "Gmsh.l"
-return tMesh;
+#line 153 "Gmsh.l"
+return tLog10 ;
 	YY_BREAK
 case 80:
 YY_RULE_SETUP
-#line 155 "Gmsh.l"
-return tMPI_Rank;
+#line 154 "Gmsh.l"
+return tLayers;
 	YY_BREAK
 case 81:
 YY_RULE_SETUP
 #line 156 "Gmsh.l"
-return tMPI_Size;
+return tModulo ;
 	YY_BREAK
 case 82:
 YY_RULE_SETUP
-#line 158 "Gmsh.l"
-return tNurbs;
+#line 157 "Gmsh.l"
+return tMesh;
 	YY_BREAK
 case 83:
 YY_RULE_SETUP
-#line 160 "Gmsh.l"
-return tOrder;
+#line 158 "Gmsh.l"
+return tMPI_Rank;
 	YY_BREAK
 case 84:
 YY_RULE_SETUP
-#line 162 "Gmsh.l"
-return tPhysical;
+#line 159 "Gmsh.l"
+return tMPI_Size;
 	YY_BREAK
 case 85:
 YY_RULE_SETUP
-#line 163 "Gmsh.l"
-return tPi;
+#line 161 "Gmsh.l"
+return tNurbs;
 	YY_BREAK
 case 86:
 YY_RULE_SETUP
-#line 164 "Gmsh.l"
-return tPlane;
+#line 163 "Gmsh.l"
+return tOrder;
 	YY_BREAK
 case 87:
 YY_RULE_SETUP
 #line 165 "Gmsh.l"
-return tPoint;
+return tPhysical;
 	YY_BREAK
 case 88:
 YY_RULE_SETUP
 #line 166 "Gmsh.l"
-return tProgression;
+return tPi;
 	YY_BREAK
 case 89:
 YY_RULE_SETUP
 #line 167 "Gmsh.l"
-return tProgression;
+return tPlane;
 	YY_BREAK
 case 90:
 YY_RULE_SETUP
 #line 168 "Gmsh.l"
-return tParametric;
+return tPoint;
 	YY_BREAK
 case 91:
 YY_RULE_SETUP
 #line 169 "Gmsh.l"
-return tPrintf;
+return tProgression;
 	YY_BREAK
 case 92:
 YY_RULE_SETUP
 #line 170 "Gmsh.l"
-return tPlugin;
+return tProgression;
 	YY_BREAK
 case 93:
 YY_RULE_SETUP
-#line 172 "Gmsh.l"
-return tRecombine;
+#line 171 "Gmsh.l"
+return tParametric;
 	YY_BREAK
 case 94:
 YY_RULE_SETUP
-#line 173 "Gmsh.l"
-return tRotate;
+#line 172 "Gmsh.l"
+return tPrintf;
 	YY_BREAK
 case 95:
 YY_RULE_SETUP
-#line 174 "Gmsh.l"
-return tRuled;
+#line 173 "Gmsh.l"
+return tPlugin;
 	YY_BREAK
 case 96:
 YY_RULE_SETUP
 #line 175 "Gmsh.l"
-return tRand;
+return tRecombine;
 	YY_BREAK
 case 97:
 YY_RULE_SETUP
 #line 176 "Gmsh.l"
-return tReturn;
+return tRotate;
 	YY_BREAK
 case 98:
 YY_RULE_SETUP
-#line 178 "Gmsh.l"
-return tSqrt ;
+#line 177 "Gmsh.l"
+return tRuled;
 	YY_BREAK
 case 99:
 YY_RULE_SETUP
-#line 179 "Gmsh.l"
-return tSin ;
+#line 178 "Gmsh.l"
+return tRand;
 	YY_BREAK
 case 100:
 YY_RULE_SETUP
-#line 180 "Gmsh.l"
-return tSinh ;
+#line 179 "Gmsh.l"
+return tReturn;
 	YY_BREAK
 case 101:
 YY_RULE_SETUP
 #line 181 "Gmsh.l"
-return tSpline;
+return tSqrt ;
 	YY_BREAK
 case 102:
 YY_RULE_SETUP
 #line 182 "Gmsh.l"
-return tSurface;
+return tSin ;
 	YY_BREAK
 case 103:
 YY_RULE_SETUP
 #line 183 "Gmsh.l"
-return tSymmetry;
+return tSinh ;
 	YY_BREAK
 case 104:
 YY_RULE_SETUP
 #line 184 "Gmsh.l"
-return tSprintf ;
+return tSpline;
 	YY_BREAK
 case 105:
 YY_RULE_SETUP
 #line 185 "Gmsh.l"
-return tStrCat ;
+return tSurface;
 	YY_BREAK
 case 106:
 YY_RULE_SETUP
 #line 186 "Gmsh.l"
-return tStrPrefix ;
+return tSymmetry;
 	YY_BREAK
 case 107:
 YY_RULE_SETUP
-#line 188 "Gmsh.l"
-return tTransfinite;
+#line 187 "Gmsh.l"
+return tSprintf ;
 	YY_BREAK
 case 108:
 YY_RULE_SETUP
-#line 189 "Gmsh.l"
-return tTranslate;
+#line 188 "Gmsh.l"
+return tStrCat ;
 	YY_BREAK
 case 109:
 YY_RULE_SETUP
-#line 190 "Gmsh.l"
-return tTanh ;
+#line 189 "Gmsh.l"
+return tStrPrefix ;
 	YY_BREAK
 case 110:
 YY_RULE_SETUP
 #line 191 "Gmsh.l"
-return tTan;
+return tTransfinite;
 	YY_BREAK
 case 111:
 YY_RULE_SETUP
 #line 192 "Gmsh.l"
-return tTrimmed;
+return tTranslate;
 	YY_BREAK
 case 112:
 YY_RULE_SETUP
-#line 194 "Gmsh.l"
-return tUsing;
+#line 193 "Gmsh.l"
+return tTanh ;
 	YY_BREAK
 case 113:
 YY_RULE_SETUP
-#line 196 "Gmsh.l"
-return tVolume;
+#line 194 "Gmsh.l"
+return tTan;
 	YY_BREAK
 case 114:
 YY_RULE_SETUP
-#line 198 "Gmsh.l"
-return tWith;
+#line 195 "Gmsh.l"
+return tTrimmed;
 	YY_BREAK
 case 115:
 YY_RULE_SETUP
-#line 200 "Gmsh.l"
-return tScalarTetrahedron;
+#line 197 "Gmsh.l"
+return tUsing;
 	YY_BREAK
 case 116:
 YY_RULE_SETUP
-#line 201 "Gmsh.l"
-return tVectorTetrahedron;
+#line 199 "Gmsh.l"
+return tVolume;
 	YY_BREAK
 case 117:
 YY_RULE_SETUP
-#line 202 "Gmsh.l"
-return tTensorTetrahedron;
+#line 201 "Gmsh.l"
+return tWith;
 	YY_BREAK
 case 118:
 YY_RULE_SETUP
 #line 203 "Gmsh.l"
-return tScalarTriangle;
+return tScalarTetrahedron;
 	YY_BREAK
 case 119:
 YY_RULE_SETUP
 #line 204 "Gmsh.l"
-return tVectorTriangle;
+return tVectorTetrahedron;
 	YY_BREAK
 case 120:
 YY_RULE_SETUP
 #line 205 "Gmsh.l"
-return tTensorTriangle;
+return tTensorTetrahedron;
 	YY_BREAK
 case 121:
 YY_RULE_SETUP
 #line 206 "Gmsh.l"
-return tScalarLine;
+return tScalarTriangle;
 	YY_BREAK
 case 122:
 YY_RULE_SETUP
 #line 207 "Gmsh.l"
-return tVectorLine;
+return tVectorTriangle;
 	YY_BREAK
 case 123:
 YY_RULE_SETUP
 #line 208 "Gmsh.l"
-return tTensorLine;
+return tTensorTriangle;
 	YY_BREAK
 case 124:
 YY_RULE_SETUP
 #line 209 "Gmsh.l"
-return tScalarPoint;
+return tScalarLine;
 	YY_BREAK
 case 125:
 YY_RULE_SETUP
 #line 210 "Gmsh.l"
-return tVectorPoint;
+return tVectorLine;
 	YY_BREAK
 case 126:
 YY_RULE_SETUP
 #line 211 "Gmsh.l"
-return tTensorPoint;
+return tTensorLine;
 	YY_BREAK
 case 127:
 YY_RULE_SETUP
-#line 214 "Gmsh.l"
-return tCARTESIAN_POINT;
+#line 212 "Gmsh.l"
+return tScalarPoint;
 	YY_BREAK
 case 128:
 YY_RULE_SETUP
-#line 215 "Gmsh.l"
-return tB_SPLINE_SURFACE_WITH_KNOTS;
+#line 213 "Gmsh.l"
+return tVectorPoint;
 	YY_BREAK
 case 129:
 YY_RULE_SETUP
-#line 216 "Gmsh.l"
-return tB_SPLINE_CURVE_WITH_KNOTS;
+#line 214 "Gmsh.l"
+return tTensorPoint;
 	YY_BREAK
 case 130:
 YY_RULE_SETUP
 #line 217 "Gmsh.l"
-return tUNSPECIFIED;
+return tCARTESIAN_POINT;
 	YY_BREAK
 case 131:
 YY_RULE_SETUP
 #line 218 "Gmsh.l"
-return tCONTINUOUS;
+return tB_SPLINE_SURFACE_WITH_KNOTS;
 	YY_BREAK
 case 132:
 YY_RULE_SETUP
 #line 219 "Gmsh.l"
-return tFALSE;
+return tB_SPLINE_CURVE_WITH_KNOTS;
 	YY_BREAK
 case 133:
 YY_RULE_SETUP
 #line 220 "Gmsh.l"
-return tTRUE;
+return tUNSPECIFIED;
 	YY_BREAK
 case 134:
 YY_RULE_SETUP
 #line 221 "Gmsh.l"
-return tU;
+return tCONTINUOUS;
 	YY_BREAK
 case 135:
 YY_RULE_SETUP
 #line 222 "Gmsh.l"
-return tV;
+return tFALSE;
 	YY_BREAK
 case 136:
 YY_RULE_SETUP
 #line 223 "Gmsh.l"
-return tORIENTED_EDGE;
+return tTRUE;
 	YY_BREAK
 case 137:
 YY_RULE_SETUP
 #line 224 "Gmsh.l"
-return tEDGE_CURVE;
+return tU;
 	YY_BREAK
 case 138:
 YY_RULE_SETUP
 #line 225 "Gmsh.l"
-return tEDGE_LOOP;
+return tV;
 	YY_BREAK
 case 139:
 YY_RULE_SETUP
 #line 226 "Gmsh.l"
-return tVERTEX_POINT;
+return tORIENTED_EDGE;
 	YY_BREAK
 case 140:
 YY_RULE_SETUP
 #line 227 "Gmsh.l"
-return tFACE_OUTER_BOUND;
+return tEDGE_CURVE;
 	YY_BREAK
 case 141:
 YY_RULE_SETUP
 #line 228 "Gmsh.l"
-return tFACE_BOUND;
+return tEDGE_LOOP;
 	YY_BREAK
 case 142:
 YY_RULE_SETUP
 #line 229 "Gmsh.l"
-return tADVANCED_FACE;
+return tVERTEX_POINT;
 	YY_BREAK
 case 143:
 YY_RULE_SETUP
 #line 230 "Gmsh.l"
-return tLine;
+return tFACE_OUTER_BOUND;
 	YY_BREAK
 case 144:
 YY_RULE_SETUP
 #line 231 "Gmsh.l"
-return tVECTOR;
+return tFACE_BOUND;
 	YY_BREAK
 case 145:
 YY_RULE_SETUP
 #line 232 "Gmsh.l"
-return tDIRECTION;
+return tADVANCED_FACE;
 	YY_BREAK
 case 146:
 YY_RULE_SETUP
 #line 233 "Gmsh.l"
-return tAXIS2_PLACEMENT_3D;
+return tLine;
 	YY_BREAK
 case 147:
 YY_RULE_SETUP
 #line 234 "Gmsh.l"
-return tPLANE;
+return tVECTOR;
 	YY_BREAK
 case 148:
 YY_RULE_SETUP
 #line 235 "Gmsh.l"
-return tHEADER;
+return tDIRECTION;
 	YY_BREAK
 case 149:
 YY_RULE_SETUP
 #line 236 "Gmsh.l"
-return tDATA;
+return tAXIS2_PLACEMENT_3D;
 	YY_BREAK
 case 150:
 YY_RULE_SETUP
 #line 237 "Gmsh.l"
-return tFILE_SCHEMA;
+return tPLANE;
 	YY_BREAK
 case 151:
 YY_RULE_SETUP
 #line 238 "Gmsh.l"
-return tFILE_NAME;
+return tHEADER;
 	YY_BREAK
 case 152:
 YY_RULE_SETUP
 #line 239 "Gmsh.l"
-return tFILE_DESCRIPTION;
+return tDATA;
 	YY_BREAK
 case 153:
 YY_RULE_SETUP
 #line 240 "Gmsh.l"
-return tISO;
+return tFILE_SCHEMA;
 	YY_BREAK
 case 154:
 YY_RULE_SETUP
 #line 241 "Gmsh.l"
-return tENDISO;
+return tFILE_NAME;
 	YY_BREAK
 case 155:
 YY_RULE_SETUP
 #line 242 "Gmsh.l"
-return tENDSEC;
+return tFILE_DESCRIPTION;
 	YY_BREAK
 case 156:
 YY_RULE_SETUP
 #line 243 "Gmsh.l"
-return tCLOSED_SHELL;
+return tISO;
 	YY_BREAK
 case 157:
 YY_RULE_SETUP
 #line 244 "Gmsh.l"
-return  tADVANCED_BREP_SHAPE_REPRESENTATION;
+return tENDISO;
 	YY_BREAK
 case 158:
 YY_RULE_SETUP
 #line 245 "Gmsh.l"
-return tMANIFOLD_SOLID_BREP;
+return tENDSEC;
 	YY_BREAK
 case 159:
 YY_RULE_SETUP
 #line 246 "Gmsh.l"
-return tCYLINDRICAL_SURFACE;
+return tCLOSED_SHELL;
 	YY_BREAK
 case 160:
 YY_RULE_SETUP
 #line 247 "Gmsh.l"
-return tCONICAL_SURFACE;
+return  tADVANCED_BREP_SHAPE_REPRESENTATION;
 	YY_BREAK
 case 161:
 YY_RULE_SETUP
 #line 248 "Gmsh.l"
-return tTOROIDAL_SURFACE;
+return tMANIFOLD_SOLID_BREP;
 	YY_BREAK
 case 162:
 YY_RULE_SETUP
 #line 249 "Gmsh.l"
-return tCIRCLE;
+return tCYLINDRICAL_SURFACE;
 	YY_BREAK
 case 163:
 YY_RULE_SETUP
 #line 250 "Gmsh.l"
-return tTRIMMED_CURVE;
+return tCONICAL_SURFACE;
 	YY_BREAK
 case 164:
 YY_RULE_SETUP
 #line 251 "Gmsh.l"
-return tGEOMETRIC_SET;
+return tTOROIDAL_SURFACE;
 	YY_BREAK
 case 165:
 YY_RULE_SETUP
 #line 252 "Gmsh.l"
-return tCOMPOSITE_CURVE_SEGMENT;
+return tCIRCLE;
 	YY_BREAK
 case 166:
 YY_RULE_SETUP
 #line 253 "Gmsh.l"
-return tCOMPOSITE_CURVE;
+return tTRIMMED_CURVE;
 	YY_BREAK
 case 167:
 YY_RULE_SETUP
 #line 254 "Gmsh.l"
-return tPRODUCT_DEFINITION;
+return tGEOMETRIC_SET;
 	YY_BREAK
 case 168:
 YY_RULE_SETUP
 #line 255 "Gmsh.l"
-return tPRODUCT_DEFINITION_SHAPE;
+return tCOMPOSITE_CURVE_SEGMENT;
 	YY_BREAK
 case 169:
 YY_RULE_SETUP
 #line 256 "Gmsh.l"
-return tSHAPE_DEFINITION_REPRESENTATION;
+return tCOMPOSITE_CURVE;
 	YY_BREAK
 case 170:
 YY_RULE_SETUP
-#line 258 "Gmsh.l"
-return tVertex;
+#line 257 "Gmsh.l"
+return tPRODUCT_DEFINITION;
 	YY_BREAK
 case 171:
 YY_RULE_SETUP
-#line 259 "Gmsh.l"
-return tFacet;
+#line 258 "Gmsh.l"
+return tPRODUCT_DEFINITION_SHAPE;
 	YY_BREAK
 case 172:
 YY_RULE_SETUP
-#line 260 "Gmsh.l"
-return tNormal;
+#line 259 "Gmsh.l"
+return tSHAPE_DEFINITION_REPRESENTATION;
 	YY_BREAK
 case 173:
 YY_RULE_SETUP
 #line 261 "Gmsh.l"
-return tOuter;
+return tVertex;
 	YY_BREAK
 case 174:
 YY_RULE_SETUP
 #line 262 "Gmsh.l"
-return tLoopSTL;
+return tFacet;
 	YY_BREAK
 case 175:
 YY_RULE_SETUP
 #line 263 "Gmsh.l"
-return tEndLoop;
+return tNormal;
 	YY_BREAK
 case 176:
 YY_RULE_SETUP
 #line 264 "Gmsh.l"
-return tEndFacet;
+return tOuter;
 	YY_BREAK
 case 177:
 YY_RULE_SETUP
 #line 265 "Gmsh.l"
-{skipline();return tEndSolid;}
+return tLoopSTL;
 	YY_BREAK
 case 178:
 YY_RULE_SETUP
 #line 266 "Gmsh.l"
-{skipline();return tSolid;}
+return tEndLoop;
 	YY_BREAK
 case 179:
 YY_RULE_SETUP
-#line 268 "Gmsh.l"
-{yylval.d = (double)atoi((char*)(yytext+1)); return tDOUBLE;}
+#line 267 "Gmsh.l"
+return tEndFacet;
 	YY_BREAK
 case 180:
-#line 271 "Gmsh.l"
+YY_RULE_SETUP
+#line 268 "Gmsh.l"
+{skipline();return tEndSolid;}
+	YY_BREAK
 case 181:
-#line 272 "Gmsh.l"
+YY_RULE_SETUP
+#line 269 "Gmsh.l"
+{skipline();return tSolid;}
+	YY_BREAK
 case 182:
-#line 273 "Gmsh.l"
+YY_RULE_SETUP
+#line 271 "Gmsh.l"
+{yylval.d = (double)atoi((char*)(yytext+1)); return tDOUBLE;}
+	YY_BREAK
 case 183:
+#line 274 "Gmsh.l"
+case 184:
+#line 275 "Gmsh.l"
+case 185:
+#line 276 "Gmsh.l"
+case 186:
 YY_RULE_SETUP
-#line 273 "Gmsh.l"
+#line 276 "Gmsh.l"
 {yylval.d = atof((char *)yytext); return tDOUBLE;}
 	YY_BREAK
-case 184:
+case 187:
 YY_RULE_SETUP
-#line 275 "Gmsh.l"
+#line 278 "Gmsh.l"
 {yylval.c = strsave((char*)yytext); return tSTRING;}
 	YY_BREAK
-case 185:
+case 188:
 YY_RULE_SETUP
-#line 277 "Gmsh.l"
+#line 280 "Gmsh.l"
 return yytext[0];
 	YY_BREAK
-case 186:
+case 189:
 YY_RULE_SETUP
-#line 279 "Gmsh.l"
+#line 282 "Gmsh.l"
 ECHO;
 	YY_BREAK
-#line 2203 "Gmsh.yy.cpp"
+#line 2220 "Gmsh.yy.cpp"
 case YY_STATE_EOF(INITIAL):
 	yyterminate();
 
@@ -2491,7 +2508,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 >= 1014 )
+			if ( yy_current_state >= 1017 )
 				yy_c = yy_meta[(unsigned int) yy_c];
 			}
 		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -2526,11 +2543,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 >= 1014 )
+		if ( yy_current_state >= 1017 )
 			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 == 1013);
+	yy_is_jam = (yy_current_state == 1016);
 
 	return yy_is_jam ? 0 : yy_current_state;
 	}
@@ -3080,7 +3097,7 @@ int main()
 	return 0;
 	}
 #endif
-#line 279 "Gmsh.l"
+#line 282 "Gmsh.l"
 
 
 #undef yywrap
diff --git a/Parser/Makefile b/Parser/Makefile
index cc58720cc359615c0c3dfefda21c5b4f5de7c453..eca475cc51d114b75bfc1b67ee2cdd698848558e 100644
--- a/Parser/Makefile
+++ b/Parser/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.31 2001-08-20 08:25:24 geuzaine Exp $
+# $Id: Makefile,v 1.32 2001-10-29 08:52:21 geuzaine Exp $
 #
 # Makefile for "libParser.a"
 #
@@ -14,15 +14,15 @@ LEX      = flex
 
 LIB      = ../lib/libParser.a
 INCLUDE  = -I../includes -I../Common -I../DataStr -I../Geo -I../Graphics\
-           -I../Mesh -I../Motif -I../Fltk -I../Plugin -I../Parallel
+           -I../Mesh -I../Fltk -I../Plugin -I../Parallel
 
 OPT_FLAGS     = -g -Wall
 OS_FLAGS      = -D_LITTLE_ENDIAN
-VERSION_FLAGS = -D_XMOTIF
+VERSION_FLAGS = 
 
 GL_INCLUDE    = -I$(HOME)/SOURCES/Mesa-3.1/include\
                 -I$(HOME)/SOURCES/Mesa-3.1/include/GL
-GUI_INCLUDE   = -I/usr/X11R6/LessTif/Motif1.2/include
+GUI_INCLUDE   = 
 
 RMFLAGS  = -f
 CFLAGS   = $(OPT_FLAGS) $(OS_FLAGS) $(VERSION_FLAGS) $(INCLUDE)\
@@ -86,6 +86,5 @@ OpenFile.o: OpenFile.cpp ../Common/Gmsh.h ../Common/Message.h \
  ../Geo/Geo.h ../Mesh/Mesh.h ../Mesh/Vertex.h ../Mesh/Simplex.h \
  ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/Metric.h \
  ../Common/Views.h ../Common/ColorTable.h ../Geo/MinMax.h \
- ../Geo/Visibility.h ../Common/GmshUI.h ../Graphics/Draw.h \
- ../Motif/Widgets.h
+ ../Geo/Visibility.h ../Common/GmshUI.h ../Graphics/Draw.h
 FunctionManager.o: FunctionManager.cpp FunctionManager.h
diff --git a/Parser/OpenFile.cpp b/Parser/OpenFile.cpp
index 49f04aa9eb41084133cef11c2a004e6aef0067b5..a2d95856c53cbd0ef3bf68d8025ea458d76787c1 100644
--- a/Parser/OpenFile.cpp
+++ b/Parser/OpenFile.cpp
@@ -1,4 +1,4 @@
-// $Id: OpenFile.cpp,v 1.20 2001-09-06 05:25:19 geuzaine Exp $
+// $Id: OpenFile.cpp,v 1.21 2001-10-29 08:52:21 geuzaine Exp $
 
 #include "Gmsh.h"
 #include "Numeric.h"
@@ -17,10 +17,7 @@
 #include "Draw.h"
 #endif
 
-#if _XMOTIF
-#include "Widgets.h"
-extern Widgets_T WID;
-#elif _FLTK
+#if _FLTK
 #include "GUI.h"
 extern GUI *WID;
 #endif
@@ -134,17 +131,12 @@ void OpenProblem(char *name){
   strncpy(THEM->name, CTX.base_filename,255);
 
   if(!CTX.batch){
-#if _XMOTIF
-    XtVaSetValues(WID.G.shell,
-                  XmNtitle, CTX.filename,
-                  XmNiconName, CTX.base_filename,
-                  NULL);
-#elif _FLTK
+#if _FLTK
     WID->set_title(CTX.filename);
 #endif
   }
 
-  int nb = List_Nbr(Post_ViewList);
+  int nb = List_Nbr(CTX.post.list);
 
   status = ParseFile(CTX.filename);  
 
@@ -161,9 +153,9 @@ void OpenProblem(char *name){
   ZeroHighlight(&M); 
 #endif
   
-  if(List_Nbr(Post_ViewList) > nb)
+  if(List_Nbr(CTX.post.list) > nb)
     CalculateMinMax(NULL, ((Post_View*)List_Pointer
-			   (Post_ViewList,List_Nbr(Post_ViewList)-1))->BBox);
+			   (CTX.post.list,List_Nbr(CTX.post.list)-1))->BBox);
   else if(!status) 
     CalculateMinMax(THEM->Points,NULL);
   else
diff --git a/Plugin/CutMap.cpp b/Plugin/CutMap.cpp
index 83d9bf971efe06d98f12b7491dc9052be10877aa..966331eb51a336947a5f558f4051320c2662b2ba 100644
--- a/Plugin/CutMap.cpp
+++ b/Plugin/CutMap.cpp
@@ -1,7 +1,10 @@
-// $Id: CutMap.cpp,v 1.22 2001-08-11 23:25:50 geuzaine Exp $
+// $Id: CutMap.cpp,v 1.23 2001-10-29 08:52:21 geuzaine Exp $
 
 #include "CutMap.h"
 #include "List.h"
+#include "Context.h"
+
+extern Context_T CTX;
 
 StringXNumber CutMapOptions_Number[] = {
   { GMSH_FULLRC, "A" , NULL , 1. },
@@ -60,8 +63,6 @@ double GMSH_CutMapPlugin :: levelset (double x, double y, double z, double val)
   return CutMapOptions_Number[0].def - val;
 }
 
-extern List_T *Post_ViewList;
-
 Post_View *GMSH_CutMapPlugin::execute (Post_View *v)
 {
   Post_View *vv;
@@ -74,7 +75,7 @@ Post_View *GMSH_CutMapPlugin::execute (Post_View *v)
     vv = v;
   else{
     if(!v && iView < 0) iView = 0;
-    if(!(vv = (Post_View*)List_Pointer_Test(Post_ViewList,iView))){
+    if(!(vv = (Post_View*)List_Pointer_Test(CTX.post.list,iView))){
       Msg(WARNING,"View[%d] does not exist",iView);
       return 0;
     }
diff --git a/Plugin/CutPlane.cpp b/Plugin/CutPlane.cpp
index 468231196ca777a5c132eb9380cb38b25903d367..a17b126b3d19a765fd55758d8b7622228919e21b 100644
--- a/Plugin/CutPlane.cpp
+++ b/Plugin/CutPlane.cpp
@@ -1,7 +1,10 @@
-// $Id: CutPlane.cpp,v 1.18 2001-08-11 23:25:50 geuzaine Exp $
+// $Id: CutPlane.cpp,v 1.19 2001-10-29 08:52:21 geuzaine Exp $
 
 #include "CutPlane.h"
 #include "List.h"
+#include "Context.h"
+
+extern Context_T CTX;
 
 StringXNumber CutPlaneOptions_Number[] = {
   { GMSH_FULLRC, "A" , NULL , 1. },
@@ -62,8 +65,6 @@ double GMSH_CutPlanePlugin :: levelset (double x, double y, double z, double val
     CutPlaneOptions_Number[3].def ;
 }
 
-extern List_T *Post_ViewList;
-
 Post_View *GMSH_CutPlanePlugin::execute (Post_View *v)
 {
   Post_View *vv;
@@ -78,7 +79,7 @@ Post_View *GMSH_CutPlanePlugin::execute (Post_View *v)
     vv = v;
   else{
     if(!v && iView < 0) iView = 0;
-    if(!(vv = (Post_View*)List_Pointer_Test(Post_ViewList,iView))){
+    if(!(vv = (Post_View*)List_Pointer_Test(CTX.post.list,iView))){
       Msg(WARNING,"View[%d] does not exist",iView);
       return 0;
     }
diff --git a/Plugin/CutSphere.cpp b/Plugin/CutSphere.cpp
index 493b3c186a969f6ad28f39678964000b45d13113..f9f630f54798acb1be88ced10ac3afc09a2926c9 100644
--- a/Plugin/CutSphere.cpp
+++ b/Plugin/CutSphere.cpp
@@ -1,8 +1,11 @@
-// $Id: CutSphere.cpp,v 1.17 2001-08-11 23:25:50 geuzaine Exp $
+// $Id: CutSphere.cpp,v 1.18 2001-10-29 08:52:21 geuzaine Exp $
 
 #include <string.h>
 #include "CutSphere.h"
 #include "List.h"
+#include "Context.h"
+
+extern Context_T CTX;
 
 StringXNumber CutSphereOptions_Number[] = {
   { GMSH_FULLRC, "Xc" , NULL , 0. },
@@ -64,8 +67,6 @@ double GMSH_CutSpherePlugin :: levelset (double x, double y, double z, double va
   return (x-a)*(x-a) + (y-b)*(y-b) + (z-c)*(z-c) - r*r;
 }
 
-extern List_T *Post_ViewList;
-
 Post_View *GMSH_CutSpherePlugin::execute (Post_View *v)
 {
   Post_View *vv;
@@ -80,7 +81,7 @@ Post_View *GMSH_CutSpherePlugin::execute (Post_View *v)
     vv = v;
   else{
     if(!v && iView < 0) iView = 0;
-    if(!(vv = (Post_View*)List_Pointer_Test(Post_ViewList,iView))){
+    if(!(vv = (Post_View*)List_Pointer_Test(CTX.post.list,iView))){
       Msg(WARNING,"View[%d] does not exist",iView);
       return 0;
     }
diff --git a/Plugin/Skin.cpp b/Plugin/Skin.cpp
index 653d4661fe79ff2a99a464a9d2416f3ea2fe7f1b..404c6066dba997d0ae09ba194ee33303cde86ce9 100644
--- a/Plugin/Skin.cpp
+++ b/Plugin/Skin.cpp
@@ -1,4 +1,4 @@
-// $Id: Skin.cpp,v 1.10 2001-10-03 06:59:37 geuzaine Exp $
+// $Id: Skin.cpp,v 1.11 2001-10-29 08:52:21 geuzaine Exp $
 
 #include "Plugin.h"
 #include "Skin.h"
@@ -133,8 +133,6 @@ static void skinSimplex(List_T *Simp, int NbSimp){
   Tree_Delete(Skin);
 }
 
-extern List_T * Post_ViewList;
-
 Post_View *GMSH_SkinPlugin::execute (Post_View *v)
 {
   Post_View *vv, *View;
@@ -145,7 +143,7 @@ Post_View *GMSH_SkinPlugin::execute (Post_View *v)
     vv = v;
   else{
     if(!v && iView < 0) iView = 0;
-    if(!(vv = (Post_View*)List_Pointer_Test(Post_ViewList,iView))){
+    if(!(vv = (Post_View*)List_Pointer_Test(CTX.post.list,iView))){
       Msg(WARNING,"View[%d] does not exist",iView);
       return 0;
     }
diff --git a/Plugin/Smooth.cpp b/Plugin/Smooth.cpp
index 442f8f92f7ea8b9d3a05298c4b42b22639029bfd..2671e1aeb9ab1dbc576ea8fb556663d0ce6a4864 100644
--- a/Plugin/Smooth.cpp
+++ b/Plugin/Smooth.cpp
@@ -1,9 +1,12 @@
-// $Id: Smooth.cpp,v 1.6 2001-08-06 11:39:22 geuzaine Exp $
+// $Id: Smooth.cpp,v 1.7 2001-10-29 08:52:21 geuzaine Exp $
 
 #include "Plugin.h"
 #include "Smooth.h"
 #include "List.h"
 #include "Views.h"
+#include "Context.h"
+
+extern Context_T CTX;
 
 StringXNumber SmoothOptions_Number[] = {
   { GMSH_FULLRC, "iView" , NULL , -1. }
@@ -51,8 +54,6 @@ void GMSH_SmoothPlugin::CatchErrorMessage (char *errorMessage) const
   strcpy(errorMessage,"Smooth failed...");
 }
 
-extern List_T *Post_ViewList;
-
 Post_View *GMSH_SmoothPlugin::execute (Post_View *v)
 {
   Post_View *vv;
@@ -62,7 +63,7 @@ Post_View *GMSH_SmoothPlugin::execute (Post_View *v)
     vv = v;
   else{
     if(!v && iView < 0) iView = 0;
-    if(!(vv = (Post_View*)List_Pointer_Test(Post_ViewList,iView))){
+    if(!(vv = (Post_View*)List_Pointer_Test(CTX.post.list,iView))){
       Msg(WARNING,"View[%d] does not exist",iView);
       return 0;
     }
diff --git a/Plugin/Transform.cpp b/Plugin/Transform.cpp
index dbaeec60b3808f6718681fef63f797d1ac254b0d..ac7c2bd6fe02b579497d193e7cbe7a2eafd30479 100644
--- a/Plugin/Transform.cpp
+++ b/Plugin/Transform.cpp
@@ -1,9 +1,12 @@
-// $Id: Transform.cpp,v 1.7 2001-08-09 20:53:23 geuzaine Exp $
+// $Id: Transform.cpp,v 1.8 2001-10-29 08:52:21 geuzaine Exp $
 
 #include "Plugin.h"
 #include "Transform.h"
 #include "List.h"
 #include "Views.h"
+#include "Context.h"
+
+extern Context_T CTX;
 
 StringXNumber TransformOptions_Number[] = {
   { GMSH_FULLRC, "A11" , NULL , 1. },
@@ -60,8 +63,6 @@ void GMSH_TransformPlugin::CatchErrorMessage (char *errorMessage) const
   strcpy(errorMessage,"Transform failed...");
 }
 
-extern List_T *Post_ViewList;
-
 Post_View *GMSH_TransformPlugin::execute (Post_View *v)
 {
   Post_View *vv;
@@ -83,7 +84,7 @@ Post_View *GMSH_TransformPlugin::execute (Post_View *v)
     vv = v;
   else{
     if(!v && iView < 0) iView = 0;
-    if(!(vv = (Post_View*)List_Pointer_Test(Post_ViewList,iView))){
+    if(!(vv = (Post_View*)List_Pointer_Test(CTX.post.list,iView))){
       Msg(WARNING,"View[%d] does not exist",iView);
       return 0;
     }
diff --git a/Plugin/Triangulate.cpp b/Plugin/Triangulate.cpp
index 76244403a9b4ebb25dd735f87ac22ed2b3a3710d..ca10db04d941d9bdfaf73f38567e73de506ea49a 100644
--- a/Plugin/Triangulate.cpp
+++ b/Plugin/Triangulate.cpp
@@ -1,4 +1,4 @@
-// $Id: Triangulate.cpp,v 1.1 2001-10-25 07:22:46 geuzaine Exp $
+// $Id: Triangulate.cpp,v 1.2 2001-10-29 08:52:21 geuzaine Exp $
 
 #include "Gmsh.h"
 #include "Plugin.h"
@@ -165,8 +165,6 @@ void Triangulate(Post_View *vin, Post_View *vout){
 }
 
 
-extern List_T * Post_ViewList;
-
 Post_View *GMSH_TriangulatePlugin::execute (Post_View *v)
 {
   Post_View *vv, *View;
@@ -177,7 +175,7 @@ Post_View *GMSH_TriangulatePlugin::execute (Post_View *v)
     vv = v;
   else{
     if(!v && iView < 0) iView = 0;
-    if(!(vv = (Post_View*)List_Pointer_Test(Post_ViewList,iView))){
+    if(!(vv = (Post_View*)List_Pointer_Test(CTX.post.list,iView))){
       Msg(WARNING,"View[%d] does not exist",iView);
       return 0;
     }