[project @ 2002-11-13 12:21:08 by simonmar]
[ghc-hetmet.git] / ghc / rts / Printer.c
index 86a10a0..3ac0e4e 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: Printer.c,v 1.50 2001/12/06 14:33:02 simonmar Exp $
+ * $Id: Printer.c,v 1.53 2002/07/24 18:18:13 sof Exp $
  *
  * (c) The GHC Team, 1994-2000.
  *
@@ -11,6 +11,8 @@
 #include "Rts.h"
 #include "Printer.h"
 
+#include <stdio.h>
+
 #ifdef DEBUG
 
 #include "RtsUtils.h"
@@ -20,7 +22,8 @@
 #include "Bytecodes.h"  /* for InstrPtr */
 #include "Disassembler.h"
 
-#include "Printer.h"
+#include <stdlib.h>
+#include <string.h>
 
 #if defined(GRAN) || defined(PAR)
 // HWL: explicit fixed header size to make debugging easier
@@ -314,7 +317,7 @@ printClosure( StgClosure *obj )
                 putchar(arrWordsGetChar(obj,i));
                } */
            for (i=0; i<((StgArrWords *)obj)->words; i++)
-             fprintf(stdout, "%ld", ((StgArrWords *)obj)->payload[i]);
+             fprintf(stdout, "%u", ((StgArrWords *)obj)->payload[i]);
             fprintf(stdout,"\")\n");
             break;
         }
@@ -977,7 +980,7 @@ findPtr(P_ p, int follow)
                  if (*q == (W_)p) {
                      if (i < arr_size) {
                          r = q;
-                         while (!LOOKS_LIKE_GHC_INFO(*r) || *r == NULL) {
+                         while (!LOOKS_LIKE_GHC_INFO(*r) || (P_)*r == NULL) {
                              r--;
                          }
                          fprintf(stdout, "%p = ", r);