diff options
author | Garrett D'Amore <garrett@damore.org> | 2014-08-14 15:41:06 -0700 |
---|---|---|
committer | Garrett D'Amore <garrett@damore.org> | 2014-11-04 01:02:21 -0800 |
commit | f07f0fb66492a2792d4da5e0a6f9a92b4c581ab3 (patch) | |
tree | c4c3ad54d2abbbd8eb9162d43ed7593f536fde55 /usr/src/man/man3c/wcsdup.3c | |
parent | acd07c6b871cfa70bc42c9278037a17c430897b6 (diff) | |
download | illumos-joyent-f07f0fb66492a2792d4da5e0a6f9a92b4c581ab3.tar.gz |
5041 man pages needed for some wide character routines
Reviewed by: Rich Ercolani <rercola@pha.jhu.edu>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Diffstat (limited to 'usr/src/man/man3c/wcsdup.3c')
-rw-r--r-- | usr/src/man/man3c/wcsdup.3c | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/usr/src/man/man3c/wcsdup.3c b/usr/src/man/man3c/wcsdup.3c new file mode 100644 index 0000000000..80113744a9 --- /dev/null +++ b/usr/src/man/man3c/wcsdup.3c @@ -0,0 +1,73 @@ +.\" +.\" This file and its contents are supplied under the terms of the +.\" Common Development and Distribution License ("CDDL"), version 1.0. +.\" You may only use this file in accordance with the terms of version +.\" 1.0 of the CDDL. +.\" +.\" A full copy of the text of the CDDL should have accompanied this +.\" source. A copy of the CDDL is also available via the Internet at +.\" http://www.illumos.org/license/CDDL. +.\" +.\" +.\" Copyright 2014 Garrett D'Amore <garrett@damore.org> +.\" +.Dd "Nov 4, 2014" +.Dt WCSDUP 3C +.Os +.Sh NAME +.Nm wcsdup +.Nd duplicate wide-character string +.Sh SYNOPSIS +.In wchar.h +. +.Ft wchar_t +.Fo wcsdup +.Fa "const wchar_t *string" +.Fc +. +.Sh DESCRIPTION +The +.Fn wcsdup +function duplicates a wide-character +.Fa string , +allocating sufficient memory to store the copy, and then +copying from +.Fa string . +The resulting copy is returned. It may be deallocated with +.Xr free 3C +when it is no longer needed. The +.Fn wcsdup +function is the wide-character equivalent of +.Xr strdup 3C . +.Sh RETURN VALUES +On success, the function +.Fn wcsdup +returns the newly allocated copy of the string; on failure it +returns +.Dv NULL +and sets +.Va errno . +.Sh ERRORS +The +.Fn wcsdup +function will fail if: +.Bl -tag -width Er +.It Er ENOMEM +Insufficient memory was available to create the copy. +.El +.Sh INTERFACE STABILITY +.Sy Standard . +.Sh MT-LEVEL +.Sy MT-Safe . +.Sh SEE ALSO +.Xr free 3C , +.Xr strdup 3C , +.Xr wcslen 3C , +.Xr wchar.h 3HEAD , +.Xr locale 5 , +.Xr standards 5 +.Sh STANDARDS +The +.Fn wcsdup +function was introduced in +.St -p1003.1-2008 . |