X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d9966aa66acc63c0417fbeae8e3ff12bccb0cdb0..0ea1a3dca97a66f81466333806853c97af7eb398:/src/surf/surf_interface.cpp diff --git a/src/surf/surf_interface.cpp b/src/surf/surf_interface.cpp index f45907ef1a..c1729908bc 100644 --- a/src/surf/surf_interface.cpp +++ b/src/surf/surf_interface.cpp @@ -5,12 +5,13 @@ #include "surf_interface.hpp" #include "mc/mc.h" +#include "simgrid/kernel/routing/NetPoint.hpp" #include "simgrid/s4u/Engine.hpp" -#include "simgrid/sg_config.h" +#include "simgrid/sg_config.hpp" #include "src/instr/instr_private.hpp" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals #include "src/kernel/lmm/maxmin.hpp" // Constraint -#include "src/kernel/routing/NetPoint.hpp" #include "src/surf/HostImpl.hpp" +#include "src/surf/xml/platf.hpp" #include "xbt/utility.hpp" #include @@ -128,12 +129,6 @@ double surf_get_clock() return NOW; } -#ifdef _WIN32 -# define FILE_DELIM "\\" -#else -# define FILE_DELIM "/" /* FIXME: move to better location */ -#endif - std::ifstream* surf_ifsopen(std::string name) { std::ifstream* fs = new std::ifstream(); @@ -144,7 +139,7 @@ std::ifstream* surf_ifsopen(std::string name) /* search relative files in the path */ for (auto const& path_elm : surf_path) { - std::string buff = path_elm + FILE_DELIM + name; + std::string buff = path_elm + "/" + name; fs->open(buff.c_str(), std::ifstream::in); if (not fs->fail()) { @@ -167,7 +162,7 @@ FILE *surf_fopen(const char *name, const char *mode) /* search relative files in the path */ for (auto const& path_elm : surf_path) { - std::string buff = path_elm + FILE_DELIM + name; + std::string buff = path_elm + "/" + name; file = fopen(buff.c_str(), mode); if (file) @@ -329,9 +324,6 @@ void surf_exit() delete stype->model_properties; delete stype; } - for (auto const& s : *simgrid::surf::StorageImpl::storagesMap()) - delete s.second; - delete simgrid::surf::StorageImpl::storagesMap(); for (auto const& model : *all_existing_models) delete model;