]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkInterpreter.cxx
*** empty log message ***
[bbtk.git] / kernel / src / bbtkInterpreter.cxx
index 951c40db00b1831324f4edfaaedc523db8a6afde..c572234691dbe69bb29dea3c1a2779d03f736467 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkInterpreter.cxx,v $ $
   Language:  C++
-  Date:      $Date: 2008/02/21 07:30:20 $
-  Version:   $Revision: 1.36 $
+  Date:      $Date: 2008/03/03 08:06:36 $
+  Version:   $Revision: 1.37 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -300,8 +300,7 @@ Interpreter* Interpreter::mGlobalInterpreter = NULL;
   /**
    *  
    */
-  void Interpreter::InterpretFile( const std::string& filename,  
-                                   bool use_configuration_file)
+  void Interpreter::InterpretFile( const std::string& filename )
   {
     bbtkDebugMessageInc("Interpreter",9,"Interpreter::InterpretFile(\""<<filename<<"\")"<<std::endl);
 
@@ -310,7 +309,7 @@ Interpreter* Interpreter::mGlobalInterpreter = NULL;
 
     try 
     {
-      SwitchToFile(filename, use_configuration_file);
+      SwitchToFile(filename);
       bool insideComment = false; // for multiline comment
       while (mFile.size()>0) 
       {
@@ -563,11 +562,11 @@ void Interpreter::InterpretLine( const std::string& line, bool &insideComment )
       case cInclude :
         if (mCommandLine)
         {
-           InterpretFile(words[1], true ); // true : better pass use_config_file
+           InterpretFile(words[1]); 
         }
         else
         {
-            SwitchToFile(words[1], true ); // true : better pass use_config_file
+            SwitchToFile(words[1]);
         }
        // if 'source' was given
        if (words.size()==3) 
@@ -577,7 +576,7 @@ void Interpreter::InterpretLine( const std::string& line, bool &insideComment )
         break;
 
       case cLoad:
-        LoadPackage(words[1], true ); // true : better pass use_config_file
+        LoadPackage(words[1]);
         break;
 
       case cUnload:
@@ -728,8 +727,7 @@ void Interpreter::SplitLine ( const std::string& str, std::vector<std::string>&
 
 // ===================================================================================
 
-  void Interpreter::SwitchToFile( const std::string& name,
-                                  bool use_configuration_file )
+  void Interpreter::SwitchToFile( const std::string& name )
   {
   // Note : in the following :
   // name : the user supplied name 
@@ -749,16 +747,14 @@ void Interpreter::SplitLine ( const std::string& str, std::vector<std::string>&
     std::string pkgname;             // e.g. <scriptname>.bbs
     std::vector<std::string> Filenames;
 
-    if (use_configuration_file)
-    {
-        // The following is *NOT* a debug time message :
-        // It's a user intended message.
-        // Please don't remove it.
-      bbtkMessage("Interpreter",1,
-                 "look for : [" << name
-                 << "] (use_configuration_file == TRUE)" << std::endl);
-      script_paths = ConfigurationFile::GetInstance().Get_bbs_paths();
-    }
+    // The following is *NOT* a debug time message :
+    // It's a user intended message.
+    // Please don't remove it.
+    bbtkMessage("Interpreter",1,
+               "look for : [" << name
+                 << "]" << std::endl);
+    script_paths = ConfigurationFile::GetInstance().Get_bbs_paths();
+
     std::string upath;
     pkgname = Utilities::ExtractScriptName(name,upath);