Hi,
The following patch fixes a bug in hp2ps that causes silly numbers like
84,762,122,-646
to appear in the heading. The problem was that 'n' is (can be) a 64-bit
type, and converting to an int before doing the modulo gives rounding
errors.
The fix is courtesy of Ralf Wildenhues ([EMAIL PROTECTED]).
N
Index: massif/hp2ps/Utilities.c
===================================================================
RCS file: /home/kde/valgrind/massif/hp2ps/Utilities.c,v
retrieving revision 1.2
diff -u -r1.2 Utilities.c
--- massif/hp2ps/Utilities.c 15 Feb 2004 15:38:08 -0000 1.2
+++ massif/hp2ps/Utilities.c 2 Apr 2004 12:24:45 -0000
@ -77,7 +77,7 @
fprintf(fp, "%d", (int)n);
} else {
CommaPrint(fp, n / ONETHOUSAND);
- fprintf(fp, ",%03d", (int)n % ONETHOUSAND);
+ fprintf(fp, ",%03d", (int)(n % ONETHOUSAND));
}
}
_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs