From 6b9ac4c30e1765a8e58daeed8cccccf419edd4dc Mon Sep 17 00:00:00 2001
From: Jean-Francois Remacle <jean-francois.remacle@uclouvain.be>
Date: Mon, 11 Sep 2006 20:18:23 +0000
Subject: [PATCH] *** empty log message ***

---
 Geo/GModelIO.cpp       |  8 ++++----
 Mesh/2D_DivAndConq.cpp | 13 ++++++++++++-
 2 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/Geo/GModelIO.cpp b/Geo/GModelIO.cpp
index e2c32e730a..217f96934e 100644
--- a/Geo/GModelIO.cpp
+++ b/Geo/GModelIO.cpp
@@ -1,4 +1,4 @@
-// $Id: GModelIO.cpp,v 1.51 2006-09-10 03:25:11 geuzaine Exp $
+// $Id: GModelIO.cpp,v 1.52 2006-09-11 20:18:23 remacle Exp $
 //
 // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
 //
@@ -330,7 +330,7 @@ int GModel::readMSH(const std::string &name)
 	  if(fread(&num, sizeof(int), 1, fp) != 1) return 0;
 	  if(swap) swapBytes((char*)&num, sizeof(int), 1);
 	  if(fread(xyz, sizeof(double), 3, fp) != 3) return 0;
-	  if(swap) swapBytes((char*)&xyz, sizeof(double), 3);
+	  if(swap) swapBytes((char*)xyz, sizeof(double), 3);
 	}
 	minVertex = std::min(minVertex, num);
 	maxVertex = std::max(maxVertex, num);
@@ -409,7 +409,7 @@ int GModel::readMSH(const std::string &name)
 	while(numElementsPartial < numElements){
 	  int header[3];
 	  if(fread(header, sizeof(int), 3, fp) != 3) return 0;
-	  if(swap) swapBytes((char*)&header, sizeof(int), 3);
+	  if(swap) swapBytes((char*)header, sizeof(int), 3);
 	  int type = header[0];
 	  int numElms = header[1];
 	  int numTags = header[2];
@@ -418,7 +418,7 @@ int GModel::readMSH(const std::string &name)
 	  int *data = new int[n];
 	  for(int i = 0; i < numElms; i++) {
 	    if(fread(data, sizeof(int), n, fp) != n) return 0;
-	    if(swap) swapBytes((char*)&data, sizeof(int), n);
+	    if(swap) swapBytes((char*)data, sizeof(int), n);
 	    int num = data[0];
 	    int physical = (numTags > 0) ? data[4 - numTags] : 0;
 	    int elementary = (numTags > 1) ? data[4 - numTags + 1] : 0;
diff --git a/Mesh/2D_DivAndConq.cpp b/Mesh/2D_DivAndConq.cpp
index 59a302b2f6..94ed2fad21 100644
--- a/Mesh/2D_DivAndConq.cpp
+++ b/Mesh/2D_DivAndConq.cpp
@@ -1,4 +1,4 @@
-// $Id: 2D_DivAndConq.cpp,v 1.23 2006-09-11 17:58:19 geuzaine Exp $
+// $Id: 2D_DivAndConq.cpp,v 1.24 2006-09-11 20:18:23 remacle Exp $
 //
 // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
 //
@@ -394,6 +394,8 @@ int CircumCircle(double x1, double y1, double x2, double y2, double x3,
   return (1);
 }
 
+// we should use robust predicates here, let's give it at try...
+
 
 int Is_right_of(PointNumero x, PointNumero y, PointNumero check)
 {
@@ -402,6 +404,15 @@ int Is_right_of(PointNumero x, PointNumero y, PointNumero check)
 
 int Is_left_of(PointNumero x, PointNumero y, PointNumero check)
 {
+
+  //  double pa[2] = {(double)pPointArray[x].where.h, (double)pPointArray[x].where.v};
+  //  double pb[2] = {(double)pPointArray[y].where.h, (double)pPointArray[y].where.v};
+  //  double pc[2] = {(double)pPointArray[check].where.h, (double)pPointArray[check].where.v};
+
+  //  double result gmsh::orient2d(pa, pb, pc);
+
+  //  return result > 0;
+
   static double xx, yy, alpha, beta;
 
   yy = (double)(pPointArray[y].where.v - pPointArray[x].where.v);
-- 
GitLab