diff options
Diffstat (limited to 'src/lib/libc/string/memccpy.3')
| -rw-r--r-- | src/lib/libc/string/memccpy.3 | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/src/lib/libc/string/memccpy.3 b/src/lib/libc/string/memccpy.3 index 61df704028..f8f880e3b1 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.10 2011/07/25 00:38:52 schwarze 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 $Mdocdate: July 25 2011 $ |
| 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 |
| 45 | The | 43 | The |
| 46 | .Fn memccpy | 44 | .Fn memccpy |
| 47 | function | 45 | function copies bytes from string |
| 48 | copies bytes from string | ||
| 49 | .Fa src | 46 | .Fa src |
| 50 | to string | 47 | to string |
| 51 | .Fa dst . | 48 | .Fa dst . |
| 52 | If the character | 49 | If 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 ) | ||
| 53 | occurs in the string | ||
| 55 | .Fa src , | 54 | .Fa src , |
| 56 | the copy stops and a pointer to the byte after the copy of | 55 | the copy stops and a pointer to the byte after the copy of |
| 57 | .Fa c | 56 | .Fa c |
| @@ -60,14 +59,17 @@ in the string | |||
| 60 | is returned. | 59 | is returned. |
| 61 | Otherwise, | 60 | Otherwise, |
| 62 | .Fa len | 61 | .Fa len |
| 63 | bytes are copied, and a NULL pointer is returned. | 62 | bytes 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 |
| 70 | The | 70 | The |
| 71 | .Fn memccpy | 71 | .Fn memccpy |
| 72 | function is | 72 | function first appeared in |
| 73 | .Ud . | 73 | .At V |
| 74 | and was reimplemented for | ||
| 75 | .Bx 4.3 Tahoe . | ||
