[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Console question
- Date: Thu, 04 Nov 2004 12:51:53 -0600
- From: norume at aps.anl.gov (Eric Norum)
- Subject: Console question
Ian Caddy wrote:
>
> Using fgetc, as soon as I had a timeout from termios, it was all over
> and I got EOF returned from fgetc whenever I called it without even a
> timeout.
>
> This fgetc is in newlib and if it gets returned 0 characters from the
> lower levels, it marks that it is at the end of the file. After this
> time, even if new characters come into termios, it still returns EOF
> straight away, not even waiting for the timeout.
>
You can use clearerr(FILE *stream) to reset the flag.
--
Eric Norum norume at aps.anl.gov
Advanced Photon Source Phone: (630) 252-4793
Argonne National Laboratory