Date: Thu, 15 Nov 2001 21:40:05 +0100 (CET) From: Helge Oldach <send-pr@oldach.net> To: FreeBSD-gnats-submit@freebsd.org Subject: ports/32015: ports/palm/pilrc bugs Message-ID: <200111152040.fAFKe5235876@sep.oldach.net>
next in thread | raw e-mail | index | archive | help
>Number: 32015 >Category: ports >Synopsis: ports/palm/pilrc bugs >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Nov 15 12:50:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: Helge Oldach >Release: FreeBSD 4.4-STABLE i386 >Organization: >Environment: System: FreeBSD sep.oldach.net 4.4-STABLE FreeBSD 4.4-STABLE #4: Sat Nov 3 16:16:29 CET 2001 toor@sep.oldach.net:/usr/obj/usr/src/sys/GENERIC i386 >Description: pilrc (current port version 2.8p5) displays two bugs. Both that are not fixed with the latest version (2.8p7) from www.ardiri.com. PR's have been filed to the author of pilrc, but no fix so far. The problems are as follows: 1) For a given test rcp file (stolen from CSpotRun) which contains the line LIST "TOP" "10%" "20%" "30%" "40%" "50%" "60%" "70%" "80%" "90%" "BOTTOM" ID listID_percent AT (PREVLEFT PREVTOP PREVWIDTH PREVHEIGHT) NONUSABLE VISIBLEITEMS 11 pilrc 2.8 (up to and including 2.8p7) generates wrong code. While 2.7b creates this as LIST "TOP" "10%" "20%" "30%" "40%" "50%" "60%" "70%" "80%" "90%" "BOTTOM" ID 1302 AT (126 147 36 121) NONUSABLE FONT 0 pilrc-2.8...pilrc-2.8p7 compile this to LIST "TOP" "10%" "20%" "30%" "40%" "50%" "60%" "70%" "80%" "90%" "BOTTOM" ID 1302 AT (126 147 36 13) NONUSABLE FONT 0 The PREVHEIGHT is completely mistaken. For such a long list it should indeed be much longer than just 13 pixels. 121 is the correct value for this particular case. The complete resource (and accompanying header) file are available for verification. 2) A resource like LIST "short" "long-long-longer" ID 2701 AT (81 66 AUTO AUTO) NONUSABLE FONT 0 will generate nonsense as well. The first AUTO (i.e. the width of the resource) will receive the actual width of the first list element ("short") while it should receive the width of the longest list element ("long-long-longer"). I am not sure where this bug was introduced but it is present in 2.8p5 (current port) as well as 2.8p7 (latest patch). >How-To-Repeat: >Fix: The first diff block will fix problem 2) and vice versa. --- pilrc.c.orig Sat May 26 15:51:43 2001 +++ pilrc.c Thu Nov 8 14:58:57 2001 @@ -1128,7 +1128,18 @@ case ktAuto: if (fHoriz) { - wVal = DxCalcExtent((unsigned char *)pitm->text, pitm->font); + if (pitm->grif & ifMultText) { + char *text = pitm->text; + wVal = 0; + while (text < pitm->text + pitm->cbText) { + int extlen = DxCalcExtent((unsigned char *)text, pitm->font); + text += strlen(text) + 1; + if (extlen > wVal) + wVal = extlen; + } + } else { + wVal = DxCalcExtent((unsigned char *)pitm->text, pitm->font); + } if (pitm->grif & ifSmallMargin) wVal += 2 * dxObjSmallMargin; if (pitm->grif & ifBigMargin) @@ -2464,8 +2475,6 @@ (PBAFIELD(obj.list, font) == largeFont ? 14 : 11) * itm.cvis; if (height >= 160) height = 160; - if (itm.rc.topLeft.y + height >= 160) - height = 160 - itm.rc.topLeft.y; SETPBAFIELD(obj.list, bounds.extent.y, height); rcPrev.extent.y = height; } >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111152040.fAFKe5235876>