diff --git a/Makefile b/Makefile index 56fdcc1cba07dc7ef3c3d57415aca17a3b733798..c0f0f592881bff16d1e1a1a5b9b18356887fd1d4 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 c07b63d8ffed0098ec34125c5f13461756ea52c2..ae9b9de55a8ad05dfaa86c78864bf4c1b9038ba4 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 5045b83a22deef1d003adefc455fe69585af3b66..a4b551ce9aeb245d2d12796dbca4c255c8a3ded9 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 2e16d54cf606eb4b93fdd1587b808a1a414b38fe..cf8dfc79bf21f659b20a3f48d86d2d8f60d71c15 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 d84c5f709f46ad56ec4f1e7d525da1a08b2ae22e..7da6fd88499a7213aa1e2bbc2826f0723c77f536 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 d5dbe01bccffd91a7cf94d8141f636c34c6497ab..d3397144de00be9eee0fd1572880dedc3d1c041d 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 ce6c35d75ae1bb9a98bb50a1126125517fa4ae55..5ea12b41461887a1ae2ce909babc755a48a1af7a 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