Do you remember a previous discussion on this newsgroup as at
http://groups.google.com/group/comp....738c4f91113b4e
It concerned code to manage a buffer, expanding it as needed semi
automatically. I've incorporated suggestions people made and published
the code at
http://codewiki.wikispaces.com/xbuf.c
(For the impatient check the last two links in the table of contents
for the code. The rest is documentation.)
The code is intended to be fast. It's uses include reading an
arbitrary-length line from an input stream - a safe gets() replacement
if you like - but it is more flexible than line reading functions and
is intended to be useful in more cases than just line reading.
--NB. Code and documentation are on a wiki. If you see things that
should be changed feel free to change them.
Apart from the code itself what do you think of the concept of
publishing it on a wiki...?
James