[m-rev.] For review: pretty print c_pointers as addresses

Mark Brown mark at csse.unimelb.edu.au
Tue Aug 22 12:32:31 AEST 2006


On 14-Aug-2006, Ralph Becket <rafe at csse.unimelb.edu.au> wrote:
> Branches: main
> Estimated hours taken: 0.2
> 
> library/pprint.m:
> 	Pretty print c_pointers as "<<0xADDRESS>>" rather than just
> 	"<<c_pointer>>".  This allows us to distinguish between different
> 	C pointers.

Here's an alternative, discussed in person.

Cheers,
Mark.

Estimated hours taken: 2
Branches: main

runtime/mercury_ml_expand_body.h:
	Construct strings representing c_pointer addresses.  Used in the
	implementation of functor and deconstruct.

library/deconstruct.m:
	Document the behaviour of functor and deconstruct for c_pointers.

library/string.m:
	Export c_pointer_to_string for getting a string representation
	of the pointer address.

library/io.m:
library/rtti_implementation.m:
	Use c_pointer_to_string/1 to print c_pointers.

	Update comments.

library/pprint.m:
	Undo Ralph's earlier change, since it is no longer required.

tests/debugger/Mmakefile:
tests/debugger/declarative/Mmakefile:
	Canonicalize the output of test cases in which c_pointers appear.

tests:
	Update the expected output of test cases.

Index: library/deconstruct.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/deconstruct.m,v
retrieving revision 1.38
diff -u -r1.38 deconstruct.m
--- library/deconstruct.m	19 Apr 2006 05:17:50 -0000	1.38
+++ library/deconstruct.m	21 Aug 2006 12:41:05 -0000
@@ -78,6 +78,8 @@
     %     predicate and function values created by lambda expressions.)
     %   - for tuples, the string {}.
     %   - for arrays, the string <<array>>.
+    %   - for c_pointers, the string ptr(0xXXXX) where XXXX is the
+    %     hexadecimal representation of the pointer.
     %
     % The arity that these predicates return is:
     %
@@ -95,6 +97,7 @@
     %     arguments hidden in the closure.
     %   - for tuples, the number of elements in the tuple.
     %   - for arrays, the number of elements in the array.
+    %   - for c_pointers, zero.
     %
     % Note that in the current University of Melbourne implementation,
     % the implementations of these predicates depart from the above
Index: library/io.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/io.m,v
retrieving revision 1.352
diff -u -r1.352 io.m
--- library/io.m	17 Aug 2006 01:36:06 -0000	1.352
+++ library/io.m	21 Aug 2006 09:40:22 -0000
@@ -374,9 +374,8 @@
     % io.print/4 implicitly specify `canonicalize' as the method for handling
     % non-canonical types. This means that for higher-order types, or types
     % with user-defined equality axioms, or types defined using the foreign
-    % language interface (i.e. c_pointer type or pragma foreign_type),
-    % the text output will only describe the type that is being printed,
-    % not the value.
+    % language interface (i.e. pragma foreign_type), the text output will
+    % only describe the type that is being printed, not the value.
     %
     % io.print_cc/3 is the same as io.print/3 except that it specifies
     % `include_details_cc' rather than `canonicalize'. This means that it will
@@ -4156,9 +4155,8 @@
 
 :- pred io.write_c_pointer(c_pointer::in, io::di, io::uo) is det.
 
-io.write_c_pointer(_C_Pointer, !IO) :-
-    % XXX What should we do here?
-    io.write_string("'<<c_pointer>>'", !IO).
+io.write_c_pointer(C_Pointer, !IO) :-
+    io.write_string(c_pointer_to_string(C_Pointer), !IO).
 
 :- pred io.write_array(array(T)::in, io::di, io::uo) is det.
 
Index: library/pprint.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/pprint.m,v
retrieving revision 1.23
diff -u -r1.23 pprint.m
--- library/pprint.m	14 Aug 2006 07:39:32 -0000	1.23
+++ library/pprint.m	21 Aug 2006 09:26:48 -0000
@@ -806,10 +806,7 @@
 
               then
 
-                ( if   Name = "<<c_pointer>>"
-                  then text(string.format("<<0x%x>>", [i(c_pointer_addr(X))]))
-                  else text(Name)
-                )
+                text(Name)
 
               else
 
@@ -821,18 +818,6 @@
             )
     ).
 
-
-% This really should be impure...
-%
-:- func c_pointer_addr(T) = int.
-
-:- pragma foreign_proc("C",
-    c_pointer_addr(X::in) = (Addr::out),
-    [promise_pure, will_not_call_mercury, will_not_modify_trail],
-"
-    Addr = (MR_Integer) X;
-").
-
 %-----------------------------------------------------------------------------%
 
     % We need to put parentheses around a subterm if its top-level
Index: library/rtti_implementation.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/rtti_implementation.m,v
retrieving revision 1.70
diff -u -r1.70 rtti_implementation.m
--- library/rtti_implementation.m	9 May 2006 05:04:50 -0000	1.70
+++ library/rtti_implementation.m	21 Aug 2006 09:59:12 -0000
@@ -1248,15 +1248,15 @@
         TypeCtorRep = void,
         error("rtti_implementation.m: cannot deconstruct void types")
     ;
-        % XXX noncanonical term
         TypeCtorRep = c_pointer,
-        Functor = "<<c_pointer>>",
+        det_dynamic_cast(Term, CPtr),
+        Functor = string.c_pointer_to_string(CPtr),
         Arity = 0,
         Arguments = []
     ;
-        % XXX noncanonical term
         TypeCtorRep = stable_c_pointer,
-        Functor = "<<stable_c_pointer>>",
+        det_dynamic_cast(Term, CPtr),
+        Functor = "stable_" ++ string.c_pointer_to_string(CPtr),
         Arity = 0,
         Arguments = []
     ;
Index: library/string.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/string.m,v
retrieving revision 1.246
diff -u -r1.246 string.m
--- library/string.m	28 Jul 2006 04:54:04 -0000	1.246
+++ library/string.m	21 Aug 2006 12:41:27 -0000
@@ -175,6 +175,12 @@
     %
 :- func string.from_float(float::in) = (string::uo) is det.
 
+    % Convert a c_pointer to a string.  The format is "c_pointer(0xXXXX)"
+    % where XXXX is the hexadecimal representation of the pointer.
+    %
+:- func string.c_pointer_to_string(c_pointer::in) = (string::uo) is det.
+:- pred string.c_pointer_to_string(c_pointer::in, string::uo) is det.
+
     % string.first_char(String, Char, Rest) is true iff Char is the first
     % character of String, and Rest is the remainder.
     %
@@ -1083,6 +1089,10 @@
         string.append(Str1, DigitString, Str)
     ).
 
+string.c_pointer_to_string(C_Pointer, Str) :-
+    private_builtin.unsafe_type_cast(C_Pointer, Int),
+    Str = "c_pointer(0x" ++ string.int_to_base_string(Int, 16) ++ ")".
+
 string.from_char_list(CharList, Str) :-
     string.to_char_list(Str, CharList).
 
@@ -3959,6 +3969,9 @@
 string.float_to_string(R) = S2 :-
     string.float_to_string(R, S2).
 
+string.c_pointer_to_string(P) = S :-
+    string.c_pointer_to_string(P, S).
+
 string.replace_all(S1, S2, S3) = S4 :-
     string.replace_all(S1, S2, S3, S4).
 
@@ -4491,10 +4504,6 @@
 
 comma_priority(_OpTable) = 1000.
 
-:- func c_pointer_to_string(c_pointer) = string.
-
-c_pointer_to_string(_C_Pointer) = "<<c_pointer>>".
-
 :- pred array_to_revstrings(deconstruct.noncanon_handling,
     ops.table, array(T), revstrings, revstrings).
 :- mode array_to_revstrings(in(do_not_allow), in, in, in, out) is det.
Index: runtime/mercury_ml_expand_body.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_ml_expand_body.h,v
retrieving revision 1.36
diff -u -r1.36 mercury_ml_expand_body.h
--- runtime/mercury_ml_expand_body.h	5 Oct 2005 06:34:20 -0000	1.36
+++ runtime/mercury_ml_expand_body.h	21 Aug 2006 12:10:01 -0000
@@ -900,26 +900,36 @@
                 ": cannot expand void types");
 
         case MR_TYPECTOR_REP_C_POINTER:
-            if (noncanon == MR_NONCANON_ABORT) {
-                /* XXX should throw an exception */
-                MR_fatal_error(MR_STRINGIFY(EXPAND_FUNCTION_NAME)
-                    ": attempt to deconstruct noncanonical term");
-                return;
+#ifdef  EXPAND_FUNCTOR_FIELD
+            {
+                MR_Word data_word;
+                char    buf[500];
+                char    *str;
+
+                data_word = *data_word_ptr;
+                sprintf(buf, "c_pointer(0x%lX)", (long) data_word);
+                MR_make_aligned_string_copy_saved_hp(str, buf);
+                expand_info->EXPAND_FUNCTOR_FIELD = str;
             }
+#endif  /* EXPAND_FUNCTOR_FIELD */
 
-            handle_functor_name("<<c_pointer>>");
             handle_zero_arity_args();
             return;
 
         case MR_TYPECTOR_REP_STABLE_C_POINTER:
-            if (noncanon == MR_NONCANON_ABORT) {
-                /* XXX should throw an exception */
-                MR_fatal_error(MR_STRINGIFY(EXPAND_FUNCTION_NAME)
-                    ": attempt to deconstruct noncanonical term");
-                return;
+#ifdef  EXPAND_FUNCTOR_FIELD
+            {
+                MR_Word data_word;
+                char    buf[500];
+                char    *str;
+
+                data_word = *data_word_ptr;
+                sprintf(buf, "stable_c_pointer(0x%lX)", (long) data_word);
+                MR_make_aligned_string_copy_saved_hp(str, buf);
+                expand_info->EXPAND_FUNCTOR_FIELD = str;
             }
+#endif  /* EXPAND_FUNCTOR_FIELD */
 
-            handle_functor_name("<<stable_c_pointer>>");
             handle_zero_arity_args();
             return;
 
Index: tests/debugger/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/Mmakefile,v
retrieving revision 1.124
diff -u -r1.124 Mmakefile
--- tests/debugger/Mmakefile	13 Jun 2006 09:49:01 -0000	1.124
+++ tests/debugger/Mmakefile	21 Aug 2006 12:35:56 -0000
@@ -354,7 +354,8 @@
 	$(MDB_STD) ./existential_type_classes < existential_type_classes.inp \
 		2>&1 | sed 's/string.m:[0-9]*/string.m:NNNN/g' | \
 		sed 's/int.m:[0-9]*/int.m:NNNN/g' | \
-		sed 's/existential_type_classes.m:[0-9]*/existential_type_classes.m:NNNN/g' \
+		sed 's/existential_type_classes.m:[0-9]*/existential_type_classes.m:NNNN/g' | \
+		sed 's/c_pointer(0x[0-9A-Fa-f]*)/c_pointer(0xXXXX)/g' \
 		> existential_type_classes.out
 
 exported_eqv_type.out: exported_eqv_type exported_eqv_type.inp
@@ -374,7 +375,9 @@
 		> implied_instance.out 2>&1
 
 io_tab_goto.out: io_tab_goto io_tab_goto.inp
-	$(MDB_STD) ./io_tab_goto < io_tab_goto.inp > io_tab_goto.out 2>&1
+	$(MDB_STD) ./io_tab_goto < io_tab_goto.inp 2>&1 | \
+		sed 's/c_pointer(0x[0-9A-Fa-f]*)/c_pointer(0xXXXX)/g' \
+		> io_tab_goto.out 2>&1
 
 lambda_expr.out: lambda_expr lambda_expr.inp
 	$(MDB_STD) ./lambda_expr < lambda_expr.inp > lambda_expr.out 2>&1
@@ -486,7 +489,9 @@
 	$(MDB_STD) ./solver_test < solver_test.inp > solver_test.out 2>&1
 
 tabled_read.out: tabled_read tabled_read.inp tabled_read.data
-	$(MDB_STD) ./tabled_read < tabled_read.inp > tabled_read.out 2>&1
+	$(MDB_STD) ./tabled_read < tabled_read.inp 2>&1 | \
+		sed 's/c_pointer(0x[0-9A-Fa-f]*)/c_pointer(0xXXXX)/g' \
+		> tabled_read.out 2>&1
 
 tabled_read_unitize.out: tabled_read_unitize.data
 
@@ -495,7 +500,8 @@
 		> tabled_read_unitize.out 2>&1
 
 tabled_read_decl.out: tabled_read_decl tabled_read_decl.inp tabled_read_decl.data
-	$(MDB_STD) ./tabled_read_decl < tabled_read_decl.inp \
+	$(MDB_STD) ./tabled_read_decl < tabled_read_decl.inp 2>&1 | \
+		sed 's/c_pointer(0x[0-9A-Fa-f]*)/c_pointer(0xXXXX)/g' \
 		> tabled_read_decl.out 2>&1
 
 term_size_cells.out: term_size_cells term_size_cells.inp
Index: tests/debugger/existential_type_classes.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/existential_type_classes.exp,v
retrieving revision 1.17
diff -u -r1.17 existential_type_classes.exp
--- tests/debugger/existential_type_classes.exp	20 Oct 2005 03:58:02 -0000	1.17
+++ tests/debugger/existential_type_classes.exp	21 Aug 2006 12:05:14 -0000
@@ -183,12 +183,12 @@
      E54:    C28 CALL existential_type_classes.m:NNNN (from existential_type_classes.m:NNNN)
                          func existential_type_classes.call_my_univ_value/1-0 (det)
 mdb> P
-       Univ (arg 1)           	my_univ('<<c_pointer>>')
+       Univ (arg 1)           	my_univ(c_pointer(0xXXXX))
 mdb> 
      E55:    C29 CALL existential_type_classes.m:NNNN (from existential_type_classes.m:NNNN)
                          func existential_type_classes.my_univ_value/1-0 (det)
 mdb> P
-       HeadVar__1             	my_univ('<<c_pointer>>')
+       HeadVar__1             	my_univ(c_pointer(0xXXXX))
 mdb> continue -a
      E56:    C29 EXIT existential_type_classes.m:NNNN (from existential_type_classes.m:NNNN)
                          func existential_type_classes.my_univ_value/1-0 (det)
Index: tests/debugger/existential_type_classes.exp2
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/existential_type_classes.exp2,v
retrieving revision 1.17
diff -u -r1.17 existential_type_classes.exp2
--- tests/debugger/existential_type_classes.exp2	20 Oct 2005 03:58:03 -0000	1.17
+++ tests/debugger/existential_type_classes.exp2	21 Aug 2006 12:06:08 -0000
@@ -203,12 +203,12 @@
      E64:    C33 CALL existential_type_classes.m:NNNN (from existential_type_classes.m:NNNN)
                          func existential_type_classes.call_my_univ_value/1-0 (det)
 mdb> P
-       Univ (arg 1)           	my_univ('<<c_pointer>>')
+       Univ (arg 1)           	my_univ(c_pointer(0xXXXX))
 mdb> 
      E65:    C34 CALL existential_type_classes.m:NNNN (from existential_type_classes.m:NNNN)
                          func existential_type_classes.my_univ_value/1-0 (det)
 mdb> P
-       HeadVar__1             	my_univ('<<c_pointer>>')
+       HeadVar__1             	my_univ(c_pointer(0xXXXX))
 mdb> continue -a
      E66:    C34 EXIT existential_type_classes.m:NNNN (from existential_type_classes.m:NNNN)
                          func existential_type_classes.my_univ_value/1-0 (det)
Index: tests/debugger/io_tab_goto.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/io_tab_goto.exp,v
retrieving revision 1.2
diff -u -r1.2 io_tab_goto.exp
--- tests/debugger/io_tab_goto.exp	28 Sep 2005 12:20:02 -0000	1.2
+++ tests/debugger/io_tab_goto.exp	21 Aug 2006 12:36:16 -0000
@@ -17,18 +17,18 @@
 mdb> finish -n
       E3:     C2 EXIT pred io_tab_goto.test/5-0 (det)
 mdb> print *
-       Stream (arg 1)         	'<<c_pointer>>'
+       Stream (arg 1)         	c_pointer(0xXXXX)
        SoFar (arg 2)          	0
        N (arg 3)              	123
 mdb> retry -o -a
       E2:     C2 CALL pred io_tab_goto.test/5-0 (det)
 mdb> print *
-       Stream (arg 1)         	'<<c_pointer>>'
+       Stream (arg 1)         	c_pointer(0xXXXX)
        SoFar (arg 2)          	0
 mdb> finish -n
       E3:     C2 EXIT pred io_tab_goto.test/5-0 (det)
 mdb> print *
-       Stream (arg 1)         	'<<c_pointer>>'
+       Stream (arg 1)         	c_pointer(0xXXXX)
        SoFar (arg 2)          	0
        N (arg 3)              	123
 mdb> table_io end
@@ -40,7 +40,7 @@
 mdb> finish -n
       E5:     C3 EXIT pred io_tab_goto.test/5-0 (det)
 mdb> print *
-       Stream (arg 1)         	'<<c_pointer>>'
+       Stream (arg 1)         	c_pointer(0xXXXX)
        SoFar (arg 2)          	0
        N (arg 3)              	789
 mdb> retry -f
@@ -48,7 +48,7 @@
 mdb> finish -n
       E6:     C3 EXIT pred io_tab_goto.test/5-0 (det)
 mdb> print *
-       Stream (arg 1)         	'<<c_pointer>>'
+       Stream (arg 1)         	c_pointer(0xXXXX)
        SoFar (arg 2)          	0
        N (arg 3)              	42
 mdb> continue -S
Index: tests/debugger/tabled_read.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/tabled_read.exp,v
retrieving revision 1.10
diff -u -r1.10 tabled_read.exp
--- tests/debugger/tabled_read.exp	19 Nov 2004 05:46:17 -0000	1.10
+++ tests/debugger/tabled_read.exp	21 Aug 2006 12:34:39 -0000
@@ -16,18 +16,18 @@
 mdb> finish -n
       E3:     C2 EXIT pred tabled_read.test/5-0 (det)
 mdb> print *
-       Stream (arg 1)         	'<<c_pointer>>'
+       Stream (arg 1)         	c_pointer(0xXXXX)
        SoFar (arg 2)          	0
        N (arg 3)              	123
 mdb> retry -o -a
       E2:     C2 CALL pred tabled_read.test/5-0 (det)
 mdb> print *
-       Stream (arg 1)         	'<<c_pointer>>'
+       Stream (arg 1)         	c_pointer(0xXXXX)
        SoFar (arg 2)          	0
 mdb> finish -n
       E3:     C2 EXIT pred tabled_read.test/5-0 (det)
 mdb> print *
-       Stream (arg 1)         	'<<c_pointer>>'
+       Stream (arg 1)         	c_pointer(0xXXXX)
        SoFar (arg 2)          	0
        N (arg 3)              	123
 mdb> table_io end
@@ -39,7 +39,7 @@
 mdb> finish -n
       E5:     C3 EXIT pred tabled_read.test/5-0 (det)
 mdb> print *
-       Stream (arg 1)         	'<<c_pointer>>'
+       Stream (arg 1)         	c_pointer(0xXXXX)
        SoFar (arg 2)          	0
        N (arg 3)              	789
 mdb> retry -f
@@ -47,7 +47,7 @@
 mdb> finish -n
       E6:     C3 EXIT pred tabled_read.test/5-0 (det)
 mdb> print *
-       Stream (arg 1)         	'<<c_pointer>>'
+       Stream (arg 1)         	c_pointer(0xXXXX)
        SoFar (arg 2)          	0
        N (arg 3)              	42
 mdb> continue -S
Index: tests/debugger/tabled_read.exp2
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/tabled_read.exp2,v
retrieving revision 1.4
diff -u -r1.4 tabled_read.exp2
--- tests/debugger/tabled_read.exp2	17 Jan 2003 05:56:57 -0000	1.4
+++ tests/debugger/tabled_read.exp2	21 Aug 2006 12:35:02 -0000
@@ -15,25 +15,25 @@
 mdb> finish -n
       57:      4  3 EXIT pred tabled_read.test/5-0 (det)
 mdb> print *
-       Stream (arg 1)         	'<<c_pointer>>'
+       Stream (arg 1)         	c_pointer(0xXXXX)
        SoFar (arg 2)          	0
        N (arg 3)              	123
-       DCG_2 (arg 5)          	state('<<c_pointer>>')
+       DCG_2 (arg 5)          	state(c_pointer(0xXXXX))
 mdb> retry
 Retry across I/O operations is not always safe.
 Are you sure you want to do it? y
        8:      4  3 CALL pred tabled_read.test/5-0 (det)
 mdb> print *
-       Stream (arg 1)         	'<<c_pointer>>'
+       Stream (arg 1)         	c_pointer(0xXXXX)
        SoFar (arg 2)          	0
-       DCG_0 (arg 4)          	state('<<c_pointer>>')
+       DCG_0 (arg 4)          	state(c_pointer(0xXXXX))
 mdb> finish -n
       57:      4  3 EXIT pred tabled_read.test/5-0 (det)
 mdb> print *
-       Stream (arg 1)         	'<<c_pointer>>'
+       Stream (arg 1)         	c_pointer(0xXXXX)
        SoFar (arg 2)          	0
        N (arg 3)              	123
-       DCG_2 (arg 5)          	state('<<c_pointer>>')
+       DCG_2 (arg 5)          	state(c_pointer(0xXXXX))
 mdb> table_io end
 io tabling ended
 mdb> continue
@@ -43,10 +43,10 @@
 mdb> finish -n
      155:     45  3 EXIT pred tabled_read.test/5-0 (det)
 mdb> print *
-       Stream (arg 1)         	'<<c_pointer>>'
+       Stream (arg 1)         	c_pointer(0xXXXX)
        SoFar (arg 2)          	0
        N (arg 3)              	789
-       DCG_2 (arg 5)          	state('<<c_pointer>>')
+       DCG_2 (arg 5)          	state(c_pointer(0xXXXX))
 mdb> retry
 Retry across I/O operations is not always safe.
 Are you sure you want to do it? y
@@ -54,9 +54,9 @@
 mdb> finish -n
      143:     45  3 EXIT pred tabled_read.test/5-0 (det)
 mdb> print *
-       Stream (arg 1)         	'<<c_pointer>>'
+       Stream (arg 1)         	c_pointer(0xXXXX)
        SoFar (arg 2)          	0
        N (arg 3)              	42
-       DCG_2 (arg 5)          	state('<<c_pointer>>')
+       DCG_2 (arg 5)          	state(c_pointer(0xXXXX))
 mdb> continue -S
 42
Index: tests/debugger/tabled_read_decl.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/tabled_read_decl.exp,v
retrieving revision 1.11
diff -u -r1.11 tabled_read_decl.exp
--- tests/debugger/tabled_read_decl.exp	19 Nov 2004 05:46:17 -0000	1.11
+++ tests/debugger/tabled_read_decl.exp	21 Aug 2006 12:31:56 -0000
@@ -16,18 +16,18 @@
 mdb> finish -n
       E3:     C2 EXIT pred tabled_read_decl.test/5-0 (det)
 mdb> print *
-       Stream (arg 1)         	'<<c_pointer>>'
+       Stream (arg 1)         	c_pointer(0xXXXX)
        SoFar (arg 2)          	0
        N (arg 3)              	123
 mdb> retry -o -a
       E2:     C2 CALL pred tabled_read_decl.test/5-0 (det)
 mdb> print *
-       Stream (arg 1)         	'<<c_pointer>>'
+       Stream (arg 1)         	c_pointer(0xXXXX)
        SoFar (arg 2)          	0
 mdb> finish -n
       E3:     C2 EXIT pred tabled_read_decl.test/5-0 (det)
 mdb> print *
-       Stream (arg 1)         	'<<c_pointer>>'
+       Stream (arg 1)         	c_pointer(0xXXXX)
        SoFar (arg 2)          	0
        N (arg 3)              	123
 mdb> break tabled_read_decl__poly_test
@@ -38,7 +38,7 @@
 mdb> finish -n
       E5:     C3 EXIT pred tabled_read_decl.poly_test/6-0 (det)
 mdb> print *
-       Stream (arg 1)         	'<<c_pointer>>'
+       Stream (arg 1)         	c_pointer(0xXXXX)
        Unused (arg 2)         	['a', 'b', 'c']
        SoFar (arg 3)          	0
        N (arg 4)              	456
@@ -47,7 +47,7 @@
 mdb> finish -n
       E5:     C3 EXIT pred tabled_read_decl.poly_test/6-0 (det)
 mdb> print *
-       Stream (arg 1)         	'<<c_pointer>>'
+       Stream (arg 1)         	c_pointer(0xXXXX)
        Unused (arg 2)         	['a', 'b', 'c']
        SoFar (arg 3)          	0
        N (arg 4)              	456
@@ -62,30 +62,30 @@
 mdb> table_io end
 I/O tabling stopped.
 mdb> print action 0
-open_input("tabled_read_decl.data", 0, '<<c_pointer>>')
+open_input("tabled_read_decl.data", 0, c_pointer(0xXXXX))
 mdb> print action 1
-read_char_code('<<c_pointer>>', 49)
+read_char_code(c_pointer(0xXXXX), 49)
 mdb> browse action 1
 browser> p
-read_char_code('<<c_pointer>>', 49)
+read_char_code(c_pointer(0xXXXX), 49)
 browser> ^1
 browser> p
-'<<c_pointer>>'
+c_pointer(0xXXXX)
 browser> quit
 mdb> print action 2
-read_char_code('<<c_pointer>>', 50)
+read_char_code(c_pointer(0xXXXX), 50)
 mdb> print action 3
-read_char_code('<<c_pointer>>', 51)
+read_char_code(c_pointer(0xXXXX), 51)
 mdb> print action 4
-read_char_code('<<c_pointer>>', 10)
+read_char_code(c_pointer(0xXXXX), 10)
 mdb> print action 5
-poly_read_char_code(list(character), <<c_pointer>>, ['a', 'b', 'c'], 52)
+poly_read_char_code(list(character), c_pointer(0xXXXX), ['a', 'b', 'c'], 52)
 mdb> print action 6
-poly_read_char_code(list(character), <<c_pointer>>, ['a', 'b', 'c'], 53)
+poly_read_char_code(list(character), c_pointer(0xXXXX), ['a', 'b', 'c'], 53)
 mdb> print action 7
-poly_read_char_code(list(character), <<c_pointer>>, ['a', 'b', 'c'], 54)
+poly_read_char_code(list(character), c_pointer(0xXXXX), ['a', 'b', 'c'], 54)
 mdb> print action 8
-poly_read_char_code(list(character), <<c_pointer>>, ['a', 'b', 'c'], 10)
+poly_read_char_code(list(character), c_pointer(0xXXXX), ['a', 'b', 'c'], 10)
 mdb> print action 9
 mdb: I/O action number not in range.
 mdb> continue -S
Index: tests/debugger/tabled_read_decl.exp2
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/tabled_read_decl.exp2,v
retrieving revision 1.4
diff -u -r1.4 tabled_read_decl.exp2
--- tests/debugger/tabled_read_decl.exp2	17 Jan 2003 05:56:57 -0000	1.4
+++ tests/debugger/tabled_read_decl.exp2	21 Aug 2006 12:33:28 -0000
@@ -15,25 +15,25 @@
 mdb> finish -n
       57:      4  3 EXIT pred tabled_read_decl.test/5-0 (det)
 mdb> print *
-       Stream (arg 1)         	'<<c_pointer>>'
+       Stream (arg 1)         	c_pointer(0xXXXX)
        SoFar (arg 2)          	0
        N (arg 3)              	123
-       DCG_2 (arg 5)          	state('<<c_pointer>>')
+       DCG_2 (arg 5)          	state(c_pointer(0xXXXX))
 mdb> retry
 Retry across I/O operations is not always safe.
 Are you sure you want to do it? y
        8:      4  3 CALL pred tabled_read_decl.test/5-0 (det)
 mdb> print *
-       Stream (arg 1)         	'<<c_pointer>>'
+       Stream (arg 1)         	c_pointer(0xXXXX)
        SoFar (arg 2)          	0
-       DCG_0 (arg 4)          	state('<<c_pointer>>')
+       DCG_0 (arg 4)          	state(c_pointer(0xXXXX))
 mdb> finish -n
       57:      4  3 EXIT pred tabled_read_decl.test/5-0 (det)
 mdb> print *
-       Stream (arg 1)         	'<<c_pointer>>'
+       Stream (arg 1)         	c_pointer(0xXXXX)
        SoFar (arg 2)          	0
        N (arg 3)              	123
-       DCG_2 (arg 5)          	state('<<c_pointer>>')
+       DCG_2 (arg 5)          	state(c_pointer(0xXXXX))
 mdb> break tabled_read_decl__poly_test
  1: + stop  interface pred tabled_read_decl.poly_test/6-0 (det)
 mdb> continue
@@ -42,11 +42,11 @@
 mdb> finish -n
      109:     24  3 EXIT pred tabled_read_decl.poly_test/6-0 (det)
 mdb> print *
-       Stream (arg 1)         	'<<c_pointer>>'
+       Stream (arg 1)         	c_pointer(0xXXXX)
        Unused (arg 2)         	['a', 'b', 'c']
        SoFar (arg 3)          	0
        N (arg 4)              	456
-       DCG_2 (arg 6)          	state('<<c_pointer>>')
+       DCG_2 (arg 6)          	state(c_pointer(0xXXXX))
 mdb> retry
 Retry across I/O operations is not always safe.
 Are you sure you want to do it? y
@@ -54,11 +54,11 @@
 mdb> finish -n
      109:     24  3 EXIT pred tabled_read_decl.poly_test/6-0 (det)
 mdb> print *
-       Stream (arg 1)         	'<<c_pointer>>'
+       Stream (arg 1)         	c_pointer(0xXXXX)
        Unused (arg 2)         	['a', 'b', 'c']
        SoFar (arg 3)          	0
        N (arg 4)              	456
-       DCG_2 (arg 6)          	state('<<c_pointer>>')
+       DCG_2 (arg 6)          	state(c_pointer(0xXXXX))
 mdb> delete *
  0: E stop  interface pred tabled_read_decl.test/5-0 (det)
  1: E stop  interface pred tabled_read_decl.poly_test/6-0 (det)
@@ -70,30 +70,30 @@
 mdb> table_io end
 io tabling ended
 mdb> print action 0
-open_input("tabled_read_decl.data", 0, '<<c_pointer>>')
+open_input("tabled_read_decl.data", 0, c_pointer(0xXXXX))
 mdb> print action 1
-read_char_code('<<c_pointer>>', 49)
+read_char_code(c_pointer(0xXXXX), 49)
 mdb> browse action 1
 browser> p
-read_char_code('<<c_pointer>>', 49)
+read_char_code(c_pointer(0xXXXX), 49)
 browser> ^1
 browser> p
-'<<c_pointer>>'
+c_pointer(0xXXXX)
 browser> quit
 mdb> print action 2
-read_char_code('<<c_pointer>>', 50)
+read_char_code(c_pointer(0xXXXX), 50)
 mdb> print action 3
-read_char_code('<<c_pointer>>', 51)
+read_char_code(c_pointer(0xXXXX), 51)
 mdb> print action 4
-read_char_code('<<c_pointer>>', 10)
+read_char_code(c_pointer(0xXXXX), 10)
 mdb> print action 5
-poly_read_char_code(list(character), <<c_pointer>>, [|]('a', [|]('b', [|]/2)), 52)
+poly_read_char_code(list(character), c_pointer(0xXXXX), [|]('a', [|]('b', [|]/2)), 52)
 mdb> print action 6
-poly_read_char_code(list(character), <<c_pointer>>, [|]('a', [|]('b', [|]/2)), 53)
+poly_read_char_code(list(character), c_pointer(0xXXXX), [|]('a', [|]('b', [|]/2)), 53)
 mdb> print action 7
-poly_read_char_code(list(character), <<c_pointer>>, [|]('a', [|]('b', [|]/2)), 54)
+poly_read_char_code(list(character), c_pointer(0xXXXX), [|]('a', [|]('b', [|]/2)), 54)
 mdb> print action 8
-poly_read_char_code(list(character), <<c_pointer>>, [|]('a', [|]('b', [|]/2)), 10)
+poly_read_char_code(list(character), c_pointer(0xXXXX), [|]('a', [|]('b', [|]/2)), 10)
 mdb> print action 9
 mdb: I/O action number not in range.
 mdb> continue -S
Index: tests/debugger/declarative/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/declarative/Mmakefile,v
retrieving revision 1.94
diff -u -r1.94 Mmakefile
--- tests/debugger/declarative/Mmakefile	27 Jun 2006 04:09:01 -0000	1.94
+++ tests/debugger/declarative/Mmakefile	21 Aug 2006 12:02:59 -0000
@@ -520,12 +520,14 @@
 	|| { grep . $@ /dev/null; exit 1; }
 
 tabled_read_decl.out: tabled_read_decl tabled_read_decl.inp
-	$(MDB_STD) ./tabled_read_decl < tabled_read_decl.inp \
+	$(MDB_STD) ./tabled_read_decl < tabled_read_decl.inp 2>&1 | \
+		sed 's/c_pointer(0x[0-9A-Fa-f]*)/c_pointer(0xXXXX)/g' \
 		> tabled_read_decl.out 2>&1 \
 	|| { grep . $@ /dev/null; exit 1; }
 
 tabled_read_decl_goto.out: tabled_read_decl_goto tabled_read_decl_goto.inp
-	$(MDB_STD) ./tabled_read_decl_goto < tabled_read_decl_goto.inp \
+	$(MDB_STD) ./tabled_read_decl_goto < tabled_read_decl_goto.inp 2>&1 | \
+		sed 's/c_pointer(0x[0-9A-Fa-f]*)/c_pointer(0xXXXX)/g' \
 		> tabled_read_decl_goto.out 2>&1 \
 	|| { grep . $@ /dev/null; exit 1; }
 
Index: tests/debugger/declarative/tabled_read_decl.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/declarative/tabled_read_decl.exp,v
retrieving revision 1.16
diff -u -r1.16 tabled_read_decl.exp
--- tests/debugger/declarative/tabled_read_decl.exp	4 Apr 2006 07:37:24 -0000	1.16
+++ tests/debugger/declarative/tabled_read_decl.exp	21 Aug 2006 12:37:20 -0000
@@ -14,52 +14,52 @@
 mdb> finish -n
       E3:     C2 EXIT pred tabled_read_decl.test/4-0 (det)
 mdb> print
-test('<<c_pointer>>', 1123, _, _)
+test(c_pointer(0xXXXX), 1123, _, _)
 mdb> dd -d 3 -n 7 -a
-test('<<c_pointer>>', 1123, _, _)
+test(c_pointer(0xXXXX), 1123, _, _)
 4 tabled IO actions:
-read_char_code('<<c_pointer>>', 49)
-read_char_code('<<c_pointer>>', 50)
-read_char_code('<<c_pointer>>', 51)
-read_char_code('<<c_pointer>>', 10)
+read_char_code(c_pointer(0xXXXX), 49)
+read_char_code(c_pointer(0xXXXX), 50)
+read_char_code(c_pointer(0xXXXX), 51)
+read_char_code(c_pointer(0xXXXX), 10)
 Valid? print 1-2
-'<<c_pointer>>'
+c_pointer(0xXXXX)
 1123
 dd> p io 1-2
-read_char_code('<<c_pointer>>', 49)
-read_char_code('<<c_pointer>>', 50)
+read_char_code(c_pointer(0xXXXX), 49)
+read_char_code(c_pointer(0xXXXX), 50)
 dd> print io 2-1
-read_char_code('<<c_pointer>>', 49)
-read_char_code('<<c_pointer>>', 50)
+read_char_code(c_pointer(0xXXXX), 49)
+read_char_code(c_pointer(0xXXXX), 50)
 dd> browse io 4
 browser> print
-read_char_code('<<c_pointer>>', 10)
+read_char_code(c_pointer(0xXXXX), 10)
 browser> num_io_actions 3
 browser> quit
 dd> browse 1
 browser> num_io_actions 10
 browser> quit
 dd> no
-test_2('<<c_pointer>>', 1, 1123, _, _)
+test_2(c_pointer(0xXXXX), 1, 1123, _, _)
 4 tabled IO actions:
-read_char_code('<<c_pointer>>', 49)
-read_char_code('<<c_pointer>>', 50)
-read_char_code('<<c_pointer>>', 51)
-read_char_code('<<c_pointer>>', 10)
+read_char_code(c_pointer(0xXXXX), 49)
+read_char_code(c_pointer(0xXXXX), 50)
+read_char_code(c_pointer(0xXXXX), 51)
+read_char_code(c_pointer(0xXXXX), 10)
 Valid? yes
 Found incorrect contour:
-test_2('<<c_pointer>>', 1, 1123, _, _)
+test_2(c_pointer(0xXXXX), 1, 1123, _, _)
 4 tabled IO actions:
-read_char_code('<<c_pointer>>', 49)
-read_char_code('<<c_pointer>>', 50)
-read_char_code('<<c_pointer>>', 51)
-read_char_code('<<c_pointer>>', 10)
-test('<<c_pointer>>', 1123, _, _)
-4 tabled IO actions:
-read_char_code('<<c_pointer>>', 49)
-read_char_code('<<c_pointer>>', 50)
-read_char_code('<<c_pointer>>', 51)
-read_char_code('<<c_pointer>>', 10)
+read_char_code(c_pointer(0xXXXX), 49)
+read_char_code(c_pointer(0xXXXX), 50)
+read_char_code(c_pointer(0xXXXX), 51)
+read_char_code(c_pointer(0xXXXX), 10)
+test(c_pointer(0xXXXX), 1123, _, _)
+4 tabled IO actions:
+read_char_code(c_pointer(0xXXXX), 49)
+read_char_code(c_pointer(0xXXXX), 50)
+read_char_code(c_pointer(0xXXXX), 51)
+read_char_code(c_pointer(0xXXXX), 10)
 Is this a bug? yes
       E3:     C2 EXIT pred tabled_read_decl.test/4-0 (det)
 mdb> break tabled_read_decl.part_2
@@ -79,20 +79,20 @@
 mdb> f
       E6:     C4 EXIT pred tabled_read_decl.test/4-0 (det)
 mdb> dd -d 3 -n 7 -ad1
-test('<<c_pointer>>', 1789, _, _)
+test(c_pointer(0xXXXX), 1789, _, _)
 4 tabled IO actions:
-read_char_code('<<c_pointer>>', 55)
-read_char_code('<<c_pointer>>', 56)
-read_char_code('<<c_pointer>>', 57)
-read_char_code('<<c_pointer>>', 10)
+read_char_code(c_pointer(0xXXXX), 55)
+read_char_code(c_pointer(0xXXXX), 56)
+read_char_code(c_pointer(0xXXXX), 57)
+read_char_code(c_pointer(0xXXXX), 10)
 Valid? y
 1789
-part_2('<<c_pointer>>', _, _)
+part_2(c_pointer(0xXXXX), _, _)
 5 tabled IO actions:
-read_char_code('<<c_pointer>>', 55)
-read_char_code('<<c_pointer>>', 56)
-read_char_code('<<c_pointer>>', 57)
-read_char_code('<<c_pointer>>', 10)
+read_char_code(c_pointer(0xXXXX), 55)
+read_char_code(c_pointer(0xXXXX), 56)
+read_char_code(c_pointer(0xXXXX), 57)
+read_char_code(c_pointer(0xXXXX), 10)
 write_int(1789)
 Valid? n
 write_int(1789, _, _)
@@ -100,21 +100,21 @@
 write_int(1789)
 Valid? y
 Found incorrect contour:
-test('<<c_pointer>>', 1789, _, _)
+test(c_pointer(0xXXXX), 1789, _, _)
 4 tabled IO actions:
-read_char_code('<<c_pointer>>', 55)
-read_char_code('<<c_pointer>>', 56)
-read_char_code('<<c_pointer>>', 57)
-read_char_code('<<c_pointer>>', 10)
+read_char_code(c_pointer(0xXXXX), 55)
+read_char_code(c_pointer(0xXXXX), 56)
+read_char_code(c_pointer(0xXXXX), 57)
+read_char_code(c_pointer(0xXXXX), 10)
 write_int(1789, _, _)
 1 tabled IO action:
 write_int(1789)
-part_2('<<c_pointer>>', _, _)
+part_2(c_pointer(0xXXXX), _, _)
 5 tabled IO actions:
-read_char_code('<<c_pointer>>', 55)
-read_char_code('<<c_pointer>>', 56)
-read_char_code('<<c_pointer>>', 57)
-read_char_code('<<c_pointer>>', 10)
+read_char_code(c_pointer(0xXXXX), 55)
+read_char_code(c_pointer(0xXXXX), 56)
+read_char_code(c_pointer(0xXXXX), 57)
+read_char_code(c_pointer(0xXXXX), 10)
 write_int(1789)
 Is this a bug? y
       E7:     C3 EXIT pred tabled_read_decl.part_2/3-0 (det)
Index: tests/debugger/declarative/tabled_read_decl_goto.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/declarative/tabled_read_decl_goto.exp,v
retrieving revision 1.2
diff -u -r1.2 tabled_read_decl_goto.exp
--- tests/debugger/declarative/tabled_read_decl_goto.exp	4 Apr 2006 07:37:24 -0000	1.2
+++ tests/debugger/declarative/tabled_read_decl_goto.exp	21 Aug 2006 12:37:43 -0000
@@ -14,52 +14,52 @@
 mdb> finish -n
       E3:     C2 EXIT pred tabled_read_decl_goto.test/4-0 (det)
 mdb> print
-test('<<c_pointer>>', 1123, _, _)
+test(c_pointer(0xXXXX), 1123, _, _)
 mdb> dd -d 3 -n 7 -a
-test('<<c_pointer>>', 1123, _, _)
+test(c_pointer(0xXXXX), 1123, _, _)
 4 tabled IO actions:
-read_char_code('<<c_pointer>>', 49)
-read_char_code('<<c_pointer>>', 50)
-read_char_code('<<c_pointer>>', 51)
-read_char_code('<<c_pointer>>', 10)
+read_char_code(c_pointer(0xXXXX), 49)
+read_char_code(c_pointer(0xXXXX), 50)
+read_char_code(c_pointer(0xXXXX), 51)
+read_char_code(c_pointer(0xXXXX), 10)
 Valid? print 1-2
-'<<c_pointer>>'
+c_pointer(0xXXXX)
 1123
 dd> p io 1-2
-read_char_code('<<c_pointer>>', 49)
-read_char_code('<<c_pointer>>', 50)
+read_char_code(c_pointer(0xXXXX), 49)
+read_char_code(c_pointer(0xXXXX), 50)
 dd> print io 2-1
-read_char_code('<<c_pointer>>', 49)
-read_char_code('<<c_pointer>>', 50)
+read_char_code(c_pointer(0xXXXX), 49)
+read_char_code(c_pointer(0xXXXX), 50)
 dd> browse io 4
 browser> print
-read_char_code('<<c_pointer>>', 10)
+read_char_code(c_pointer(0xXXXX), 10)
 browser> num_io_actions 3
 browser> quit
 dd> browse 1
 browser> num_io_actions 10
 browser> quit
 dd> no
-test_2('<<c_pointer>>', 1, 1123, _, _)
+test_2(c_pointer(0xXXXX), 1, 1123, _, _)
 4 tabled IO actions:
-read_char_code('<<c_pointer>>', 49)
-read_char_code('<<c_pointer>>', 50)
-read_char_code('<<c_pointer>>', 51)
-read_char_code('<<c_pointer>>', 10)
+read_char_code(c_pointer(0xXXXX), 49)
+read_char_code(c_pointer(0xXXXX), 50)
+read_char_code(c_pointer(0xXXXX), 51)
+read_char_code(c_pointer(0xXXXX), 10)
 Valid? yes
 Found incorrect contour:
-test_2('<<c_pointer>>', 1, 1123, _, _)
+test_2(c_pointer(0xXXXX), 1, 1123, _, _)
 4 tabled IO actions:
-read_char_code('<<c_pointer>>', 49)
-read_char_code('<<c_pointer>>', 50)
-read_char_code('<<c_pointer>>', 51)
-read_char_code('<<c_pointer>>', 10)
-test('<<c_pointer>>', 1123, _, _)
-4 tabled IO actions:
-read_char_code('<<c_pointer>>', 49)
-read_char_code('<<c_pointer>>', 50)
-read_char_code('<<c_pointer>>', 51)
-read_char_code('<<c_pointer>>', 10)
+read_char_code(c_pointer(0xXXXX), 49)
+read_char_code(c_pointer(0xXXXX), 50)
+read_char_code(c_pointer(0xXXXX), 51)
+read_char_code(c_pointer(0xXXXX), 10)
+test(c_pointer(0xXXXX), 1123, _, _)
+4 tabled IO actions:
+read_char_code(c_pointer(0xXXXX), 49)
+read_char_code(c_pointer(0xXXXX), 50)
+read_char_code(c_pointer(0xXXXX), 51)
+read_char_code(c_pointer(0xXXXX), 10)
 Is this a bug? yes
       E3:     C2 EXIT pred tabled_read_decl_goto.test/4-0 (det)
 mdb> break tabled_read_decl_goto.part_2
@@ -79,20 +79,20 @@
 mdb> f
       E6:     C4 EXIT pred tabled_read_decl_goto.test/4-0 (det)
 mdb> dd -d 3 -n 7 -ad1
-test('<<c_pointer>>', 1789, _, _)
+test(c_pointer(0xXXXX), 1789, _, _)
 4 tabled IO actions:
-read_char_code('<<c_pointer>>', 55)
-read_char_code('<<c_pointer>>', 56)
-read_char_code('<<c_pointer>>', 57)
-read_char_code('<<c_pointer>>', 10)
+read_char_code(c_pointer(0xXXXX), 55)
+read_char_code(c_pointer(0xXXXX), 56)
+read_char_code(c_pointer(0xXXXX), 57)
+read_char_code(c_pointer(0xXXXX), 10)
 Valid? y
 1789
-part_2('<<c_pointer>>', _, _)
+part_2(c_pointer(0xXXXX), _, _)
 5 tabled IO actions:
-read_char_code('<<c_pointer>>', 55)
-read_char_code('<<c_pointer>>', 56)
-read_char_code('<<c_pointer>>', 57)
-read_char_code('<<c_pointer>>', 10)
+read_char_code(c_pointer(0xXXXX), 55)
+read_char_code(c_pointer(0xXXXX), 56)
+read_char_code(c_pointer(0xXXXX), 57)
+read_char_code(c_pointer(0xXXXX), 10)
 write_int(1789)
 Valid? n
 write_int(1789, _, _)
@@ -100,21 +100,21 @@
 write_int(1789)
 Valid? y
 Found incorrect contour:
-test('<<c_pointer>>', 1789, _, _)
+test(c_pointer(0xXXXX), 1789, _, _)
 4 tabled IO actions:
-read_char_code('<<c_pointer>>', 55)
-read_char_code('<<c_pointer>>', 56)
-read_char_code('<<c_pointer>>', 57)
-read_char_code('<<c_pointer>>', 10)
+read_char_code(c_pointer(0xXXXX), 55)
+read_char_code(c_pointer(0xXXXX), 56)
+read_char_code(c_pointer(0xXXXX), 57)
+read_char_code(c_pointer(0xXXXX), 10)
 write_int(1789, _, _)
 1 tabled IO action:
 write_int(1789)
-part_2('<<c_pointer>>', _, _)
+part_2(c_pointer(0xXXXX), _, _)
 5 tabled IO actions:
-read_char_code('<<c_pointer>>', 55)
-read_char_code('<<c_pointer>>', 56)
-read_char_code('<<c_pointer>>', 57)
-read_char_code('<<c_pointer>>', 10)
+read_char_code(c_pointer(0xXXXX), 55)
+read_char_code(c_pointer(0xXXXX), 56)
+read_char_code(c_pointer(0xXXXX), 57)
+read_char_code(c_pointer(0xXXXX), 10)
 write_int(1789)
 Is this a bug? y
       E7:     C3 EXIT pred tabled_read_decl_goto.part_2/3-0 (det)
Index: tests/hard_coded/write_xml.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/write_xml.exp,v
retrieving revision 1.3
diff -u -r1.3 write_xml.exp
--- tests/hard_coded/write_xml.exp	15 Dec 2004 04:40:24 -0000	1.3
+++ tests/hard_coded/write_xml.exp	21 Aug 2006 13:16:02 -0000
@@ -137,7 +137,7 @@
 		<write_xml-46ftype functor="<<foreign>>" type="write_xml.ftype" arity="0" />
 	</foreign--1--write_xml-46mytype>
 	<pointer--1--write_xml-46mytype functor="pointer" type="write_xml.mytype" arity="1">
-		<c_pointer functor="<<c_pointer>>" type="c_pointer" arity="0" />
+		<c_pointer functor="c_pointer(0x0)" type="c_pointer" arity="0" />
 	</pointer--1--write_xml-46mytype>
 </Array--array-46array-40write_xml-46mytype-41>
 Result 2:
@@ -524,7 +524,7 @@
 											</foreign>
 											<List functor="[|]" type="list.list(write_xml.mytype)" arity="2">
 												<pointer functor="pointer" type="write_xml.mytype" arity="1">
-													<Unknown functor="<<c_pointer>>" type="c_pointer" arity="0" />
+													<Unknown functor="c_pointer(0x0)" type="c_pointer" arity="0" />
 												</pointer>
 												<Nil functor="[]" type="list.list(write_xml.mytype)" arity="0" />
 											</List>
Index: tests/hard_coded/write_xml.exp2
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/write_xml.exp2,v
retrieving revision 1.2
diff -u -r1.2 write_xml.exp2
--- tests/hard_coded/write_xml.exp2	15 Dec 2004 04:40:24 -0000	1.2
+++ tests/hard_coded/write_xml.exp2	21 Aug 2006 13:17:24 -0000
@@ -127,7 +127,7 @@
 		<write_xml-46ftype functor="<<foreign>>" type="write_xml.ftype" arity="0" />
 	</foreign--1--write_xml-46mytype>
 	<pointer--1--write_xml-46mytype functor="pointer" type="write_xml.mytype" arity="1">
-		<c_pointer functor="<<c_pointer>>" type="c_pointer" arity="0" />
+		<c_pointer functor="c_pointer(0x0)" type="c_pointer" arity="0" />
 	</pointer--1--write_xml-46mytype>
 </Array--array-46array-40write_xml-46mytype-41>
 Result 2:
@@ -514,7 +514,7 @@
 											</foreign>
 											<List functor="[|]" type="list.list(write_xml.mytype)" arity="2">
 												<pointer functor="pointer" type="write_xml.mytype" arity="1">
-													<Unknown functor="<<c_pointer>>" type="c_pointer" arity="0" />
+													<Unknown functor="c_pointer(0x0)" type="c_pointer" arity="0" />
 												</pointer>
 												<Nil functor="[]" type="list.list(write_xml.mytype)" arity="0" />
 											</List>
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list