From 987033eaf9591a5b2fc30b09dcf2a0a6266b9408 Mon Sep 17 00:00:00 2001 From: Clint Adams Date: Mon, 15 Aug 2005 17:19:16 +0000 Subject: 21619: define wide versions of zarrdup, zputs, niceztrlen. --- Src/string.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Src/string.c') diff --git a/Src/string.c b/Src/string.c index 397c868ce..0a7f200ab 100644 --- a/Src/string.c +++ b/Src/string.c @@ -54,6 +54,22 @@ ztrdup(const char *s) return t; } +#ifdef ZLE_UNICODE_SUPPORT +/**/ +mod_export wchar_t * +wcs_ztrdup(const wchar_t *s) +{ + wchar_t *t; + + if (!s) + return NULL; + t = (wchar_t *)zalloc(wcslen((wchar_t *)s) + 1); + wcscpy(t, s); + return t; +} +#endif /* ZLE_UNICODE_SUPPORT */ + + /* concatenate s1, s2, and s3 in dynamically allocated buffer */ /**/ -- cgit 1.4.1