X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cc01c6a871dbbfd0cc84e26eb9f94aeb539e613e..3f0c94e70e5ee6fc659b2e1dd45c765e7afbd0fe:/tools/gras/windows_stub_generator.c diff --git a/tools/gras/windows_stub_generator.c b/tools/gras/windows_stub_generator.c index 585ba12e61..ddb4299fd0 100644 --- a/tools/gras/windows_stub_generator.c +++ b/tools/gras/windows_stub_generator.c @@ -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) {