From df17162b204c0920fd2ebf57bd4f2e80a0f9c561 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Fri, 23 Feb 2001 08:18:50 +0000
Subject: [PATCH] *** empty log message ***

---
 Common/Options.cpp | 12 +++++++-----
 Fltk/Callbacks.cpp |  4 ++--
 Fltk/GUI.cpp       |  9 +--------
 Fltk/GUI.h         |  1 -
 Fltk/Message.cpp   |  6 +++---
 5 files changed, 13 insertions(+), 19 deletions(-)

diff --git a/Common/Options.cpp b/Common/Options.cpp
index 854fd6da69..3d87cd43bf 100644
--- a/Common/Options.cpp
+++ b/Common/Options.cpp
@@ -1,4 +1,4 @@
-// $Id: Options.cpp,v 1.4 2001-02-22 08:16:30 geuzaine Exp $
+// $Id: Options.cpp,v 1.5 2001-02-23 08:18:50 geuzaine Exp $
 
 #include "Gmsh.h"
 #include "GmshUI.h"
@@ -119,8 +119,8 @@ void Print_Options(int num, int level, char *filename){
     fprintf(file, "// you want to keep between two Gmsh sessions). You are\n");
     fprintf(file, "// not supposed to edit it manually, but of course you\n");
     fprintf(file, "// can do. This file will be entirely rewritten every time\n");
-    fprintf(file, "// you quit Gmsh. If this file isn't found, defaults\n");
-    fprintf(file, "// are used.\n");
+    fprintf(file, "// you quit Gmsh if the option 'General.SaveSession' is\n");
+    fprintf(file, "// set. If this file isn't found, defaults are used.\n");
   }
 
   if((level & GMSH_OPTIONSRC) && file){
@@ -128,8 +128,10 @@ void Print_Options(int num, int level, char *filename){
     fprintf(file, "// This file takes configuration options that should\n");
     fprintf(file, "// be loaded each time Gmsh is launched. You can create\n");
     fprintf(file, "// this file by hand, or let Gmsh generate it for you (with\n");
-    fprintf(file, "// the 'File->Save Options' menu button). If this file\n");
-    fprintf(file, "// isn't found, defaults are used.\n");
+    fprintf(file, "// the 'File->Save Options' menu button). This file can\n");
+    fprintf(file, "// also be automatically regenerated every time you quit\n");
+    fprintf(file, "// Gmsh if the option 'General.SaveOptions' is set. If\n");
+    fprintf(file, "// this file isn't found, defaults are used.\n");
   }
 
   Print_StringOptions(num, level, GeneralOptions_String, "General.", file);
diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp
index e23a1531ef..f5e9aa7c88 100644
--- a/Fltk/Callbacks.cpp
+++ b/Fltk/Callbacks.cpp
@@ -1,4 +1,4 @@
-// $Id: Callbacks.cpp,v 1.36 2001-02-22 08:16:30 geuzaine Exp $
+// $Id: Callbacks.cpp,v 1.37 2001-02-23 08:18:50 geuzaine Exp $
 
 #include "Gmsh.h"
 #include "GmshUI.h"
@@ -425,7 +425,7 @@ void opt_message_cb(CALLBACK_ARGS) {
   WID->create_message_window();
 }
 void opt_message_clear_cb(CALLBACK_ARGS) {
-  WID->clear_message();
+  WID->msg_browser->clear();
 }
 void opt_message_save_cb(CALLBACK_ARGS) {
   char *newfile;
diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp
index fd3ec2aa46..59c582a84f 100644
--- a/Fltk/GUI.cpp
+++ b/Fltk/GUI.cpp
@@ -1,4 +1,4 @@
-// $Id: GUI.cpp,v 1.51 2001-02-22 08:16:30 geuzaine Exp $
+// $Id: GUI.cpp,v 1.52 2001-02-23 08:18:50 geuzaine Exp $
 
 // To make the interface as visually consistent as possible, please:
 // - use the BH, BW, WB, IW values for button heights/widths, window borders, etc.
@@ -1577,13 +1577,6 @@ void GUI::add_message(char *msg){
   msg_browser->bottomline(msg_browser->size());
 }
 
-void GUI::clear_message(){
-  for(int i =msg_browser->size() ; i > 0; i--)
-    msg_browser->remove(i);
-  msg_browser->bottomline(msg_browser->size());
-  msg_browser->redraw();
-}
-
 void GUI::save_message(char *name){
   FILE *fp;
 
diff --git a/Fltk/GUI.h b/Fltk/GUI.h
index fc1c58b86b..5f467dd551 100644
--- a/Fltk/GUI.h
+++ b/Fltk/GUI.h
@@ -186,7 +186,6 @@ public:
   void set_anim(int mode);
   void set_status(char *msg, int num);
   void add_message(char *msg);
-  void clear_message();
   void save_message(char *filename);
   void set_statistics();
   void update_view_window(int numview);
diff --git a/Fltk/Message.cpp b/Fltk/Message.cpp
index 4b73c083c6..439d9befe9 100644
--- a/Fltk/Message.cpp
+++ b/Fltk/Message.cpp
@@ -1,7 +1,7 @@
-// $Id: Message.cpp,v 1.14 2001-02-20 18:32:58 geuzaine Exp $
+// $Id: Message.cpp,v 1.15 2001-02-23 08:18:50 geuzaine Exp $
 
 #include <signal.h>
-#ifndef WIN32
+#if !defined(WIN32) || defined(__CYGWIN__)
 #include <sys/resource.h>
 #endif
 
@@ -163,7 +163,7 @@ void Exit(int level){
 /* ------------------------------------------------------------------------ */
 
 void GetResources(long *s, long *us, long *mem){
-#ifndef WIN32
+#if !defined(WIN32) || defined(__CYGWIN__)
   static struct rusage r;
 
   getrusage(RUSAGE_SELF,&r);
-- 
GitLab