44 int front = 0, point = 0, objective = 0;
50 fp = fopen(filename,
"r");
53 fprintf(stderr,
"File %s could not be opened\n", filename);
57 while(fgets(line,
sizeof line, fp) != NULL)
60 if (strcmp(line,
"#") == 0)
64 fc->fronts = (
FRONT*)realloc(fc->fronts,
sizeof(
FRONT) * fc->nFronts);
65 fc->fronts[front].nPoints = 0;
66 fc->fronts[front].points = NULL;
70 FRONT *f = &fc->fronts[front];
73 f->points = (
POINT*)realloc(f->points,
sizeof(
POINT) * f->nPoints);
75 f->points[point].objectives = NULL;
77 char *tok = strtok(line,
" \t\n");
80 POINT *p = &f->points[point];
84 p->objectives[objective] = atof(tok);
85 }
while ((tok = strtok(NULL,
" \t\n")) != NULL);