diff: Prolog bug fixes

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Mar 30 23:26:50 AEST 1998


Fix some bugs with the SICStus/NU-Prolog versions of some library predicates.

library/store.nu.nl:
	Fix a bug in the Prolog implementation of store__set_mutvar:
	the SICStus Prolog name for this is `update_mutable', not
	`put_mutable'.

library/io.nu.nl:
	Fix another bug (wrong variable name) in the code for
	io__remove_file_name_2.

cvs diff -N library/io.nu.nl library/store.nu.nl
Index: library/io.nu.nl
===================================================================
RCS file: /home/mercury1/repository/mercury/library/io.nu.nl,v
retrieving revision 1.59
diff -u -r1.59 io.nu.nl
--- io.nu.nl	1998/03/27 13:33:24	1.59
+++ io.nu.nl	1998/03/29 23:58:42
@@ -567,7 +567,7 @@
 
 io__remove_file_2(FileName, Result, ResultStr) -->
 	{ use_module(library(system)) }, % for delete_file/2
-	{ name(FileAtom, OldName) },
+	{ name(FileAtom, FileName) },
 	{ delete_file(FileAtom, []) ->
 		Result = 0
 	;
Index: library/store.nu.nl
===================================================================
RCS file: /home/mercury1/repository/mercury/library/store.nu.nl,v
retrieving revision 1.1
diff -u -r1.1 store.nu.nl
--- store.nu.nl	1997/09/26 15:01:18	1.1
+++ store.nu.nl	1998/03/30 05:07:24
@@ -25,7 +25,7 @@
 	{ get_mutable(MutVar, Val) }. 
 
 store__set_mutvar(MutVar, Val) -->
-	{ put_mutable(MutVar, Val) }. 
+	{ update_mutable(MutVar, Val) }. 
 
 %-----------------------------------------------------------------------------%
 
@@ -36,7 +36,7 @@
 
 get_mutable(mutable(Val), Val).
 
-put_mutable(Ref, NewVal) :-
+update_mutable(Ref, NewVal) :-
 	setarg(Ref, 1, NewVal).
 
 %-----------------------------------------------------------------------------%

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