[m-rev.] Trivial diff: escaped some `\n's in scoped_update.m
Ralph Becket
rafe at cs.mu.OZ.AU
Wed Mar 3 14:01:13 AEDT 2004
Estimated hours taken: 0.2
Branches: main
extras/references/scoped_update.m:
Some `\n's needed an extra level of escaping because they
themselves appeared in escaped string literals. In at
least one case this caused a #define to break in the
generated .c file.
Index: scoped_update.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/references/scoped_update.m,v
retrieving revision 1.5
diff -u -r1.5 scoped_update.m
--- scoped_update.m 3 Mar 2004 02:54:08 -0000
+++ scoped_update.m 3 Mar 2004 02:58:56 -0000 1.5
@@ -90,7 +90,7 @@
#ifdef ME_DEBUG_SCOPE
#define ME_show_handle(msg, handle) \
- printf(""%s <%5d, in: %5d, out: %5d\n"", (msg), \
+ printf(""%s <%5d, in: %5d, out: %5d\\n"", (msg), \
*(int *) (handle)->var, \
(int) (handle)->insideval, \
(int) (handle)->outsideval)
@@ -112,7 +112,7 @@
case MR_undo:
case MR_retry:
ME_untrail_msg(""ME_enter_scope_failing: ""
- ""exception/undo/retry\n"");
+ ""exception/undo/retry\\n"");
ME_show_handle(""=> fail back into scope. old: "",
handle);
handle->outsideval = *handle->var;
@@ -122,7 +122,7 @@
break;
default:
- ME_untrail_msg(""ME_enter_scope_failing: default\n"");
+ ME_untrail_msg(""ME_enter_scope_failing: default\\n"");
break;
}
}
@@ -135,7 +135,7 @@
case MR_undo:
case MR_retry:
ME_untrail_msg(""ME_exit_scope_failing: ""
- ""exception/undo/retry\n"");
+ ""exception/undo/retry\\n"");
ME_show_handle(""<= fail back out of scope. old: "",
handle);
*handle->var = handle->outsideval;
@@ -146,14 +146,14 @@
case MR_commit:
case MR_solve:
ME_untrail_msg(""ME_exit_scope_failing: ""
- ""commit/solve\n"");
+ ""commit/solve\\n"");
/* This *may* help GC collect more garbage */
handle->var = (MR_Word *) 0;
handle->outsideval = handle->insideval = (MR_Word) 0;
break;
default:
- ME_untrail_msg(""ME_exit_scope_failing: default\n"");
+ ME_untrail_msg(""ME_exit_scope_failing: default\\n"");
/* we may need to do something if reason == MR_gc */
break;
}
--------------------------------------------------------------------------
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