summaryrefslogtreecommitdiff
path: root/src/lib/libc/string/memccpy.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/string/memccpy.3')
-rw-r--r--src/lib/libc/string/memccpy.334
1 files changed, 17 insertions, 17 deletions
diff --git a/src/lib/libc/string/memccpy.3 b/src/lib/libc/string/memccpy.3
index 61df704028..8c159cb8de 100644
--- a/src/lib/libc/string/memccpy.3
+++ b/src/lib/libc/string/memccpy.3
@@ -1,5 +1,7 @@
1.\" Copyright (c) 1990, 1991 The Regents of the University of California. 1.\" $OpenBSD: memccpy.3,v 1.8 2003/06/02 20:18:38 millert Exp $
2.\" All rights reserved. 2.\"
3.\" Copyright (c) 1990, 1991, 1993
4.\" The Regents of the University of California. All rights reserved.
3.\" 5.\"
4.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
@@ -9,11 +11,7 @@
9.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
10.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
11.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
12.\" 3. All advertising materials mentioning features or use of this software 14.\" 3. Neither the name of the University nor the names of its contributors
13.\" must display the following acknowledgement:
14.\" This product includes software developed by the University of
15.\" California, Berkeley and its contributors.
16.\" 4. Neither the name of the University nor the names of its contributors
17.\" may be used to endorse or promote products derived from this software 15.\" may be used to endorse or promote products derived from this software
18.\" without specific prior written permission. 16.\" without specific prior written permission.
19.\" 17.\"
@@ -29,14 +27,14 @@
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE. 28.\" SUCH DAMAGE.
31.\" 29.\"
32.\" from: @(#)memccpy.3 5.4 (Berkeley) 4/19/91 30.\" @(#)memccpy.3 8.1 (Berkeley) 6/9/93
33.\" $Id: memccpy.3,v 1.1.1.1 1995/10/18 08:42:21 deraadt Exp $
34.\" 31.\"
35.Dd April 19, 1991 32.Dd June 9, 1993
36.Dt MEMCCPY 3 33.Dt MEMCCPY 3
37.Os 34.Os
38.Sh NAME 35.Sh NAME
39.Nm memccpy 36.Nm memccpy
37.Nd copy string until character found
40.Sh SYNOPSIS 38.Sh SYNOPSIS
41.Fd #include <string.h> 39.Fd #include <string.h>
42.Ft void * 40.Ft void *
@@ -44,14 +42,15 @@
44.Sh DESCRIPTION 42.Sh DESCRIPTION
45The 43The
46.Fn memccpy 44.Fn memccpy
47function 45function copies bytes from string
48copies bytes from string
49.Fa src 46.Fa src
50to string 47to string
51.Fa dst . 48.Fa dst .
52If the character 49If the character
53.Fa c 50.Fa c
54(as converted to an unsigned char) occurs in the string 51(as converted to an
52.Li unsigned char )
53occurs in the string
55.Fa src , 54.Fa src ,
56the copy stops and a pointer to the byte after the copy of 55the copy stops and a pointer to the byte after the copy of
57.Fa c 56.Fa c
@@ -60,14 +59,15 @@ in the string
60is returned. 59is returned.
61Otherwise, 60Otherwise,
62.Fa len 61.Fa len
63bytes are copied, and a NULL pointer is returned. 62bytes are copied, and a null pointer is returned.
64.Sh SEE ALSO 63.Sh SEE ALSO
65.Xr bcopy 3 , 64.Xr bcopy 3 ,
66.Xr memcpy 3 , 65.Xr memcpy 3 ,
67.Xr memmove 3 , 66.Xr memmove 3 ,
68.Xr strcpy 3 67.Xr strcpy 3 ,
68.Xr strlcpy 3
69.Sh HISTORY 69.Sh HISTORY
70The 70The
71.Fn memccpy 71.Fn memccpy
72function is 72function first appeared in
73.Ud . 73.Bx 4.4 .