diff: interface to external opium-style debugger (round 2)

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Mar 13 06:45:01 AEDT 1998


On 12-Mar-1998, Erwan Jahier <Erwan.Jahier at irisa.fr> wrote:
> > --- io.m        1998/02/27 16:11:15     1.151
> > +++ io.m        1998/03/11 19:16:40
> > @@ -2038,11 +2038,6 @@
> >  ** Mercury files are not quite the same as C stdio FILEs,
> >  ** because we keep track of a little bit more information.
> >  */
> > -
> > -typedef struct mercury_file {
> > -       FILE *file;
> > -       int line_number;
> > -} MercuryFile;
> 
> The comment above seems to go with the code you removed. Shouldn't you
> removed it either or am I missing something ?

Yes, I should have removed it too.  Thanks for spotting that.

--------------------

runtime/mercury_types.h:
library/io.m:
	Move a comment about MercuryFile from io.m to mercury_types.h,
	since the definition of the MercuryFile type had been moved.

cvs diff  library/io.m runtime/mercury_types.h
Index: library/io.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/io.m,v
retrieving revision 1.152
diff -u -r1.152 io.m
--- io.m	1998/03/11 22:07:26	1.152
+++ io.m	1998/03/12 19:40:21
@@ -1000,6 +1000,7 @@
  *			;	user_error.
  * In C:
  *	io__stream	==	pointer to MercuryFile
+ *				(which is defined in runtime/mercury_types.h)
  */
 
 	% This inter-language stuff is tricky.
@@ -2033,11 +2034,6 @@
 #ifdef HAVE_SYS_WAIT
 #include <sys/wait.h>
 #endif
-
-/*
-** Mercury files are not quite the same as C stdio FILEs,
-** because we keep track of a little bit more information.
-*/
 
 extern MercuryFile mercury_stdin;
 extern MercuryFile mercury_stdout;
Index: runtime/mercury_types.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_types.h,v
retrieving revision 1.9
diff -u -r1.9 mercury_types.h
--- mercury_types.h	1998/03/11 22:07:33	1.9
+++ mercury_types.h	1998/03/12 19:41:28
@@ -56,7 +56,13 @@
 /* spinlocks -- see mercury_spinlock.h */
 typedef Word	SpinLock;
 
-/* MercuryFile is used for the Mercury io__stream type in library/io.m */
+/*
+** The C `MercuryFile' type is used for the Mercury `io__stream' type
+** in library/io.m.
+** Mercury files are not quite the same as C stdio FILEs,
+** because we keep track of a little bit more information.
+*/
+
 typedef struct mercury_file {
 	FILE *file;
 	int line_number;

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



More information about the developers mailing list