i = 0;
while (fgets(buf, Buf_Len, infile) != NULL){
ass(buf[0] = '(', "badly-formatted input line",
"line", "%d", i, NULL);
ass(sscanf(buf+1, "%f%f", &(c[i].r), &(c[i].i)) == 2,
"badly-formatted input line",
"line", "%d", i, NULL);
i++;
}
I know I can do this with readline(), split(), and atof(), but it
requires a lot of extra lines of error checking (or seems to).
======================================================
Gregory V. Wilson gvw@cs.vu.nl
Beg, starve, rebel... Beg, starve, rebel...
We are not such a people
- Alasdair Gray
======================================================