X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=kernel%2Fsrc%2FbbtkInterpreter.cxx;h=951c40db00b1831324f4edfaaedc523db8a6afde;hb=63005ec659612d567c00bfbb9ecbd62566a3217d;hp=7a7e08b47b0c25fd9827e64d4a6c0b2995808f85;hpb=0d9c3f691b5889816aea4d7e813f58e1950f81ed;p=bbtk.git diff --git a/kernel/src/bbtkInterpreter.cxx b/kernel/src/bbtkInterpreter.cxx index 7a7e08b..951c40d 100644 --- a/kernel/src/bbtkInterpreter.cxx +++ b/kernel/src/bbtkInterpreter.cxx @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkInterpreter.cxx,v $ $ Language: C++ - Date: $Date: 2008/02/14 20:26:54 $ - Version: $Revision: 1.32 $ + Date: $Date: 2008/02/21 07:30:20 $ + Version: $Revision: 1.36 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -26,6 +26,7 @@ #include "bbtkWxConsole.h" #include "bbtkUtilities.h" #include +#include #ifdef CMAKE_HAVE_TERMIOS_H #include #define BBTK_USE_TERMIOS_BASED_PROMPT @@ -57,7 +58,7 @@ Interpreter* Interpreter::mGlobalInterpreter = NULL; // For the time being, comment out previous line, and // uncomment next line to check Transcriptor - //mExecuter = new bbtk::Transcriptor("GeneratedProgram.txt"); + // mExecuter = new bbtk::Transcriptor("GeneratedProgram.txt"); // Builds the commands dict CommandInfoType info; @@ -789,7 +790,7 @@ void Interpreter::SplitLine ( const std::string& str, std::vector& std::string path; std::vector::iterator i; std::string fullDirectoryName; - for (i=script_paths.begin();i!=script_paths.end();++i)// ==== relative name, iterate + load all .bbs files + for (i=script_paths.begin();i!=script_paths.end();i++)// ==== relative name, iterate + load all .bbs files { path = *i; @@ -803,8 +804,12 @@ void Interpreter::SplitLine ( const std::string& str, std::vector& fullDirectoryName = Utilities::MakePkgnameFromPath(path, upath, false); + //EED 18 Fev 2008 + // without last slash "\" + std::string fullDirectoryNameClean = fullDirectoryName.substr(0,fullDirectoryName.size()-1); + // Check if library exists - if ( ! Utilities::IsDirectory(fullDirectoryName) ) + if ( ! Utilities::IsDirectory( fullDirectoryNameClean ) ) { // The following is *NOT* a debug time message : // It's a user intended message. @@ -821,7 +826,6 @@ void Interpreter::SplitLine ( const std::string& str, std::vector& nbBssFiles = 0; for (std::vector::iterator i = Filenames.begin(); i!= Filenames.end(); ++i) { - if ((*i).substr((*i).size()-4, 4) != ".bbs") continue; // ignore non .bbs files LoadScript(*i,name);