From 812b1c7a01d4866b44015aba4529aeaf8ff8e234 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Sun, 12 Aug 2001 14:24:51 +0000
Subject: [PATCH] clean-up Gmsh.h

---
 Common/Gmsh.h        | 5 -----
 Geo/Geo.cpp          | 4 ++--
 Graphics/Draw.h      | 2 ++
 Motif/CbColorbar.cpp | 4 ++--
 Motif/CbColorbar.h   | 2 +-
 Parser/Gmsh.tab.cpp  | 4 ++--
 Parser/Gmsh.y        | 4 ++--
 Parser/Gmsh.yy.cpp   | 4 ++--
 Parser/OpenFile.h    | 2 ++
 doc/VERSIONS         | 4 ++--
 10 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/Common/Gmsh.h b/Common/Gmsh.h
index da95314a8d..ec3acf0e79 100644
--- a/Common/Gmsh.h
+++ b/Common/Gmsh.h
@@ -14,11 +14,6 @@
 #undef false
 #define false 0
 
-#define TEXT_BUFFER_SIZE       1024
-#define SELECTION_BUFFER_SIZE  1024
-#define LABEL_STR_L            16
-#define MAX_OPEN_FILES         256
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <math.h>
diff --git a/Geo/Geo.cpp b/Geo/Geo.cpp
index 4ee2453e77..74dd149932 100644
--- a/Geo/Geo.cpp
+++ b/Geo/Geo.cpp
@@ -1,4 +1,4 @@
-// $Id: Geo.cpp,v 1.21 2001-08-11 23:28:31 geuzaine Exp $
+// $Id: Geo.cpp,v 1.22 2001-08-12 14:24:50 geuzaine Exp $
 
 #include "Gmsh.h"
 #include "Numeric.h"
@@ -394,7 +394,7 @@ void add_multvol(List_T *list, char *fich){
 }
 
 void add_trsfvol(int N, int *l, char *fich){
-  char text[TEXT_BUFFER_SIZE], text2[TEXT_BUFFER_SIZE];
+  char text[BUFFSIZE], text2[BUFFSIZE];
   int i;
 
   sprintf(text,"Transfinite Volume{%s} = {", trsf_vol_text);
diff --git a/Graphics/Draw.h b/Graphics/Draw.h
index 42b8ed55d7..a4e93ceb59 100644
--- a/Graphics/Draw.h
+++ b/Graphics/Draw.h
@@ -7,6 +7,8 @@
 #define GMSH_SELECT    2
 #define GMSH_FEEDBACK  3
 
+#define SELECTION_BUFFER_SIZE  1024
+
 #define TO_SCREEN  1
 #define TO_FILE    2
 
diff --git a/Motif/CbColorbar.cpp b/Motif/CbColorbar.cpp
index 5dd96c8c28..3e2490deb9 100644
--- a/Motif/CbColorbar.cpp
+++ b/Motif/CbColorbar.cpp
@@ -1,4 +1,4 @@
-// $Id: CbColorbar.cpp,v 1.2 2001-08-11 23:28:33 geuzaine Exp $
+// $Id: CbColorbar.cpp,v 1.3 2001-08-12 14:24:50 geuzaine Exp $
 
 #include "Gmsh.h"
 #include "GmshUI.h"
@@ -359,7 +359,7 @@ void ColorBarRedraw(void){
 }
 
 void ColorBarChange(char *label, float min, float max, ColorTable *ct, int rgb){
-  strncpy(TheCB->label, label, LABEL_STR_L);
+  strncpy(TheCB->label, label, 31);
   TheCB->ct     = ct;
   TheCB->minval = min;
   TheCB->maxval = max;
diff --git a/Motif/CbColorbar.h b/Motif/CbColorbar.h
index ac94bf00fd..bd2d8ab71b 100644
--- a/Motif/CbColorbar.h
+++ b/Motif/CbColorbar.h
@@ -7,7 +7,7 @@ typedef struct _colorbar {
   int wedge_y;                 /* top coord of color wedge */
   int marker_y;                /* top coord of marker arrow */
   int label_y;                 /* y coord of text labels */
-  char label[LABEL_STR_L];     /* text label at bottom */
+  char label[32];              /* text label at bottom */
   float minval, maxval;        /* min and max data values */
   int markerpos;               /* position of marker as index into table */
   int helpflag;                /* if nonzero, print help messages */  
diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp
index 219e3d7255..b14a2d656a 100644
--- a/Parser/Gmsh.tab.cpp
+++ b/Parser/Gmsh.tab.cpp
@@ -174,7 +174,7 @@
 #line 1 "Gmsh.y"
  
 
-// $Id: Gmsh.tab.cpp,v 1.105 2001-08-11 23:28:33 geuzaine Exp $
+// $Id: Gmsh.tab.cpp,v 1.106 2001-08-12 14:24:50 geuzaine Exp $
 
   //
   // Generaliser sprintf avec des chaines de caracteres
@@ -5918,7 +5918,7 @@ void yyerror(char *s){
 
 void vyyerror(char *fmt, ...){
   va_list args;
-  char tmp[TEXT_BUFFER_SIZE];
+  char tmp[1024];
 
   va_start (args, fmt);
   vsprintf (tmp, fmt, args);
diff --git a/Parser/Gmsh.y b/Parser/Gmsh.y
index cd7fc5e6c0..ab99f027ef 100644
--- a/Parser/Gmsh.y
+++ b/Parser/Gmsh.y
@@ -1,6 +1,6 @@
 %{ 
 
-// $Id: Gmsh.y,v 1.91 2001-08-11 23:28:33 geuzaine Exp $
+// $Id: Gmsh.y,v 1.92 2001-08-12 14:24:50 geuzaine Exp $
 
   //
   // Generaliser sprintf avec des chaines de caracteres
@@ -2579,7 +2579,7 @@ void yyerror(char *s){
 
 void vyyerror(char *fmt, ...){
   va_list args;
-  char tmp[TEXT_BUFFER_SIZE];
+  char tmp[1024];
 
   va_start (args, fmt);
   vsprintf (tmp, fmt, args);
diff --git a/Parser/Gmsh.yy.cpp b/Parser/Gmsh.yy.cpp
index 34b942df2d..c7bee26d07 100644
--- a/Parser/Gmsh.yy.cpp
+++ b/Parser/Gmsh.yy.cpp
@@ -2,7 +2,7 @@
 /* A lexical scanner generated by flex */
 
 /* Scanner skeleton version:
- * $Header: /cvsroot/gmsh/Parser/Gmsh.yy.cpp,v 1.105 2001-08-11 23:28:33 geuzaine Exp $
+ * $Header: /cvsroot/gmsh/Parser/Gmsh.yy.cpp,v 1.106 2001-08-12 14:24:51 geuzaine Exp $
  */
 
 #define FLEX_SCANNER
@@ -995,7 +995,7 @@ char *yytext;
 #define INITIAL 0
 #line 2 "Gmsh.l"
 
-// $Id: Gmsh.yy.cpp,v 1.105 2001-08-11 23:28:33 geuzaine Exp $
+// $Id: Gmsh.yy.cpp,v 1.106 2001-08-12 14:24:51 geuzaine Exp $
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/Parser/OpenFile.h b/Parser/OpenFile.h
index f3bcad2ffa..179f66e3bb 100644
--- a/Parser/OpenFile.h
+++ b/Parser/OpenFile.h
@@ -1,6 +1,8 @@
 #ifndef _OPENFILE_H_
 #define _OPENFILE_H_
 
+#define MAX_OPEN_FILES  256
+
 int  ParseFile(char *filename);
 void ParseString(char *str);
 void OpenProblem(char *filename);
diff --git a/doc/VERSIONS b/doc/VERSIONS
index e258eaefd5..bcaf0f0d2e 100644
--- a/doc/VERSIONS
+++ b/doc/VERSIONS
@@ -1,11 +1,11 @@
-$Id: VERSIONS,v 1.52 2001-08-11 23:28:34 geuzaine Exp $
+$Id: VERSIONS,v 1.53 2001-08-12 14:24:51 geuzaine Exp $
 
 New in 1.23: Fixed duplicate elements generation with Extrude; Better
 display of displacement maps; boundary operator generalization; new
 explode option for post-processing views; enhanced link view behaviour
 (to update only the changed items); new default plugins: Skin,
 Transform, Smooth; various other bug fixes and clean-ups (mostly in
-the post-processing module);
+the post-processing module and for extruded meshes);
 
 New in 1.22: Fixed (yet another) bug for 2D mesh in the mean plane;
 fixed surface coherence bug in extruded meshes; new double logarithmic
-- 
GitLab