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