X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkInterpreterVirtual.cxx;h=35a87464b311639d28bd23b655cc26870cc58d2c;hb=0cac86ce714cf094a2f74f5a48c314688d12347c;hp=d49124b09bbb407119b2ce2de452f84890b6c551;hpb=4cb6c59ce12259b0f61bd465aac75fe8c822952f;p=bbtk.git diff --git a/kernel/src/bbtkInterpreterVirtual.cxx b/kernel/src/bbtkInterpreterVirtual.cxx index d49124b..35a8746 100644 --- a/kernel/src/bbtkInterpreterVirtual.cxx +++ b/kernel/src/bbtkInterpreterVirtual.cxx @@ -1270,7 +1270,8 @@ namespace bbtk std::string fullPathScriptName; // full path script name std::string pkgname; // e.g. .bbs std::vector Filenames; - + std::string tmpFilenames; + // The following is *NOT* a debug time message : // It's a user intended message. // Please don't remove it. @@ -1332,6 +1333,7 @@ namespace bbtk i++) { std::string full_path(*i); +printf("EED InterpreterVirtual::SwitchToFile 1. >>%s\n", full_path.c_str() ); // we *really* want '.' to be the current working directory if (full_path == ".") { @@ -1362,16 +1364,43 @@ namespace bbtk std::vector::iterator i; for (i=script_paths.begin();i!=script_paths.end();i++) { + +printf("EED InterpreterVirtual::SwitchToFile jaja >> %s\n", (*i).c_str() ); + bbtkMessage("interpreter",1, "--> Looking in '" << *i << "'" << std::endl); Filenames.clear(); //int nbFiles = Utilities::Explore(*i, false, Filenames); - + + int iFilesnames,jFilesnames,sizeFilenames; + sizeFilenames=Filenames.size(); + + + // EEDd 30 sept 2012 + //Sorting list of files + for (iFilesnames=0;iFilesnames Filenames[jFilesnames] ) + { + tmpFilenames = Filenames[iFilesnames]; + Filenames[iFilesnames] = Filenames[jFilesnames]; + Filenames[jFilesnames] = tmpFilenames; + } // if Filesnames + } // for iFilesnames + } // for iFilesnames + + + for (std::vector::iterator j = Filenames.begin(); j!= Filenames.end(); ++j) { + +printf("EED InterpreterVirtual::SwitchToFile kkkkk >> %s\n", (*j).c_str() ); + int lgr = (*j).size(); if (lgr < 5) continue; // ignore non .bbp file @@ -1466,6 +1495,7 @@ namespace bbtk } std::string tfullPathScriptName = Utilities::MakePkgnameFromPath(path, name, false); + //Addition JCP tfullPathScriptName.size()>=4 if(tfullPathScriptName.size()>=4){ if (tfullPathScriptName.substr(tfullPathScriptName.size()-4, 3)==".bb") @@ -1526,6 +1556,7 @@ namespace bbtk bbtkError("No ["<SetCurrentFileName(fullPathScriptName); if (source) SetCurrentFileName(fullPathScriptName); @@ -1956,7 +1987,7 @@ void InterpreterVirtual::SwitchToStream( std::stringstream* stream ) ter.c_cc[VTIME]=0; tcsetattr(0,TCSANOW,&ter); #endif - + mCommandLine = true; bool again = true; // bool insideComment = false; // for multiline comment