X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/558e19f535bb0c65b610bc758c8133ded549ca3c..2807fde4fd1f59c230d69a934634c5dfb77905f2:/examples/simdag/daxload/sd_daxload.c?ds=sidebyside diff --git a/examples/simdag/daxload/sd_daxload.c b/examples/simdag/daxload/sd_daxload.c index 8276fc92da..e268452deb 100644 --- a/examples/simdag/daxload/sd_daxload.c +++ b/examples/simdag/daxload/sd_daxload.c @@ -7,7 +7,9 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "simgrid/simdag.h" -#include "xbt/file.h" + +#include +#include XBT_LOG_NEW_DEFAULT_CATEGORY(test, "Logging specific to this SimDag example"); @@ -79,9 +81,8 @@ int main(int argc, char **argv) XBT_INFO("------------------- Run the schedule ---------------------------"); SD_simulate(-1); XBT_INFO("------------------- Produce the trace file---------------------------"); - char * basename = xbt_basename(tracefilename); - XBT_INFO("Producing the trace of the run into %s", basename); - free(basename); + char* basename = strrchr(tracefilename, '/'); + XBT_INFO("Producing the trace of the run into %s", basename ? basename + 1 : tracefilename); FILE *out = fopen(tracefilename, "w"); xbt_assert(out, "Cannot write to %s", tracefilename); free(tracefilename);