X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/762815d39849184808292c38523d0ea7e498ca82..6aee3c83262838c5202a1e013845242554b60db2:/tools/tesh/tesh.c diff --git a/tools/tesh/tesh.c b/tools/tesh/tesh.c index 0d6255a829..af0ff1a8eb 100644 --- a/tools/tesh/tesh.c +++ b/tools/tesh/tesh.c @@ -163,6 +163,19 @@ static void handle_suite(const char* filename, FILE* IN) { } +static void parse_environ(){ + char *p; + int i; + env = xbt_dict_new(); + for (i=0; environ[i];i++) { + p=environ[i]; + char *eq = strchr(p,'='); + char *key = bprintf("%.*s",(int)(eq-p),p); + xbt_dict_set(env,key,xbt_strdup(eq+1),xbt_free_f); + free(key); + } +} + int main(int argc,char *argv[]) { FILE *IN; @@ -177,6 +190,7 @@ int main(int argc,char *argv[]) { xbt_init(&argc,argv); rctx_init(); + parse_environ(); /* Find the description file */ if (argc == 1) {