From b0240d4f28e51f6b027a6d033976f6542faaf341 Mon Sep 17 00:00:00 2001 From: John van Groningen Date: Fri, 25 Jun 2004 15:16:49 +0000 Subject: test for error when closing stdio --- ufileIO2.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ufileIO2.c') diff --git a/ufileIO2.c b/ufileIO2.c index f718b3b..d4a6d57 100644 --- a/ufileIO2.c +++ b/ufileIO2.c @@ -386,6 +386,8 @@ int close_file (long fn) if (!stdio_open) IO_error ("fclose: file not open (stdio)"); stdio_open=0; + if (ferror (stdin) || ferror (stdout)) + return 0; } return -1; } else { -- cgit v1.2.3