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
51f07f0fb6SGarrett D'Amorewide-characters have been copied. If
52f07f0fb6SGarrett D'Amore.Fa ws2
53f07f0fb6SGarrett D'Amorecontains fewer than
54f07f0fb6SGarrett D'Amore.Fa n
55f07f0fb6SGarrett D'Amorewide-characters, then the
56f07f0fb6SGarrett D'Amore.Fn wcpncpy
57f07f0fb6SGarrett D'Amorefunction pads wide-characters to the end of the destination
58f07f0fb6SGarrett D'Amore.Fa ws1
59f07f0fb6SGarrett D'Amoreuntil exactly
60f07f0fb6SGarrett D'Amore.Fa n
61f07f0fb6SGarrett D'Amorewide-characters have been written.
62f07f0fb6SGarrett D'Amore.Lp
63f07f0fb6SGarrett D'AmoreIn the case of
64f07f0fb6SGarrett D'Amore.Fn wcpncpy
65f07f0fb6SGarrett D'Amorea terminating null wide-character will
66f07f0fb6SGarrett D'Amore.Em not
67f07f0fb6SGarrett D'Amorebe written if the length of
68f07f0fb6SGarrett D'Amore.Fa ws2
69f07f0fb6SGarrett D'Amoreexceeds
70f07f0fb6SGarrett D'Amore.Fa n .
71f07f0fb6SGarrett D'Amore.Lp
72f07f0fb6SGarrett D'AmoreIf
73f07f0fb6SGarrett D'Amore.Fa ws1
74f07f0fb6SGarrett D'Amoreand
75f07f0fb6SGarrett D'Amore.Fa ws2
76f07f0fb6SGarrett D'Amoreoverlap, the result is undefined.
77f07f0fb6SGarrett D'Amore.Lp
78f07f0fb6SGarrett D'AmoreThe
79f07f0fb6SGarrett D'Amore.Fn wcpcpy
80f07f0fb6SGarrett D'Amoreand
81f07f0fb6SGarrett D'Amore.Fn wcpncpy
82f07f0fb6SGarrett D'Amorefunctions are the wide-character equivalents of
83f07f0fb6SGarrett D'Amore.Fn stpcpy
84f07f0fb6SGarrett D'Amoreand
85f07f0fb6SGarrett D'Amore.Fn stpncpy ,
86f07f0fb6SGarrett D'Amorerespectively.
87f07f0fb6SGarrett D'Amore.Sh RETURN VALUES
88f07f0fb6SGarrett D'AmoreThe
89f07f0fb6SGarrett D'Amore.Fn wcpcpy
90f07f0fb6SGarrett D'Amoreand
91f07f0fb6SGarrett D'Amore.Fn wcpncpy
92f07f0fb6SGarrett D'Amorefunctions return a pointer to the last wide-character written.  In the
93f07f0fb6SGarrett D'Amorecase of
94f07f0fb6SGarrett D'Amore.Fn wcpncpy
95f07f0fb6SGarrett D'Amorethis will always be equal to
96f07f0fb6SGarrett D'Amore.Po Fa ws1 Li + Fa n Li \(mi 1 Pc .
97f07f0fb6SGarrett D'Amore.Sh ERRORS
98f07f0fb6SGarrett D'AmoreNone.
99f07f0fb6SGarrett D'Amore.Sh INTERFACE STABILITY
100f07f0fb6SGarrett D'Amore.Sy Standard .
101f07f0fb6SGarrett D'Amore.Sh MT-LEVEL
102f07f0fb6SGarrett D'Amore.Sy MT-Safe .
103f07f0fb6SGarrett D'Amore.Sh SEE ALSO
104f07f0fb6SGarrett D'Amore.Xr stpcpy 3C ,
105f07f0fb6SGarrett D'Amore.Xr stpncpy 3C ,
106f07f0fb6SGarrett D'Amore.Xr wcscpy 3C ,
107f07f0fb6SGarrett D'Amore.Xr wcsncpy 3C ,
108f07f0fb6SGarrett D'Amore.Xr wchar.h 3HEAD ,
109f07f0fb6SGarrett D'Amore.Xr standards 5
110f07f0fb6SGarrett D'Amore.Sh STANDARDS
111f07f0fb6SGarrett D'AmoreThe
112f07f0fb6SGarrett D'Amore.Fn wcpcpy
113f07f0fb6SGarrett D'Amoreand
114f07f0fb6SGarrett D'Amore.Fn wcpncpy
115f07f0fb6SGarrett D'Amorefunctions were introduced in
116f07f0fb6SGarrett D'Amore.St -p1003.1-2008 .
117