From b054fdde01471ba990c56ca4cd35e04a88cf6e77 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Tue, 7 May 2002 05:32:20 +0000 Subject: [PATCH] #define MAXSOLVERS --- Fltk/Callbacks.cpp | 11 ++++++++--- Fltk/Solvers.cpp | 4 ++-- Fltk/Solvers.h | 12 +++++++----- doc/VERSIONS | 10 +++++----- 4 files changed, 22 insertions(+), 15 deletions(-) diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp index 3d38c28fb3..09e37b9009 100644 --- a/Fltk/Callbacks.cpp +++ b/Fltk/Callbacks.cpp @@ -1,4 +1,4 @@ -// $Id: Callbacks.cpp,v 1.120 2002-05-01 21:11:53 geuzaine Exp $ +// $Id: Callbacks.cpp,v 1.121 2002-05-07 05:32:20 geuzaine Exp $ #include <sys/types.h> #include <signal.h> @@ -1699,8 +1699,13 @@ void mesh_define_transfinite_volume_cb(CALLBACK_ARGS){ void solver_cb(CALLBACK_ARGS){ char file[256], tmp[256]; - static int first[5]={1,1,1,1,1}; - int num = (int)data; + static int init=0, first[MAXSOLVERS]; + int i, num = (int)data; + + if(!init){ + for(i=0; i<MAXSOLVERS; i++) first[i] = 1; + init = 1; + } if(first[num]){ first[num] = 0; diff --git a/Fltk/Solvers.cpp b/Fltk/Solvers.cpp index 8899026fdc..3f9ea1d410 100644 --- a/Fltk/Solvers.cpp +++ b/Fltk/Solvers.cpp @@ -1,4 +1,4 @@ -// $Id: Solvers.cpp,v 1.9 2002-01-03 10:25:06 geuzaine Exp $ +// $Id: Solvers.cpp,v 1.10 2002-05-07 05:32:20 geuzaine Exp $ #include "Gmsh.h" #include "GmshClient.h" @@ -21,7 +21,7 @@ extern Context_T CTX; extern GUI *WID; -SolverInfo SINFO[5] ; +SolverInfo SINFO[MAXSOLVERS] ; int Solver(int num, char *args){ int sock, type, stop=0, i, j, n; diff --git a/Fltk/Solvers.h b/Fltk/Solvers.h index 88d3c3ca28..b7304c6db4 100644 --- a/Fltk/Solvers.h +++ b/Fltk/Solvers.h @@ -1,19 +1,21 @@ #ifndef _SOLVERS_H_ #define _SOLVERS_H_ +#define MAXSOLVERS 5 + typedef struct{ char name[256], extension[32], executable_name[256]; char mesh_name[256], mesh_command[256]; - char button_name[5][32], button_command[5][256]; - char option_name[5][256], option_command[256]; - char option[5][100][256]; - int nboptions, nbval[5]; + char button_name[MAXSOLVERS][32], button_command[MAXSOLVERS][256]; + char option_name[MAXSOLVERS][256], option_command[256]; + char option[MAXSOLVERS][100][256]; + int nboptions, nbval[MAXSOLVERS]; char *help; int client_server, popup_messages, merge_views; int pid; } SolverInfo ; -extern SolverInfo SINFO[5] ; +extern SolverInfo SINFO[MAXSOLVERS] ; int Solver(int num, char *args); diff --git a/doc/VERSIONS b/doc/VERSIONS index a2d219a678..b15e118a32 100644 --- a/doc/VERSIONS +++ b/doc/VERSIONS @@ -1,11 +1,11 @@ -$Date: 2002-04-24 00:22:54 $ +$Date: 2002-05-07 05:32:20 $ New in 1.35: Graphical user interface upgraded to FLTK 1.1 (tooltips, new file chooser with multiple selection, full keyboard navigation, -etc.); colors can be now be directly assigned to mesh entities; -initial tensor visaulization; new keyboard animation (righ/left arrow -for time steps; up/down arrow for view cycling); new VRML output -format for surface meshes; small bug fixes; +cut/paste of messages, etc.); colors can be now be directly assigned to +mesh entities; initial tensor visaulization; new keyboard animation +(righ/left arrow for time steps; up/down arrow for view cycling); new +VRML output format for surface meshes; small bug fixes; New in 1.34: Improved surface mesh of non-plane surfaces; fixed orientation of elements in 2D anisotropic algorithm; minor user -- GitLab