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