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