line buffering

James Jones jejones at mcrware.UUCP
Wed May 18 05:37:34 AEST 1988


Greetings.  I've entered pilpul mode trying to interpret 4.9.3's description
of "line buffering" of streams.  The sentence in question is

	When a stream is *line buffered*, characters are intended to be
	transmitted to or from the host environment as a block when a
	new-line character is encountered, when a buffer is filled, or
	when input is requested on any line buffered or unbuffered stream.

What I'm wondering about is this: does that last clause mean that whenever
someone does input on *any* line buffered or unbuffered stream, a conforming
implementation should flush buffers on *all* line buffered streams?  (That's
what it seems to say, but it seems like a somewhat unlikely notion.)

The other clauses aren't qualified to show they refer to encounters or
fillings associated with the particular stream in question, so the truly
persnickety could raise the same question about them, but the last clause
is the only one that explicitly says "any...stream."

(Somewhere I have a Stuart Chase book that quotes a city council session
in which the council members thrashed out the precise wording of a leash law.
If I had the book available, I'd quote it--not to make fun of X3J11, whose
members and work I respect, but to point out the difficulties of the medium
they have to work with, i.e. English prose.)

		James Jones



More information about the Comp.lang.c mailing list