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

Don't reinitialize the symbol tree in OpenFile.

(We don't reinitialize the option database, so why should we reinitialize
the variables? Using a single global symbol tree we can again define
variables with -string "" on the command line.)
parent b26d18bc
No related branches found
No related tags found
No related merge requests found
// $Id: Main.cpp,v 1.50 2005-06-20 16:40:25 geuzaine Exp $
// $Id: Main.cpp,v 1.51 2005-10-24 15:38:13 geuzaine Exp $
//
// Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
//
......@@ -86,13 +86,15 @@ int main(int argc, char *argv[])
{
ParUtil::Instance()->init(argc, argv);
InitSymbols();
Init_Mesh0(&M);
Init_Options(0);
if(argc < 2)
Info(0, argv[0]);
Init_Mesh0(&M);
// FIXME: could not make this work on IRIX
#if !defined(__sgi__)
signal(SIGINT, Signal);
......
// $Id: CommandLine.cpp,v 1.65 2005-09-22 22:39:22 geuzaine Exp $
// $Id: CommandLine.cpp,v 1.66 2005-10-24 15:38:13 geuzaine Exp $
//
// Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
//
......@@ -155,10 +155,6 @@ char *Get_BuildOptions(void)
void Get_Options(int argc, char *argv[])
{
// This symbol context is local to option parsing (the symbols will
// not interfere with subsequent OpenFiles)
InitSymbols();
// Parse session and option files
ParseFile(CTX.session_filename_fullpath, 1, 1);
ParseFile(CTX.options_filename_fullpath, 1, 1);
......
// $Id: Main.cpp,v 1.83 2005-08-24 20:28:43 remacle Exp $
// $Id: Main.cpp,v 1.84 2005-10-24 15:38:13 geuzaine Exp $
//
// Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
//
......@@ -71,6 +71,10 @@ int main(int argc, char *argv[])
strcat(cmdline, " ");
}
// Initialize the symbol tree that will hold variable names
InitSymbols();
// Initialize the static Mesh
Init_Mesh0(&M);
......
// $Id: OpenFile.cpp,v 1.84 2005-10-15 19:06:09 geuzaine Exp $
// $Id: OpenFile.cpp,v 1.85 2005-10-24 15:38:14 geuzaine Exp $
//
// Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
//
......@@ -342,7 +342,6 @@ void OpenProblem(char *name)
}
CTX.threads_lock = 1;
InitSymbols();
Init_Mesh(&M);
// Initialize pseudo random mesh generator to the same seed
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment