Roman Bednarek <[EMAIL PROTECTED]> writes: >>> The Info-ZIP code uses one function with a ring of string buffers to >>> ease the load on the programmer. >> >> That makes sense. I assume the print function also receives an >> integer argument specifying the ring position? > > The function can have a circular buffer with current free slot > index, so the integer argument will not be necessary, and > everything will work as long as the buffer is long enough to > support "worst case".
You're right, that's much better. I've now written a new version that does away with the "_second" function. The caller still has to be aware of the ring size limitation, but that's hard to avoid without making the interface hairier.