From 214dac56ff0032f34c3442ea423514cc55042670 Mon Sep 17 00:00:00 2001
From: Laurent Stainier <laurent.stainier@ec-nantes.fr>
Date: Wed, 13 Feb 2002 09:20:41 +0000
Subject: [PATCH] Gmsh now compiles under Mac OS X. The main adaptations, aside
 a few compilation directives (cf. __APPLE__), were to rename the type
 ColorTable to GmshColorTable and the function Palette to Palette1, in order
 to avoid conflicts with Apple's QuickDraw. Note that HFS is case-insensitive,
 which requires to have a fltk lib name otherwise than libfltk.a (in the Mac
 version, the GL part is separate anyway, so I've been using libfltk_base.a
 and libfltk_gl.a).

---
 Box/Main.cpp             |  9 ++++++++-
 Common/ColorTable.cpp    | 14 +++++++-------
 Common/ColorTable.h      | 12 ++++++------
 Common/GmshUI.h          |  4 ++++
 Common/Views.cpp         |  4 ++--
 Common/Views.h           |  4 ++--
 DataStr/Malloc.cpp       |  4 +++-
 Fltk/Colorbar_Window.cpp |  4 ++--
 Fltk/Colorbar_Window.h   |  4 ++--
 Fltk/GUI.cpp             |  4 +++-
 Fltk/Message.cpp         |  9 ++++++++-
 Graphics/Draw.h          |  2 +-
 Graphics/Post.cpp        |  4 ++--
 Graphics/PostSimplex.cpp | 14 +++++++-------
 Graphics/Scale.cpp       |  6 +++---
 Graphics/gl2ps.h         |  6 +++++-
 Makefile                 | 22 +++++++++++++++++++++-
 Parser/Gmsh.tab.cpp      |  8 ++++----
 Parser/Gmsh.y            |  8 ++++----
 19 files changed, 94 insertions(+), 48 deletions(-)

diff --git a/Box/Main.cpp b/Box/Main.cpp
index 0dcd0338bb..1a32cad49c 100644
--- a/Box/Main.cpp
+++ b/Box/Main.cpp
@@ -1,11 +1,18 @@
-// $Id: Main.cpp,v 1.14 2001-12-05 10:53:11 geuzaine Exp $
+// $Id: Main.cpp,v 1.15 2002-02-13 09:17:48 stainier Exp $
 
 #include <signal.h>
 #include "ParUtil.h"
 
 #include <signal.h>
 #if !defined(WIN32) || defined(__CYGWIN__)
+#ifdef __APPLE__
+#include <sys/time.h>
+#endif /* __APPLE__ */
 #include <sys/resource.h>
+#ifdef __APPLE__
+#define   RUSAGE_SELF      0
+#define   RUSAGE_CHILDREN -1
+#endif /* __APPLE__ */
 #endif
 
 #include "PluginManager.h"
diff --git a/Common/ColorTable.cpp b/Common/ColorTable.cpp
index 566fb89576..ba1d8ee1be 100644
--- a/Common/ColorTable.cpp
+++ b/Common/ColorTable.cpp
@@ -1,4 +1,4 @@
-// $Id: ColorTable.cpp,v 1.4 2001-12-03 08:41:43 geuzaine Exp $
+// $Id: ColorTable.cpp,v 1.5 2002-02-13 09:20:14 stainier Exp $
 
 #include "Gmsh.h"
 #include "ColorTable.h"
@@ -6,7 +6,7 @@
 
 extern Context_T CTX ;
 
-void ColorTable_InitParam(int number, ColorTable *ct, 
+void ColorTable_InitParam(int number, GmshColorTable *ct, 
                           int rgb_flag, int alpha_flag){
 
   ct->ipar[COLORTABLE_NUMBER] = number;
@@ -27,7 +27,7 @@ void ColorTable_InitParam(int number, ColorTable *ct,
 
 }
 
-void ColorTable_Recompute(ColorTable *ct, int rgb_flag, int alpha_flag){
+void ColorTable_Recompute(GmshColorTable *ct, int rgb_flag, int alpha_flag){
   float curve, bias;
   double gamma;
   int i,r,g,b,a,rotate;
@@ -172,16 +172,16 @@ void ColorTable_Recompute(ColorTable *ct, int rgb_flag, int alpha_flag){
   
 }
 
-static ColorTable clip;
+static GmshColorTable clip;
 
-void ColorTable_Copy(ColorTable *ct){
+void ColorTable_Copy(GmshColorTable *ct){
   clip.size = ct->size;
   memcpy(clip.table, ct->table, ct->size * sizeof(unsigned int));
   memcpy(clip.ipar,  ct->ipar,  COLORTABLE_NBMAX_PARAM * sizeof(int));
   memcpy(clip.fpar,  ct->fpar,  COLORTABLE_NBMAX_PARAM * sizeof(float));
 }
 
-void ColorTable_Paste(ColorTable *ct){
+void ColorTable_Paste(GmshColorTable *ct){
   ct->size = clip.size;
   memcpy(ct->table, clip.table, clip.size * sizeof(unsigned int));
   memcpy(ct->ipar,  clip.ipar,  COLORTABLE_NBMAX_PARAM * sizeof(int));
@@ -189,7 +189,7 @@ void ColorTable_Paste(ColorTable *ct){
 }
 
 
-void ColorTable_Print(ColorTable *ct, FILE *fp){
+void ColorTable_Print(GmshColorTable *ct, FILE *fp){
   int i, r, g, b, a;  
   char tmp1[1024],tmp2[1024];
 
diff --git a/Common/ColorTable.h b/Common/ColorTable.h
index e0b1b52676..99ec36fe51 100644
--- a/Common/ColorTable.h
+++ b/Common/ColorTable.h
@@ -9,7 +9,7 @@ typedef struct{
   int size; // must be >= 2
   int ipar[COLORTABLE_NBMAX_PARAM];
   float fpar[COLORTABLE_NBMAX_PARAM];
-}ColorTable;
+}GmshColorTable;
 
 
 /* COLORTABLE_MODE */
@@ -35,10 +35,10 @@ typedef struct{
 #define COLORTABLE_ALPHAVAL  3  /* alpha channel value */
 #define COLORTABLE_BETA      4  /* beta coeff for brighten */
 
-void ColorTable_InitParam (int number, ColorTable * ct, int rgb_flag, int alpha_flag);
-void ColorTable_Recompute (ColorTable * ct, int rgb_flag, int alpha_flag);
-void ColorTable_Copy(ColorTable *ct);
-void ColorTable_Paste(ColorTable *ct);
-void ColorTable_Print(ColorTable *ct, FILE *fp) ;
+void ColorTable_InitParam (int number, GmshColorTable * ct, int rgb_flag, int alpha_flag);
+void ColorTable_Recompute (GmshColorTable * ct, int rgb_flag, int alpha_flag);
+void ColorTable_Copy(GmshColorTable *ct);
+void ColorTable_Paste(GmshColorTable *ct);
+void ColorTable_Print(GmshColorTable *ct, FILE *fp) ;
 
 #endif
diff --git a/Common/GmshUI.h b/Common/GmshUI.h
index 4440f4669f..c1e71a9900 100644
--- a/Common/GmshUI.h
+++ b/Common/GmshUI.h
@@ -10,7 +10,11 @@
 #ifdef _FLTK
 #include <FL/Fl.H>
 #include <FL/gl.h>
+#ifdef __APPLE__
+#include <OpenGL/glu.h>
+#else
 #include <GL/glu.h>
+#endif /* __APPLE__ */
 #endif
 
 
diff --git a/Common/Views.cpp b/Common/Views.cpp
index c67d139dfe..b76dc13d80 100644
--- a/Common/Views.cpp
+++ b/Common/Views.cpp
@@ -1,4 +1,4 @@
-// $Id: Views.cpp,v 1.63 2002-01-18 23:46:38 geuzaine Exp $
+// $Id: Views.cpp,v 1.64 2002-02-13 09:20:41 stainier Exp $
 
 #include <set>
 #include "Gmsh.h"
@@ -455,7 +455,7 @@ void CopyViewOptions(Post_View *src, Post_View *dest){
   ColorTable_Paste(&dest->CT);
 }
 
-ColorTable *Get_ColorTable(int num){
+GmshColorTable *Get_ColorTable(int num){
   Post_View *v;
 
   if(!CTX.post.list)
diff --git a/Common/Views.h b/Common/Views.h
index d7784152f7..dc470d259a 100644
--- a/Common/Views.h
+++ b/Common/Views.h
@@ -44,7 +44,7 @@ class Post_View{
   int DrawScalars, DrawVectors, DrawTensors;
   int Boundary, Grid;
   double PointSize, LineWidth;
-  ColorTable CT;
+  GmshColorTable CT;
 
   // dynamic
   double (*GVFI) (double min, double max, int nb, int index);
@@ -113,7 +113,7 @@ int CreateBGM(Post_View *ErrView, int OptiMethod, double Degree,
 double ErrorInView(Post_View * ErrView, int *n);
 Post_View *Create2DGraph(char *xname, char *yname, int nbdata, double *x, double *y);
 
-ColorTable *Get_ColorTable(int num);
+GmshColorTable *Get_ColorTable(int num);
 void Print_ColorTable(int num, char *prefix, FILE *file);
 
 #endif
diff --git a/DataStr/Malloc.cpp b/DataStr/Malloc.cpp
index fb02765f15..afaa3bb920 100644
--- a/DataStr/Malloc.cpp
+++ b/DataStr/Malloc.cpp
@@ -1,7 +1,9 @@
-// $Id: Malloc.cpp,v 1.8 2001-06-07 15:13:08 geuzaine Exp $
+// $Id: Malloc.cpp,v 1.9 2002-02-13 09:20:41 stainier Exp $
 #include <stdio.h>
 #include <stdlib.h>
+#ifndef __APPLE__
 #include <malloc.h>
+#endif
 
 #include "Malloc.h"
 #include "Message.h"
diff --git a/Fltk/Colorbar_Window.cpp b/Fltk/Colorbar_Window.cpp
index e01d75d10e..9d671b972a 100644
--- a/Fltk/Colorbar_Window.cpp
+++ b/Fltk/Colorbar_Window.cpp
@@ -1,4 +1,4 @@
-// $Id: Colorbar_Window.cpp,v 1.17 2001-11-23 13:32:21 geuzaine Exp $
+// $Id: Colorbar_Window.cpp,v 1.18 2002-02-13 09:20:41 stainier Exp $
 
 #include "Gmsh.h"
 #include "GmshUI.h"
@@ -328,7 +328,7 @@ void Colorbar_Window::draw(){
 // Update
 
 void Colorbar_Window::update(char *name, float min, float max, 
-			     ColorTable *table, int *changed){
+			     GmshColorTable *table, int *changed){
   label = name;
   ct = table;
   viewchanged = changed;
diff --git a/Fltk/Colorbar_Window.h b/Fltk/Colorbar_Window.h
index ce037d5d5a..1592706b78 100644
--- a/Fltk/Colorbar_Window.h
+++ b/Fltk/Colorbar_Window.h
@@ -25,14 +25,14 @@ class Colorbar_Window : public Fl_Window {
   int help_flag;   // if nonzero, print help message
   int marker_pos;  // position of marker as index into table
   
-  ColorTable *ct;  // pointer to the color table (allocated in Post_View)
+  GmshColorTable *ct;  // pointer to the color table (allocated in Post_View)
   int *viewchanged;// pointer to changed bit in view
   Fl_Color color_bg;
 
 public:
 
   Colorbar_Window(int x,int y,int w,int h,const char *l=0);
-  void update(char *name, float min, float max, ColorTable *ct, int *changed);
+  void update(char *name, float min, float max, GmshColorTable *ct, int *changed);
 
 };
 
diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp
index a086c22559..4399383ac3 100644
--- a/Fltk/GUI.cpp
+++ b/Fltk/GUI.cpp
@@ -1,4 +1,4 @@
-// $Id: GUI.cpp,v 1.150 2002-02-09 19:50:50 geuzaine Exp $
+// $Id: GUI.cpp,v 1.151 2002-02-13 09:20:41 stainier Exp $
 
 // To make the interface as visually consistent as possible, please:
 // - use the IW, BB, BH, BW and WB values
@@ -534,6 +534,8 @@ GUI::GUI(int argc, char **argv) {
 #ifdef WIN32
   m_window->icon((char *)LoadImage(fl_display, MAKEINTRESOURCE(IDI_ICON),
   				   IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR));
+#elif defined(__APPLE__)
+  /* ??? */
 #else
   fl_open_display();
   Pixmap p1 = XCreateBitmapFromData(fl_display, DefaultRootWindow(fl_display),
diff --git a/Fltk/Message.cpp b/Fltk/Message.cpp
index 150abcb3c6..d077f8b996 100644
--- a/Fltk/Message.cpp
+++ b/Fltk/Message.cpp
@@ -1,9 +1,16 @@
-// $Id: Message.cpp,v 1.24 2001-11-20 09:04:54 geuzaine Exp $
+// $Id: Message.cpp,v 1.25 2002-02-13 09:20:41 stainier Exp $
 
 #include <unistd.h>
 #include <signal.h>
 #if !defined(WIN32) || defined(__CYGWIN__)
+#ifdef __APPLE__
+#include <sys/time.h>
+#endif /* __APPLE__ */
 #include <sys/resource.h>
+#ifdef __APPLE__
+#define   RUSAGE_SELF      0
+#define   RUSAGE_CHILDREN -1
+#endif /* __APPLE__ */
 #endif
 
 #include "Gmsh.h"
diff --git a/Graphics/Draw.h b/Graphics/Draw.h
index 3cc47c267e..02b4094327 100644
--- a/Graphics/Draw.h
+++ b/Graphics/Draw.h
@@ -26,7 +26,7 @@ void set_s(int i, double val);
 void Replot(void);
 
 void RaiseFill (int i, double Val, double ValMin, double Raise[3][5]);
-void Palette (Post_View * View, int nbi, int i);
+void Palette1 (Post_View * View, int nbi, int i);
 void Palette2 (Post_View * View, double min, double max, double val);
 void ColorSwitch(int i);
 
diff --git a/Graphics/Post.cpp b/Graphics/Post.cpp
index 4df574332c..94e77fb5a8 100644
--- a/Graphics/Post.cpp
+++ b/Graphics/Post.cpp
@@ -1,4 +1,4 @@
-// $Id: Post.cpp,v 1.31 2001-12-03 08:41:43 geuzaine Exp $
+// $Id: Post.cpp,v 1.32 2002-02-13 09:20:41 stainier Exp $
 
 #include "Gmsh.h"
 #include "GmshUI.h"
@@ -67,7 +67,7 @@ int GiveIndexFromValue_DoubleLog(double ValMin, double ValMax, int NbIso, double
     Color Palette
    ------------------------------------------------------------------------ */
 
-void Palette(Post_View *v, int nbi, int i){ /* i in [0,nbi-1] */
+void Palette1(Post_View *v, int nbi, int i){ /* i in [0,nbi-1] */
   int index ;
 
   index = (nbi==1) ? 
diff --git a/Graphics/PostSimplex.cpp b/Graphics/PostSimplex.cpp
index 85acc5d55c..b322db0c6c 100644
--- a/Graphics/PostSimplex.cpp
+++ b/Graphics/PostSimplex.cpp
@@ -1,4 +1,4 @@
-// $Id: PostSimplex.cpp,v 1.31 2001-11-19 09:29:18 geuzaine Exp $
+// $Id: PostSimplex.cpp,v 1.32 2002-02-13 09:20:41 stainier Exp $
 
 #include "Gmsh.h"
 #include "GmshUI.h"
@@ -161,7 +161,7 @@ void Draw_ScalarLine(Post_View *View,
     }
     else{
       for(k=0 ; k<View->NbIso ; k++){
-	Palette(View,View->NbIso,k);
+	Palette1(View,View->NbIso,k);
 	if(View->IntervalsType==DRAW_POST_DISCRETE){
 	  CutLine1D(X,Y,Z,&Val[0],
 		    View->GVFI(ValMin,ValMax,View->NbIso+1,k),
@@ -329,7 +329,7 @@ void Draw_ScalarTriangle(Post_View *View, int preproNormals,
     else{
       for(k=0 ; k<View->NbIso ; k++){
         if(View->IntervalsType == DRAW_POST_DISCRETE){
-          Palette(View,View->NbIso,k);
+          Palette1(View,View->NbIso,k);
           CutTriangle2D(X,Y,Z,Val,
                         View->GVFI(ValMin,ValMax,View->NbIso+1,k),
                         View->GVFI(ValMin,ValMax,View->NbIso+1,k+1),
@@ -341,7 +341,7 @@ void Draw_ScalarTriangle(Post_View *View, int preproNormals,
           }
         }
         else{
-          Palette(View,View->NbIso,k);
+          Palette1(View,View->NbIso,k);
           thev = View->GVFI(ValMin,ValMax,View->NbIso,k);
           CutTriangle1D(X,Y,Z,Val,
                         thev, ValMin,ValMax,Xp,Yp,Zp,&nb);        
@@ -421,7 +421,7 @@ void Draw_ScalarTetrahedron(Post_View *View, int preproNormals,
   }
   else{
     for(k=0 ; k<View->NbIso ; k++){
-      if(!preproNormals) Palette(View,View->NbIso,k);
+      if(!preproNormals) Palette1(View,View->NbIso,k);
       IsoSimplex(View, preproNormals, X, Y, Z, Val,
 		 View->GVFI(ValMin,ValMax,View->NbIso,k), 
 		 ValMin, ValMax, Raise);
@@ -500,7 +500,7 @@ void Draw_VectorSimplex(int nbnod, Post_View *View,
     dz /= (double)nbnod; zc /= (double)nbnod;
     dd = sqrt(dx*dx+dy*dy+dz*dz);
     if(dd!=0.0 && dd>=ValMin && dd<=ValMax){             
-      Palette(View,View->NbIso,View->GIFV(ValMin,ValMax,View->NbIso,dd));            
+      Palette1(View,View->NbIso,View->GIFV(ValMin,ValMax,View->NbIso,dd));            
       if(View->IntervalsType == DRAW_POST_NUMERIC){
 	glRasterPos3d(xc, yc, zc);
 	sprintf(Num, View->Format, dd);
@@ -522,7 +522,7 @@ void Draw_VectorSimplex(int nbnod, Post_View *View,
   else{
     for(k=0 ; k<nbnod ; k++){
       if(d[k]!=0.0 && d[k]>=ValMin && d[k]<=ValMax){           
-	Palette(View,View->NbIso,View->GIFV(ValMin,ValMax,View->NbIso,d[k]));
+	Palette1(View,View->NbIso,View->GIFV(ValMin,ValMax,View->NbIso,d[k]));
 	fact = CTX.pixel_equiv_x/CTX.s[0] * View->ArrowScale/ValMax ;
 	if(View->ScaleType == DRAW_POST_LOGARITHMIC && ValMin>0){
 	  Val[k][0] /= d[k] ; Val[k][1] /= d[k] ; Val[k][2] /= d[k] ;
diff --git a/Graphics/Scale.cpp b/Graphics/Scale.cpp
index cf545686c0..a91048edac 100644
--- a/Graphics/Scale.cpp
+++ b/Graphics/Scale.cpp
@@ -1,4 +1,4 @@
-// $Id: Scale.cpp,v 1.27 2001-12-03 08:41:44 geuzaine Exp $
+// $Id: Scale.cpp,v 1.28 2002-02-13 09:20:41 stainier Exp $
 
 #include "Gmsh.h"
 #include "GmshUI.h"
@@ -85,7 +85,7 @@ void draw_scale(Post_View *v,
 
   for(i=0;i<v->NbIso;i++){
     if(v->IntervalsType==DRAW_POST_DISCRETE){
-      Palette(v,v->NbIso,i);   
+      Palette1(v,v->NbIso,i);   
       glBegin(GL_QUADS);
       glVertex2d(xmin,       ymin+i*cs_bh);
       glVertex2d(xmin+width, ymin+i*cs_bh);
@@ -104,7 +104,7 @@ void draw_scale(Post_View *v,
       glEnd();  
     }
     else{
-      Palette(v,v->NbIso,i);
+      Palette1(v,v->NbIso,i);
       glBegin(GL_LINES);
       glVertex2d(xmin,       ymin+i*cs_bh+0.5*cs_bh);
       glVertex2d(xmin+width, ymin+i*cs_bh+0.5*cs_bh);
diff --git a/Graphics/gl2ps.h b/Graphics/gl2ps.h
index 51e21837c2..96888ff123 100644
--- a/Graphics/gl2ps.h
+++ b/Graphics/gl2ps.h
@@ -2,7 +2,7 @@
  * GL2PS, an OpenGL to PostScript Printing Library
  * Copyright (C) 1999-2002  Christophe Geuzaine
  *
- * $Id: gl2ps.h,v 1.17 2002-02-05 20:13:51 geuzaine Exp $
+ * $Id: gl2ps.h,v 1.18 2002-02-13 09:20:41 stainier Exp $
  *
  * E-mail: geuz@geuz.org
  * URL: http://www.geuz.org/gl2ps/
@@ -32,7 +32,11 @@
 #ifdef WIN32
 #include <windows.h>
 #endif
+#ifdef __APPLE__
+#include <OpenGL/gl.h>
+#else
 #include <GL/gl.h>
+#endif /* __APPLE__ */
 
 #define GL2PS_VERSION                    0.52
 #define GL2PS_NONE                       0
diff --git a/Makefile b/Makefile
index 10c7644763..e015367ee9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.188 2002-02-12 23:26:04 geuzaine Exp $
+# $Id: Makefile,v 1.189 2002-02-13 09:16:06 stainier Exp $
 
 GMSH_MAJOR_VERSION = 1
 GMSH_MINOR_VERSION = 34
@@ -658,3 +658,23 @@ link-solaris-scorec:
                  -L/usr/X11R6/lib -lX11 -lm -ldl -lsocket
 solaris-scorec: compile-solaris-scorec link-solaris-scorec
 
+#
+# MacOS X
+#
+compile-macosx: initialtag
+	@for i in $(GMSH_FLTK_DIR); do (cd $$i && $(MAKE) \
+           "CXX=$(CXX)" \
+           "CC=$(CC)" \
+           "AR=ar ruv" \
+           "OPT_FLAGS=-O2" \
+           "OS_FLAGS=" \
+           "VERSION_FLAGS=-D_FLTK -D_NODLL" \
+           "GL_INCLUDE=" \
+           "GUI_INCLUDE=-I$(HOME)/Projects/fltk" \
+        ); done
+link-macosx:
+	$(CXX) -o $(GMSH_BIN_DIR)/gmsh $(GMSH_FLTK_LIB) -L../fltk/lib -lfltk_gl -lfltk_base \
+               -framework AGL -framework OpenGL -framework Carbon -framework ApplicationServices
+	/Developer/Tools/Rez -t APPL -o $(GMSH_BIN_DIR)/gmsh ../fltk/FL/mac.r
+macosx: compile-macosx link-macosx
+
diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp
index 91d3e81b6a..998416f120 100644
--- a/Parser/Gmsh.tab.cpp
+++ b/Parser/Gmsh.tab.cpp
@@ -177,7 +177,7 @@
 #line 1 "Gmsh.y"
  
 
-// $Id: Gmsh.tab.cpp,v 1.134 2001-12-16 05:16:37 remacle Exp $
+// $Id: Gmsh.tab.cpp,v 1.135 2002-02-13 09:20:41 stainier Exp $
 
 #include <stdarg.h>
 #ifndef _NOPLUGIN
@@ -4222,7 +4222,7 @@ case 162:
 case 163:
 #line 1077 "Gmsh.y"
 {
-      ColorTable *ct = Get_ColorTable(0);
+      GmshColorTable *ct = Get_ColorTable(0);
       if(!ct)
 	vyyerror("View[%d] does not exist", 0);
       else{
@@ -4243,7 +4243,7 @@ case 163:
 case 164:
 #line 1097 "Gmsh.y"
 {
-      ColorTable *ct = Get_ColorTable((int)yyvsp[-6].d);
+      GmshColorTable *ct = Get_ColorTable((int)yyvsp[-6].d);
       if(!ct)
 	vyyerror("View[%d] does not exist", (int)yyvsp[-6].d);
       else{
@@ -6101,7 +6101,7 @@ case 376:
 #line 2641 "Gmsh.y"
 {
       yyval.l = List_Create(256,10,sizeof(unsigned int)) ;
-      ColorTable *ct = Get_ColorTable((int)yyvsp[-3].d);
+      GmshColorTable *ct = Get_ColorTable((int)yyvsp[-3].d);
       if(!ct)
 	vyyerror("View[%d] does not exist", (int)yyvsp[-3].d);
       else{
diff --git a/Parser/Gmsh.y b/Parser/Gmsh.y
index 0b86c3eb94..66f23360fc 100644
--- a/Parser/Gmsh.y
+++ b/Parser/Gmsh.y
@@ -1,6 +1,6 @@
 %{ 
 
-// $Id: Gmsh.y,v 1.115 2001-12-03 08:41:44 geuzaine Exp $
+// $Id: Gmsh.y,v 1.116 2002-02-13 09:20:41 stainier Exp $
 
 #include <stdarg.h>
 #ifndef _NOPLUGIN
@@ -1075,7 +1075,7 @@ Affectation :
 
   | tSTRING '.' tColorTable tAFFECT ListOfColor tEND 
     {
-      ColorTable *ct = Get_ColorTable(0);
+      GmshColorTable *ct = Get_ColorTable(0);
       if(!ct)
 	vyyerror("View[%d] does not exist", 0);
       else{
@@ -1095,7 +1095,7 @@ Affectation :
 
   | tSTRING '[' FExpr ']' '.' tColorTable tAFFECT ListOfColor tEND 
     {
-      ColorTable *ct = Get_ColorTable((int)$3);
+      GmshColorTable *ct = Get_ColorTable((int)$3);
       if(!ct)
 	vyyerror("View[%d] does not exist", (int)$3);
       else{
@@ -2640,7 +2640,7 @@ ListOfColor :
   | tSTRING '[' FExpr ']' '.' tColorTable
     {
       $$ = List_Create(256,10,sizeof(unsigned int)) ;
-      ColorTable *ct = Get_ColorTable((int)$3);
+      GmshColorTable *ct = Get_ColorTable((int)$3);
       if(!ct)
 	vyyerror("View[%d] does not exist", (int)$3);
       else{
-- 
GitLab