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

*** empty log message ***

parent f94a7485
No related branches found
No related tags found
No related merge requests found
// $Id: GetOptions.cpp,v 1.8 2001-02-05 07:56:57 geuzaine Exp $ // $Id: GetOptions.cpp,v 1.9 2001-02-05 20:32:32 geuzaine Exp $
#include "Gmsh.h" #include "Gmsh.h"
#include "GmshUI.h" #include "GmshUI.h"
...@@ -14,7 +14,6 @@ extern Context_T CTX; ...@@ -14,7 +14,6 @@ extern Context_T CTX;
char *TheFileNameTab[MAX_OPEN_FILES]; char *TheFileNameTab[MAX_OPEN_FILES];
char *TheBgmFileName=NULL; char *TheBgmFileName=NULL;
char ThePathForIncludes[NAME_STR_L];
char gmsh_progname[] = "This is Gmsh" ; char gmsh_progname[] = "This is Gmsh" ;
char gmsh_copyright[] = "Copyright (C) 1997-2001 J.-F. Remacle, C. Geuzaine"; char gmsh_copyright[] = "Copyright (C) 1997-2001 J.-F. Remacle, C. Geuzaine";
...@@ -72,7 +71,6 @@ char gmsh_options[] = ...@@ -72,7 +71,6 @@ char gmsh_options[] =
#ifdef _MOTIF #ifdef _MOTIF
" -nothreads disable threads\n" " -nothreads disable threads\n"
#endif #endif
" -path string set path for included files\n"
" -version show version number\n" " -version show version number\n"
" -info show detailed version information\n" " -info show detailed version information\n"
" -help show this message\n" " -help show this message\n"
...@@ -113,16 +111,6 @@ void Get_Options (int argc, char *argv[], int *nbfiles) { ...@@ -113,16 +111,6 @@ void Get_Options (int argc, char *argv[], int *nbfiles) {
else if(!strcmp(argv[i]+1, "3")){ else if(!strcmp(argv[i]+1, "3")){
CTX.interactive = 3; i++; CTX.interactive = 3; i++;
} }
else if(!strcmp(argv[i]+1, "path")){
i++;
/* we need to make a copy because of bison */
if(argv[i] != NULL)
strncpy(ThePathForIncludes, argv[i++], NAME_STR_L) ;
else {
fprintf(stderr, ERROR_STR "Missing String\n");
exit(1);
}
}
else if(!strcmp(argv[i]+1, "bgm")){ else if(!strcmp(argv[i]+1, "bgm")){
i++; i++;
if(argv[i] != NULL) TheBgmFileName = argv[i++]; if(argv[i] != NULL) TheBgmFileName = argv[i++];
......
This diff is collapsed.
%{ %{
// $Id: Gmsh.y,v 1.57 2001-01-29 08:43:45 geuzaine Exp $ // $Id: Gmsh.y,v 1.58 2001-02-05 20:32:33 geuzaine Exp $
#include <stdarg.h> #include <stdarg.h>
...@@ -32,7 +32,6 @@ List_T *Symbol_L; ...@@ -32,7 +32,6 @@ List_T *Symbol_L;
extern Mesh *THEM; extern Mesh *THEM;
extern Post_View *ActualView; extern Post_View *ActualView;
extern char ThePathForIncludes[NAME_STR_L];
static FILE *yyinTab[MAX_OPEN_FILES]; static FILE *yyinTab[MAX_OPEN_FILES];
static int yylinenoTab[MAX_OPEN_FILES]; static int yylinenoTab[MAX_OPEN_FILES];
...@@ -1608,12 +1607,18 @@ Command : ...@@ -1608,12 +1607,18 @@ Command :
if(!strcmp($1, "Include")){ if(!strcmp($1, "Include")){
yyinTab[RecursionLevel++] = yyin; yyinTab[RecursionLevel++] = yyin;
strcpy(tmpstring, ThePathForIncludes);
if((yyin = fopen(strcat(tmpstring,$2),"r"))){ strcpy(tmpstring, yyname);
i = strlen(yyname)-1 ;
while(i >= 0 && yyname[i] != '/' && yyname[i] != '\\') i-- ;
tmpstring[i+1] = '\0';
strcat(tmpstring,$2);
if((yyin = fopen(tmpstring,"r"))){
strcpy(yynameTab[RecursionLevel-1],yyname); strcpy(yynameTab[RecursionLevel-1],yyname);
yylinenoTab[RecursionLevel-1]=yylineno; yylinenoTab[RecursionLevel-1]=yylineno;
yylineno=1; yylineno=1;
strcpy(yyname,$2); strcpy(yyname,tmpstring);
while(!feof(yyin)){ while(!feof(yyin)){
yyparse(); yyparse();
} }
...@@ -1623,7 +1628,7 @@ Command : ...@@ -1623,7 +1628,7 @@ Command :
yylineno = yylinenoTab[RecursionLevel]; yylineno = yylinenoTab[RecursionLevel];
} }
else{ else{
vyyerror("Unknown File '%s'", $2) ; vyyerror("Unknown File '%s'", tmpstring) ;
yyin = yyinTab[--RecursionLevel]; yyin = yyinTab[--RecursionLevel];
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* A lexical scanner generated by flex */ /* A lexical scanner generated by flex */
/* Scanner skeleton version: /* Scanner skeleton version:
* $Header: /cvsroot/gmsh/Parser/Gmsh.yy.cpp,v 1.65 2001-01-29 08:43:45 geuzaine Exp $ * $Header: /cvsroot/gmsh/Parser/Gmsh.yy.cpp,v 1.66 2001-02-05 20:32:33 geuzaine Exp $
*/ */
#define FLEX_SCANNER #define FLEX_SCANNER
...@@ -977,7 +977,7 @@ char *yytext; ...@@ -977,7 +977,7 @@ char *yytext;
#define INITIAL 0 #define INITIAL 0
#line 2 "Gmsh.l" #line 2 "Gmsh.l"
// $Id: Gmsh.yy.cpp,v 1.65 2001-01-29 08:43:45 geuzaine Exp $ // $Id: Gmsh.yy.cpp,v 1.66 2001-02-05 20:32:33 geuzaine Exp $
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
......
- Ecrire une vraie base de donnee des options, avec un fonction pour
chaque option. Cette fonction devrait modifier la GUI s'il y a lieu
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment