From 0cac86ce714cf094a2f74f5a48c314688d12347c Mon Sep 17 00:00:00 2001 From: Eduardo Davila Date: Tue, 16 Oct 2012 06:31:04 +0000 Subject: [PATCH] Bug #1498 Load Package order. --- kernel/src/bbtkFactory.cxx | 29 ++++++++++----------------- kernel/src/bbtkInterpreter.cxx | 5 ++--- kernel/src/bbtkInterpreterVirtual.cxx | 24 +++++++++++++++++++++- 3 files changed, 36 insertions(+), 22 deletions(-) diff --git a/kernel/src/bbtkFactory.cxx b/kernel/src/bbtkFactory.cxx index 3d4aef1..7c55c7f 100644 --- a/kernel/src/bbtkFactory.cxx +++ b/kernel/src/bbtkFactory.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbtkFactory.cxx,v $ Language: C++ - Date: $Date: 2012/05/30 17:17:00 $ - Version: $Revision: 1.52 $ + Date: $Date: 2012/10/16 06:31:04 $ + Version: $Revision: 1.53 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -115,7 +115,6 @@ namespace bbtk bbtkMessage("output",2,p->GetDescription()<AddFactory(GetThisPointer()); -printf("EED Factory::DoLoadPackage > %s %s %s \n",libname.c_str(), pkgname.c_str(),path.c_str()); mPackageMap[pkgname] = p; return true; } @@ -164,26 +163,23 @@ printf("EED Factory::DoLoadPackage > %s %s %s \n",libname.c_str(), pkgname.c_st std::string upath; - pkgname = Utilities::ExtractPackageName(name,upath); - - printf("EED Factory::LoadPackage A. %s\n", name.c_str()); - printf("EED Factory::LoadPackage A. %s\n", upath.c_str()); - printf("EED Factory::LoadPackage A. %s\n", pkgname.c_str()); - + bbtkMessage("debug",1,"Package name ["<LoadPackage(packageName); } diff --git a/kernel/src/bbtkInterpreterVirtual.cxx b/kernel/src/bbtkInterpreterVirtual.cxx index e3ce34b..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. @@ -1373,6 +1374,27 @@ printf("EED InterpreterVirtual::SwitchToFile jaja >> %s\n", (*i).c_str() ); //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) { -- 2.47.1