xref: /titanic_41/usr/src/man/man3c/wcsdup.3c (revision 2cd8d409f7a1b4749ee611cec28b63f45eb9f84d)
1*2cd8d409SGarrett D'Amore.\"
2*2cd8d409SGarrett D'Amore.\" This file and its contents are supplied under the terms of the
3*2cd8d409SGarrett D'Amore.\" Common Development and Distribution License ("CDDL"), version 1.0.
4*2cd8d409SGarrett D'Amore.\" You may only use this file in accordance with the terms of version
5*2cd8d409SGarrett D'Amore.\" 1.0 of the CDDL.
6*2cd8d409SGarrett D'Amore.\"
7*2cd8d409SGarrett D'Amore.\" A full copy of the text of the CDDL should have accompanied this
8*2cd8d409SGarrett D'Amore.\" source.  A copy of the CDDL is also available via the Internet at
9*2cd8d409SGarrett D'Amore.\" http://www.illumos.org/license/CDDL.
10*2cd8d409SGarrett D'Amore.\"
11*2cd8d409SGarrett D'Amore.\"
12*2cd8d409SGarrett D'Amore.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
13*2cd8d409SGarrett D'Amore.\"
14*2cd8d409SGarrett D'Amore.Dd "Nov 4, 2014"
15*2cd8d409SGarrett D'Amore.Dt WCSDUP 3C
16*2cd8d409SGarrett D'Amore.Os
17*2cd8d409SGarrett D'Amore.Sh NAME
18*2cd8d409SGarrett D'Amore.Nm wcsdup
19*2cd8d409SGarrett D'Amore.Nd duplicate wide-character string
20*2cd8d409SGarrett D'Amore.Sh SYNOPSIS
21*2cd8d409SGarrett D'Amore.In wchar.h
22*2cd8d409SGarrett D'Amore.
23*2cd8d409SGarrett D'Amore.Ft wchar_t
24*2cd8d409SGarrett D'Amore.Fo wcsdup
25*2cd8d409SGarrett D'Amore.Fa "const wchar_t *string"
26*2cd8d409SGarrett D'Amore.Fc
27*2cd8d409SGarrett D'Amore.
28*2cd8d409SGarrett D'Amore.Sh DESCRIPTION
29*2cd8d409SGarrett D'AmoreThe
30*2cd8d409SGarrett D'Amore.Fn wcsdup
31*2cd8d409SGarrett D'Amorefunction duplicates a wide-character
32*2cd8d409SGarrett D'Amore.Fa string ,
33*2cd8d409SGarrett D'Amoreallocating sufficient memory to store the copy, and then
34*2cd8d409SGarrett D'Amorecopying from
35*2cd8d409SGarrett D'Amore.Fa string .
36*2cd8d409SGarrett D'AmoreThe resulting copy is returned.  It may be deallocated with
37*2cd8d409SGarrett D'Amore.Xr free 3C
38*2cd8d409SGarrett D'Amorewhen it is no longer needed.  The
39*2cd8d409SGarrett D'Amore.Fn wcsdup
40*2cd8d409SGarrett D'Amorefunction is the wide-character equivalent of
41*2cd8d409SGarrett D'Amore.Xr strdup 3C .
42*2cd8d409SGarrett D'Amore.Sh RETURN VALUES
43*2cd8d409SGarrett D'AmoreOn success, the function
44*2cd8d409SGarrett D'Amore.Fn wcsdup
45*2cd8d409SGarrett D'Amorereturns the newly allocated copy of the string; on failure it
46*2cd8d409SGarrett D'Amorereturns
47*2cd8d409SGarrett D'Amore.Dv NULL
48*2cd8d409SGarrett D'Amoreand sets
49*2cd8d409SGarrett D'Amore.Va errno .
50*2cd8d409SGarrett D'Amore.Sh ERRORS
51*2cd8d409SGarrett D'AmoreThe
52*2cd8d409SGarrett D'Amore.Fn wcsdup
53*2cd8d409SGarrett D'Amorefunction will fail if:
54*2cd8d409SGarrett D'Amore.Bl -tag -width Er
55*2cd8d409SGarrett D'Amore.It Er ENOMEM
56*2cd8d409SGarrett D'AmoreInsufficient memory was available to create the copy.
57*2cd8d409SGarrett D'Amore.El
58*2cd8d409SGarrett D'Amore.Sh INTERFACE STABILITY
59*2cd8d409SGarrett D'Amore.Sy Standard .
60*2cd8d409SGarrett D'Amore.Sh MT-LEVEL
61*2cd8d409SGarrett D'Amore.Sy MT-Safe .
62*2cd8d409SGarrett D'Amore.Sh SEE ALSO
63*2cd8d409SGarrett D'Amore.Xr free 3C ,
64*2cd8d409SGarrett D'Amore.Xr strdup 3C ,
65*2cd8d409SGarrett D'Amore.Xr wcslen 3C ,
66*2cd8d409SGarrett D'Amore.Xr wchar.h 3HEAD ,
67*2cd8d409SGarrett D'Amore.Xr locale 5 ,
68*2cd8d409SGarrett D'Amore.Xr standards 5
69*2cd8d409SGarrett D'Amore.Sh STANDARDS
70*2cd8d409SGarrett D'AmoreThe
71*2cd8d409SGarrett D'Amore.Fn wcsdup
72*2cd8d409SGarrett D'Amorefunction was introduced in
73*2cd8d409SGarrett D'Amore.St -p1003.1-2008 .
74