mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-02 12:20:51 +00:00
Since the width is always 2, it is enough to put just one
trailing space is enough. MFC after: 1 week
This commit is contained in:
parent
b94b189aa5
commit
46f39347f5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=194447
@ -844,7 +844,7 @@ mkweekdays(struct weekdays *wds)
|
||||
for (i = 0; i != 7; i++) {
|
||||
tm.tm_wday = (i+1) % 7;
|
||||
wcsftime(buf, sizeof(buf), L"%a", &tm);
|
||||
for (len = wcslen(buf); len > 0; --len) {
|
||||
for (len = 2; len > 0; --len) {
|
||||
if ((width = wcswidth(buf, len)) <= 2)
|
||||
break;
|
||||
}
|
||||
@ -852,7 +852,7 @@ mkweekdays(struct weekdays *wds)
|
||||
if (width == 1)
|
||||
wds->names[i][0] = L' ';
|
||||
wcsncat(wds->names[i], buf, len);
|
||||
wcsncat(wds->names[i], L" ", 3 - wcswidth(wds->names[i], 2));
|
||||
wcsncat(wds->names[i], L" ", 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user