← Commit list

86350f8d5

Denys Vlasenko
Denys Vlasenko
2010-01-06
FAILED Duration: 28s

Subject

cal: document the location of unicode bug. no code changes

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

coreutils/cal.c+6 -0
@@ -115,11 +115,17 @@ int cal_main(int argc UNUSED_PARAM, char **argv)
i = 0;
do {
zero_tm.tm_mon = i;
+ /* full month name according to locale */
strftime(buf, sizeof(buf), "%B", &zero_tm);
month_names[i] = xstrdup(buf);
if (i < 7) {
zero_tm.tm_wday = i;
+//FIXME: unicode
+//Bug 839:
+//testcase with doublewidth Japanese chars: "LANG=zh_TW.utf8 cal"
+//perhaps use wc[s]width() to probe terminal width
+ /* abbreviated weekday name according to locale */
strftime(buf, sizeof(buf), "%a", &zero_tm);
strncpy(day_headings + i * (3+julian) + julian, buf, 2);
}