freebsd-ports/sysutils/du2ps/files/patch-ac
OKAZAKI Tetsurou 88f263f5c0 Add du2ps 2.1, filter for converting output of du to PostScript file.
PR:		27848
Submitted by:	Yoshihiko Sarumaru <mistral@imasy.or.jp>
2001-06-26 21:03:15 +00:00

12 lines
410 B
Text

--- nodeop.c.orig Tue Mar 15 18:15:58 1994
+++ nodeop.c Wed Jun 6 15:03:28 2001
@@ -142,7 +142,8 @@
/* for each child */
for(np = nodep->child; NODE_NULL != np; np = np->peer){
- double height = h * np->size / nodep->size;
+ /* When nodep->size is 0, 'divided by zero' will be raised */
+ double height = (nodep->size != 0 ? h * np->size / nodep->size : 0);
drawrect(np, y, height, depth);