X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/693ba4212f01cdcc236bc94bfb2a0fbcbb6a3379..0df3d092ef2add4b5648a77b0bee5bcaabb0af65:/tools/gras/stub_generator.c diff --git a/tools/gras/stub_generator.c b/tools/gras/stub_generator.c index b602aed730..c2ae9d2836 100644 --- a/tools/gras/stub_generator.c +++ b/tools/gras/stub_generator.c @@ -9,6 +9,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "xbt/sysdep.h" +#include "xbt/function_types.h" #include "xbt/log.h" #include "surf/surfxml_parse.h" #include "surf/surf.h" @@ -560,13 +561,13 @@ int main(int argc, char *argv[]) { char *project_name = NULL; char *deployment_file = NULL; - + int i; + surf_init(&argc, argv); - xbt_assert1((argc ==3),"Usage: %s project_name deployment_file\n",argv[0]); + xbt_assert1((argc >= 3),"Usage: %s project_name deployment_file [deployment_file...]\n",argv[0]); project_name = argv[1]; - deployment_file = argv[2]; process_function_set = xbt_dict_new(); process_list = xbt_dynar_new(sizeof(s_process_t),s_process_free); @@ -575,9 +576,13 @@ int main(int argc, char *argv[]) STag_surfxml_process_fun = parse_process_init; ETag_surfxml_argument_fun = parse_argument; ETag_surfxml_process_fun = parse_process_finalize; - surf_parse_open(deployment_file); - if(surf_parse()) xbt_assert1(0,"Parse error in %s",deployment_file); - surf_parse_close(); + for(i=2; i