From 6a38234794fd5dbaa58a3833bef007f743228f82 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Fri, 26 Sep 2008 15:55:49 +0000
Subject: [PATCH] new netgen leaves crumbs all over the place

---
 contrib/Netgen/libsrc/general/profiler.cpp |  7 ++++---
 contrib/Netgen/nglib_addon.cpp             | 16 +++++++---------
 2 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/contrib/Netgen/libsrc/general/profiler.cpp b/contrib/Netgen/libsrc/general/profiler.cpp
index 4d61a7056b..bbe0423c29 100644
--- a/contrib/Netgen/libsrc/general/profiler.cpp
+++ b/contrib/Netgen/libsrc/general/profiler.cpp
@@ -48,9 +48,10 @@ namespace netgen
     sprintf (filename, "netgen.prof");
 #endif
 
-    FILE *prof = fopen(filename,"w");
-    Print (prof);
-    fclose(prof);
+    // MODIFIED FOR GMSH
+    //FILE *prof = fopen(filename,"w");
+    //Print (prof);
+    //fclose(prof);
   }
 
 
diff --git a/contrib/Netgen/nglib_addon.cpp b/contrib/Netgen/nglib_addon.cpp
index 8796bd7105..d36aef21df 100644
--- a/contrib/Netgen/nglib_addon.cpp
+++ b/contrib/Netgen/nglib_addon.cpp
@@ -15,18 +15,15 @@ using namespace netgen;
 namespace nglib
 {
 
-class mystreambuf: public streambuf
-{
+class mystreambuf : public streambuf {
   int index;
   char txt[1024];
  public:
-  mystreambuf() { 
-    index = 0; 
-  }
-  int sync(){ 
+  mystreambuf() : index(0) {} 
+  int sync()
+  { 
     txt[index] = '\0';
-    if(!index || 
-       (index == 1 && (txt[0] == '.' || txt[0] == '+' || txt[0] == ' '))){
+    if(!index || (index == 1 && (txt[0] == '.' || txt[0] == '+' || txt[0] == ' '))){
       // ignore these messages
     }
     else{
@@ -38,7 +35,8 @@ class mystreambuf: public streambuf
     index = 0; 
     return 0; 
   }
-  int overflow(int ch){ 
+  int overflow(int ch)
+  {
     if(index < 1023){
       txt[index] = ch;
       if(txt[index] == '\n' || txt[index] == '\r') txt[index] = ' ';
-- 
GitLab