diff options
| author | Clint Adams <clint@users.sourceforge.net> | 2005-08-15 17:19:16 +0000 |
|---|---|---|
| committer | Clint Adams <clint@users.sourceforge.net> | 2005-08-15 17:19:16 +0000 |
| commit | 987033eaf9591a5b2fc30b09dcf2a0a6266b9408 (patch) | |
| tree | e1b19c6e7c79695c427f2ad9b60a7eda700bc1a7 /Src/string.c | |
| parent | 21565: better handle uncompresed manpages with .[0-9] in their names. (diff) | |
| download | zsh-987033eaf9591a5b2fc30b09dcf2a0a6266b9408.tar zsh-987033eaf9591a5b2fc30b09dcf2a0a6266b9408.tar.gz zsh-987033eaf9591a5b2fc30b09dcf2a0a6266b9408.tar.bz2 zsh-987033eaf9591a5b2fc30b09dcf2a0a6266b9408.tar.lz zsh-987033eaf9591a5b2fc30b09dcf2a0a6266b9408.tar.xz zsh-987033eaf9591a5b2fc30b09dcf2a0a6266b9408.tar.zst zsh-987033eaf9591a5b2fc30b09dcf2a0a6266b9408.zip | |
21619: define wide versions of zarrdup, zputs, niceztrlen.
Diffstat (limited to 'Src/string.c')
| -rw-r--r-- | Src/string.c | 16 |
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 */ /**/ |
