xref: /illumos-gate/usr/src/man/man3c/wcpcpy.3c (revision bbf215553c7233fbab8a0afdf1fac74c44781867)
1f07f0fb6SGarrett D'Amore.\"
2f07f0fb6SGarrett D'Amore.\" This file and its contents are supplied under the terms of the
3f07f0fb6SGarrett D'Amore.\" Common Development and Distribution License ("CDDL"), version 1.0.
4f07f0fb6SGarrett D'Amore.\" You may only use this file in accordance with the terms of version
5f07f0fb6SGarrett D'Amore.\" 1.0 of the CDDL.
6f07f0fb6SGarrett D'Amore.\"
7f07f0fb6SGarrett D'Amore.\" A full copy of the text of the CDDL should have accompanied this
8f07f0fb6SGarrett D'Amore.\" source.  A copy of the CDDL is also available via the Internet at
9f07f0fb6SGarrett D'Amore.\" http://www.illumos.org/license/CDDL.
10f07f0fb6SGarrett D'Amore.\"
11f07f0fb6SGarrett D'Amore.\"
12f07f0fb6SGarrett D'Amore.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
13f07f0fb6SGarrett D'Amore.\"
14f07f0fb6SGarrett D'Amore.Dd "Jul 27, 2014"
15f07f0fb6SGarrett D'Amore.Dt WCPCPY 3C
16f07f0fb6SGarrett D'Amore.Os
17f07f0fb6SGarrett D'Amore.Sh NAME
18f07f0fb6SGarrett D'Amore.Nm wcpcpy ,
19f07f0fb6SGarrett D'Amore.Nm wcpncpy
20f07f0fb6SGarrett D'Amore.Nd copy a wide-character string and return a pointer to its end
21f07f0fb6SGarrett D'Amore.Sh SYNOPSIS
22f07f0fb6SGarrett D'Amore.In wchar.h
23f07f0fb6SGarrett D'Amore.
24f07f0fb6SGarrett D'Amore.Ft "wchar_t *"
25f07f0fb6SGarrett D'Amore.Fo wcpcpy
26f07f0fb6SGarrett D'Amore.Fa "wchar_t *restrict ws1"
27f07f0fb6SGarrett D'Amore.Fa "const wchar_t *restrict ws2"
28f07f0fb6SGarrett D'Amore.Fc
29f07f0fb6SGarrett D'Amore.
30f07f0fb6SGarrett D'Amore.Ft "wchar_t *"
31f07f0fb6SGarrett D'Amore.Fo wcpncpy
32f07f0fb6SGarrett D'Amore.Fa "wchar_t *restrict ws1"
33f07f0fb6SGarrett D'Amore.Fa "const wchar_t *restrict ws2"
34f07f0fb6SGarrett D'Amore.Fa "size_t n"
35f07f0fb6SGarrett D'Amore.Fc
36f07f0fb6SGarrett D'Amore.
37f07f0fb6SGarrett D'Amore.Sh DESCRIPTION
38f07f0fb6SGarrett D'AmoreThe
39f07f0fb6SGarrett D'Amore.Fn wcpcpy
40f07f0fb6SGarrett D'Amoreand
41f07f0fb6SGarrett D'Amore.Fn wcpncpy
42f07f0fb6SGarrett D'Amorefunctions copy the wide-character string pointed to by
43f07f0fb6SGarrett D'Amore.Fa ws2
44f07f0fb6SGarrett D'Amoreinto the location pointed to by
45f07f0fb6SGarrett D'Amore.Fa ws1 .
46f07f0fb6SGarrett D'AmoreThey stop copying after a null wide-character is copied, or in the case
47f07f0fb6SGarrett D'Amoreof
48f07f0fb6SGarrett D'Amore.Fn wcpncpy ,
49f07f0fb6SGarrett D'Amoreafter
50f07f0fb6SGarrett D'Amore.Fa n
5172d3dbb9SYuri Pankovwide-characters have been copied.
5272d3dbb9SYuri PankovIf
53f07f0fb6SGarrett D'Amore.Fa ws2
54f07f0fb6SGarrett D'Amorecontains fewer than
55f07f0fb6SGarrett D'Amore.Fa n
56f07f0fb6SGarrett D'Amorewide-characters, then the
57f07f0fb6SGarrett D'Amore.Fn wcpncpy
58f07f0fb6SGarrett D'Amorefunction pads wide-characters to the end of the destination
59f07f0fb6SGarrett D'Amore.Fa ws1
60f07f0fb6SGarrett D'Amoreuntil exactly
61f07f0fb6SGarrett D'Amore.Fa n
62f07f0fb6SGarrett D'Amorewide-characters have been written.
63f07f0fb6SGarrett D'Amore.Lp
64f07f0fb6SGarrett D'AmoreIn the case of
65f07f0fb6SGarrett D'Amore.Fn wcpncpy
66f07f0fb6SGarrett D'Amorea terminating null wide-character will
67f07f0fb6SGarrett D'Amore.Em not
68f07f0fb6SGarrett D'Amorebe written if the length of
69f07f0fb6SGarrett D'Amore.Fa ws2
70f07f0fb6SGarrett D'Amoreexceeds
71f07f0fb6SGarrett D'Amore.Fa n .
72f07f0fb6SGarrett D'Amore.Lp
73f07f0fb6SGarrett D'AmoreIf
74f07f0fb6SGarrett D'Amore.Fa ws1
75f07f0fb6SGarrett D'Amoreand
76f07f0fb6SGarrett D'Amore.Fa ws2
77f07f0fb6SGarrett D'Amoreoverlap, the result is undefined.
78f07f0fb6SGarrett D'Amore.Lp
79f07f0fb6SGarrett D'AmoreThe
80f07f0fb6SGarrett D'Amore.Fn wcpcpy
81f07f0fb6SGarrett D'Amoreand
82f07f0fb6SGarrett D'Amore.Fn wcpncpy
83f07f0fb6SGarrett D'Amorefunctions are the wide-character equivalents of
84f07f0fb6SGarrett D'Amore.Fn stpcpy
85f07f0fb6SGarrett D'Amoreand
86f07f0fb6SGarrett D'Amore.Fn stpncpy ,
87f07f0fb6SGarrett D'Amorerespectively.
88f07f0fb6SGarrett D'Amore.Sh RETURN VALUES
89f07f0fb6SGarrett D'AmoreThe
90f07f0fb6SGarrett D'Amore.Fn wcpcpy
91f07f0fb6SGarrett D'Amoreand
92f07f0fb6SGarrett D'Amore.Fn wcpncpy
9372d3dbb9SYuri Pankovfunctions return a pointer to the last wide-character written.
9472d3dbb9SYuri PankovIn the case of
95f07f0fb6SGarrett D'Amore.Fn wcpncpy
96f07f0fb6SGarrett D'Amorethis will always be equal to
97f07f0fb6SGarrett D'Amore.Po Fa ws1 Li + Fa n Li \(mi 1 Pc .
98f07f0fb6SGarrett D'Amore.Sh ERRORS
99f07f0fb6SGarrett D'AmoreNone.
100f07f0fb6SGarrett D'Amore.Sh INTERFACE STABILITY
101f07f0fb6SGarrett D'Amore.Sy Standard .
102f07f0fb6SGarrett D'Amore.Sh MT-LEVEL
103f07f0fb6SGarrett D'Amore.Sy MT-Safe .
104f07f0fb6SGarrett D'Amore.Sh SEE ALSO
105f07f0fb6SGarrett D'Amore.Xr stpcpy 3C ,
106f07f0fb6SGarrett D'Amore.Xr stpncpy 3C ,
107f07f0fb6SGarrett D'Amore.Xr wcscpy 3C ,
108f07f0fb6SGarrett D'Amore.Xr wcsncpy 3C ,
109f07f0fb6SGarrett D'Amore.Xr wchar.h 3HEAD ,
110*bbf21555SRichard Lowe.Xr standards 7
111f07f0fb6SGarrett D'Amore.Sh STANDARDS
112f07f0fb6SGarrett D'AmoreThe
113f07f0fb6SGarrett D'Amore.Fn wcpcpy
114f07f0fb6SGarrett D'Amoreand
115f07f0fb6SGarrett D'Amore.Fn wcpncpy
116f07f0fb6SGarrett D'Amorefunctions were introduced in
117f07f0fb6SGarrett D'Amore.St -p1003.1-2008 .
118