[m-rev.] trivial diff: fix close of wrong output stream

Simon Taylor stayl at cs.mu.OZ.AU
Tue Jun 18 21:35:55 AEST 2002


Estimated hours taken: 0.5
Branches: main

compiler/export.m:
	Close the `.mh' file stream, not the stdout stream, after the
	`.mh' file has been written.
	
	This bug only caused problems with `--make'. io.m silently ignores
	attempts to close mercury_stdin, mercury_stdout and mercury_stderr,
	but `--make' writes errors to a file, not stderr.

Index: export.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/export.m,v
retrieving revision 1.56
diff -u -u -r1.56 export.m
--- export.m	30 May 2002 12:54:55 -0000	1.56
+++ export.m	18 Jun 2002 11:00:56 -0000
@@ -665,7 +665,7 @@
 			"\n",
 			"#endif /* ", GuardMacroName, " */\n"]),
 		io__set_output_stream(OutputStream, _),
-		io__close_output(OutputStream)
+		io__close_output(FileStream)
 	;
 		io__progname_base("export.m", ProgName),
 		io__write_string("\n"),
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list