Mail Archives: djgpp/2000/05/11/22:15:04
> Well, after a good several hours of debugging, I finally discovered
> that feof(FILE *) does NOT work the same under DJGPP as it does
> under other compilers. This makes me VERY bitter.
oh no ... the world's going to end now. please take a look at Steve Summit's
C FAQ available at
http://www.eskimo.com/~scs/C-faq/q12.2.html.
> While I really doubt that Borland could be wrong, the possibility
> still exists. I have been using some very important file read
> functions and it makes me upset that to detect the EOF with feof,
> you have to read one character past the file. In a NORMAL
> programming language (anything other than DJGPP) you can read the
> last character, call feof(FILE *), and it will return that it has
> indeed reached the end of file.
it is not about whether Borland is wrong. you are wrong.
> Anyone doubt me, try this code for reading in exactly one
> line of text from a file:
the Standard C Library already has a function to read in exactly one
line: it is called fgets.
> Make sure the next release of DJGPP fixes this bug.
>
> Thomas J. Hruska -- shinelight AT crosswinds DOT net
> Shining Light Productions -- "Meeting the needs of fellow
> programmers"
>
if you are going to have this kind of an attitude, at least change your
signature line.
Sinan.
--
mailto:Sinan_Unur AT mail DOT com
http://unur.com/
- Raw text -