-MSG_error_t MSG_action_trace_run(char*path) {
- MSG_error_t res;
-
- FILE * fp;
- char * line = NULL;
- size_t len = 0;
- ssize_t read;
-
- xbt_dynar_t evt;
-
- fp = fopen(path, "r");
- xbt_assert2(fp != NULL,"Cannot open %s: %s",path,strerror(errno));
-
- while ((read = getline(&line, &len, fp)) != -1) {
- char *comment = strchr(line,'#');
- if (comment!=NULL)
- *comment='\0';
- xbt_str_trim(line,NULL);
- if (line[0]=='\0')
- continue;
- evt = xbt_str_split_quoted(line);
- xbt_dynar_push(action_list,&evt);
- }
-
- if (line)
- free(line);
- fclose(fp);
-
- res = MSG_main();
- xbt_dynar_free(&action_list);
- action_list = xbt_dynar_new(sizeof(xbt_dynar_t),xbt_dynar_free_voidp);
-
- return res;
+MSG_error_t MSG_action_trace_run(char *path)
+{
+ MSG_error_t res;
+
+ FILE *fp;
+ char *line = NULL;
+ size_t len = 0;
+ ssize_t read;
+
+ xbt_dynar_t evt;
+
+ fp = fopen(path, "r");
+ xbt_assert2(fp != NULL, "Cannot open %s: %s", path, strerror(errno));
+
+ while ((read = getline(&line, &len, fp)) != -1) {
+ char *comment = strchr(line, '#');
+ if (comment != NULL)
+ *comment = '\0';
+ xbt_str_trim(line, NULL);
+ if (line[0] == '\0')
+ continue;
+ evt = xbt_str_split_quoted(line);
+ xbt_dynar_push(action_list, &evt);
+ }
+
+ if (line)
+ free(line);
+ fclose(fp);
+
+ res = MSG_main();
+ xbt_dynar_free(&action_list);
+ action_list = xbt_dynar_new(sizeof(xbt_dynar_t), xbt_dynar_free_voidp);
+
+ return res;