- }
-
- if ((f = surf_fopen(filename, "r")) == NULL) {
- xbt_assert1(0, "Cannot open file '%s'", filename);
- }
-
- trace = xbt_new0(s_tmgr_trace_t, 1);
- trace->event_list = xbt_dynar_new(sizeof(s_tmgr_event_t), NULL);
-
- while (fgets(line, 256, f)) {
- linecount++;
- if ((line[0] == '#') || (line[0] == '\n') || (line[0] == '%'))
- continue;
-
- if (sscanf(line, "PERIODICITY " "%lg" "\n", &(periodicity))
- == 1) {
- if (periodicity <= 0) {
- xbt_assert2(0,
- "%s,%d: Syntax error. Periodicity has to be positive",
- filename, linecount);
- }
- continue;