Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Ansi C declaration of the variables (at the beginning of the blocks)
[simgrid.git] / src / surf / surf.c
index fe4348c..84ccf39 100644 (file)
@@ -379,7 +379,11 @@ FILE *surf_fopen(const char *name, const char *mode)
        path_name_len = strlen(path) + strlen(name) + 1;        /* plus '/' */
        path_name = xbt_realloc(path_name, path_name_len + 1);
       }
+      #ifdef WIN32
+      sprintf(path_name, "%s\\%s", path, name);
+      #else
       sprintf(path_name, "%s/%s", path, name);
+      #endif
       file = fopen(path_name, mode);
       if (file)
        return file;
@@ -418,6 +422,7 @@ void surf_exit(void)
     path_name = NULL;
   }
   surf_parse_free_callbacks();
+  xbt_dict_free(&route_table);
   NOW=0; /* Just in case the user plans to restart the simulation afterward */
   xbt_exit();
 }