Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add print out for simulated time.
[simgrid.git] / tools / gras / windows_stub_generator.c
index 585ba12..ddb4299 100644 (file)
@@ -1,5 +1,3 @@
-/*     $Id$     */
-
 /* gras_stub_generator - creates the main() to use a GRAS program           */
 
 /* Copyright (c) 2003-2007 Martin Quinson, Arnaud Legrand, Malek Cherier.   */
@@ -660,9 +658,7 @@ void generate_borland_simulation_project(const char *name)
 
   GetCurrentDirectory(MAX_PATH, buffer);
 
-  borland_project.src_dir = xbt_new0(char, strlen(buffer) + 1);
-
-  strcpy(borland_project.src_dir, buffer);
+  borland_project.src_dir = xbt_strdup(buffer);
 
   borland_project.name =
       xbt_new0(char, strlen(name) + strlen("simulator") + 2);
@@ -717,9 +713,7 @@ void generate_borland_real_life_project(const char *name)
 
   GetCurrentDirectory(MAX_PATH, buffer);
 
-  borland_project.src_dir = xbt_new0(char, strlen(buffer) + 1);
-
-  strcpy(borland_project.src_dir, buffer);
+  borland_project.src_dir = xbt_strdup(buffer);
 
   borland_project.bin_dir =
       xbt_new0(char, strlen(buffer) + strlen("\\bin") + 1);
@@ -838,8 +832,7 @@ int generate_simulation_dsp_file(const char *name)
   GetEnvironmentVariable("LIB_SIMGRID_PATH", dsp.lib_dir, MAX_PATH);
   GetCurrentDirectory(MAX_PATH, buffer);
 
-  dsp.src_dir = xbt_new0(char, strlen(buffer) + 1);
-  strcpy(dsp.src_dir, buffer);
+  dsp.src_dir = xbt_strdup(buffer);
   dsp.name = xbt_new0(char, strlen(name) + strlen("simulator") + 2);
   sprintf(dsp.name, "%s_simulator", name);
 
@@ -871,9 +864,7 @@ int generate_real_live_dsp_file(const char *name)
 
   GetCurrentDirectory(MAX_PATH, buffer);
 
-  dsp.src_dir = xbt_new0(char, strlen(buffer) + 1);
-
-  strcpy(dsp.src_dir, buffer);
+  dsp.src_dir = xbt_strdup(buffer);
 
 
   xbt_dict_foreach(process_function_set, cursor, key, data) {