X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkInterpreter.cxx;h=ea9adc9ba8f1ef9bae578080dc75dcf682a015a9;hb=63d56e2f28b834d9e13f3757aaa23ab63b2b3dd6;hp=8e87d7a4dd0d72222eed7f8549de2ee25639447e;hpb=664e5cdbbcaf3dafa5fc9f206a7094248c289d5a;p=bbtk.git diff --git a/kernel/src/bbtkInterpreter.cxx b/kernel/src/bbtkInterpreter.cxx index 8e87d7a..ea9adc9 100644 --- a/kernel/src/bbtkInterpreter.cxx +++ b/kernel/src/bbtkInterpreter.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbtkInterpreter.cxx,v $ Language: C++ - Date: $Date: 2009/06/08 14:50:03 $ - Version: $Revision: 1.86 $ + Date: $Date: 2009/10/05 22:44:48 $ + Version: $Revision: 1.87 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -687,17 +687,20 @@ namespace bbtk char buf[500]; mFile.back()->getline(buf,500); std::string str(buf); - + //size 0 JCP 21-09-2009 int size=str.length(); - if ( str[ size-1 ]==13 ) + if(size != 0){ + if ( str[ size-1 ]==13 ) { str.erase(size-1,1); } - try - { - DoInterpretLine(str); - } - CATCH_MACRO; + try + { + DoInterpretLine(str); + } + CATCH_MACRO; + } + } CloseCurrentFile(); } @@ -718,6 +721,7 @@ namespace bbtk { mStatus = Interpreter_OK; mInsideComment = false; +//std::cout<<"JCP bbtkInterpreter.cxx Interpreter::InterpretLine("< Interpreter::DoInterpretLine(\"" < words; SplitLine(line,words); @@ -786,7 +789,7 @@ namespace bbtk // Command CommandInfoType command; InterpretCommand(words,command); - +//std::cout<<"JCP bbtkInterpreter command.keyword ="<(mFile.back()); @@ -844,7 +848,7 @@ namespace bbtk } return; } - +//std::cout<<" mVirtualExecuter->Create(words[1],words[2]); "<=4 + if(tfullPathScriptName.size()>=4){ + if (tfullPathScriptName.substr(tfullPathScriptName.size()-4, 3)==".bb") { - // The following is *NOT* a debug time message : - // It's a user intended message. - // Please don't remove it. - bbtkMessage("interpreter",2, - " [" <& words,"<second; bbtkDebugMessage("interpreter",9,"<== Interpreter::InterpretCommand(...)"<