[m-rev.] trivial diff: func_trail_test_2: \n => \\n

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Nov 15 14:31:37 AEDT 2002


Estimated hours taken: 0.25
Branches: main, release

extras/trailed_update/tests/func_trail_test_2.m:
	Fix a bug that caused warnings with gcc 3:
	change \n to \\n inside pragma C code.

Workspace: /tmp/fjh
Index: tr/tests/func_trail_test_2.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/trailed_update/tests/func_trail_test_2.m,v
retrieving revision 1.3
diff -u -d -r1.3 func_trail_test_2.m
--- tr/tests/func_trail_test_2.m	1999/10/08 02:56:04	1.3
+++ tr/tests/func_trail_test_2.m	2002/11/15 03:24:46
@@ -53,7 +53,7 @@
 
 :- pragma c_code(trail_test_message(Prefix::in, I::in, J::in),
 	will_not_call_mercury, "
-	    printf(""%s: %d %d\n"",
+	    printf(""%s: %d %d\\n"",
 		   (char *)Prefix, (int)I, (int)J);
 ").
 
@@ -74,11 +74,11 @@
 	    case MR_exception:
 	    case MR_undo:
 	    case MR_retry:
-/*		printf(""trace_fail: exception/undo/retry\n""); */
-	        printf(""<= fail: %d\n"", handle);
+/*		printf(""trace_fail: exception/undo/retry\\n""); */
+	        printf(""<= fail: %d\\n"", handle);
 		break;
 	    default:
-		printf(""trace_fail: default\n"");
+		printf(""trace_fail: default\\n"");
 		break;
 	}
 }
@@ -89,15 +89,15 @@
 	    case MR_exception:
 	    case MR_undo:
 	    case MR_retry:
-/*		printf(""trace_redo: exception/undo/retry\n""); */
-	        printf("">= redo: %d\n"", handle);
+/*		printf(""trace_redo: exception/undo/retry\\n""); */
+	        printf("">= redo: %d\\n"", handle);
 		break;
 	    case MR_commit:
 	    case MR_solve:
-		printf(""trace_redo: commit/solve\n"");
+		printf(""trace_redo: commit/solve\\n"");
 		break;
 	    default:
-		printf(""trace_redo: default\n"");
+		printf(""trace_redo: default\\n"");
 		/* we may need to do something if reason == MR_gc */
 		break;
 	}
@@ -106,12 +106,12 @@
 ").
 
 :- pragma c_code(enter(I::in), will_not_call_mercury, "
-	printf("">> enter (%d)\n"", (int) I);
+	printf("">> enter (%d)\\n"", (int) I);
 	MR_trail_function(trace_fail, (void *) I);
 ").
 
 
 :- pragma c_code(leave(I::in), will_not_call_mercury, "
-	printf(""<< leave (%d)\n"", (int) I);
+	printf(""<< leave (%d)\\n"", (int) I);
 	MR_trail_function(trace_redo, (void *) I);
 ").

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