Provide compat functions for wcsl{cpy,cat}().

This commit is contained in:
Felicity Tarnell 2014-03-08 13:03:19 +00:00
parent 684c581b32
commit 7c26144e31
6 changed files with 118 additions and 10 deletions

6
str.c
View file

@ -194,19 +194,19 @@ wchar_t t[16];
if (tm >= (60 * 60)) {
swprintf(t, wsizeof(t), L"%dh", tm / (60 * 60));
wcslcat(res, t, sizeof(res));
wcslcat(res, t, wsizeof(res));
tm %= (60 * 60);
}
if (tm >= 60) {
swprintf(t, wsizeof(t), L"%dm", tm / 60);
wcslcat(res, t, sizeof(res));
wcslcat(res, t, wsizeof(res));
tm %= 60;
}
if (tm) {
swprintf(t, wsizeof(t), L"%ds", tm);
wcslcat(res, t, sizeof(res));
wcslcat(res, t, wsizeof(res));
}
return wcsdup(res);