diff --git a/xdu.c b/xdu.c index 076c783..37b0a02 100644 --- a/xdu.c +++ b/xdu.c @@ -970,7 +970,7 @@ void fprintpsbox(FILE* fp, int x1, int y1, int x2, int y2) " 10 setmiterlimit\n" " gsave\n" " newpath\n" - " %i %i moveto %i %i lineto %i %i lineto %i %i lineto\n" + " %d %d moveto %d %d lineto %d %d lineto %d %d lineto\n" " closepath\n" " stroke\n" " grestore\n" @@ -994,11 +994,10 @@ void fprintpstext(FILE* fp, int x, int y, char* s) void savepschildren(FILE* fp, struct node* nodep, struct rect rect, int showsize) { - long long totalsize; + long long size, totalsize; int totalheight, height, - top, - size; + top; struct node* np; char *name, label[1024]; @@ -1060,7 +1059,7 @@ void savepschildren(FILE* fp, struct node* nodep, struct rect rect, int showsize savepschildren(fp, np, subrect, showsize); size += np->size; - top = rect.top + (totalsize ? (double)size / (double)totalsize * rect.height + 0.5 : 0); + top = rect.top + (int)(totalsize ? (double)size / (double)totalsize * rect.height + 0.5 : 0); } }