[m-dev.] trivial diff: \n ==> \\n in library/exception.m

Fergus Henderson fjh at cs.mu.OZ.AU
Tue May 23 17:52:32 AEST 2000


Estimated hours taken: 0.25

library/exception.m:
	Fix a portability problem: in `pragma c_code' fragments, use
	`\\n' rather than `\n'.  Not all C compilers allow newlines in
	string literals.

Workspace: /home/mercury0/fjh/mercury
Index: library/exception.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/exception.m,v
retrieving revision 1.21
diff -u -d -r1.21 exception.m
--- library/exception.m	2000/05/09 09:06:05	1.21
+++ library/exception.m	2000/05/22 23:27:03
@@ -641,7 +641,7 @@
 		abort();
 	} else {
 #ifdef	MR_DEBUG_JMPBUFS
-		fprintf(stderr, ""throw longjmp %p\n"",
+		fprintf(stderr, ""throw longjmp %p\\n"",
 			ML_exception_handler->handler);
 #endif
 		ML_exception_handler->exception = exception;
@@ -659,7 +659,7 @@
 	ML_exception_handler = &this_handler;
 
 #ifdef	MR_DEBUG_JMPBUFS
-	fprintf(stderr, ""detcatch setjmp %p\n"", this_handler.handler);
+	fprintf(stderr, ""detcatch setjmp %p\\n"", this_handler.handler);
 #endif
 
 	if (setjmp(this_handler.handler) == 0) {
@@ -667,7 +667,7 @@
 		ML_exception_handler = this_handler.prev;
 	} else {
 #ifdef	MR_DEBUG_JMPBUFS
-		fprintf(stderr, ""detcatch caught jmp %p\n"",
+		fprintf(stderr, ""detcatch caught jmp %p\\n"",
 			this_handler.handler);
 #endif
 
@@ -687,7 +687,7 @@
 	ML_exception_handler = &this_handler;
 
 #ifdef	MR_DEBUG_JMPBUFS
-	fprintf(stderr, ""semicatch setjmp %p\n"", this_handler.handler);
+	fprintf(stderr, ""semicatch setjmp %p\\n"", this_handler.handler);
 #endif
 
 	if (setjmp(this_handler.handler) == 0) {
@@ -696,7 +696,7 @@
 		return result;
 	} else {
 #ifdef	MR_DEBUG_JMPBUFS
-		fprintf(stderr, ""semicatch caught jmp %p\n"",
+		fprintf(stderr, ""semicatch caught jmp %p\\n"",
 			this_handler.handler);
 #endif
 
@@ -739,7 +739,7 @@
 	ML_exception_handler = &this_handler;
 
 #ifdef	MR_DEBUG_JMPBUFS
-	fprintf(stderr, ""noncatch setjmp %p\n"", this_handler.handler);
+	fprintf(stderr, ""noncatch setjmp %p\\n"", this_handler.handler);
 #endif
 
 	if (setjmp(this_handler.handler) == 0) {
@@ -747,7 +747,7 @@
 		ML_exception_handler = this_handler.prev;
 	} else {
 #ifdef	MR_DEBUG_JMPBUFS
-		fprintf(stderr, ""noncatch caught jmp %p\n"",
+		fprintf(stderr, ""noncatch caught jmp %p\\n"",
 			this_handler.handler);
 #endif
 
@@ -800,7 +800,7 @@
 	ML_exception_handler = &locals.this_handler;
 
 #ifdef	MR_DEBUG_JMPBUFS
-	fprintf(stderr, ""noncatch setjmp %p\n"", locals.this_handler.handler);
+	fprintf(stderr, ""noncatch setjmp %p\\n"", locals.this_handler.handler);
 #endif
 
 	if (setjmp(locals.this_handler.handler) == 0) {
@@ -823,7 +823,7 @@
 		*/
 
 #ifdef	MR_DEBUG_JMPBUFS
-		fprintf(stderr, ""noncatch caught jmp %p\n"",
+		fprintf(stderr, ""noncatch caught jmp %p\\n"",
 			locals.this_handler.handler);
 #endif
 
@@ -1457,12 +1457,12 @@
 	*/
 
 #ifdef	MR_DEBUG_JMPBUFS
-	fprintf(stderr, ""throw catch_code_model %d\n"", catch_code_model);
+	fprintf(stderr, ""throw catch_code_model %d\\n"", catch_code_model);
 #endif
 
 	if (catch_code_model == MR_C_LONGJMP_HANDLER) {
 #ifdef	MR_DEBUG_JMPBUFS
-		fprintf(stderr, ""throw longjmp %p\n"",
+		fprintf(stderr, ""throw longjmp %p\\n"",
 			*(MR_ENGINE(e_jmp_buf)));
 #endif
 

-- 
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 128.250.37.3        |     -- 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