|
|
@ -24,6 +24,7 @@ int loop(int sfd, int iters) |
|
|
|
int count, foo; |
|
|
|
long temps; |
|
|
|
char ligne[200]; |
|
|
|
float datas[4]; |
|
|
|
|
|
|
|
for (count=0; count<iters; count++) { |
|
|
|
foo = getline_to(sfd, ligne, 100, 0); |
|
|
@ -32,16 +33,18 @@ for (count=0; count<iters; count++) { |
|
|
|
fprintf(stderr, "getline #%d -> %d\n", count, foo); |
|
|
|
fprintf(stderr, "%s\n", ligne); |
|
|
|
} |
|
|
|
foo = parseXvalue(ligne, 'X'); |
|
|
|
foo = parse4values(ligne, 'X', datas); |
|
|
|
// |
|
|
|
if (foo >= 0) { |
|
|
|
temps = time(NULL); |
|
|
|
printf("%ld %d\n", temps, foo); |
|
|
|
printf("%ld %f %f %f %f\n", temps, |
|
|
|
datas[0], datas[1], datas[2], datas[3]); |
|
|
|
fflush(stdout); |
|
|
|
} |
|
|
|
else { |
|
|
|
fprintf(stderr, "%s: parse -> %d\n", __func__, foo); |
|
|
|
} |
|
|
|
if (verbosity) fprintf(stderr, "\n"); |
|
|
|
} |
|
|
|
return 0; |
|
|
|
} |
|
|
|