Skip to content
Snippets Groups Projects
Commit 6a382347 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

new netgen leaves crumbs all over the place

parent f4eabe49
No related branches found
No related tags found
No related merge requests found
...@@ -48,9 +48,10 @@ namespace netgen ...@@ -48,9 +48,10 @@ namespace netgen
sprintf (filename, "netgen.prof"); sprintf (filename, "netgen.prof");
#endif #endif
FILE *prof = fopen(filename,"w"); // MODIFIED FOR GMSH
Print (prof); //FILE *prof = fopen(filename,"w");
fclose(prof); //Print (prof);
//fclose(prof);
} }
......
...@@ -15,18 +15,15 @@ using namespace netgen; ...@@ -15,18 +15,15 @@ using namespace netgen;
namespace nglib namespace nglib
{ {
class mystreambuf: public streambuf class mystreambuf : public streambuf {
{
int index; int index;
char txt[1024]; char txt[1024];
public: public:
mystreambuf() { mystreambuf() : index(0) {}
index = 0; int sync()
} {
int sync(){
txt[index] = '\0'; txt[index] = '\0';
if(!index || if(!index || (index == 1 && (txt[0] == '.' || txt[0] == '+' || txt[0] == ' '))){
(index == 1 && (txt[0] == '.' || txt[0] == '+' || txt[0] == ' '))){
// ignore these messages // ignore these messages
} }
else{ else{
...@@ -38,7 +35,8 @@ class mystreambuf: public streambuf ...@@ -38,7 +35,8 @@ class mystreambuf: public streambuf
index = 0; index = 0;
return 0; return 0;
} }
int overflow(int ch){ int overflow(int ch)
{
if(index < 1023){ if(index < 1023){
txt[index] = ch; txt[index] = ch;
if(txt[index] == '\n' || txt[index] == '\r') txt[index] = ' '; if(txt[index] == '\n' || txt[index] == '\r') txt[index] = ' ';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment