about summary refs log tree commit diff
path: root/Src/string.c
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2005-08-15 17:19:16 +0000
committerClint Adams <clint@users.sourceforge.net>2005-08-15 17:19:16 +0000
commit987033eaf9591a5b2fc30b09dcf2a0a6266b9408 (patch)
treee1b19c6e7c79695c427f2ad9b60a7eda700bc1a7 /Src/string.c
parentb9d42d6a592603d34cb8b03813d1604c59b6912e (diff)
downloadzsh-987033eaf9591a5b2fc30b09dcf2a0a6266b9408.tar.gz
zsh-987033eaf9591a5b2fc30b09dcf2a0a6266b9408.tar.xz
zsh-987033eaf9591a5b2fc30b09dcf2a0a6266b9408.zip
21619: define wide versions of zarrdup, zputs, niceztrlen.
Diffstat (limited to 'Src/string.c')
-rw-r--r--Src/string.c16
1 files changed, 16 insertions, 0 deletions
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 */
 
 /**/