On 7/25/2017 5:56 PM, Andrei Alexandrescu wrote:
I'd think that would be the case, but failed to find a fgetc implementation that mentions it's undefined for a null FILE*. Is there a link? Thx. -- Andrei
The documentation for DMC++ fgetc() is: https://digitalmars.com/rtl/stdio.html#fgetc and says:"Returns the character just read on success, or EOF if end-of-file or a read error is encountered."
The implementation checks for fp being NULL and returns EOF if it is.