summaryrefslogtreecommitdiffstats
path: root/usr.bin/ncal
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2009-04-30 13:53:00 +0000
committerru <ru@FreeBSD.org>2009-04-30 13:53:00 +0000
commite9ac1c9e24c461671fa0c6556edd38161c420c56 (patch)
tree0f7ecf4e23d728eeb75854263830764ca860f745 /usr.bin/ncal
parent39b6dc8ba2de1c81754454858aae4fc4b706bdbf (diff)
downloadFreeBSD-src-e9ac1c9e24c461671fa0c6556edd38161c420c56.zip
FreeBSD-src-e9ac1c9e24c461671fa0c6556edd38161c420c56.tar.gz
Fixed multi-byte character support to actually work.
Diffstat (limited to 'usr.bin/ncal')
-rw-r--r--usr.bin/ncal/ncal.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/ncal/ncal.c b/usr.bin/ncal/ncal.c
index d5e0f1a..38dbf98 100644
--- a/usr.bin/ncal/ncal.c
+++ b/usr.bin/ncal/ncal.c
@@ -452,7 +452,7 @@ printmonth(int y, int m, int jd_flag)
mkweekdays(&wds);
printf(" %ls %d\n", month.name, y);
for (i = 0; i != 7; i++)
- printf("%.2ls%s\n", wds.names[i], month.lines[i]);
+ wprintf(L"%.2ls%s\n", wds.names[i], month.lines[i]);
if (flag_weeks)
printf(" %s\n", month.weeks);
}
@@ -508,17 +508,17 @@ printyear(int y, int jd_flag)
printf("%s\n", center(t, s, mpl * mw));
for (j = 0; j != 12; j += mpl) {
- printf(" %-*ls%-*ls",
+ wprintf(L" %-*ls%-*ls",
mw, year[j].name,
mw, year[j + 1].name);
if (mpl == 3)
printf("%ls\n", year[j + 2].name);
else
- printf("%-*ls%ls\n",
+ wprintf(L"%-*ls%ls\n",
mw, year[j + 2].name,
year[j + 3].name);
for (i = 0; i != 7; i++) {
- printf("%.2ls%-*s%-*s",
+ wprintf(L"%.2ls%-*s%-*s",
wds.names[i],
mw, year[j].lines[i],
mw, year[j + 1].lines[i]);
@@ -566,11 +566,11 @@ printyearb(int y, int jd_flag)
printf("%s\n\n", center(t, s, mw * mpl + mpl));
for (j = 0; j != 12; j += mpl) {
- printf("%-*ls ", mw, wcenter(ws, year[j].name, mw));
+ wprintf(L"%-*ls ", mw, wcenter(ws, year[j].name, mw));
if (mpl == 2)
printf("%ls\n", wcenter(ws, year[j + 1].name, mw));
else
- printf("%-*ls %ls\n", mw,
+ wprintf(L"%-*ls %ls\n", mw,
wcenter(ws, year[j + 1].name, mw),
wcenter(wt, year[j + 2].name, mw));
OpenPOWER on IntegriCloud