A
August Derleth
Are you *sure* it solves the OP problem? Please engage your brain
*before* replying ;-)
Dan, it solves the general problem in a rather elegant way and I think you
know it.
Given your beef with the silent truncation behavior of fgets(), fggets()
should be a breath of fresh air: Automatic reallocation with a noisy
failure if it fails to grab any more core. You need to call free() on the
pointer you sent in, but, as you commonly say, it's simply a matter of
"engaging the brain".
"Engage the brain" indeed. If it were any simpler, it would be C++. ;-)