[m-rev.] diff: get some extras working

Ian MacLarty maclarty at cs.mu.OZ.AU
Thu Sep 8 17:40:52 AEST 2005


Estimated hours taken: 0.2
Branches: 0.12 (and main for the fft change).

Get some extras working for the release.

extras/complex_numbers/samples/fft.m:
	Add a main predicate so this sample compiles.

extras/graphics/samples/calc/Mmakefile:
	Bring the Mmakefile up to date with the main branch.

Index: extras/complex_numbers/samples/fft.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/complex_numbers/samples/fft.m,v
retrieving revision 1.5.2.1
diff -u -r1.5.2.1 fft.m
--- extras/complex_numbers/samples/fft.m	9 Feb 2005 12:48:41 -0000	1.5.2.1
+++ extras/complex_numbers/samples/fft.m	8 Sep 2005 07:32:16 -0000
@@ -25,7 +25,9 @@
 %------------------------------------------------------------------------------%
 :- interface.

-:- import_module list, complex_numbers, complex_numbers.complex.
+:- import_module io, list, complex_numbers, complex_numbers.complex.
+
+:- pred main(io::di, io::uo) is det.

 :- pred fft(list(complex), list(complex)).
 :- mode fft(in, out) is det.
@@ -34,6 +36,12 @@
 :- implementation.

 :- import_module float, int, math, require.
+
+main(!IO) :-
+	fft([cmplx(1.0, 0.0), cmplx(0.0, 0.0), cmplx(1.0, 0.0),
+		cmplx(0.0, 0.0)], T),
+	io.write(T, !IO),
+	io.nl(!IO).

 fft(Ins, Outs) :-
 		% First put the list into bit-reversed order.
Index: extras/graphics/samples/calc/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/graphics/samples/calc/Mmakefile,v
retrieving revision 1.3
diff -u -r1.3 Mmakefile
--- extras/graphics/samples/calc/Mmakefile	19 Dec 2001 15:08:27 -0000	1.3
+++ extras/graphics/samples/calc/Mmakefile	8 Sep 2005 07:14:43 -0000
@@ -1,15 +1,14 @@
+# Specify the location of the `mercury_tcltk' package.
+MERCURY_TCLTK_DIR	= ../../mercury_tcltk

 # To use shared libraries under Linux you need to add these:
-MGNUCFLAGS    = --pic-reg
+MGNUCFLAGS    = --pic-reg -I$(MERCURY_TCLTK_DIR) -I/usr/include/tcl8.4
 EXTRA_MLFLAGS = -shared

 # This will need to be modified according to the versions of
 # tk and tcl you are using.
-EXTRA_MLLIBS  = -ltk8.0 -ltcl8.0 -L/usr/X11R6/lib -lX11 -lXmu \
+EXTRA_MLLIBS  = -ltk8.4 -ltcl8.4 -L/usr/X11R6/lib -lX11 \
 			-lXext -lm -ldl
-
-# Specify the location of the `mercury_tcltk' package.
-MERCURY_TCLTK_DIR	= ../../mercury_tcltk

 # Tell mmake to use the `mercury_tcltk' library.
 VPATH 		= $(MERCURY_TCLTK_DIR):$(MMAKE_VPATH)

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