Subject: Re: How to translate this stdio code to netbsd?
To: None <current-users@NetBSD.ORG, mouse@Collatz.McRCIM.McGill.EDU>
From: Peter Seebach <>
List: current-users
Date: 03/12/1996 17:58:13
>As far as I can recall, all the code I've seen which tries to get under
>the hood of stdio could be satisifed with a single call: a call which,
>when applied to a readable FILE pointer, returns the number of bytes
>currently buffered, that is, the number of bytes readable before stdio
>tries to make a read() call.

True enough.  I personally don't care; the entire *reason* I use stdio
is that I don't want to think about buffering, and I want it done by
software probably twice as fast as anything I'd write.

>At least until this last thing, when I saw the poster who started this
>off send something indicating that the code was just too lazy to buffer
>input to provide context, instead peeking into the stdio buffer for the
>purpose.  That particular bit of code I have little pity for.

Agreed.  I found it mildly disquieting.