Mail Archives: djgpp/1997/12/04/20:26:32
At 07:37 12/4/1997 -0500, Peter Palotas wrote:
>>make a habit of setting fp to NULL after closing it. AFAIK, files do not
>>close themselves.
>
>I actually think that the libc exit code does this for you, although it is
>probably not defined in the ANSI standard that the files should be closed,
>but DJGPP does this, I think.
DJGPP quite definitely does it. I expect that it is part of the ANSI
standard, since automatically closing files is guaranteed as far back as K&R
I. Of course, it is best to close a file when you finish with it.
Nate Eldredge
eldredge AT ap DOT net
- Raw text -