[m-dev.] trivial diff: add some `MR_' prefixes.

Fergus Henderson fjh at cs.mu.OZ.AU
Mon May 8 23:45:34 AEST 2000


Estimated hours taken: 0.75

Add some `MR_' prefixes.

runtime/mercury_string.h:
runtime/mercury_misc.h:
runtime/mercury_misc.c:
runtime/mercury_make_type_info_body.h:
runtime/mercury_type_info.c:
runtime/mercury.c:
extras/*/*.m:
extras/*/*/*.m:
library/*.m:
trace/*.c:
compiler/fact_table.m:
compiler/ml_code_gen.m:
compiler/stack_layout.m:
	Add `MR_' prefixes to fatal_error(), hash_string(),
	do_hash_string, and HASH_STRING_FUNC_BODY.

runtime/mercury_bootstrap.h:
	Add backwards compatibility macros for 
	fatal_error() and hash_string().

Workspace: /home/pgrad/fjh/ws/hg
Index: compiler/fact_table.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/fact_table.m,v
retrieving revision 1.31
diff -u -d -r1.31 fact_table.m
--- compiler/fact_table.m	1999/10/27 05:36:42	1.31
+++ compiler/fact_table.m	2000/05/08 13:21:01
@@ -3394,7 +3394,7 @@
 %s
 				break;
 			default:
-				fatal_error(""fact table hash lookup: nondet stack corrupted?"");
+				MR_fatal_error(""fact table hash lookup: nondet stack corrupted?"");
 		}
 	success_code_%s:
 		/* lookup fact table */
Index: compiler/ml_code_gen.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/ml_code_gen.m,v
retrieving revision 1.35
diff -u -d -r1.35 ml_code_gen.m
--- compiler/ml_code_gen.m	2000/05/05 10:14:20	1.35
+++ compiler/ml_code_gen.m	2000/05/08 13:21:05
@@ -1840,7 +1840,7 @@
 		% XXX don't complain until run-time
 		% sorry("complicated pragma c_code")
 		Var_ArgName =
-		"*(fatal_error(""complicated pragma c_code""),(MR_Word *)0)"
+		"*(MR_fatal_error(""complicated pragma c_code""),(MR_Word *)0)"
 	).
 
 %-----------------------------------------------------------------------------%
Index: compiler/stack_layout.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/stack_layout.m,v
retrieving revision 1.45
diff -u -d -r1.45 stack_layout.m
--- compiler/stack_layout.m	2000/04/02 08:09:23	1.45
+++ compiler/stack_layout.m	2000/05/08 13:20:19
@@ -368,7 +368,7 @@
 		sprintf(msg, ""internal error in creating string table;\\n""
 			""cur_offset = %ld, ArenaSize = %ld\\n"",
 			(long) cur_offset, (long) ArenaSize);
-		fatal_error(msg);
+		MR_fatal_error(msg);
 	}
 }").
 
Index: extras/graphics/mercury_opengl/mtogl.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/graphics/mercury_opengl/mtogl.m,v
retrieving revision 1.1
diff -u -d -r1.1 mtogl.m
--- extras/graphics/mercury_opengl/mtogl.m	1998/03/10 06:31:39	1.1
+++ extras/graphics/mercury_opengl/mtogl.m	2000/05/08 13:18:18
@@ -86,7 +86,8 @@
 			Stat = 1;
 			break;
 		default:
-			fatal_error(""Togl_Init returned neither TCL_OK or TCL_ERROR"");
+			MR_fatal_error(
+			""Togl_Init returned neither TCL_OK or TCL_ERROR"");
 	}
 	IO = IO0;
 }").
Index: extras/graphics/mercury_tcltk/mtcltk.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/graphics/mercury_tcltk/mtcltk.m,v
retrieving revision 1.2
diff -u -d -r1.2 mtcltk.m
--- extras/graphics/mercury_tcltk/mtcltk.m	1998/03/05 03:09:31	1.2
+++ extras/graphics/mercury_tcltk/mtcltk.m	2000/05/08 13:18:35
@@ -215,7 +215,7 @@
 			RStatus = 1;
 			break;
 		default:
-			fatal_error(""Tcl_Eval returned neither ""
+			MR_fatal_error(""Tcl_Eval returned neither ""
 					""TCL_OK or TCL_ERROR"");
 	}
 	Result = mtcltk_strdup(((Tcl_Interp *)Interp)->result);
Index: extras/aditi/aditi.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/aditi/aditi.m,v
retrieving revision 1.7
diff -u -d -r1.7 aditi.m
--- extras/aditi/aditi.m	2000/04/17 04:53:38	1.7
+++ extras/aditi/aditi.m	2000/05/08 13:15:39
@@ -627,7 +627,7 @@
 
 	/* Unpack the output tuple into r1 and upwards. */
 	if (!MADITI_get_output_tuple(1)) {
-		fatal_error(""no solution for det Aditi call"");
+		MR_fatal_error(""no solution for det Aditi call"");
 	}
 
 	/*
@@ -864,7 +864,7 @@
 
 	    case MR_gc:
 	    default:
-		fatal_error(""MADITI_trail_cleanup_call_output"");
+		MR_fatal_error(""MADITI_trail_cleanup_call_output"");
 	}
 }
 #endif /* MR_USE_TRAIL */
Index: extras/clpr/cfloat.m
===================================================================
RCS file: /home/mercury1/repository/clpr/cfloat.m,v
retrieving revision 1.28
diff -u -d -r1.28 cfloat.m
--- extras/clpr/cfloat.m	2000/02/08 06:26:14	1.28
+++ extras/clpr/cfloat.m	2000/05/08 13:15:45
@@ -490,7 +490,7 @@
 			ML_cfloat_check_floundering(choicepoint->nl_eqn_top);
 			break;
 		default:
-			fatal_error(""cfloat.m: unknown MR_untrail_reason"");
+			MR_fatal_error(""cfloat.m: unknown MR_untrail_reason"");
 	}
 }
 ").
@@ -691,7 +691,7 @@
 */
 #define ML_cfloat_div_float(Svar1, Val, Svar2)		\\
 	( Val == 0 ? (					\\
-		fatal_error(""division by zero""),	\\
+		MR_fatal_error(""division by zero""),	\\
 		FALSE					\\
 	) : (						\\
 		ML_cfloat_maybe_trail_solver(),		\\
@@ -1231,7 +1231,7 @@
 		if (!CLPR_is_ground(Svar, &Val)) {
 			fprintf(stderr, ""ERROR: Var %ld not ground.\\n"",
 				(long) Svar);
-			fatal_error(""Solver variable not ground ""
+			MR_fatal_error(""Solver variable not ground ""
 				""in cfloat__get_val"");
 		}
 	").
Index: extras/clpr/dump.m
===================================================================
RCS file: /home/mercury1/repository/clpr/dump.m,v
retrieving revision 1.13
diff -u -d -r1.13 dump.m
--- extras/clpr/dump.m	2000/02/08 06:26:14	1.13
+++ extras/clpr/dump.m	2000/05/08 13:15:53
@@ -160,7 +160,7 @@
 		ListPtr = malloc(2 * sizeof(CLPR_int *));
 		HeadPtr = malloc(sizeof(CLPR_int));
 		if (ListPtr == NULL || HeadPtr == NULL)
-			fatal_error(""malloc() failed in dump"");
+			MR_fatal_error(""malloc() failed in dump"");
 		*HeadPtr = addtag(TAG_PAR, Head);
 		ListPtr[0] = HeadPtr;
 		ListPtr[1] = (CLPR_int *) Tail;
@@ -194,7 +194,8 @@
 "{
 	char *s;
 	if ((s = malloc(Length * sizeof(char))) == NULL)
-		fatal_error(""malloc() failed in dump__allocate_clpr_string"");
+		MR_fatal_error(
+			""malloc() failed in dump__allocate_clpr_string"");
 	CLPRString = (Word) s;
 }").
 
Index: extras/concurrency/spawn.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/concurrency/spawn.m,v
retrieving revision 1.1
diff -u -d -r1.1 spawn.m
--- extras/concurrency/spawn.m	2000/02/29 22:37:15	1.1
+++ extras/concurrency/spawn.m	2000/05/08 13:16:12
@@ -61,7 +61,7 @@
 	}
 	IO = IO0;
 #else
-	fatal_error(""spawn is not implemented for highlevel code"");
+	MR_fatal_error(""spawn is not implemented for highlevel code"");
 #endif
 }").
 
Index: extras/odbc/odbc.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/odbc/odbc.m,v
retrieving revision 1.11
diff -u -d -r1.11 odbc.m
--- extras/odbc/odbc.m	2000/04/17 04:53:43	1.11
+++ extras/odbc/odbc.m	2000/05/08 13:16:19
@@ -1451,7 +1451,7 @@
 		break;
 
 	    default:
-		fatal_error(
+		MR_fatal_error(
 			""odbc.m: invalid attribute type in odbc__get_data"");
 		break;
 	} /* end switch (Type) */
@@ -1732,7 +1732,7 @@
 		case SQL_VARBINARY:		return MODBC_STRING;
 		case SQL_VARCHAR:		return MODBC_STRING;
 		default:
-		    fatal_error(
+		    MR_fatal_error(
 		    	""odbc.m: sql_type_to_attribute_type: unknown type"");
 	}
 }
@@ -1751,7 +1751,7 @@
 		case MODBC_VAR_STRING:		return SQL_C_CHAR;
 		default:
 			/* Unsuported MODBC_xxx type */
-		    fatal_error(
+		    MR_fatal_error(
 		    	""odbc.m: attribute_type_to_sql_c_type: unknown type"");
 	}
 }
@@ -1930,7 +1930,7 @@
 			return cbColDef + 1;  /* 1 for NUL */
 
 		default:
-		    fatal_error(""odbc.m: sql_type_to_size: unknown type"");
+		    MR_fatal_error(""odbc.m: sql_type_to_size: unknown type"");
 	}
 }
 ").
Index: extras/posix/posix.socket.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/posix/posix.socket.m,v
retrieving revision 1.2
diff -u -d -r1.2 posix.socket.m
--- extras/posix/posix.socket.m	1999/10/18 00:50:26	1.2
+++ extras/posix/posix.socket.m	2000/05/08 13:16:22
@@ -247,7 +247,7 @@
 		field(MR_mktag(0), Ptr, 0) = ntohs(ptr->sin_port);
 		field(MR_mktag(0), Ptr, 1) = ptr->sin_addr.s_addr;
 	} else {
-		fatal_error(""cons_sockaddr: unknown type"");
+		MR_fatal_error(""cons_sockaddr: unknown type"");
 	}
 }").
 
Index: extras/posix/text.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/posix/text.m,v
retrieving revision 1.2
diff -u -d -r1.2 text.m
--- extras/posix/text.m	1999/10/18 00:50:27	1.2
+++ extras/posix/text.m	2000/05/08 13:16:29
@@ -135,7 +135,7 @@
 
 	txtptr = (ME_Text *) Txt;
 	if (Ind < 0 || Ind >= txtptr->len) {
-		fatal_error(""text:index : index out of range"");
+		MR_fatal_error(""text:index : index out of range"");
 	}
 
 	Val = txtptr->data[Ind];
@@ -148,7 +148,7 @@
 
 	txtptr = (ME_Text *) Txt;
 	if (Ind < 0 || Ind >= txtptr->len) {
-		fatal_error(""text:index : index out of range"");
+		MR_fatal_error(""text:index : index out of range"");
 	}
 
 	Val = txtptr->data[Ind];
@@ -163,7 +163,7 @@
 
 	txtptr = (ME_Text *) Txt0;
 	if (Ind < 0 || Ind >= txtptr->len) {
-		fatal_error(""text:index : index out of range"");
+		MR_fatal_error(""text:index : index out of range"");
 	}
 	
 	txtptr->data[Ind] = Val;
@@ -204,7 +204,7 @@
 
 	txtptr1 = (ME_Text *) Text0;
 	if (Where < 0 || Where >= txtptr1->len) {
-		fatal_error(""text:split : index out of range"");
+		MR_fatal_error(""text:split : index out of range"");
 	}
 
 	Text1 = Text0;
@@ -228,7 +228,7 @@
 	txtptr2 = (ME_Text *) Text1;
 
 	if (txtptr1->data + txtptr1->len != txtptr2->data) {
-		fatal_error(""text:combine : not adjacent text"");
+		MR_fatal_error(""text:combine : not adjacent text"");
 	}
 
 	txtptr1->len = txtptr1->len + txtptr2->len;
Index: extras/trailed_update/tr_array.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/trailed_update/tr_array.m,v
retrieving revision 1.5
diff -u -d -r1.5 tr_array.m
--- extras/trailed_update/tr_array.m	1999/10/18 21:48:52	1.5
+++ extras/trailed_update/tr_array.m	2000/05/08 13:16:40
@@ -183,7 +183,7 @@
 "{
 	MR_ArrayType *array = (MR_ArrayType *) Array0;
 	if ((Unsigned) Index >= (Unsigned) array->size) {
-		fatal_error(""tr_array__set: array index out of bounds"");
+		MR_fatal_error(""tr_array__set: array index out of bounds"");
 	}
 	MR_trail_current_value(&array->elements[Index]);
 	array->elements[Index] = Item;	/* destructive update! */
@@ -263,7 +263,7 @@
 "{
 	MR_ArrayType *array = (MR_ArrayType *) Array;
 	if ((Unsigned) Index >= (Unsigned) array->size) {
-		fatal_error(""tr_array__lookup: ""
+		MR_fatal_error(""tr_array__lookup: ""
 			""array index out of bounds"");
 	}
 	Item = array->elements[Index];
@@ -273,7 +273,7 @@
 "{
 	MR_ArrayType *array = (MR_ArrayType *) Array;
 	if ((Unsigned) Index >= (Unsigned) array->size) {
-		fatal_error(""tr_array__lookup: array index out of bounds"");
+		MR_fatal_error(""tr_array__lookup: array index out of bounds"");
 	}
 	Item = array->elements[Index];
 }").
@@ -353,7 +353,8 @@
 	old_array_size = old_array->size;
 	if (old_array_size == array_size) return old_array;
 	if (old_array_size < array_size) {
-		fatal_error(""tr_array__shrink: can't shrink to a larger size"");
+		MR_fatal_error(
+			""tr_array__shrink: can't shrink to a larger size"");
 	}
 
 	array = (MR_ArrayType *) MR_GC_NEW_ARRAY(Word, array_size + 1);
Index: extras/trailed_update/tr_store.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/trailed_update/tr_store.m,v
retrieving revision 1.6
diff -u -d -r1.6 tr_store.m
--- extras/trailed_update/tr_store.m	2000/03/26 07:22:22	1.6
+++ extras/trailed_update/tr_store.m	2000/05/08 13:17:39
@@ -218,13 +218,14 @@
 	if (!ML_arg((MR_TypeInfo) TypeInfo_for_T, (Word *) Ref, ArgNum,
 			&arg_type_info, &arg_ref))
 	{
-		fatal_error(""tr_store__arg_ref: argument number out of range"");
+		MR_fatal_error(""tr_store__arg_ref: ""
+			""argument number out of range"");
 	}
 
 	if (MR_compare_type_info(arg_type_info,
 		(MR_TypeInfo) TypeInfo_for_ArgT) != COMPARE_EQUAL)
 	{
-		fatal_error(""tr_store__arg_ref: argument has wrong type"");
+		MR_fatal_error(""tr_store__arg_ref: argument has wrong type"");
 	}
 
 	restore_transient_registers();
@@ -244,13 +245,15 @@
 	if (!ML_arg((MR_TypeInfo) TypeInfo_for_T, (Word *) &Val, ArgNum,
 			&arg_type_info, &arg_ref))
 	{
-	      fatal_error(""tr_store__new_arg_ref: argument number out of range"");
+		MR_fatal_error(""tr_store__new_arg_ref: ""
+			""argument number out of range"");
 	}
 
 	if (MR_compare_type_info(arg_type_info,
 		(MR_TypeInfo) TypeInfo_for_ArgT) != COMPARE_EQUAL)
 	{
-	      fatal_error(""tr_store__new_arg_ref: argument has wrong type"");
+		MR_fatal_error(""tr_store__new_arg_ref: ""
+			""argument has wrong type"");
 	}
 
 	restore_transient_registers();
Index: extras/trailed_update/var.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/trailed_update/var.m,v
retrieving revision 1.15
diff -u -d -r1.15 var.m
--- extras/trailed_update/var.m	2000/04/24 11:06:18	1.15
+++ extras/trailed_update/var.m	2000/05/08 13:17:45
@@ -521,7 +521,7 @@
 			break;
 
 		default:
-			fatal_error(""ML_var_untrail_func: ""
+			MR_fatal_error(""ML_var_untrail_func: ""
 				""unknown untrail reason"");
 	}
 }
Index: library/array.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/array.m,v
retrieving revision 1.70
diff -u -d -r1.70 array.m
--- library/array.m	2000/04/27 09:27:26	1.70
+++ library/array.m	2000/05/08 12:58:14
@@ -373,7 +373,7 @@
 
 :- pragma c_header_code("
 #include ""mercury_library_types.h""	/* for MR_ArrayType */
-#include ""mercury_misc.h""		/* for fatal_error() */
+#include ""mercury_misc.h""		/* for MR_fatal_error() */
 ").
 
 :- pragma c_header_code("
@@ -472,7 +472,7 @@
 	MR_ArrayType *array = (MR_ArrayType *)Array;
 #ifndef ML_OMIT_ARRAY_BOUNDS_CHECKS
 	if ((Unsigned) Index >= (Unsigned) array->size) {
-		fatal_error(""array__lookup: array index out of bounds"");
+		MR_fatal_error(""array__lookup: array index out of bounds"");
 	}
 #endif
 	Item = array->elements[Index];
@@ -482,7 +482,7 @@
 	MR_ArrayType *array = (MR_ArrayType *)Array;
 #ifndef ML_OMIT_ARRAY_BOUNDS_CHECKS
 	if ((Unsigned) Index >= (Unsigned) array->size) {
-		fatal_error(""array__lookup: array index out of bounds"");
+		MR_fatal_error(""array__lookup: array index out of bounds"");
 	}
 #endif
 	Item = array->elements[Index];
@@ -496,7 +496,7 @@
 	MR_ArrayType *array = (MR_ArrayType *)Array0;
 #ifndef ML_OMIT_ARRAY_BOUNDS_CHECKS
 	if ((Unsigned) Index >= (Unsigned) array->size) {
-		fatal_error(""array__set: array index out of bounds"");
+		MR_fatal_error(""array__set: array index out of bounds"");
 	}
 #endif
 	array->elements[Index] = Item;	/* destructive update! */
@@ -568,7 +568,8 @@
 	old_array_size = old_array->size;
 	if (old_array_size == array_size) return old_array;
 	if (old_array_size < array_size) {
-		fatal_error(""array__shrink: can't shrink to a larger size"");
+		MR_fatal_error(
+			""array__shrink: can't shrink to a larger size"");
 	}
 
 	array = (MR_ArrayType *) MR_GC_NEW_ARRAY(Word, array_size + 1);
Index: library/builtin.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/builtin.m,v
retrieving revision 1.33
diff -u -d -r1.33 builtin.m
--- library/builtin.m	2000/05/01 17:42:39	1.33
+++ library/builtin.m	2000/05/08 12:58:19
@@ -304,12 +304,12 @@
 /* code for predicate 'builtin_unify_pred'/2 in mode 0 */
 Define_entry(mercury__builtin_unify_pred_2_0);
 	MR_incr_sp_push_msg(2, ""private_builtin:builtin_unify_pred"");
-	fatal_error(""attempted unification of higher-order terms"");
+	MR_fatal_error(""attempted unification of higher-order terms"");
 
 /* code for predicate 'builtin_compare_pred'/3 in mode 0 */
 Define_entry(mercury__builtin_compare_pred_3_0);
 	MR_incr_sp_push_msg(2, ""private_builtin:builtin_compare_pred"");
-	fatal_error(""attempted comparison of higher-order terms"");
+	MR_fatal_error(""attempted comparison of higher-order terms"");
 END_MODULE
 
 /*
Index: library/exception.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/exception.m,v
retrieving revision 1.19
diff -u -d -r1.19 exception.m
--- library/exception.m	2000/04/21 02:47:29	1.19
+++ library/exception.m	2000/05/08 12:58:22
@@ -843,7 +843,7 @@
 /*********
 This causes problems because the LLDS back-end
 does not let you export code with determinism `nondet'.
-Instead we handle-code it... see below.
+Instead we hand-code it... see below.
 
 :- pred call_goal(pred(T), T).
 :- mode call_goal(pred(out) is det, out) is det.
@@ -953,7 +953,7 @@
 		** invoke MR_trace() to trace the exception
 		*/
 		if (return_label_layout->MR_sll_port != MR_PORT_EXCEPTION) {
-			fatal_error(""return layout port is not exception"");
+			MR_fatal_error(""return layout port is not exception"");
 		}
 
 		MR_jumpaddr = MR_trace(return_label_layout);
Index: library/int.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/int.m,v
retrieving revision 1.67
diff -u -d -r1.67 int.m
--- library/int.m	2000/04/12 09:48:23	1.67
+++ library/int.m	2000/05/08 12:58:26
@@ -419,7 +419,7 @@
 	else if (sizeof(Integer) == sizeof(long))
 		Max = LONG_MAX;
 	else
-		fatal_error(""Unable to figure out max integer size"");
+		MR_fatal_error(""Unable to figure out max integer size"");
 ").
 
 :- pragma c_code(int__min_int(Min::out), will_not_call_mercury, "
@@ -428,7 +428,7 @@
 	else if (sizeof(Integer) == sizeof(long))
 		Min = LONG_MIN;
 	else
-		fatal_error(""Unable to figure out min integer size"");
+		MR_fatal_error(""Unable to figure out min integer size"");
 ").
 
 :- pragma c_code(int__bits_per_int(Bits::out), will_not_call_mercury, "
Index: library/io.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/io.m,v
retrieving revision 1.196
diff -u -d -r1.196 io.m
--- library/io.m	2000/03/24 10:27:38	1.196
+++ library/io.m	2000/05/08 12:58:32
@@ -2706,13 +2706,13 @@
 #if defined(HAVE_FDOPEN) && (defined(HAVE_FILENO) || defined(fileno))
 	mercury_stdin_binary.file = fdopen(fileno(stdin), ""rb"");
 	if (mercury_stdin_binary.file == NULL) {
-		fatal_error(""error opening standard input stream in ""
+		MR_fatal_error(""error opening standard input stream in ""
 			""binary mode:\\n\\tfdopen() failed: %s"",
 			strerror(errno));
 	}
 	mercury_stdout_binary.file = fdopen(fileno(stdout), ""wb"");
 	if (mercury_stdout_binary.file == NULL) {
-		fatal_error(""error opening standard output stream in ""
+		MR_fatal_error(""error opening standard output stream in ""
 			""binary mode:\\n\\tfdopen() failed: %s"",
 			strerror(errno));
 	}
Index: library/private_builtin.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/private_builtin.m,v
retrieving revision 1.50
diff -u -d -r1.50 private_builtin.m
--- library/private_builtin.m	2000/05/05 10:14:39	1.50
+++ library/private_builtin.m	2000/05/08 12:58:56
@@ -326,12 +326,12 @@
 
 Define_entry(mercury____Unify___private_builtin__typeclass_info_1_0);
 {
-	fatal_error(""attempt to unify typeclass_info"");
+	MR_fatal_error(""attempt to unify typeclass_info"");
 }
 
 Define_entry(mercury____Compare___private_builtin__typeclass_info_1_0);
 {
-	fatal_error(""attempt to compare typeclass_info"");
+	MR_fatal_error(""attempt to compare typeclass_info"");
 }
 END_MODULE
 
@@ -762,7 +762,7 @@
 
 :- pragma c_code(table_nondet_setup(T0::in, T::out), will_not_call_mercury, "
 #ifndef	MR_USE_MINIMAL_MODEL
-	fatal_error(""minimal model code entered when not enabled"");
+	MR_fatal_error(""minimal model code entered when not enabled"");
 #else
 #ifdef	MR_THREAD_SAFE
 #error ""Sorry, not yet implemented: mixing minimal model tabling and threads""
@@ -804,11 +804,12 @@
 		}
 
 		if (MR_maxfr != MR_curfr) {
-			fatal_error(""MR_maxfr != MR_curfr at table setup\\n"");
+			MR_fatal_error(
+				""MR_maxfr != MR_curfr at table setup\\n"");
 		}
 #endif
 #ifdef MR_HIGHLEVEL_CODE
- 		fatal_error(""sorry, not implemented: ""
+ 		MR_fatal_error(""sorry, not implemented: ""
 			""minimal_model tabling with --high-level-code"");
 #else
 		subgoal->generator_maxfr = MR_prevfr_slot(MR_maxfr);
@@ -833,7 +834,7 @@
 
 	SUCCESS_INDICATOR = (table->MR_subgoal->status == MR_SUBGOAL_COMPLETE);
 #else
-	fatal_error(""minimal model code entered when not enabled"");
+	MR_fatal_error(""minimal model code entered when not enabled"");
 #endif
 ").
 
@@ -845,7 +846,7 @@
 
 	SUCCESS_INDICATOR = (table->MR_subgoal->status == MR_SUBGOAL_ACTIVE);
 #else
-	fatal_error(""minimal model code entered when not enabled"");
+	MR_fatal_error(""minimal model code entered when not enabled"");
 #endif
 ").
 
@@ -859,7 +860,7 @@
 	MR_register_generator_ptr(table);
 	table->MR_subgoal->status = MR_SUBGOAL_ACTIVE;
 #else
-	fatal_error(""minimal model code entered when not enabled"");
+	MR_fatal_error(""minimal model code entered when not enabled"");
 #endif
 ").
 
@@ -872,14 +873,14 @@
 
 	AT = (Word) &(table->MR_subgoal->answer_table);
 #else
-	fatal_error(""minimal model code entered when not enabled"");
+	MR_fatal_error(""minimal model code entered when not enabled"");
 #endif
 ").
 
 :- pragma c_code(table_nondet_answer_is_not_duplicate(T::in),
 		will_not_call_mercury, "
 #ifndef	MR_USE_MINIMAL_MODEL
-	fatal_error(""minimal model code entered when not enabled"");
+	MR_fatal_error(""minimal model code entered when not enabled"");
 #else
 	MR_TrieNode	table;
 	bool		is_new_answer;
@@ -902,7 +903,7 @@
 :- pragma c_code(table_nondet_new_ans_slot(T::in, Slot::out),
 		will_not_call_mercury, "
 #ifndef	MR_USE_MINIMAL_MODEL
-	fatal_error(""minimal model code entered when not enabled"");
+	MR_fatal_error(""minimal model code entered when not enabled"");
 #else
 	MR_TrieNode		table;
 	MR_Subgoal		*subgoal;
@@ -981,7 +982,7 @@
 			SUCCEED;
 		}
 #else
-		fatal_error(""minimal model code entered when not enabled"");
+		MR_fatal_error(""minimal model code entered when not enabled"");
 #endif
 	")
 ).
@@ -1028,7 +1029,7 @@
 			SUCCEED;
 		}
 #else
-		fatal_error(""minimal model code entered when not enabled"");
+		MR_fatal_error(""minimal model code entered when not enabled"");
 #endif
 	")
 ).
@@ -1141,7 +1142,7 @@
 
 :- pragma c_header_code("
 
-#include ""mercury_misc.h""		/* for fatal_error(); */
+#include ""mercury_misc.h""		/* for MR_fatal_error(); */
 #include ""mercury_type_info.h""	/* for MR_TypeCtorInfo_Struct; */
 #include ""mercury_tabling.h""		/* for MR_TrieNode, etc. */
 
Index: library/std_util.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/std_util.m,v
retrieving revision 1.192
diff -u -d -r1.192 std_util.m
--- library/std_util.m	2000/05/05 10:14:40	1.192
+++ library/std_util.m	2000/05/08 12:59:19
@@ -984,7 +984,7 @@
 
 #include ""mercury_type_info.h""
 #include ""mercury_heap.h""	/* for incr_hp_msg() etc. */
-#include ""mercury_misc.h""	/* for fatal_error() */
+#include ""mercury_misc.h""	/* for MR_fatal_error() */
 #include ""mercury_string.h""	/* for MR_make_aligned_string() */
 
 ").
@@ -1470,14 +1470,14 @@
 		type_ctor_desc = MR_TYPECTOR_DESC_MAKE_PRED(
 			MR_TYPEINFO_GET_HIGHER_ORDER_ARITY(type_info));
 		if (! MR_TYPECTOR_DESC_IS_HIGHER_ORDER(type_ctor_desc)) {
-			fatal_error(""std_util:ML_make_type_ctor_desc""
+			MR_fatal_error(""std_util:ML_make_type_ctor_desc""
 				""- arity out of range."");
 		}
 	} else if (MR_TYPE_CTOR_INFO_IS_HO_FUNC(type_ctor_info)) {
 		type_ctor_desc = MR_TYPECTOR_DESC_MAKE_FUNC(
 			MR_TYPEINFO_GET_HIGHER_ORDER_ARITY(type_info));
 		if (! MR_TYPECTOR_DESC_IS_HIGHER_ORDER(type_ctor_desc)) {
-			fatal_error(""std_util:ML_make_type_ctor_desc""
+			MR_fatal_error(""std_util:ML_make_type_ctor_desc""
 				""- arity out of range."");
 		}
 	} else {
@@ -1761,7 +1761,7 @@
         type_ctor_info = MR_TYPEINFO_GET_TYPE_CTOR_INFO(type_info);
 
         if (type_ctor_info->type_ctor_rep != construct_info.type_ctor_rep) {
-            fatal_error(""std_util:construct: type_ctor_rep mismatch"");
+            MR_fatal_error(""std_util:construct: type_ctor_rep mismatch"");
         }
 
         switch (type_ctor_info->type_ctor_rep) {
@@ -1777,11 +1777,11 @@
         case MR_TYPECTOR_REP_NOTAG_GROUND:
         case MR_TYPECTOR_REP_NOTAG_GROUND_USEREQ:
             if (MR_list_is_empty(ArgList)) {
-                fatal_error(""notag arg list is empty"");
+                MR_fatal_error(""notag arg list is empty"");
             }
 
             if (! MR_list_is_empty(MR_list_tail(ArgList))) {
-                fatal_error(""notag arg list is too long"");
+                MR_fatal_error(""notag arg list is too long"");
             }
 
             new_data = MR_field(MR_mktag(0), MR_list_head(ArgList),
@@ -1799,7 +1799,7 @@
 
                 functor_desc = construct_info.functor_info.du_functor_desc;
                 if (functor_desc->MR_du_functor_exist_info != NULL) {
-                    fatal_error(""not yet implemented: construction ""
+                    MR_fatal_error(""not yet implemented: construction ""
                         ""of terms containing existentially types"");
                 }
 
@@ -1845,13 +1845,13 @@
                 }
 
                 if (! MR_list_is_empty(arg_list)) {
-                    fatal_error(""excess arguments in std_util:construct"");
+                    MR_fatal_error(""excess arguments in std_util:construct"");
                 }
             }
             break;
 
         default:
-            fatal_error(""bad type_ctor_rep in std_util:construct"");
+            MR_fatal_error(""bad type_ctor_rep in std_util:construct"");
         }
 
         /*
@@ -1908,7 +1908,7 @@
             if (functor_number < 0 ||
                 functor_number >= type_ctor_info->type_ctor_num_functors)
             {
-                fatal_error(""ML_get_functor_info: ""
+                MR_fatal_error(""ML_get_functor_info: ""
                     ""du functor_number out of range"");
             }
 
@@ -1930,7 +1930,7 @@
             if (functor_number < 0 ||
                 functor_number >= type_ctor_info->type_ctor_num_functors)
             {
-                fatal_error(""ML_get_functor_info: ""
+                MR_fatal_error(""ML_get_functor_info: ""
                     ""enum functor_number out of range"");
             }
 
@@ -1951,7 +1951,7 @@
             MR_NotagFunctorDesc *functor_desc;
 
             if (functor_number != 0) {
-                fatal_error(""ML_get_functor_info: ""
+                MR_fatal_error(""ML_get_functor_info: ""
                     ""notag functor_number out of range"");
             }
 
@@ -1977,7 +1977,7 @@
         ** The current version of the RTTI gives all such equivalence types
         ** the EQUIV type_ctor_rep, not EQUIV_VAR.
         */
-        fatal_error(""unexpected EQUIV_VAR type_ctor_rep"");
+        MR_fatal_error(""unexpected EQUIV_VAR type_ctor_rep"");
         break;
 
     case MR_TYPECTOR_REP_INT:
@@ -2003,7 +2003,7 @@
 
     case MR_TYPECTOR_REP_UNKNOWN:
     default:
-        fatal_error(""std_util:construct - unexpected type."");
+        MR_fatal_error(""std_util:construct - unexpected type."");
     }
 
     return TRUE;
@@ -2282,7 +2282,7 @@
             ** The current version of the RTTI gives all such equivalence types
             ** the EQUIV type_ctor_rep, not EQUIV_VAR.
             */
-            fatal_error(""unexpected EQUIV_VAR type_ctor_rep"");
+            MR_fatal_error(""unexpected EQUIV_VAR type_ctor_rep"");
             break;
 
         case MR_TYPECTOR_REP_EQUIV_GROUND:
@@ -2316,7 +2316,7 @@
 
         case MR_TYPECTOR_REP_UNKNOWN:
         default:
-            fatal_error(""std_util:ML_get_num_functors :""
+            MR_fatal_error(""std_util:ML_get_num_functors :""
                 "" unknown type_ctor_rep"");
     }
 
@@ -2389,8 +2389,6 @@
 
 :- pragma c_code("
 
-Declare_entry(mercury__builtin_compare_pred_3_0);
-
 /*
 ** Expand the given data using its type_info, find its
 ** functor, arity, argument vector and type_info vector.
@@ -2596,7 +2594,7 @@
             ** The current version of the RTTI gives all such equivalence types
             ** the EQUIV type_ctor_rep, not EQUIV_VAR.
             */
-            fatal_error(""unexpected EQUIV_VAR type_ctor_rep"");
+            MR_fatal_error(""unexpected EQUIV_VAR type_ctor_rep"");
             break;
 
         case MR_TYPECTOR_REP_INT:
@@ -2707,7 +2705,7 @@
             ** There's no way to create values of type `void',
             ** so this should never happen.
             */
-            fatal_error(""ML_expand: cannot expand void types"");
+            MR_fatal_error(""ML_expand: cannot expand void types"");
 
         case MR_TYPECTOR_REP_C_POINTER:
             /* XXX expand_info->non_canonical_type = TRUE; */
@@ -2839,7 +2837,7 @@
 
         case MR_TYPECTOR_REP_UNKNOWN:    /* fallthru */
         default:
-            fatal_error(""ML_expand: cannot expand -- unknown data type"");
+            MR_fatal_error(""ML_expand: cannot expand -- unknown data type"");
             break;
     }
 }
@@ -2873,7 +2871,7 @@
         ** that allows this.)
         */
     if (expand_info.non_canonical_type) {
-        fatal_error(""called argument/2 for a type with a ""
+        MR_fatal_error(""called argument/2 for a type with a ""
             ""user-defined equality predicate"");
     }
 
@@ -2924,7 +2922,7 @@
         ** that allows this.)
         */
     if (expand_info.non_canonical_type) {
-        fatal_error(""called functor/2 for a type with a ""
+        MR_fatal_error(""called functor/2 for a type with a ""
             ""user-defined equality predicate"");
     }
 
@@ -3048,7 +3046,7 @@
         ** that allows this.)
         */
     if (expand_info.non_canonical_type) {
-        fatal_error(""called deconstruct/4 for a type with a ""
+        MR_fatal_error(""called deconstruct/4 for a type with a ""
             ""user-defined equality predicate"");
     }
 
Index: library/store.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/store.m,v
retrieving revision 1.21
diff -u -d -r1.21 store.m
--- library/store.m	2000/04/13 10:05:36	1.21
+++ library/store.m	2000/05/08 13:00:08
@@ -316,7 +316,7 @@
 :- pragma c_header_code("
 	#include ""mercury_type_info.h""
 	#include ""mercury_heap.h""
-	#include ""mercury_misc.h""	/* for fatal_error() */
+	#include ""mercury_misc.h""	/* for MR_fatal_error() */
 
 	/* ML_arg() is defined in std_util.m */
 	bool ML_arg(MR_TypeInfo term_type_info, Word *term, int arg_index,
@@ -340,13 +340,14 @@
 	if (!ML_arg(type_info, (Word *) Ref, ArgNum,
 			&arg_type_info, &arg_ref))
 	{
-		fatal_error(""store__arg_ref: argument number out of range"");
+		MR_fatal_error(
+			""store__arg_ref: argument number out of range"");
 	}
 
 	if (MR_compare_type_info(arg_type_info, exp_arg_type_info) !=
 		MR_COMPARE_EQUAL)
 	{
-		fatal_error(""store__arg_ref: argument has wrong type"");
+		MR_fatal_error(""store__arg_ref: argument has wrong type"");
 	}
 
 	restore_transient_registers();
@@ -371,13 +372,15 @@
 	if (!ML_arg(type_info, (Word *) &Val, ArgNum,
 			&arg_type_info, &arg_ref))
 	{
-	      fatal_error(""store__new_arg_ref: argument number out of range"");
+		MR_fatal_error(
+			""store__new_arg_ref: argument number out of range"");
 	}
 
 	if (MR_compare_type_info(arg_type_info, exp_arg_type_info) !=
 		MR_COMPARE_EQUAL)
 	{
-	      fatal_error(""store__new_arg_ref: argument has wrong type"");
+		MR_fatal_error(
+			""store__new_arg_ref: argument has wrong type"");
 	}
 
 	restore_transient_registers();
Index: runtime/mercury_bootstrap.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_bootstrap.h,v
retrieving revision 1.13
diff -u -d -r1.13 mercury_bootstrap.h
--- runtime/mercury_bootstrap.h	2000/03/10 13:38:10	1.13
+++ runtime/mercury_bootstrap.h	2000/05/08 12:05:07
@@ -33,6 +33,8 @@
 #define make_aligned_string(a,b)	MR_make_aligned_string((a),(b))
 #define string_equal(a,b)		MR_string_equal((a),(b))
 #define string_const(a,b)		MR_string_const((a),(b))
+#define hash_string(s)			MR_hash_string((s))
+#define fatal_error(s)			MR_fatal_error((s))
 
 /*
 ** The list manipulation macros are available for use by ordinary Mercury
Index: runtime/mercury.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury.c,v
retrieving revision 1.2
diff -u -d -r1.2 mercury.c
--- runtime/mercury.c	2000/05/05 10:14:47	1.2
+++ runtime/mercury.c	2000/05/08 13:12:50
@@ -179,7 +179,7 @@
 				(args[1], args[2], args[3],
 				 args[4], args[5], x, y);
 		default:
-			fatal_error("unify/2: type arity > 5 not supported");
+			MR_fatal_error("unify/2: type arity > 5 not supported");
 	}
 }
 
@@ -224,7 +224,7 @@
 			 (args[1], args[2], args[3],
 			  args[4], args[5], res, x, y);
 		default:
-			fatal_error("index/2: type arity > 5 not supported");
+			MR_fatal_error("index/2: type arity > 5 not supported");
 	}
 }
 
Index: runtime/mercury_make_type_info_body.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_make_type_info_body.h,v
retrieving revision 1.2
diff -u -d -r1.2 mercury_make_type_info_body.h
--- runtime/mercury_make_type_info_body.h	2000/04/02 06:37:21	1.2
+++ runtime/mercury_make_type_info_body.h	2000/05/08 12:40:31
@@ -47,7 +47,7 @@
 		if (MR_PSEUDO_TYPEINFO_IS_VARIABLE(
 			(MR_PseudoTypeInfo) expanded_type_info))
 		{
-			fatal_error(exist_func_string
+			MR_fatal_error(exist_func_string
 				": unbound type variable");
 		}
 
@@ -89,7 +89,7 @@
 		if (MR_PSEUDO_TYPEINFO_IS_VARIABLE(
 			(MR_PseudoTypeInfo) expanded_type_info))
 		{
-			fatal_error(exist_func_string
+			MR_fatal_error(exist_func_string
 				": unbound type variable");
 		}
 
Index: runtime/mercury_misc.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_misc.c,v
retrieving revision 1.20
diff -u -d -r1.20 mercury_misc.c
--- runtime/mercury_misc.c	1999/10/18 15:46:58	1.20
+++ runtime/mercury_misc.c	2000/05/08 13:37:46
@@ -444,7 +444,7 @@
 */
 
 void 
-fatal_error(const char *fmt, ...)
+MR_fatal_error(const char *fmt, ...)
 {
 	va_list args;
 
@@ -478,16 +478,16 @@
 }
 
 /*
-**  Note that hash_string is actually defined as a macro in mercury_imp.h,
+**  Note that MR_hash_string is actually defined as a macro in mercury_imp.h,
 **  if we're using GNU C.  We define it here whether or not we're using
 **  gcc, so that users can easily switch between gcc and cc without
 **  rebuilding the libraries.
 */
 
-#undef hash_string
+#undef MR_hash_string
 
 int 
-hash_string(Word s)
+MR_hash_string(Word s)
 {
-	HASH_STRING_FUNC_BODY
+	MR_HASH_STRING_FUNC_BODY
 }
Index: runtime/mercury_misc.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_misc.h,v
retrieving revision 1.18
diff -u -d -r1.18 mercury_misc.h
--- runtime/mercury_misc.h	1999/10/18 15:46:58	1.18
+++ runtime/mercury_misc.h	2000/05/08 13:31:20
@@ -7,7 +7,7 @@
 /*
 ** mercury_misc.h -	debugging messages,
 **			MR_warning(),
-**			fatal_error(),
+**			MR_fatal_error(),
 **			MR_memcpy
 **			MR_fd_zero
 */
@@ -69,7 +69,7 @@
 	#define NO_RETURN
 #endif
 extern	void	MR_warning(const char *msg, ...);
-extern	void	fatal_error(const char *msg, ...) NO_RETURN;
+extern	void	MR_fatal_error(const char *msg, ...) NO_RETURN;
 
 /*
 ** We use our own version of memcpy because gcc recognises calls to the
Index: runtime/mercury_string.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_string.h,v
retrieving revision 1.14
diff -u -d -r1.14 mercury_string.h
--- runtime/mercury_string.h	1999/10/28 06:27:20	1.14
+++ runtime/mercury_string.h	2000/05/08 12:14:43
@@ -105,7 +105,7 @@
 ** The definition here and the definition in string.m
 ** must be kept equivalent.
 */
-#define do_hash_string(hash, s)				\
+#define MR_do_hash_string(hash, s)			\
 	{						\
 	   int len = 0;					\
 	   hash = 0;					\
@@ -118,27 +118,28 @@
 	}
 
 /*
-** hash_string(s):
+** MR_hash_string(s):
 **	Given a Mercury string `s', return a hash value for that string.
 */
-int	hash_string(Word);
+int	MR_hash_string(Word);
 
 #ifdef __GNUC__
-#define hash_string(s)							\
+#define MR_hash_string(s)						\
 	({ int hash_string_result;					\
-	   do_hash_string(hash_string_result, s);			\
+	   MR_do_hash_string(hash_string_result, s);			\
 	   hash_string_result;						\
 	})
 #endif
 
 /* 
-** If we're not using gcc, the actual definition of hash_string is in misc.c;
-** it uses the macro HASH_STRING_FUNC_BODY below.
+** If we're not using gcc, the actual definition of hash_string is in
+** runtime/mercury_misc.c;
+** it uses the macro MR_HASH_STRING_FUNC_BODY below.
 */
 
-#define HASH_STRING_FUNC_BODY						\
+#define MR_HASH_STRING_FUNC_BODY					\
 	   int hash_string_result;					\
-	   do_hash_string(hash_string_result, s);			\
+	   MR_do_hash_string(hash_string_result, s);			\
 	   return hash_string_result;
 
 #endif /* not MERCURY_STRING_H */
Index: runtime/mercury_type_info.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_type_info.c,v
retrieving revision 1.36
diff -u -d -r1.36 mercury_type_info.c
--- runtime/mercury_type_info.c	2000/05/08 06:47:44	1.36
+++ runtime/mercury_type_info.c	2000/05/08 12:50:00
@@ -89,7 +89,7 @@
 
 	exist_info = functor_desc->MR_du_functor_exist_info;
 	if (exist_info == NULL) {
-		fatal_error("MR_get_arg_type_info: no exist_info");
+		MR_fatal_error("MR_get_arg_type_info: no exist_info");
 	}
 
 	exist_varnum = arg_num - MR_PSEUDOTYPEINFO_EXIST_VAR_BASE - 1;
Index: trace/mercury_trace.c
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace.c,v
retrieving revision 1.20
diff -u -d -r1.20 mercury_trace.c
--- trace/mercury_trace.c	1999/12/20 14:04:03	1.20
+++ trace/mercury_trace.c	2000/05/08 13:25:01
@@ -199,7 +199,7 @@
 			goto check_stop_print;
 
 		default:
-			fatal_error("invalid command in MR_trace");
+			MR_fatal_error("invalid command in MR_trace");
 	}
 
 check_stop_print:
@@ -338,7 +338,7 @@
 #ifdef MR_USE_EXTERNAL_DEBUGGER
 	if (MR_trace_handler == MR_TRACE_EXTERNAL) {
 		if (!interactive) {
-			fatal_error("reporting event for external debugger");
+			MR_fatal_error("reporting event for external debugger");
 		}
 
 		jumpaddr = MR_trace_event_external(cmd, &event_info);
@@ -440,7 +440,7 @@
 				MR_INIT_ARG_COUNT);
 			args[arg_num] = arg_value;
 		} else {
-			fatal_error("illegal location for input argument");
+			MR_fatal_error("illegal location for input argument");
 		}
 	}
 
@@ -461,7 +461,7 @@
 		location = entry->MR_sle_succip_locn;
 		if (MR_LONG_LVAL_TYPE(location) != MR_LONG_LVAL_TYPE_STACKVAR)
 		{
-			fatal_error("illegal location for stored succip");
+			MR_fatal_error("illegal location for stored succip");
 		}
 
 		this_frame = MR_saved_sp(saved_regs);
@@ -483,7 +483,7 @@
 			MR_reset_ticket(trail_ptr, MR_retry);
 			MR_discard_tickets_to(ticket_counter);
 		} else {
-			fatal_error("retry cannot restore the trail");
+			MR_fatal_error("retry cannot restore the trail");
 		}
 #endif
 	} else {
@@ -515,7 +515,7 @@
 			MR_reset_ticket(trail_ptr, MR_retry);
 			MR_discard_tickets_to(ticket_counter);
 		} else {
-			fatal_error("retry cannot restore the trail");
+			MR_fatal_error("retry cannot restore the trail");
 		}
 #endif
 	}
Index: trace/mercury_trace_declarative.c
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_declarative.c,v
retrieving revision 1.19
diff -u -d -r1.19 mercury_trace_declarative.c
--- trace/mercury_trace_declarative.c	2000/03/24 10:28:06	1.19
+++ trace/mercury_trace_declarative.c	2000/05/08 13:25:12
@@ -264,7 +264,7 @@
 
 	if (!MR_ENTRY_LAYOUT_HAS_EXEC_TRACE(entry)) {
 		/* XXX this should be handled better. */
-		fatal_error("layout has no execution tracing");
+		MR_fatal_error("layout has no execution tracing");
 	}
 
 	if (depth > MR_edt_max_depth || depth < MR_edt_min_depth) {
@@ -331,13 +331,13 @@
 			break;
 		case MR_PORT_PRAGMA_FIRST:
 		case MR_PORT_PRAGMA_LATER:
-			fatal_error("MR_trace_decl_debug: "
+			MR_fatal_error("MR_trace_decl_debug: "
 				"foreign language code is not handled (yet)");
 		case MR_PORT_EXCEPTION:
-			fatal_error("MR_trace_decl_debug: "
+			MR_fatal_error("MR_trace_decl_debug: "
 				"exceptions are not handled (yet)");
 		default:
-			fatal_error("MR_trace_decl_debug: unknown port");
+			MR_fatal_error("MR_trace_decl_debug: unknown port");
 	}
 	MR_decl_checkpoint_alloc(trace);
 	MR_trace_current_node = trace;
@@ -354,7 +354,7 @@
 				break;
 
 			default:
-				fatal_error("MR_trace_decl_debug: "
+				MR_fatal_error("MR_trace_decl_debug: "
 						"unexpected mode");
 		}
 
@@ -454,7 +454,7 @@
 		if (!MR_DD_trace_node_call(MR_trace_node_store, (Word) next,
 					(Word *) &call))
 		{
-			fatal_error("MR_trace_decl_redo: no matching EXIT");
+			MR_fatal_error("MR_trace_decl_redo: no matching EXIT");
 		}
 	);
 #endif /* !MR_USE_DECL_STACK_SLOT */
@@ -941,12 +941,12 @@
 		problem = MR_trace_return_var_info(i, NULL, &arg_type,
 					&arg_value);
 		if (problem != NULL) {
-			fatal_error(problem);
+			MR_fatal_error(problem);
 		}
 
 		problem = MR_trace_headvar_num(i, &arg_pos);
 		if (problem != NULL) {
-			fatal_error(problem);
+			MR_fatal_error(problem);
 		}
 
 		MR_TRACE_USE_HP(
@@ -1146,7 +1146,7 @@
 					(Word) node,
 					(Word *) &seqno))
 		{
-			fatal_error("MR_trace_node_seqno: "
+			MR_fatal_error("MR_trace_node_seqno: "
 				"not an interface event");
 		}
 	);
@@ -1161,7 +1161,7 @@
 	MR_TRACE_CALL_MERCURY(
 		if (!MR_DD_trace_node_first_disj((Word) node, (Word *) &first))
 		{
-			fatal_error("MR_trace_node_first_disj: "
+			MR_fatal_error("MR_trace_node_first_disj: "
 				"not a DISJ event");
 		}
 	);
Index: trace/mercury_trace_external.c
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_external.c,v
retrieving revision 1.38
diff -u -d -r1.38 mercury_trace_external.c
--- trace/mercury_trace_external.c	2000/04/14 07:20:37	1.38
+++ trace/mercury_trace_external.c	2000/05/08 13:25:34
@@ -254,7 +254,7 @@
 		len = strlen(unix_addr->sun_path) +
 			sizeof(unix_addr->sun_family);
 		if (len != 16) {
-			fatal_error("unix socket: length != 16");
+			MR_fatal_error("unix socket: length != 16");
 		}
 	#endif
 }
@@ -295,13 +295,13 @@
 	unix_socket = getenv("MERCURY_DEBUGGER_UNIX_SOCKET");
 	inet_socket = getenv("MERCURY_DEBUGGER_INET_SOCKET");
 	if (unix_socket == NULL && inet_socket == NULL) {
-		fatal_error("you must set either the "
+		MR_fatal_error("you must set either the "
 			"MERCURY_DEBUGGER_UNIX_SOCKET\n"
 			"or MERCURY_DEBUGGER_INET_SOCKET "
 			"environment variable");
 	}
 	if (unix_socket != NULL && inet_socket != NULL) {
-		fatal_error("you must set only one of the "
+		MR_fatal_error("you must set only one of the "
 			"MERCURY_DEBUGGER_UNIX_SOCKET "
 			"and MERCURY_DEBUGGER_INET_SOCKET\n"
 			"environment variables");
@@ -338,15 +338,15 @@
 		if (sscanf(inet_socket, "%254s %254s", hostname, port_string) 
 			!= 2)
 		{
-			fatal_error("MERCURY_DEBUGGER_INET_SOCKET invalid");
+			MR_fatal_error("MERCURY_DEBUGGER_INET_SOCKET invalid");
 		}
 		host_addr = inet_addr(hostname);
 		if (host_addr == -1) {
-			fatal_error("MERCURY_DEBUGGER_INET_SOCKET: "
+			MR_fatal_error("MERCURY_DEBUGGER_INET_SOCKET: "
 				"invalid address");
 		}
 		if (sscanf(port_string, "%hu", &port) != 1) {
-			fatal_error("MERCURY_DEBUGGER_INET_SOCKET: "
+			MR_fatal_error("MERCURY_DEBUGGER_INET_SOCKET: "
 				"invalid port");
 		}
 
@@ -370,7 +370,7 @@
 	if (fd < 0) {
 		fprintf(stderr, "Mercury runtime: socket() failed: %s\n",
 			strerror(errno));
-		fatal_error("cannot open socket for debugger");
+		MR_fatal_error("cannot open socket for debugger");
 	} else if (MR_debug_socket) {
 		fprintf(stderr,"Mercury runtime: creation of socket ok\n");
 	}
@@ -381,7 +381,7 @@
 	if (connect(fd, addr, len) < 0) {
 		fprintf(stderr, "Mercury runtime: connect() failed: %s\n",
 			strerror(errno));
-		fatal_error("can't connect to debugger socket");
+		MR_fatal_error("can't connect to debugger socket");
 	} else if (MR_debug_socket) {
 		fprintf(stderr, "Mercury runtime: connection to socket: ok\n");
 	}
@@ -394,7 +394,7 @@
 	if ((file_in == NULL)||(file_out == NULL)) {
 		fprintf(stderr, "Mercury runtime: fdopen() failed: %s\n",
 			strerror(errno));
-		fatal_error("cannot open debugger socket");
+		MR_fatal_error("cannot open debugger socket");
 	} else if (MR_debug_socket) {
 		fprintf(stderr, "Mercury runtime: fdopen(): ok\n");
 	}
@@ -421,7 +421,7 @@
 	MR_read_request_from_socket(&debugger_request, &debugger_request_type);
 
 	if (debugger_request_type != MR_REQUEST_HELLO_REPLY) {
-		fatal_error("unexpected command on debugger socket");
+		MR_fatal_error("unexpected command on debugger socket");
 	} else if (MR_debug_socket) {
 		fprintf(stderr, "Mercury runtime: read hello_reply\n");
 	}
@@ -457,7 +457,7 @@
 			break;
 
 		default:
-			fatal_error("Error in the external debugger");
+			MR_fatal_error("Error in the external debugger");
 	}
 	/*
 	** Maybe we should loop to process requests from the
@@ -549,7 +549,7 @@
 			break;
 
 		default:
-	       		fatal_error("Software error in the debugger.\n");
+	       		MR_fatal_error("Software error in the debugger.\n");
 	}
 
 	/* loop to process requests read from the debugger socket */
@@ -867,7 +867,7 @@
 				break;
 			  }
 			default:
-				fatal_error("unexpected request read from "
+				MR_fatal_error("unexpected request read from "
 					"debugger socket");
 		}
 	}
@@ -1098,7 +1098,7 @@
 		problem = MR_trace_return_var_info(i, NULL,
 				&type_info, &value);
 		if (problem != NULL) {
-			fatal_error(problem);
+			MR_fatal_error(problem);
 		}
 
 		MR_TRACE_USE_HP(
@@ -1144,7 +1144,7 @@
 	for (i = var_count; i > 0; i--) {
 		problem = MR_trace_return_var_info(i, &name, NULL, NULL);
 		if (problem != NULL) {
-			fatal_error(problem);
+			MR_fatal_error(problem);
 		}
 
 		MR_TRACE_USE_HP(
@@ -1182,7 +1182,7 @@
 	for (i = var_count; i > 0; i--) {
 		problem = MR_trace_return_var_info(i, NULL, &type_info, NULL);
 		if (problem != NULL) {
-			fatal_error(problem);
+			MR_fatal_error(problem);
 		}
 
 		MR_TRACE_CALL_MERCURY(
@@ -1228,7 +1228,7 @@
 		** Should never occur since we check in the external debugger
 		** process if a variable is live before retrieving it.
 		*/
-		fatal_error(problem);
+		MR_fatal_error(problem);
 	}
 
 	return univ;
@@ -1291,7 +1291,7 @@
 	const char *extra, Word *base_sp, Word *base_curfr)
 {
 	if (! MR_ENTRY_LAYOUT_HAS_PROC_ID(entry)) {
-		fatal_error("cannot retrieve procedure id without layout");
+		MR_fatal_error("cannot retrieve procedure id without layout");
 	}
 
 	if (base_sp != NULL && base_curfr != NULL) {
@@ -1369,7 +1369,7 @@
 		{
 			MR_send_message_to_socket("func");
 		} else {
-			fatal_error("procedure is not pred or func");
+			MR_fatal_error("procedure is not pred or func");
 		}
 		
 		MR_send_message_to_socket_format(
Index: trace/mercury_trace_internal.c
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_internal.c,v
retrieving revision 1.63
diff -u -d -r1.63 mercury_trace_internal.c
--- trace/mercury_trace_internal.c	2000/02/04 03:45:43	1.63
+++ trace/mercury_trace_internal.c	2000/05/08 13:25:39
@@ -82,7 +82,7 @@
 ** how many events we have printed so far in this screenful.
 */
 
-static	bool			MR_scroll_control = FALSE;
+static	bool			MR_scroll_control = TRUE;
 static	int			MR_scroll_limit = 24;
 static	int			MR_scroll_next = 0;
 
@@ -1015,7 +1015,7 @@
 						file, line);
 				}
 			} else {
-				fatal_error("cannot find current filename");
+				MR_fatal_error("cannot find current filename");
 			}
 		} else {
 			MR_trace_usage("breakpoint", "break");
@@ -1300,7 +1300,7 @@
 				break;
 
 			default:
-				fatal_error("invalid MR_context_position");
+				MR_fatal_error("invalid MR_context_position");
 			}
 		} else {
 			MR_trace_usage("parameter", "context");
Index: trace/mercury_trace_spy.c
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_spy.c,v
retrieving revision 1.6
diff -u -d -r1.6 mercury_trace_spy.c
--- trace/mercury_trace_spy.c	1999/11/15 00:43:57	1.6
+++ trace/mercury_trace_spy.c	2000/05/08 13:26:04
@@ -179,7 +179,7 @@
 				MR_spied_labels[slot].spy_point_num];
 			if (point->spy_enabled) {
 				if (point->spy_when != MR_SPY_LINENO) {
-					fatal_error("non-lineno spy "
+					MR_fatal_error("non-lineno spy "
 						"point in "
 						"spied labels array");
 				}
@@ -203,8 +203,8 @@
 					spy_point_num];
 				if (point->spy_enabled) {
 					if (point->spy_when != MR_SPY_LINENO) {
-						fatal_error("non-lineno spy "
-							"point in "
+						MR_fatal_error("non-lineno "
+							"spy point in "
 							"spied labels array");
 					}
 
@@ -266,11 +266,11 @@
 					break;
 
 				case MR_SPY_LINENO:
-					fatal_error("lineno spy point in "
+					MR_fatal_error("lineno spy point in "
 						"spied procs array");
 
 				default:
-					fatal_error("bad spy point when in "
+					MR_fatal_error("bad spy point when in "
 						"MR_event_matches_spy_point");
 			}
 		}
@@ -444,7 +444,7 @@
 
 		proc_table_slot = MR_search_spy_table_for_proc(point->spy_proc);
 		if (proc_table_slot < 0) {
-			fatal_error("deleted spy point "
+			MR_fatal_error("deleted spy point "
 				"was not indexed by proc addr");
 		}
 
@@ -456,7 +456,7 @@
 		}
 
 		if (cur == NULL) {
-			fatal_error("deleted spy point "
+			MR_fatal_error("deleted spy point "
 				"was not on proc index list");
 		}
 
Index: trace/mercury_trace_vars.c
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_vars.c,v
retrieving revision 1.14
diff -u -d -r1.14 mercury_trace_vars.c
--- trace/mercury_trace_vars.c	2000/04/11 10:35:42	1.14
+++ trace/mercury_trace_vars.c	2000/05/08 13:26:16
@@ -259,7 +259,7 @@
 		}
 	} else {
 		if (problem == NULL) {
-			fatal_error("MR_find_nth_ancestor failed "
+			MR_fatal_error("MR_find_nth_ancestor failed "
 					"without reporting a problem");
 		}
 
@@ -346,7 +346,7 @@
 		}
 
 		if (var_info->MR_var_name_offset > string_table_size) {
-			fatal_error("array bounds error on string table");
+			MR_fatal_error("array bounds error on string table");
 		}
 
 		name = string_table + var_info->MR_var_name_offset;
@@ -390,7 +390,8 @@
 			MR_point.MR_point_vars[slot].MR_var_basename = copy;
 		} else {
 			if (MR_isdigit(*s)) {
-				fatal_error("variable name starts with digit");
+				MR_fatal_error(
+					"variable name starts with digit");
 			}
 
 			MR_point.MR_point_vars[slot].MR_var_has_suffix = TRUE;
@@ -514,7 +515,7 @@
 	Word **base_sp_ptr, Word **base_curfr_ptr)
 {
 	if (MR_point.MR_point_problem != NULL) {
-		fatal_error("cannot get details about current level");
+		MR_fatal_error("cannot get details about current level");
 	}
 
 	if (entry_ptr != NULL) {
@@ -674,7 +675,7 @@
 				browser);
 		}
 	} else {
-		fatal_error("internal error: bad var_spec kind");
+		MR_fatal_error("internal error: bad var_spec kind");
 	}
 
 	return NULL;

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