[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: getF in lauxlib.c--why call feof?
- From: ramsdell@... (John D. Ramsdell)
- Date: 26 Mar 2008 13:21:05 -0400
> more important, the fread may return > 0 but may have also set feof.
> If you call fread again and lf->f is a terminal it will wait for the
> next line or CTRL-D.
Thank you for this explanation. Please add a comment to the code that
makes it easy for readers to understand this line of code. You could
simply modify ET's quote if you're stuck for words.
/* EOF flag checked here because when lf->f is a terminal, the fread
may return > 0 even when it is set. If you call fread again and
lf->f is a terminal it will wait for the next line or CTRL-D. */
John