diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2022-02-06 16:04:24 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2022-02-06 16:04:24 +0100 |
commit | 5d2c2b27a6323e2666378b986129b2a7c2c39e5c (patch) | |
tree | ce8982b6c0111f79791068de2c2d4c6ce3138a49 /app/tools/halibut/ustring.c | |
parent | b623f5953691b2a0614e6f1f4def86bdbb9a4113 (diff) |
New upstream version 5.2.2GAupstream/5.2.2GA
Diffstat (limited to 'app/tools/halibut/ustring.c')
-rw-r--r-- | app/tools/halibut/ustring.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/tools/halibut/ustring.c b/app/tools/halibut/ustring.c index 95477a5..a5d1103 100644 --- a/app/tools/halibut/ustring.c +++ b/app/tools/halibut/ustring.c @@ -72,7 +72,7 @@ wchar_t *ustrfroma(char const *s, wchar_t *outbuf, int size, int charset) { return outbuf; } - len = strlen(s); + len = (int)strlen(s); size--; /* allow for terminating NUL */ *outbuf = L'\0'; while (len > 0) { @@ -155,7 +155,7 @@ wchar_t *ufroma_dup(char const *s, int charset) { int len; wchar_t *buf = NULL; - len = strlen(s) + 1; + len = (int)strlen(s) + 1; do { buf = sresize(buf, len, wchar_t); ustrfroma(s, buf, len, charset); @@ -184,7 +184,7 @@ char *utoa_locale_dup(wchar_t const *s) if (siz) { assert(siz <= (size_t)(MB_CUR_MAX * len)); ret[siz] = '\0'; - ret = sresize(ret, siz+1, char); + ret = sresize(ret, (int)siz+1, char); return ret; } @@ -206,7 +206,7 @@ wchar_t *ufroma_locale_dup(char const *s) int len; size_t siz; - len = strlen(s); + len = (int)strlen(s); ret = snewn(1 + 2*len, wchar_t); /* be conservative */ @@ -215,7 +215,7 @@ wchar_t *ufroma_locale_dup(char const *s) if (siz) { assert(siz <= (size_t)(2 * len)); ret[siz] = L'\0'; - ret = sresize(ret, siz+1, wchar_t); + ret = sresize(ret, (int)siz+1, wchar_t); return ret; } @@ -429,7 +429,7 @@ wchar_t *ustrftime(const wchar_t *wfmt, const struct tm *timespec) rdadd(&rs, L'%'); wfmt += 2; } else if (wfmt[0] == L'%' && wfmt[1]) { - ustrftime_internal(&rs, wfmt[1], timespec); + ustrftime_internal(&rs, (char)(wfmt[1]), timespec); wfmt += 2; } else { rdadd(&rs, wfmt[0]); |