[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fflush after ungetc
From: |
Bruno Haible |
Subject: |
Re: fflush after ungetc |
Date: |
Sun, 9 Mar 2008 22:31:47 +0100 |
User-agent: |
KMail/1.5.4 |
Eric Blake wrote:
> > On HP-UX 11:
> > When reading from the pipe:
> > c = '#'
> > c = 'i'
> > ungetc result = '@'
> > c = <EOF>
> > c = <EOF>
>
> Bug - C99 requires that ALL streams have at least one byte of ungetc space,
> with no limitation on what can go in that buffer. You only invoke
> unspecified
> behavior when you use ungetc() multiple times in a row.
HP-UX 11 supports ungetc. The <EOF> appears because of the fflush() call
and because the input has less than 8192 bytes. But fflush() on a non-
seekable input stream is undefined behaviour anyway, so it cannot count as
a bug, right?
Bruno
- Re: new module 'freadseek', Eric Blake, 2008/03/01
- Message not available
- Re: fflush after ungetc, Eric Blake, 2008/03/26
- Re: fflush after ungetc, Bruno Haible, 2008/03/06
- Re: fflush after ungetc, Eric Blake, 2008/03/06
- Re: fflush after ungetc, Bruno Haible, 2008/03/09
- Re: fflush after ungetc, Eric Blake, 2008/03/29
- Re: fflush after ungetc, Eric Blake, 2008/03/29
- Re: fflush after ungetc, Bruno Haible, 2008/03/29