From 70ce11f4e73a68f2e31fc9c6df877fea4d182cad Mon Sep 17 00:00:00 2001
From: Jean-Francois Remacle <jean-francois.remacle@uclouvain.be>
Date: Wed, 6 Jun 2001 15:30:18 +0000
Subject: [PATCH] *** empty log message ***

---
 Makefile               | 14 +++++++++-----
 Mesh/2D_Mesh.cpp       |  6 +++---
 Mesh/2D_Mesh_Aniso.cpp |  6 +++---
 Mesh/Generator.cpp     |  6 +++---
 Mesh/Simplex.cpp       |  4 ++--
 Mesh/Vertex.cpp        | 24 ++++++++++++++----------
 Mesh/Vertex.h          |  1 +
 7 files changed, 35 insertions(+), 26 deletions(-)

diff --git a/Makefile b/Makefile
index 56fdcc1cba..c0f0f59288 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.102 2001-05-25 14:27:20 geuzaine Exp $
+# $Id: Makefile,v 1.103 2001-06-06 15:30:18 remacle Exp $
 # ----------------------------------------------------------------------
 #  Makefile for Gmsh  
 # ----------------------------------------------------------------------
@@ -184,7 +184,7 @@ tag:
 	echo "#define GMSH_VERSION  $(GMSH_RELEASE)" >  Common/GmshVersion.h
 	echo "#define GMSH_DATE     \"`date`\""      >> Common/GmshVersion.h
 	echo "#define GMSH_HOST     \"`hostname`\""  >> Common/GmshVersion.h
-	echo "#define GMSH_PACKAGER \"`whoami`\""    >> Common/GmshVersion.h
+	echo "#define GMSH_PACKAGER \"remacle\""    >> Common/GmshVersion.h
 	echo "#define GMSH_OS       \"`uname -sr`\"" >> Common/GmshVersion.h
 
 initialtag:
@@ -471,11 +471,15 @@ fltk_compile_cygwin:
 
 fltk_link_solaris_scorec:
 	$(CC) -o $(GMSH_BIN_DIR)/gmsh-sun $(GMSH_FLTK_LIB) $(OPENGL_LIB) \
-                 $(FLTK_LIB_SOLARIS_SCOREC) -lm -ldl
+                 $(FLTK_LIB_SOLARIS_SCOREC) -lm -ldl -lsocket
+
+fltk_purify:
+	purify -cache-dir=/space g++ -o $(GMSH_BIN_DIR)/gmsh-sun $(GMSH_FLTK_LIB) $(OPENGL_LIB) \
+                 $(FLTK_LIB_SOLARIS_SCOREC) -lm -ldl -lsocket
 
 fltk_link_linux_scorec:
 	$(CC) -o $(GMSH_BIN_DIR)/gmsh-linux $(GMSH_FLTK_LIB) $(OPENGL_LIB) \
-                 $(FLTK_LIB_LINUX_SCOREC) -lm -ldl
+                 $(FLTK_LIB_LINUX_SCOREC) -lm -ldl 
 fltk_link_mesa:
 	$(CC) -o $(GMSH_BIN_DIR)/gmsh $(GMSH_FLTK_LIB) $(MESA_LIB) \
                  $(FLTK_LIB) -lm -ldl
@@ -527,7 +531,7 @@ fltk_hp: tag fltk_compile_big_endian fltk_link_hp strip_bin
 
 fltk_ibm: tag fltk_compile_ibm fltk_link_ibm strip_bin
 
-fltk_solaris_scorec : tag fltk_compile_solaris_scorec fltk_link_solaris_scorec strip_bin 
+fltk_solaris_scorec : fltk_compile_solaris_scorec fltk_link_solaris_scorec strip_bin 
 
 fltk_linux_scorec : fltk_compile_linux_scorec fltk_link_linux_scorec strip_bin 
 
diff --git a/Mesh/2D_Mesh.cpp b/Mesh/2D_Mesh.cpp
index c07b63d8ff..ae9b9de55a 100644
--- a/Mesh/2D_Mesh.cpp
+++ b/Mesh/2D_Mesh.cpp
@@ -1,4 +1,4 @@
-// $Id: 2D_Mesh.cpp,v 1.25 2001-06-03 11:19:52 geuzaine Exp $
+// $Id: 2D_Mesh.cpp,v 1.26 2001-06-06 15:30:18 remacle Exp $
 
 /*
    Maillage Delaunay d'une surface (Point insertion Technique)
@@ -980,7 +980,7 @@ void filldel (Delaunay * deladd, int aa, int bb, int cc,
     v = Create_Vertex (-1, pt2.h, pt2.v, 0.0, 0.0, 0.0);
     Calcule_Z_Plan (&v, &dum);
     Projette_Inverse (&v, &dum);
-    Free (v);
+    Free_Vertex (&v,0);
   }
   else{
     v = Create_Vertex (-1, pt2.h, pt2.v, 0.0, 0.0, 0.0);
@@ -997,7 +997,7 @@ void filldel (Delaunay * deladd, int aa, int bb, int cc,
     }
     else
       newqual = qual;
-    Free (v);
+    Free_Vertex (&v,0);
   }
 
   switch (LocalNewPoint){
diff --git a/Mesh/2D_Mesh_Aniso.cpp b/Mesh/2D_Mesh_Aniso.cpp
index 5045b83a22..a4b551ce9a 100644
--- a/Mesh/2D_Mesh_Aniso.cpp
+++ b/Mesh/2D_Mesh_Aniso.cpp
@@ -1,4 +1,4 @@
-// $Id: 2D_Mesh_Aniso.cpp,v 1.15 2001-06-02 16:24:51 geuzaine Exp $
+// $Id: 2D_Mesh_Aniso.cpp,v 1.16 2001-06-06 15:30:18 remacle Exp $
 
 /*
    Jean-Francois Remacle
@@ -409,7 +409,7 @@ int Maillage_Edge (Vertex * v1, Vertex * v2, List_T * Points){
   }
   List_Delete (c->Vertices);
   List_Delete (c->Control_Points);
-  Free (c);
+  Free_Curve (&c,0);
   return 1;
 }
 
@@ -626,7 +626,7 @@ bool Bowyer_Watson_2D (Surface * sur, Vertex * v, Simplex * S, int force){
       if (!Tree_Suppress (sur->Simplexes, &s)){
         Msg(WARNING, "Failed to suppress simplex %d", s->Num);
       }
-      Free (s);
+      Free_Simplex (&s,0);
     }
     for (i = 0; i < List_Nbr (Simplexes_New); i++){
       List_Read (Simplexes_New, i, &s);
diff --git a/Mesh/Generator.cpp b/Mesh/Generator.cpp
index 2e16d54cf6..cf8dfc79bf 100644
--- a/Mesh/Generator.cpp
+++ b/Mesh/Generator.cpp
@@ -1,4 +1,4 @@
-// $Id: Generator.cpp,v 1.17 2001-05-29 13:31:04 geuzaine Exp $
+// $Id: Generator.cpp,v 1.18 2001-06-06 15:30:18 remacle Exp $
 
 #include "Gmsh.h"
 #include "Const.h"
@@ -134,7 +134,7 @@ void Init_Mesh (Mesh * M, int all){
     Tree_Delete (M->VertexEdges);
   }
   if (M->Simplexes){
-    //Tree_Action (M->Simplexes, Free_Simplex);//produit des crashes innatendus...
+    Tree_Action (M->Simplexes, Free_Simplex);//produit des crashes innatendus...
     Tree_Delete (M->Simplexes);
   }
   if (M->Points){
@@ -166,7 +166,7 @@ void Init_Mesh (Mesh * M, int all){
     List_Delete (M->PhysicalGroups);
   }
   if (M->Metric){
-    Free (M->Metric);
+    delete M->Metric;
   }
   
   M->Vertices = Tree_Create (sizeof (Vertex *), compareVertex);
diff --git a/Mesh/Simplex.cpp b/Mesh/Simplex.cpp
index d84c5f709f..7da6fd8849 100644
--- a/Mesh/Simplex.cpp
+++ b/Mesh/Simplex.cpp
@@ -1,4 +1,4 @@
-// $Id: Simplex.cpp,v 1.13 2001-05-29 13:31:25 geuzaine Exp $
+// $Id: Simplex.cpp,v 1.14 2001-06-06 15:30:18 remacle Exp $
 
 #include "Gmsh.h"
 #include "Const.h"
@@ -355,7 +355,7 @@ Simplex *Create_Simplex (Vertex * v1, Vertex * v2, Vertex * v3, Vertex * v4){
 void Free_Simplex (void *a, void *b){
   Simplex *s = *(Simplex**)a;
   if(s){
-    Free(s);
+    delete s;
     s = NULL;
   }
 }
diff --git a/Mesh/Vertex.cpp b/Mesh/Vertex.cpp
index d5dbe01bcc..d3397144de 100644
--- a/Mesh/Vertex.cpp
+++ b/Mesh/Vertex.cpp
@@ -1,4 +1,4 @@
-// $Id: Vertex.cpp,v 1.7 2001-05-29 13:32:02 geuzaine Exp $
+// $Id: Vertex.cpp,v 1.8 2001-06-06 15:30:18 remacle Exp $
 
 #include "Gmsh.h"
 #include "Vertex.h"
@@ -74,16 +74,20 @@ Vertex *Create_Vertex (int Num, double X, double Y, double Z, double lc, double
   return pV;
 }
 
-void Free_Vertex (void *a, void *b){
-  Vertex *pV = *(Vertex**)a;
+void Delete_Vertex ( Vertex *pV )
+{
+  if(pV)
+    {
+      List_Delete(pV->ListSurf);
+      List_Delete(pV->ListCurves);
+      List_Delete(pV->Extruded_Points);
+      delete pV;
+    }
+}
 
-  if(pV){
-    List_Delete(pV->ListSurf);
-    List_Delete(pV->ListCurves);
-    List_Delete(pV->Extruded_Points);
-    Free(pV);
-    pV = NULL ;
-  }
+void Free_Vertex (void *a, void *b)
+{
+  Delete_Vertex ( *(Vertex**)a );
 }
 
 int compareVertex (const void *a, const void *b){
diff --git a/Mesh/Vertex.h b/Mesh/Vertex.h
index ce6c35d75a..5ea12b4146 100644
--- a/Mesh/Vertex.h
+++ b/Mesh/Vertex.h
@@ -33,6 +33,7 @@ int compareVertex (const void *a, const void *b);
 int comparePosition (const void *a, const void *b);
 
 Vertex *Create_Vertex (int Num, double X, double Y, double Z, double lc, double u);
+void Delete_Vertex ( Vertex *pV );
 void Free_Vertex (void *a, void *b);
 
 #endif
-- 
GitLab