[m-dev.] trivial diff: fix test case: \n -> \\n inside pragma c

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Feb 5 17:58:41 AEDT 2001


For both main and release branches.

----------

Estimated hours taken: 0.25

tests/debugger/tabled_read.m:
	Fix a bug that broke this test case when using lcc:
	C string literals inside pragma c_code must use `\\n'
	rather than `\n'.  This worked OK in gcc because gcc
	allows newlines in string literals, but standard ISO C
	doesn't require that.

Workspace: /home/venus/fjh/ws-venus2/mercury
Index: tests/debugger/tabled_read.m
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/tabled_read.m,v
retrieving revision 1.1
diff -u -d -r1.1 tabled_read.m
--- tests/debugger/tabled_read.m	2000/12/06 06:05:55	1.1
+++ tests/debugger/tabled_read.m	2001/02/05 06:53:54
@@ -68,6 +68,6 @@
 :- pragma c_code(tabled_read__write_int(N::in,
 		IO0::di, IO::uo), [may_call_mercury, thread_safe],
 "{
-	printf(""%d\n"", (int) N);
+	printf(""%d\\n"", (int) N);
 	IO = IO0;
 }").

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- 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