Date: Mon, 12 Jun 2006 17:17:02 -0700 (PDT) From: "Eric P. Scott" <eps+pbug0606@ana.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/98886: x11-clocks/wmclock: correct year display, Thursday abbreviation Message-ID: <200606130017.k5D0H2hP012091@anna.ana.com> Resent-Message-ID: <200606130040.k5D0e59c068100@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 98886 >Category: ports >Synopsis: x11-clocks/wmclock: correct year display, Thursday abbreviation >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jun 13 00:40:05 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Eric P. Scott >Release: FreeBSD 6.1-RELEASE i386 >Organization: ana-systems, Inc. >Environment: System: FreeBSD tools 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Sun May 7 04:32:43 UTC 2006 root@opus.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: 1. wmclock miscalculates the middle two digits of the year, e.g. 2006 displays as 2666. 2. date(1), ctime(3), strftime(3) abbreviate Thursday as Thu in English locales. wmclock uses THR instead. >How-To-Repeat: 1. run wmclock with the -year option. 2. Run wmclock on a Thursday. >Fix: files/patch-aa: Correct year display --- wmclock.c.orig Tue Mar 7 23:31:33 2000 +++ wmclock.c @@ -470,11 +470,11 @@ XCopyArea(dpy, led.pixmap, visible.pixmap, normalGC, digitXOffset , digitYOffset, LED_NUM_WIDTH, LED_NUM_HEIGHT, xPos[DIGIT_1_X_POS], yPos[DIGIT_Y_POS]); - digitXOffset = LED_NUM_WIDTH * (year % 1000); + digitXOffset = LED_NUM_WIDTH * ((year / 100) % 10); XCopyArea(dpy, led.pixmap, visible.pixmap, normalGC, digitXOffset , digitYOffset, LED_NUM_WIDTH, LED_NUM_HEIGHT, xPos[DIGIT_2_X_POS], yPos[DIGIT_Y_POS]); - digitXOffset = LED_NUM_WIDTH * (year % 100); + digitXOffset = LED_NUM_WIDTH * ((year / 10) % 10); XCopyArea(dpy, led.pixmap, visible.pixmap, normalGC, digitXOffset , digitYOffset, LED_NUM_WIDTH, LED_NUM_HEIGHT, xPos[DIGIT_3_X_POS], yPos[DIGIT_Y_POS]); files/patch-ab: Change THR to THU --- lang.english/weekday.xpm.orig Tue Mar 7 22:56:36 2000 +++ lang.english/weekday.xpm @@ -27,11 +27,11 @@ "b..bb..b.bbbbb.bbb.b", "b.bbbb.b.....b....bb", "bbbbbbbbbbbbbbbbbbbb", -"b.....b.bbb.b.....bb", +"b.....b.bbb.b.bbbb.b", "bbb.bbb.bbb.b.bbbb.b", -"bbb.bbb.....b.....bb", -"bbb.bbb.bbb.b.bbb.bb", +"bbb.bbb.....b.bbbb.b", "bbb.bbb.bbb.b.bbbb.b", +"bbb.bbb.bbb.bb....bb", "bbbbbbbbbbbbbbbbbbbb", "b.....b.....bb.....b", "b.bbbbb.bbbb.bbb.bbb", >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606130017.k5D0H2hP012091>