Is this a bug in Quick C?

Lars Henrik Mathiesen thorinn at diku.dk
Sat Mar 30 08:05:25 AEST 1991


Doug Gwyn (gwyn at smoke.brl.mil) writes:
>In article <s64421.668684042 at zeus> s64421 at zeus.usq.EDU.AU (house ron) writes:

>>The idea is to have the newline typed after the number put into c.
>>However, Quick C version 2.5 requires that the user type TWO newlines
>>before any output is produced.

>Assuming that that behavior persists after you change the program to be
>strictly conforming to the C standard, it would be an error in the
>Quick C implementation, rendering it not standard conforming.

I assume you refer to the discussion in section 7.9.3 (Library,
Input/Output <stdio.h>, Files). If stdin is interactive, it cannot be
fully buffered in a conforming implementation. There is some wording
about how characters "are intended to" be transmitted to and from the
host environment under the various buffering schemes, but that part
seems to be very careful not to promise anything.

If the Standard was intended to bind conforming implementations on the
exact behaviour of line buffered input from terminals, it should come
out and say so.

--
Lars Mathiesen, DIKU, U of Copenhagen, Denmark      [uunet!]mcsun!diku!thorinn
Institute of Datalogy -- we're scientists, not engineers.      thorinn at diku.dk



More information about the Comp.std.c mailing list