Blob Blame History Raw
diff -uNrp eqp-09e.orig/ac.c eqp-09e/ac.c
--- eqp-09e.orig/ac.c	1999-04-02 10:37:56.000000000 -0700
+++ eqp-09e/ac.c	2011-12-22 16:09:13.669540652 -0700
@@ -20,9 +20,9 @@ static void p_binding(int vnum, Context_
   ti = apply(vt, vc);
   printf("[");
   print_term(stdout,vt);
-  printf(",0x%x:%d] -> [", (unsigned) vc, vc->multiplier);
+  printf(",%p:%d] -> [", vc, vc->multiplier);
   print_term(stdout,t);
-  printf(",0x%x:%d] (", (unsigned) tc, tc->multiplier);
+  printf(",%p:%d] (", tc, tc->multiplier);
   print_term(stdout,ti);
   printf(")\n");
   free_term(vt);
diff -uNrp eqp-09e.orig/btm.c eqp-09e/btm.c
--- eqp-09e.orig/btm.c	1999-04-02 10:37:57.000000000 -0700
+++ eqp-09e/btm.c	2011-12-22 16:09:13.670540075 -0700
@@ -214,10 +214,10 @@ void print_ac_mem(FILE *fp, int heading)
     if (heading)
 	fprintf(fp, "  type (bytes each)        gets      frees     in use      avail      bytes\n");
 
-    fprintf(fp, "bt_node (%4d)      %11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct bt_node), bt_node_gets, bt_node_frees, bt_node_gets - bt_node_frees, bt_node_avails, (((bt_node_gets - bt_node_frees) + bt_node_avails) * sizeof(struct bt_node)) / 1024.);
-    fprintf(fp, "ac_position (%4d)%11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct ac_position), ac_position_gets, ac_position_frees, ac_position_gets - ac_position_frees, ac_position_avails, (((ac_position_gets - ac_position_frees) + ac_position_avails) * sizeof(struct ac_position)) / 1024.);
-    fprintf(fp, "ac_match_pos (%4d)%11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct ac_match_pos), ac_match_pos_gets, ac_match_pos_frees, ac_match_pos_gets - ac_match_pos_frees, ac_match_pos_avails, (((ac_match_pos_gets - ac_match_pos_frees) + ac_match_pos_avails) * sizeof(struct ac_match_pos)) / 1024.);
-    fprintf(fp, "ac_match_free_vars_pos (%4d)\n                    %11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct ac_match_free_vars_pos), ac_match_free_vars_pos_gets, ac_match_free_vars_pos_frees, ac_match_free_vars_pos_gets - ac_match_free_vars_pos_frees, ac_match_free_vars_pos_avails, (((ac_match_free_vars_pos_gets - ac_match_free_vars_pos_frees) + ac_match_free_vars_pos_avails) * sizeof(struct ac_match_free_vars_pos)) / 1024.);
+    fprintf(fp, "bt_node (%4zu)      %11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct bt_node), bt_node_gets, bt_node_frees, bt_node_gets - bt_node_frees, bt_node_avails, (((bt_node_gets - bt_node_frees) + bt_node_avails) * sizeof(struct bt_node)) / 1024.);
+    fprintf(fp, "ac_position (%4zu)%11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct ac_position), ac_position_gets, ac_position_frees, ac_position_gets - ac_position_frees, ac_position_avails, (((ac_position_gets - ac_position_frees) + ac_position_avails) * sizeof(struct ac_position)) / 1024.);
+    fprintf(fp, "ac_match_pos (%4zu)%11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct ac_match_pos), ac_match_pos_gets, ac_match_pos_frees, ac_match_pos_gets - ac_match_pos_frees, ac_match_pos_avails, (((ac_match_pos_gets - ac_match_pos_frees) + ac_match_pos_avails) * sizeof(struct ac_match_pos)) / 1024.);
+    fprintf(fp, "ac_match_free_vars_pos (%4zu)\n                    %11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct ac_match_free_vars_pos), ac_match_free_vars_pos_gets, ac_match_free_vars_pos_frees, ac_match_free_vars_pos_gets - ac_match_free_vars_pos_frees, ac_match_free_vars_pos_avails, (((ac_match_free_vars_pos_gets - ac_match_free_vars_pos_frees) + ac_match_free_vars_pos_avails) * sizeof(struct ac_match_free_vars_pos)) / 1024.);
 
 }  /* print_ac_mem */
 
diff -uNrp eqp-09e.orig/btu.c eqp-09e/btu.c
--- eqp-09e.orig/btu.c	1999-04-02 10:37:57.000000000 -0700
+++ eqp-09e/btu.c	2011-12-22 16:09:13.670540075 -0700
@@ -418,8 +418,8 @@ void p_bt_tree(Bt_node_ptr bt, int n)
 	    printf("----");
 	printf(" bt_tree: %d\n", n);
 
-	print_term(stdout, bt->t1); printf(" [ 0x%x ]\n", (unsigned) bt->c1);
-	print_term(stdout, bt->t2); printf(" [ 0x%x ]\n", (unsigned) bt->c2);
+	print_term(stdout, bt->t1); printf(" [ %p ]\n", bt->c1);
+	print_term(stdout, bt->t2); printf(" [ %p ]\n", bt->c2);
 	p_context(bt->c1);
 	p_context(bt->c2);
 
diff -uNrp eqp-09e.orig/clause.c eqp-09e/clause.c
--- eqp-09e.orig/clause.c	2009-05-12 15:50:13.000000000 -0600
+++ eqp-09e/clause.c	2011-12-22 16:09:13.671539498 -0700
@@ -191,10 +191,10 @@ void print_clause_mem(FILE *fp, int head
     if (heading)
 	fprintf(fp, "  type (bytes each)        gets      frees     in use      avail      bytes\n");
 
-    fprintf(fp, "literal (%4d)      %11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct literal), literal_gets, literal_frees, literal_gets - literal_frees, literal_avails, (((literal_gets - literal_frees) + literal_avails) * sizeof(struct literal)) / 1024.);
-    fprintf(fp, "clause (%4d)       %11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct clause), clause_gets, clause_frees, clause_gets - clause_frees, clause_avails, (((clause_gets - clause_frees) + clause_avails) * sizeof(struct clause)) / 1024.);
-    fprintf(fp, "list (%4d)         %11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct list), list_gets, list_frees, list_gets - list_frees, list_avails, (((list_gets - list_frees) + list_avails) * sizeof(struct list)) / 1024.);
-    fprintf(fp, "list_pos (%4d)     %11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct list_pos), list_pos_gets, list_pos_frees, list_pos_gets - list_pos_frees, list_pos_avails, (((list_pos_gets - list_pos_frees) + list_pos_avails) * sizeof(struct list_pos)) / 1024.);
+    fprintf(fp, "literal (%4zu)      %11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct literal), literal_gets, literal_frees, literal_gets - literal_frees, literal_avails, (((literal_gets - literal_frees) + literal_avails) * sizeof(struct literal)) / 1024.);
+    fprintf(fp, "clause (%4zu)       %11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct clause), clause_gets, clause_frees, clause_gets - clause_frees, clause_avails, (((clause_gets - clause_frees) + clause_avails) * sizeof(struct clause)) / 1024.);
+    fprintf(fp, "list (%4zu)         %11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct list), list_gets, list_frees, list_gets - list_frees, list_avails, (((list_gets - list_frees) + list_avails) * sizeof(struct list)) / 1024.);
+    fprintf(fp, "list_pos (%4zu)     %11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct list_pos), list_pos_gets, list_pos_frees, list_pos_gets - list_pos_frees, list_pos_avails, (((list_pos_gets - list_pos_frees) + list_pos_avails) * sizeof(struct list_pos)) / 1024.);
 
 }  /* print_clause_mem */
 
diff -uNrp eqp-09e.orig/discrim.c eqp-09e/discrim.c
--- eqp-09e.orig/discrim.c	1999-04-02 10:37:57.000000000 -0700
+++ eqp-09e/discrim.c	2011-12-22 16:09:13.672538922 -0700
@@ -185,9 +185,9 @@ void print_discrim_mem(FILE *fp, int hea
     if (heading)
 	fprintf(fp, "  type (bytes each)        gets      frees     in use      avail      bytes\n");
 
-    fprintf(fp, "discrim (%4d)      %11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct discrim), discrim_gets, discrim_frees, discrim_gets - discrim_frees, discrim_avails, (((discrim_gets - discrim_frees) + discrim_avails) * sizeof(struct discrim)) / 1024.);
-    fprintf(fp, "flat (%4d)         %11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct flat), flat_gets, flat_frees, flat_gets - flat_frees, flat_avails, (((flat_gets - flat_frees) + flat_avails) * sizeof(struct flat)) / 1024.);
-    fprintf(fp, "discrim_pos (%4d)  %11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct discrim_pos), discrim_pos_gets, discrim_pos_frees, discrim_pos_gets - discrim_pos_frees, discrim_pos_avails, (((discrim_pos_gets - discrim_pos_frees) + discrim_pos_avails) * sizeof(struct discrim_pos)) / 1024.);
+    fprintf(fp, "discrim (%4zu)      %11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct discrim), discrim_gets, discrim_frees, discrim_gets - discrim_frees, discrim_avails, (((discrim_gets - discrim_frees) + discrim_avails) * sizeof(struct discrim)) / 1024.);
+    fprintf(fp, "flat (%4zu)         %11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct flat), flat_gets, flat_frees, flat_gets - flat_frees, flat_avails, (((flat_gets - flat_frees) + flat_avails) * sizeof(struct flat)) / 1024.);
+    fprintf(fp, "discrim_pos (%4zu)  %11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct discrim_pos), discrim_pos_gets, discrim_pos_frees, discrim_pos_gets - discrim_pos_frees, discrim_pos_avails, (((discrim_pos_gets - discrim_pos_frees) + discrim_pos_avails) * sizeof(struct discrim_pos)) / 1024.);
 
 }  /* print_discrim_mem */
 
diff -uNrp eqp-09e.orig/fpa.c eqp-09e/fpa.c
--- eqp-09e.orig/fpa.c	2009-05-12 15:51:00.000000000 -0600
+++ eqp-09e/fpa.c	2011-12-22 16:09:13.672538922 -0700
@@ -169,9 +169,9 @@ void print_fpa_mem(FILE *fp, int heading
 {
     if (heading)
 	fprintf(fp, "  type (bytes each)        gets      frees     in use      avail      bytes\n");
-    fprintf(fp, "fpa_head (%4d)     %11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct fpa_head), fpa_head_gets, fpa_head_frees, fpa_head_gets - fpa_head_frees, fpa_head_avails, (((fpa_head_gets - fpa_head_frees) + fpa_head_avails) * sizeof(struct fpa_head)) / 1024.);
-    fprintf(fp, "fpa_tree (%4d)     %11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct fpa_tree), fpa_tree_gets, fpa_tree_frees, fpa_tree_gets - fpa_tree_frees, fpa_tree_avails, (((fpa_tree_gets - fpa_tree_frees) + fpa_tree_avails) * sizeof(struct fpa_tree)) / 1024.);
-    fprintf(fp, "fpa_pos (%4d)      %11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct fpa_pos), fpa_pos_gets, fpa_pos_frees, fpa_pos_gets - fpa_pos_frees, fpa_pos_avails, (((fpa_pos_gets - fpa_pos_frees) + fpa_pos_avails) * sizeof(struct fpa_pos)) / 1024.);
+    fprintf(fp, "fpa_head (%4zu)     %11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct fpa_head), fpa_head_gets, fpa_head_frees, fpa_head_gets - fpa_head_frees, fpa_head_avails, (((fpa_head_gets - fpa_head_frees) + fpa_head_avails) * sizeof(struct fpa_head)) / 1024.);
+    fprintf(fp, "fpa_tree (%4zu)     %11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct fpa_tree), fpa_tree_gets, fpa_tree_frees, fpa_tree_gets - fpa_tree_frees, fpa_tree_avails, (((fpa_tree_gets - fpa_tree_frees) + fpa_tree_avails) * sizeof(struct fpa_tree)) / 1024.);
+    fprintf(fp, "fpa_pos (%4zu)      %11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct fpa_pos), fpa_pos_gets, fpa_pos_frees, fpa_pos_gets - fpa_pos_frees, fpa_pos_avails, (((fpa_pos_gets - fpa_pos_frees) + fpa_pos_avails) * sizeof(struct fpa_pos)) / 1024.);
 
 }  /* print_fpa_mem */
 
@@ -990,7 +990,7 @@ void print_fpa_index(FILE *fp, Fpa_index
     Fpa_head_ptr f;
     Gen_ptr_ptr g;
     
-    fprintf(fp, "\nFpa index %x, depth=%d.\n", (unsigned) p, p->depth);
+    fprintf(fp, "\nFpa index %p, depth=%d.\n", p, p->depth);
     for (i=0; i<FPA_SIZE; i++) {
 	if (p->table[i]) {
 	    fprintf(fp, "bucket %d\n", i);
@@ -1335,7 +1335,7 @@ void print_fpa_index_summary(FILE *fp, F
     if (!p)
 	return;
     
-    fprintf(fp, "\nFpa index %x, depth=%d.\n", (unsigned) p, p->depth);
+    fprintf(fp, "\nFpa index %p, depth=%d.\n", p, p->depth);
 
     for (i = 0; i < FPA_SIZE; i++) {
 	if (p->table[i]) {
diff -uNrp eqp-09e.orig/list.c eqp-09e/list.c
--- eqp-09e.orig/list.c	1999-04-02 10:37:58.000000000 -0700
+++ eqp-09e/list.c	2011-12-22 16:09:25.476729352 -0700
@@ -57,7 +57,7 @@ void print_list_mem(FILE *fp, int headin
     if (heading)
 	fprintf(fp, "  type (bytes each)        gets      frees     in use      avail      bytes\n");
 
-    fprintf(fp, "gen_ptr (%4d)      %11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct gen_ptr), gen_ptr_gets, gen_ptr_frees, gen_ptr_gets - gen_ptr_frees, gen_ptr_avails, (((gen_ptr_gets - gen_ptr_frees) + gen_ptr_avails) * sizeof(struct gen_ptr)) / 1024.);
+    fprintf(fp, "gen_ptr (%4zu)      %11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct gen_ptr), gen_ptr_gets, gen_ptr_frees, gen_ptr_gets - gen_ptr_frees, gen_ptr_avails, (((gen_ptr_gets - gen_ptr_frees) + gen_ptr_avails) * sizeof(struct gen_ptr)) / 1024.);
 
 }  /* print_list_mem */
 
diff -uNrp eqp-09e.orig/unify.c eqp-09e/unify.c
--- eqp-09e.orig/unify.c	1999-04-02 10:38:00.000000000 -0700
+++ eqp-09e/unify.c	2011-12-22 16:09:13.673538346 -0700
@@ -139,8 +139,8 @@ void print_unify_mem(FILE *fp, int headi
     if (heading)
 	fprintf(fp, "  type (bytes each)        gets      frees     in use      avail      bytes\n");
 
-    fprintf(fp, "context (%4d)      %11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct context), context_gets, context_frees, context_gets - context_frees, context_avails, (((context_gets - context_frees) + context_avails) * sizeof(struct context)) / 1024.);
-    fprintf(fp, "trail (%4d)        %11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct trail), trail_gets, trail_frees, trail_gets - trail_frees, trail_avails, (((trail_gets - trail_frees) + trail_avails) * sizeof(struct trail)) / 1024.);
+    fprintf(fp, "context (%4zu)      %11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct context), context_gets, context_frees, context_gets - context_frees, context_avails, (((context_gets - context_frees) + context_avails) * sizeof(struct context)) / 1024.);
+    fprintf(fp, "trail (%4zu)        %11ld%11ld%11ld%11ld%9.1f K\n", sizeof(struct trail), trail_gets, trail_frees, trail_gets - trail_frees, trail_avails, (((trail_gets - trail_frees) + trail_avails) * sizeof(struct trail)) / 1024.);
 
 }  /* print_unify_mem */
 
@@ -581,9 +581,9 @@ void print_context(FILE *fp, Context_ptr
 	    if (c->terms[i] != NULL) {
 		t->symbol = i;
 		print_term(fp, t);
-		fprintf(fp, " [0x%x] -> ", (unsigned) c);
+		fprintf(fp, " [%p] -> ", c);
 		print_term(fp, c->terms[i]);
-		fprintf(fp, " [0x%x:%d]\n", (unsigned) c->contexts[i], c->contexts[i]->multiplier);
+		fprintf(fp, " [%p:%d]\n", c->contexts[i], c->contexts[i]->multiplier);
 		}
 	if (c->partial_term) {
 	    printf("partial_term: ");
@@ -638,7 +638,7 @@ void print_trail(FILE *fp, Trail_ptr t)
     fprintf(fp, "Trail:");
     t2 = t;
     while (t2 != NULL) {
-	fprintf(fp, " <%d,%x>", t2->varnum, (unsigned) t2->context);
+	fprintf(fp, " <%d,%p>", t2->varnum, t2->context);
 	t2 = t2->next;
 	}
     fprintf(fp, ".\n");