On Sun, Mar 11, 2012 at 03:14, Christos Zoulas<christos%zoulas.com@localhost>
wrote:
On Mar 10, 2:56pm, agcarver+netbsd%acarver.net@localhost (AGC) wrote:
| Well, that didn't take long:
|
Hmm, does not seem to leak for me. Here's how I tested it:
Thanks for trying. A question and a suggestion below.
Assuming you're testing this on sparc32, is it necessary to byte-swap
with be64toh()? Did you verify, for example, that the last value in
the log interpreted as a double is -4.2612301185727119?
if (errno)
err(1, "line=%s", line);
else if (p == line || *p)
errx(1, "line=%s", line);
fprintf(fp, "%g", u.d);
You might be able to tickle it by changing this to:
fprintf(fp, "%g %.2f %.3f", u.d, u.d, u.d);
}
fclose(fp);
return 0;
}
Thanks,
Dave Hart