X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/418a8a2942538b0741691f030b2fa8e6bae47290..377062621c619adff65090eebbcb8e9d6c1d780f:/tools/gras/stub_generator.c diff --git a/tools/gras/stub_generator.c b/tools/gras/stub_generator.c index dfe760ce2d..3639b0bc41 100644 --- a/tools/gras/stub_generator.c +++ b/tools/gras/stub_generator.c @@ -21,6 +21,7 @@ #include "gras_stub_generator.h" #include +extern char *xbt_binary_name; XBT_LOG_NEW_DEFAULT_SUBCATEGORY(stubgen, gras, "Stub generator"); @@ -56,8 +57,7 @@ static s_process_t process; static void parse_process_init(void) { - xbt_dict_set(process_function_set, A_surfxml_process_function, NULL, - NULL); + xbt_dict_set(process_function_set, A_surfxml_process_function, NULL, NULL); xbt_dict_set(machine_set, A_surfxml_process_host, NULL, NULL); process.argc = 1; process.argv = xbt_new(char *, 1); @@ -95,10 +95,12 @@ int main(int argc, char *argv[]) char *deployment_file = NULL; int i; + xbt_binary_name=xbt_strdup(argv[0]); + surf_init(&argc, argv); - process_function_set = xbt_dict_new(); + process_function_set = xbt_dict_new_homogeneous(NULL); process_list = xbt_dynar_new(sizeof(s_process_t), s_process_free); - machine_set = xbt_dict_new(); + machine_set = xbt_dict_new_homogeneous(NULL); for (i = 1; i < argc; i++) { int need_removal = 0; @@ -169,8 +171,7 @@ int main(int argc, char *argv[]) generate_simulation_dsp_file(project_name); generate_real_live_dsp_file(project_name); - if (__gras_path) - xbt_free(__gras_path); + xbt_free(__gras_path); #endif free(warning);