[m-dev.] diff: fix bug with --debug --split-c-files

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Oct 26 12:21:22 AEST 1999

On 26-Oct-1999, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> > -		io__write_string("\t\tif (MR_register_module_layout != NULL)"),
> > -		io__write_string("{\n\t\t\t(*MR_register_module_layout)("),
> > -		io__write_string("(MR_Module_Layout *)\n\t\t\t\t& "),
> > +		io__write_string("\t\tif (MR_register_module_layout != NULL) {\n"),
> > +		io__write_string("\t\t\t(*MR_register_module_layout)("),
> > +		io__write_string("(MR_Module_Layout *)\n\t\t\t\t&"),
> >  		output_data_addr(ModuleName, DataName),
> >  		io__write_string(");\n\t\t}\n")
> This seems to have introduced a left brace but not a right brace.

That change didn't introduce a left brace, it just moved the left brace
from the start of the second io__write_string to the end of the first one.

There was a minor bug here which I didn't mention in the log message:
it was outputting "if (...){", with no space before the "{",
instead of "if (...) {".  I added a space, and moved the code to output the "{\n"
onto the same line that output the "if (...)" to make it easier to read.
I also deleted the space after "&" since our normal coding convention
is to write "&foo" not "& foo".

Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at        |     -- the last words of T. S. Garp.
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au

More information about the developers mailing list