From 9ea2e55fa5ea97a29392619e6020f5a627532065 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Thu, 8 Jun 2006 12:32:08 +0000
Subject: [PATCH] modified patch from philip kelleners (mostly for irix)

---
 Common/AdaptiveViews.cpp                 |  10 +-
 Common/AdaptiveViews.h                   |   2 +-
 Mesh/3D_Mesh_Tetgen.cpp                  |   4 +-
 configure                                |  21 ++--
 configure.in                             |  27 +++--
 contrib/Netgen/libsrc/include/mystdlib.h | 138 +++++++++++------------
 doc/CREDITS                              |   5 +-
 7 files changed, 107 insertions(+), 100 deletions(-)

diff --git a/Common/AdaptiveViews.cpp b/Common/AdaptiveViews.cpp
index d2b1a119d3..31d1f0e7b1 100644
--- a/Common/AdaptiveViews.cpp
+++ b/Common/AdaptiveViews.cpp
@@ -752,8 +752,8 @@ int Adaptive_Post_View::zoomElement(Post_View * view,
     p->X = XYZ(kk, 0);
     p->Y = XYZ(kk, 1);
     p->Z = XYZ(kk, 2);
-    if (min > p->val) min = p->val;
-    if (max < p->val) max = p->val;
+    if (minval > p->val) minval = p->val;
+    if (maxval < p->val) maxval = p->val;
     kk++;
   }
   double c2 = Cpu();
@@ -766,7 +766,7 @@ int Adaptive_Post_View::zoomElement(Post_View * view,
   }
 
   if(!plug || tol != 0.0) {
-    ELEM::Error(max - min, tol);
+    ELEM::Error(maxval - minval, tol);
   }
 
   if(plug)
@@ -1042,8 +1042,8 @@ void Adaptive_Post_View::initWithLowResolution(Post_View * view)
   }
   else return;
 
-  min = VAL_INF;
-  max = -VAL_INF;
+  minval = VAL_INF;
+  maxval = -VAL_INF;
 
   int nb = List_Nbr(myList) / (nbelm);
 
diff --git a/Common/AdaptiveViews.h b/Common/AdaptiveViews.h
index 7d74d1384a..18b4a410dd 100644
--- a/Common/AdaptiveViews.h
+++ b/Common/AdaptiveViews.h
@@ -266,7 +266,7 @@ public:
 class Adaptive_Post_View 
 {
   double tol;
-  double min,max;
+  double minval, maxval;
   int presentZoomLevel;
   double presentTol;
   Double_Matrix * _eexps;
diff --git a/Mesh/3D_Mesh_Tetgen.cpp b/Mesh/3D_Mesh_Tetgen.cpp
index fc35c351b3..e6ede517a1 100644
--- a/Mesh/3D_Mesh_Tetgen.cpp
+++ b/Mesh/3D_Mesh_Tetgen.cpp
@@ -1,4 +1,4 @@
-// $Id: 3D_Mesh_Tetgen.cpp,v 1.6 2006-01-29 22:53:41 geuzaine Exp $
+// $Id: 3D_Mesh_Tetgen.cpp,v 1.7 2006-06-08 12:32:08 geuzaine Exp $
 //
 // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
 //
@@ -129,7 +129,7 @@ int Mesh_Tetgen(Volume * vol) {
     in.facetmarkerlist[i] = s->iEnt;
   }
  
-  sprintf(opts, "pqa%f%c", (float)CTX.mesh.quality, 
+  sprintf(opts, "pq1.4Ya%f%c", (float)CTX.mesh.quality, 
 	  (CTX.verbosity < 3)? 'Q': (CTX.verbosity > 6)? 'V': '\0');
   Msg(STATUS3, "Meshing with volume constraint %f", (float)CTX.mesh.quality);
   
diff --git a/configure b/configure
index 598323d4f4..31c77ae46a 100755
--- a/configure
+++ b/configure
@@ -4412,19 +4412,22 @@ case "$UNAME" in
     ;;
 
   IRIX*)
-        if test "x${CXX}" = "xCC"; then
-                  OPTIM="-O2"
-      FLAGS="-LANG:std -OPT:Olimit=0 -DOLDCINCLUDE ${FLAGS}"
-      AR="CC -ar -o"
-      LINKER="CC -O2"
-    fi
+        case "${CXX}" in
+      *CC*)
+                        FLAGS="-LANG:std -OPT:Olimit=0 -DOLDCINCLUDE ${FLAGS}"
+        AR="${CXX} -ar -o"
+        LINKER="${CXX}"
+        ;;
+    esac
     ;;
 
   OSF1*)
     FLAGS="-DHAVE_NO_SOCKLEN_T ${FLAGS}"
-        if test "x${CXX}" = "xcxx" ; then
-      FLAGS="-D__USE_STD_IOSTREAM ${FLAGS}"
-    fi
+        case "${CXX}" in
+      *cxx*)
+        FLAGS="-D__USE_STD_IOSTREAM ${FLAGS}"
+        ;;
+    esac
     ;;
 
   SunOS*)
diff --git a/configure.in b/configure.in
index 9dacc848f4..095ab44c66 100644
--- a/configure.in
+++ b/configure.in
@@ -1,4 +1,4 @@
-dnl $Id: configure.in,v 1.97 2006-05-17 01:19:05 geuzaine Exp $
+dnl $Id: configure.in,v 1.98 2006-06-08 12:32:08 geuzaine Exp $
 dnl
 dnl Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
 dnl
@@ -568,22 +568,25 @@ case "$UNAME" in
 
   IRIX*)
     dnl options for native SGI compiler
-    if test "x${CXX}" = "xCC"; then
-      dnl add "-mips3 -n32" to FLAGS, AR and LINKER for portable 32 bit exe
-      dnl "-DOLDCINCLUDE" is for Netgen
-      OPTIM="-O2"
-      FLAGS="-LANG:std -OPT:Olimit=0 -DOLDCINCLUDE ${FLAGS}"
-      AR="CC -ar -o"
-      LINKER="CC -O2"
-    fi
+    case "${CXX}" in
+      *CC*)
+        dnl add "-mips3 -n32" to FLAGS, AR and LINKER for portable 32 bit exe
+        dnl "-DOLDCINCLUDE" is for Netgen
+        FLAGS="-LANG:std -OPT:Olimit=0 -DOLDCINCLUDE ${FLAGS}"
+        AR="${CXX} -ar -o"
+        LINKER="${CXX}"
+        ;;
+    esac
     ;;
 
   OSF1*)
     FLAGS="-DHAVE_NO_SOCKLEN_T ${FLAGS}"
     dnl options for native DEC compiler
-    if test "x${CXX}" = "xcxx" ; then
-      FLAGS="-D__USE_STD_IOSTREAM ${FLAGS}"
-    fi
+    case "${CXX}" in
+      *cxx*)
+        FLAGS="-D__USE_STD_IOSTREAM ${FLAGS}"
+        ;;
+    esac
     ;;
 
   SunOS*)
diff --git a/contrib/Netgen/libsrc/include/mystdlib.h b/contrib/Netgen/libsrc/include/mystdlib.h
index 2249aea3a2..29ae9f7eb7 100644
--- a/contrib/Netgen/libsrc/include/mystdlib.h
+++ b/contrib/Netgen/libsrc/include/mystdlib.h
@@ -1,69 +1,69 @@
-#ifndef FILE_MYSTDLIB
-#define FILE_MYSTDLIB
-
-
-#include <iostream>
-#include <iomanip>
-#include <fstream>
-#include <sstream>
-
-#ifdef OLDCINCLUDE
-
-// e.g., CC compiler on SGI
-#include <stdlib.h>
-#include <stdio.h>
-#include <math.h>
-#include <malloc.h>
-#include <ctype.h>
-#include <time.h>
-
-#else
- 
-// new standard
-#include <cstdlib>
-#include <cstdio>
-#include <cmath>
-#include <cctype>
-#include <ctime>
-#endif
-
-
-
-#include <new>
-#include <string>
-#include <typeinfo>
-
-#ifndef M_PI
-#define M_PI 3.14159265358979323846
-#endif
-
-
-/*** Windows headers ***/
-#ifdef WIN32
-#define WIN32_LEAN_AND_MEAN
-#include <afxwin.h>
-#include <afxmt.h>
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-#include <winnt.h>
-#endif /* WIN32 */
-
-
-/*
-extern void* operator new(std::size_t) throw (std::bad_alloc);
-extern void* operator new[](std::size_t) throw (std::bad_alloc);
-extern void operator delete(void*) throw();
-extern void operator delete[](void*) throw();
-*/
-
-
-extern int mem_alloc;
-extern int mem_total_alloc;
-extern int mem_max_alloc;
-extern int mem_total_alloc_array;
-extern int mem_total_alloc_table;
-
-
-using namespace std;
-
-#endif
+#ifndef FILE_MYSTDLIB
+#define FILE_MYSTDLIB
+
+
+#include <iostream>
+#include <iomanip>
+#include <fstream>
+#include <sstream>
+
+#ifdef OLDCINCLUDE
+
+// e.g., CC compiler on SGI
+#include <stdlib.h>
+#include <stdio.h>
+#include <math.h>
+#include <malloc.h>
+#include <ctype.h>
+#include <time.h>
+
+#else
+ 
+// new standard
+#include <cstdlib>
+#include <cstdio>
+#include <cmath>
+#include <cctype>
+#include <ctime>
+#endif
+
+
+
+#include <new>
+#include <string>
+#include <typeinfo>
+
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
+
+/*** Windows headers ***/
+#ifdef WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <afxwin.h>
+#include <afxmt.h>
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+#include <winnt.h>
+#endif /* WIN32 */
+
+
+/*
+extern void* operator new(std::size_t) throw (std::bad_alloc);
+extern void* operator new[](std::size_t) throw (std::bad_alloc);
+extern void operator delete(void*) throw();
+extern void operator delete[](void*) throw();
+*/
+
+
+extern int mem_alloc;
+extern int mem_total_alloc;
+extern int mem_max_alloc;
+extern int mem_total_alloc_array;
+extern int mem_total_alloc_table;
+
+
+using namespace std;
+
+#endif
diff --git a/doc/CREDITS b/doc/CREDITS
index a539b4faf0..6aa5c346df 100644
--- a/doc/CREDITS
+++ b/doc/CREDITS
@@ -1,4 +1,4 @@
-$Id: CREDITS,v 1.34 2006-01-06 00:34:33 geuzaine Exp $
+$Id: CREDITS,v 1.35 2006-06-08 12:32:08 geuzaine Exp $
 
              Gmsh is copyright (C) 1997-2006
 
@@ -113,4 +113,5 @@ necs.fr>, Jacques Kools <JKools at veeco.com>, Bayram Yenikaya
 Krishna Mohan Gundu <gkmohan at gmail.com>, Christopher Stott <C.Stott
 at surrey.ac.uk>, Timmy Schumacher <Tim.Schumacher at colorado.edu>,
 Carl Osterwisch <osterwischc at asme.org>, Bruno Frackowiak
-<bruno.frackowiak at onecert.fr>.
+<bruno.frackowiak at onecert.fr>, Philip Kelleners <P.H.Kelleners at
+ctw.utwente.nl>.
-- 
GitLab