]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkInterpreter.cxx
Fixed crash with Interpreter without WxConsole (case of RUN button of WxBrowser)
[bbtk.git] / kernel / src / bbtkInterpreter.cxx
index ab194e90913eb95ebf7b8e4ec58c7064dc6d48ff..d791462c9464d2a338f819fd01317aada1a88b8b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkInterpreter.cxx,v $ $
   Language:  C++
-  Date:      $Date: 2008/03/10 06:24:13 $
-  Version:   $Revision: 1.42 $
+  Date:      $Date: 2008/03/11 12:27:21 $
+  Version:   $Revision: 1.43 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -313,27 +313,24 @@ std::cout << "=========================================~Interpreter()" << std::e
     try 
     {
       SwitchToFile(filename);
-
-printf("EED Interpreter::InterpretFile 0001\n" );
+      /*
+      printf("EED Interpreter::InterpretFile 0001\n" );
 int ii,ssize = mFileName.size();
 for (ii=0;ii<ssize;ii++)
 {
-       printf("EED RRR Interpreter::InterpretFile %s\n", mFileName[ii].c_str() );
+       printf("EED RRR Interpreter::InterpretFile %s\n", mFileName[ii].c_str() );
 }
-
+      */
       bool insideComment = false; // for multiline comment
       while (mFile.size()>0) 
       {
-printf("EED --- %s --- Interpreter::InterpretFile \n", mFileName[0].c_str() );
+       //printf("EED --- %s --- Interpreter::InterpretFile \n", mFileName[0].c_str() );
          while ((mFile.size()>0) && 
                 (!mFile.back()->eof()))
-//EED3                                 (!mFile[0]->eof()))
          {
             mLine.back()++;
             char buf[500];
             mFile.back()->getline(buf,500);
-//EED3            mFile[0]->getline(buf,500);
-      
             std::string str(buf);
             int size=str.length();
             if ( str[ size-1 ]==13  )
@@ -342,7 +339,7 @@ printf("EED --- %s --- Interpreter::InterpretFile \n", mFileName[0].c_str() );
             }
       
             InterpretLine(str, insideComment);
-printf("EED Interpreter::InterpretFile %s\n", str.c_str() );
+           //printf("EED Interpreter::InterpretFile %s\n", str.c_str() );
          }
         //if (mFile.size()>0) 
         CloseCurrentFile();
@@ -995,7 +992,7 @@ void Interpreter::SplitLine ( const std::string& str, std::vector<std::string>&
 //EED printf("  EED %d Interpreter::LoadScript %s __>>__ %s\n", iStrScript,mFileName[iStrScript].c_str(),fullPathScriptName.c_str() );
                if (mFileName[iStrScript] == fullPathScriptName )
                {
-                       printf("  EED %d Interpreter::LoadScript iguales\n",iStrScript ); 
+                 //                    printf("  EED %d Interpreter::LoadScript iguales\n",iStrScript ); 
                        okScriptExist=true;
                } // if
        } // for