[tpop3d-discuss] mailspool_save_index() using STDIO

Chris Lightfoot chris at ex-parrot.com
Mon, 1 Jul 2002 15:09:38 +0100


On Mon, Jul 01, 2002 at 02:51:01PM +0100, Chris Elsworth wrote:
> Having just stumbled upon mailspool_save_index(), I see it uses the
> STDIO library, perhaps unnecessarily - it might be an idea to
> eradicate the rather awful STDIO file i/o functions from the code
> entirely if possible?

TBH it's not obvious to me that this is worth doing. It
would certainly be possible to have a buffer and use
read/write on it, but since it's actually a text file of
lines with fields of known format, which is about the only
thing stdio is useful for, it may as well stay. In
particular, stdio's buffering may well be the most
efficient way to do this.

-- 
Early to rise and early to bed,
makes a man healthy, wealthy and dead (Thurber)