[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: getF in lauxlib.c--why call feof?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 25 Mar 2008 16:04:52 -0300
> While almost all of the code was clear to me, I am unable to explain
> one line of code in getF. Why is it necessary to call feof before the
> fread? Won't fread return 0 if feof returns true? It seems that
> fread correctly handles the case of EOF.
This was added to the code in June 2002, with no proper documentation.
I am afraid we will have to figure out again why...
-- Roberto