diff options
Diffstat (limited to 'src/lib/libc/string/memcpy.3')
| -rw-r--r-- | src/lib/libc/string/memcpy.3 | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/src/lib/libc/string/memcpy.3 b/src/lib/libc/string/memcpy.3 index 3f4bb643c9..c8265d94a6 100644 --- a/src/lib/libc/string/memcpy.3 +++ b/src/lib/libc/string/memcpy.3 | |||
| @@ -13,11 +13,7 @@ | |||
| 13 | .\" 2. Redistributions in binary form must reproduce the above copyright | 13 | .\" 2. Redistributions in binary form must reproduce the above copyright |
| 14 | .\" notice, this list of conditions and the following disclaimer in the | 14 | .\" notice, this list of conditions and the following disclaimer in the |
| 15 | .\" documentation and/or other materials provided with the distribution. | 15 | .\" documentation and/or other materials provided with the distribution. |
| 16 | .\" 3. All advertising materials mentioning features or use of this software | 16 | .\" 3. Neither the name of the University nor the names of its contributors |
| 17 | .\" must display the following acknowledgement: | ||
| 18 | .\" This product includes software developed by the University of | ||
| 19 | .\" California, Berkeley and its contributors. | ||
| 20 | .\" 4. Neither the name of the University nor the names of its contributors | ||
| 21 | .\" may be used to endorse or promote products derived from this software | 17 | .\" may be used to endorse or promote products derived from this software |
| 22 | .\" without specific prior written permission. | 18 | .\" without specific prior written permission. |
| 23 | .\" | 19 | .\" |
| @@ -33,15 +29,14 @@ | |||
| 33 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 34 | .\" SUCH DAMAGE. | 30 | .\" SUCH DAMAGE. |
| 35 | .\" | 31 | .\" |
| 36 | .\" from: @(#)memcpy.3 5.5 (Berkeley) 6/29/91 | 32 | .\" $OpenBSD: memcpy.3,v 1.6 2003/06/21 12:04:01 avsm Exp $ |
| 37 | .\" $Id: memcpy.3,v 1.1.1.1 1995/10/18 08:42:21 deraadt Exp $ | ||
| 38 | .\" | 33 | .\" |
| 39 | .Dd June 29, 1991 | 34 | .Dd June 29, 1991 |
| 40 | .Dt MEMCPY 3 | 35 | .Dt MEMCPY 3 |
| 41 | .Os | 36 | .Os |
| 42 | .Sh NAME | 37 | .Sh NAME |
| 43 | .Nm memcpy | 38 | .Nm memcpy |
| 44 | .Nd copy byte string | 39 | .Nd copy bytes |
| 45 | .Sh SYNOPSIS | 40 | .Sh SYNOPSIS |
| 46 | .Fd #include <string.h> | 41 | .Fd #include <string.h> |
| 47 | .Ft void * | 42 | .Ft void * |
| @@ -49,36 +44,34 @@ | |||
| 49 | .Sh DESCRIPTION | 44 | .Sh DESCRIPTION |
| 50 | The | 45 | The |
| 51 | .Fn memcpy | 46 | .Fn memcpy |
| 52 | function | 47 | function copies |
| 53 | copies | ||
| 54 | .Fa len | 48 | .Fa len |
| 55 | bytes from string | 49 | bytes from buffer |
| 56 | .Fa src | 50 | .Fa src |
| 57 | to string | 51 | to buffer |
| 58 | .Fa dst . | 52 | .Fa dst . |
| 59 | .Sh RETURN VALUES | 53 | .Sh RETURN VALUES |
| 60 | The | 54 | The |
| 61 | .Fn memcpy | 55 | .Fn memcpy |
| 62 | function | 56 | function returns the original value of |
| 63 | returns the original value of | ||
| 64 | .Fa dst . | 57 | .Fa dst . |
| 65 | .Sh SEE ALSO | 58 | .Sh SEE ALSO |
| 66 | .Xr bcopy 3 , | 59 | .Xr bcopy 3 , |
| 67 | .Xr memccpy 3 , | 60 | .Xr memccpy 3 , |
| 68 | .Xr memmove 3 , | 61 | .Xr memmove 3 , |
| 69 | .Xr strcpy 3 | 62 | .Xr strcpy 3 , |
| 63 | .Xr strlcpy 3 | ||
| 70 | .Sh STANDARDS | 64 | .Sh STANDARDS |
| 71 | The | 65 | The |
| 72 | .Fn memcpy | 66 | .Fn memcpy |
| 73 | function | 67 | function conforms to |
| 74 | conforms to | ||
| 75 | .St -ansiC . | 68 | .St -ansiC . |
| 76 | .Sh BUGS | 69 | .Sh BUGS |
| 77 | In this implementation | 70 | In this implementation |
| 78 | .Fn memcpy | 71 | .Fn memcpy |
| 79 | is implemented using | 72 | is implemented using |
| 80 | .Xr bcopy 3 , | 73 | .Xr bcopy 3 , |
| 81 | and therefore the strings may overlap. | 74 | and therefore the buffers may overlap. |
| 82 | On other systems, copying overlapping strings may produce surprises. | 75 | On other systems, copying overlapping buffers may produce surprises. |
| 83 | A simpler solution is to not use | 76 | A simpler solution is to not use |
| 84 | .Fn memcpy . | 77 | .Fn memcpy . |
