]> Creatis software - bbtk.git/commitdiff
Merge branch 'wt-version'
authorEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Tue, 6 Oct 2015 09:08:44 +0000 (11:08 +0200)
committerEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Tue, 6 Oct 2015 09:08:44 +0000 (11:08 +0200)
1  2 
kernel/src/bbtkInterpreterVirtual.cxx
kernel/src/bbtkPackage.cxx

index c1a6fac6a6a6a1b7bb4ee0998d08822244b7e431,58552fc160db1b8ee27dd2a1a0ebd7577d1fbcc3..8d27b3290dd51134d6cbe9c578ca4d5805942d3a
@@@ -346,7 -346,6 +346,6 @@@ namespace bbt
      */
  
  
    } 
    //=======================================================================
    
        
    //=======================================================================  
    void InterpreterVirtual::DoInterpretLine( const std::string& line )
-   {
-         
+   {  
      bbtkDebugMessage("interpreter",6,"==> InterpreterVirtual::DoInterpretLine(\""
                     <<line<<"\")"<<std::endl);
      std::vector<std::string> words;
  
      // break and quit commands
      if ((command.code==cBreak) || (command.code==cQuit))
 -      {
 -      bool in_script = false;
 -      std::string file("");
 -      int line = 0;
 -
 -      if (mFileName.size()) 
 -        {
 -          std::ifstream* fs = dynamic_cast<std::ifstream*>(mFile.back());
 -          if (fs!=0) in_script = true;          
 -          file = mFileName.back();
 -          line = mLine.back();
 -        } 
 -      if (command.code==cBreak)
 +    {
 +//EED-Borrame bool in_script = false;
 +//EED-Borrame std::string file("");
 +//EED-Borrame int line = 0;
 +
 +//EED-Borrame if (mFileName.size()) 
 +//EED-Borrame   {
 +//EED-Borrame     std::ifstream* fs = dynamic_cast<std::ifstream*>(mFile.back());
 +//EED-Borrame     if (fs!=0) in_script = true;          
 +//EED-Borrame     file = mFileName.back();
 +//EED-Borrame     line = mLine.back();
 +//EED-Borrame   } 
 +        if (command.code==cBreak)
          {
            /*
            std::cout << "BreakException(" 
                  commandBreak();
  //EED Borrame     bbtkError("break");//,in_script,file,line);
            //      throw BreakException(in_script,file,line);
 -        }       
 -      else 
 -        {
 +        } else {
                  commandQuit();
  //EED Borrame     bbtkError("quit");//,in_script,file,line);
              //throw QuitException(in_script,file,line);
 -        }
 -      return;
 -      }   
 +        } // cBreak
 +        return;
 +   } // cBreak  cQuit  
  //std::cout<<" mVirtualExecuter->Create(words[1],words[2]); "<<line<<std::endl;
      // other cammands
  
  
      bbtkDebugMessage("interpreter",6,"<== InterpreterVirtual::DoInterpretLine(\""
                     <<line<<"\")"<<std::endl);
-         
    }
    //=======================================================================  
  
@@@ -1370,7 -1370,7 +1368,7 @@@ printf("EED InterpreterVirtual::SwitchT
        for (i=script_paths.begin();i!=script_paths.end();i++)
          {
  
- printf("EED InterpreterVirtual::SwitchToFile jaja >>  %s\n", (*i).c_str() );
+ printf("EED InterpreterVirtual::SwitchToFile (1) >>  %s\n", (*i).c_str() );
                  
            bbtkMessage("interpreter",1,
                        "--> Looking in '" << *i << "'" << std::endl);
                 j!= Filenames.end(); ++j)
              {
                          
- printf("EED InterpreterVirtual::SwitchToFile kkkkk     >>  %s\n", (*j).c_str() );
+ printf("EED InterpreterVirtual::SwitchToFile (2)     >>  %s\n", (*j).c_str() );
                          
                int lgr = (*j).size();
                if (lgr < 5) continue;  
index f2929573f4a53cca6312bf340632f68da3b59935,7cf93fc1f68996148cc88650b00e0016dc294a7d..91cdb518372b220f124b1de33af8dc5c22c8912a
@@@ -85,8 -85,10 +85,10 @@@ namespace bbt
      mDescription(description),
      mVersion(version)
    {
      bbtkDebugMessage("object",2,"==> Package('"<<name<<"',...)"
                     <<bbtkendl);
      std::string default_doc_dir = ConfigurationFile::GetInstance().Get_default_temp_dir();
      char c = default_doc_dir.c_str()[strlen(default_doc_dir.c_str())-1];
      std::string url = default_doc_dir; 
      bbtkDebugMessage("package",3,"* Symbol ["<<getvername
                     <<"] found"<<std::endl);
      // version matches ?
 +
      if (getbbtkversion() != bbtk::GetVersion())
        {
        bbtkMessage("package",0,