[m-dev.] diff: fix #includes in trace/*.[ch]

Fergus Henderson fjh at cs.mu.OZ.AU
Tue May 16 00:50:36 AEST 2000


Estimated hours taken: 1

Fix a problem which stopped the `trace' directory from compiling in
MLDS grades.  (With this change, it gets lots of warnings, but it does
compile.)  Also some miscellaneous cleanup of the `#include' statements
in the `trace' directory.

trace/mercury_trace_browse.c:
trace/mercury_trace_declarative.c:
trace/mercury_trace_external.c:
trace/mercury_trace_help.c:
	Change the `#include' statements that include header
	files from code in the library directory so that
	if MR_HIGHLEVEL_C is defined, the file names are
	all prefixed with "mercury.".  This is necessary
	because the MLDS back-end names those header files
	differently than the LLDS back-end.

trace/*.c:
	Arrange the `#include' statements so that they are
	grouped according to which directory the file being
	included comes from.

trace/mercury_trace_browse.h:
trace/mercury_trace_internal.h:
trace/mercury_trace_external.h:
	Add missing `#include' statements, to make these
	header files self-contained.

Workspace: /home/pgrad/fjh/ws/hg
Index: trace/mercury_trace_alias.c
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_alias.c,v
retrieving revision 1.2
diff -u -d -r1.2 mercury_trace_alias.c
--- trace/mercury_trace_alias.c	1999/10/18 15:47:16	1.2
+++ trace/mercury_trace_alias.c	2000/05/15 12:56:02
@@ -12,8 +12,9 @@
 */
 
 #include "mercury_imp.h"
-#include "mercury_trace_alias.h"
 #include "mercury_array_macros.h"
+
+#include "mercury_trace_alias.h"
 
 static	MR_Alias	*MR_alias_records = NULL;
 static	int		MR_alias_record_max = 0;
Index: trace/mercury_trace_browse.c
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_browse.c,v
retrieving revision 1.11
diff -u -d -r1.11 mercury_trace_browse.c
--- trace/mercury_trace_browse.c	2000/04/14 07:20:37	1.11
+++ trace/mercury_trace_browse.c	2000/05/15 12:32:25
@@ -22,14 +22,21 @@
 */
 
 #include "mercury_imp.h"
+#include "mercury_deep_copy.h"
+
 #include "mercury_trace_browse.h"
 #include "mercury_trace_util.h"
 #include "mercury_trace_internal.h"
-#include "mercury_deep_copy.h"
+#include "mercury_trace_external.h"
+
 #include "mdb.browse.h"
 #include "mdb.interactive_query.h"
-#include "std_util.h"
-#include "mercury_trace_external.h"
+#ifdef MR_HIGHLEVEL_CODE
+  #include "mercury.std_util.h"
+#else
+  #include "std_util.h"
+#endif
+
 #include <stdio.h>
 
 static	Word		MR_trace_browser_state;
Index: trace/mercury_trace.c
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace.c,v
retrieving revision 1.21
diff -u -d -r1.21 mercury_trace.c
--- trace/mercury_trace.c	2000/05/08 13:48:48	1.21
+++ trace/mercury_trace.c	2000/05/15 12:55:40
@@ -35,10 +35,6 @@
 */
 
 #include "mercury_imp.h"
-#include "mercury_trace.h"
-#include "mercury_trace_internal.h"
-#include "mercury_trace_external.h"
-#include "mercury_trace_spy.h"
 #include "mercury_layout_util.h"
 #include "mercury_memory.h"
 #include "mercury_engine.h"
@@ -46,6 +42,12 @@
 #include "mercury_misc.h"
 #include "mercury_array_macros.h"
 #include "mercury_init.h"
+
+#include "mercury_trace.h"
+#include "mercury_trace_internal.h"
+#include "mercury_trace_external.h"
+#include "mercury_trace_spy.h"
+
 #include <stdio.h>
 
 static	MR_Trace_Cmd_Info	MR_trace_ctrl = {
Index: trace/mercury_trace_declarative.c
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_declarative.c,v
retrieving revision 1.21
diff -u -d -r1.21 mercury_trace_declarative.c
--- trace/mercury_trace_declarative.c	2000/05/08 18:17:44	1.21
+++ trace/mercury_trace_declarative.c	2000/05/15 12:31:42
@@ -38,14 +38,20 @@
 #include "mercury_trace_tables.h"
 #include "mercury_trace_util.h"
 #include "mercury_trace_vars.h"
+
 #include "mercury_layout_util.h"
 #include "mercury_deep_copy.h"
 #include "mercury_stack_trace.h"
 #include "mercury_string.h"
 #include "mercury_trace_base.h"
+
 #include "mdb.declarative_debugger.h"
 #include "mdb.declarative_execution.h"
-#include "std_util.h"
+#ifdef MR_HIGHLEVEL_CODE
+  #include "mercury.std_util.h"
+#else
+  #include "std_util.h"
+#endif
 
 #include <errno.h>
 
Index: trace/mercury_trace_external.c
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_external.c,v
retrieving revision 1.39
diff -u -d -r1.39 mercury_trace_external.c
--- trace/mercury_trace_external.c	2000/05/08 13:48:49	1.39
+++ trace/mercury_trace_external.c	2000/05/15 12:31:17
@@ -31,8 +31,13 @@
 
 #include "mdb.debugger_interface.h"
 #include "mdb.collect_lib.h"
+#ifdef MR_HIGHLEVEL_CODE
+  #include "mercury.std_util.h"
+#else
+  #include "std_util.h"
+#endif
+
 #include "mercury_deep_copy.h"
-#include "std_util.h"
 
 #include <stdio.h>
 #include <errno.h>
Index: trace/mercury_trace_help.c
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_help.c,v
retrieving revision 1.9
diff -u -d -r1.9 mercury_trace_help.c
--- trace/mercury_trace_help.c	2000/04/14 07:20:38	1.9
+++ trace/mercury_trace_help.c	2000/05/15 12:33:18
@@ -23,14 +23,22 @@
 */
 
 #include "mercury_imp.h"
-#include "mercury_trace_help.h"
 #include "mercury_layout_util.h"
 #include "mercury_array_macros.h"
 #include "mercury_deep_copy.h"
+
+#include "mercury_trace_help.h"
 #include "mercury_trace_util.h"
-#include "std_util.h"
+
+#ifdef MR_HIGHLEVEL_CODE
+  #include "mercury.std_util.h"
+  #include "mercury.io.h"
+#else
+  #include "std_util.h"
+  #include "io.h"
+#endif
 #include "mdb.help.h"
-#include "io.h"
+
 #include <stdio.h>
 
 static	Word		MR_trace_help_system;
Index: trace/mercury_trace_internal.c
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_internal.c,v
retrieving revision 1.65
diff -u -d -r1.65 mercury_trace_internal.c
--- trace/mercury_trace_internal.c	2000/05/08 18:17:45	1.65
+++ trace/mercury_trace_internal.c	2000/05/15 12:33:32
@@ -11,6 +11,10 @@
 */
 
 #include "mercury_imp.h"
+#include "mercury_layout_util.h"
+#include "mercury_array_macros.h"
+#include "mercury_getopt.h"
+
 #include "mercury_trace.h"
 #include "mercury_trace_internal.h"
 #include "mercury_trace_declarative.h"
@@ -22,9 +26,6 @@
 #include "mercury_trace_util.h"
 #include "mercury_trace_vars.h"
 #include "mercury_trace_readline.h"
-#include "mercury_layout_util.h"
-#include "mercury_array_macros.h"
-#include "mercury_getopt.h"
 
 #include "mdb.browse.h"
 
Index: trace/mercury_trace_readline.c
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_readline.c,v
retrieving revision 1.4
diff -u -d -r1.4 mercury_trace_readline.c
--- trace/mercury_trace_readline.c	1999/11/09 09:34:10	1.4
+++ trace/mercury_trace_readline.c	2000/05/15 12:57:00
@@ -14,10 +14,11 @@
 */
 
 #include "mercury_imp.h"
-#include "mercury_trace_readline.h"
 #include "mercury_array_macros.h"
 #include "mercury_memory.h"
 #include "mercury_std.h"
+
+#include "mercury_trace_readline.h"
 
 #ifndef MR_NO_USE_READLINE
   #ifdef HAVE_READLINE_READLINE
Index: trace/mercury_trace_spy.c
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_spy.c,v
retrieving revision 1.7
diff -u -d -r1.7 mercury_trace_spy.c
--- trace/mercury_trace_spy.c	2000/05/08 13:48:50	1.7
+++ trace/mercury_trace_spy.c	2000/05/15 12:57:10
@@ -12,11 +12,13 @@
 */
 
 #include "mercury_imp.h"
+#include "mercury_array_macros.h"
 #include "mercury_trace_base.h"
+
 #include "mercury_trace.h"
 #include "mercury_trace_spy.h"
 #include "mercury_trace_tables.h"
-#include "mercury_array_macros.h"
+
 #include <stdlib.h>
 
 const char		*MR_spy_when_names[] =
Index: trace/mercury_trace_tables.c
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_tables.c,v
retrieving revision 1.9
diff -u -d -r1.9 mercury_trace_tables.c
--- trace/mercury_trace_tables.c	1999/11/15 00:43:58	1.9
+++ trace/mercury_trace_tables.c	2000/05/15 12:39:14
@@ -14,8 +14,10 @@
 #include "mercury_imp.h"
 #include "mercury_label.h"
 #include "mercury_array_macros.h"
+
 #include "mercury_trace_tables.h"
 #include "mercury_trace.h"
+
 #include <stdio.h>
 #include <string.h>
 #include <ctype.h>
Index: trace/mercury_trace_vars.c
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_vars.c,v
retrieving revision 1.15
diff -u -d -r1.15 mercury_trace_vars.c
--- trace/mercury_trace_vars.c	2000/05/08 13:48:50	1.15
+++ trace/mercury_trace_vars.c	2000/05/15 12:39:29
@@ -17,6 +17,7 @@
 #include "mercury_memory.h"
 #include "mercury_layout_util.h"
 #include "mercury_stack_layout.h"
+
 #include "mercury_trace_vars.h"
 
 #include <stdio.h>
Index: trace/mercury_trace_browse.h
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_browse.h,v
retrieving revision 1.6
diff -u -d -r1.6 mercury_trace_browse.h
--- trace/mercury_trace_browse.h	1999/06/07 21:49:26	1.6
+++ trace/mercury_trace_browse.h	2000/05/15 12:47:22
@@ -14,6 +14,9 @@
 #ifndef	MERCURY_TRACE_BROWSE_H
 #define MERCURY_TRACE_BROWSE_H
 
+#include "mercury_conf.h"	/* for MR_USE_EXTERNAL_DEBUGGER */
+#include "mercury_types.h"	/* for Word, String */
+
 /*
 ** Interactively browse a term.
 */
Index: trace/mercury_trace_external.h
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_external.h,v
retrieving revision 1.6
diff -u -d -r1.6 mercury_trace_external.h
--- trace/mercury_trace_external.h	1999/04/22 06:58:50	1.6
+++ trace/mercury_trace_external.h	2000/05/15 12:49:09
@@ -7,6 +7,12 @@
 #ifndef	MERCURY_TRACE_EXTERNAL_H
 #define	MERCURY_TRACE_EXTERNAL_H
 
+#include "mercury_conf.h"		/* for MR_USE_EXTERNAL_DEBUGGER */
+#include "mercury_types.h"		/* for Code */
+#include "mercury_library_types.h"	/* for MercuryFile */
+
+#include "mercury_trace.h"		/* for MR_Trace_Cmd_Info, etc. */
+
 #ifdef	MR_USE_EXTERNAL_DEBUGGER
 
 extern	void	MR_trace_init_external(void);
Index: trace/mercury_trace_internal.h
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_internal.h,v
retrieving revision 1.10
diff -u -d -r1.10 mercury_trace_internal.h
--- trace/mercury_trace_internal.h	1999/12/20 14:04:04	1.10
+++ trace/mercury_trace_internal.h	2000/05/15 12:51:09
@@ -7,8 +7,12 @@
 #ifndef	MERCURY_TRACE_INTERNAL_H
 #define	MERCURY_TRACE_INTERNAL_H
 
-#include "mercury_types.h"
-#include "mercury_trace.h"
+#include "mercury_conf.h"	/* for MR_USE_DECLARATIVE_DEBUGGER */
+#include "mercury_types.h"	/* for Code */
+#include "mercury_trace.h"	/* for MR_Event_Info, etc. */
+#include "mercury_std.h"	/* for bool */
+
+#include <stdio.h>		/* for FILE */
 
 #ifdef  MR_USE_DECLARATIVE_DEBUGGER
 

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