ports/98884: x11-clocks/wmclock: correct year display, Thursday abbreviation
Eric P. Scott
eps+pbug0606 at ana.com
Tue Jun 13 00:20:24 UTC 2006
>Number: 98884
>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:20:16 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 at 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:
More information about the freebsd-ports-bugs
mailing list