--- Begin Message ---
- To: "Debian BTS" <submit@bugs.debian.org>
- Subject: cal: please pad the weekday abbreviations on the left
- From: "Piotr Engelking" <inkerman42@gmail.com>
- Date: Thu, 15 Mar 2007 21:44:04 +0100
- Message-id: <814371d60703151344y1ae5426fw8d7a407702b9b1e9@mail.gmail.com>
Package: bsdmainutils
Version: 6.1.6
Severity: minor
Tags: patch l10n
At the moment, cal pads the weekday abbreviations on the right:
marzec 2007
Pn Wt Śr Cz Pt So N
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Please pad them on the left instead. This looks better since days of the
month are padded on the left as well:
marzec 2007
Pn Wt Śr Cz Pt So N
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
The attached patch fixes this problem.
-- System Information:
Debian Release: 4.0
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (x86_64)
Shell: /bin/sh linked to /bin/dash
Kernel: Linux 2.6.18
Locale: LANG=C, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
Versions of packages bsdmainutils depends on:
ii bsdutils 1:2.12r-19 Basic utilities from 4.4BSD-Lite
ii debianutils 2.17 Miscellaneous utilities specific t
ii libc6 2.3.6.ds1-13 GNU C Library: Shared libraries
ii libncurses5 5.5-5 Shared libraries for terminal hand
bsdmainutils recommends no packages.
-- debconf information excluded
diff -ur bsdmainutils-6.1.6/usr.bin/ncal/ncal.c bsdmainutils/usr.bin/ncal/ncal.c
--- bsdmainutils-6.1.6/usr.bin/ncal/ncal.c 2006-08-15 08:03:30.000000000 +0200
+++ bsdmainutils/usr.bin/ncal/ncal.c 2007-03-15 20:40:33.000000000 +0100
@@ -875,10 +875,9 @@
col = wcswidth(wcs, j + 1);
len = wcstombs(NULL, wcs, 0);
wds->names[i] = calloc(len + 2 - col + 1, sizeof(char));
- wcstombs(wds->names[i], wcs, len);
+ wds->names[i][0] = ' ';
+ wcstombs(wds->names[i] + (col < 2), wcs, len);
free(wcs);
- if (col < 2)
- strcat(wds->names[i], " ");
}
}
--- End Message ---
--- Begin Message ---
At least I couldn't reproduce. Could you please try and if it still is a
problem on your side reopen? Thanks.
Michael
--
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
ICQ: 179140304, AIM/Yahoo/Skype: michaelmeskes, Jabber: meskes@jabber.org
Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL!
--- End Message ---