Browse Source

clarify these functions by changing references from strings to buffers

ok deraadt@, millert@, jmc@, suggested by espie@
OPENBSD_3_4
avsm 21 years ago
parent
commit
0c6b29846c
3 changed files with 16 additions and 16 deletions
  1. +5
    -5
      src/lib/libc/string/bcopy.3
  2. +6
    -6
      src/lib/libc/string/memcpy.3
  3. +5
    -5
      src/lib/libc/string/memmove.3

+ 5
- 5
src/lib/libc/string/bcopy.3 View File

@ -28,14 +28,14 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" SUCH DAMAGE.
.\" .\"
.\" $OpenBSD: bcopy.3,v 1.7 2003/06/02 20:18:38 millert Exp $
.\" $OpenBSD: bcopy.3,v 1.8 2003/06/21 12:04:01 avsm Exp $
.\" .\"
.Dd April 19, 1991 .Dd April 19, 1991
.Dt BCOPY 3 .Dt BCOPY 3
.Os .Os
.Sh NAME .Sh NAME
.Nm bcopy .Nm bcopy
.Nd copy byte string
.Nd copy bytes
.Sh SYNOPSIS .Sh SYNOPSIS
.Fd #include <string.h> .Fd #include <string.h>
.Ft void .Ft void
@ -45,11 +45,11 @@ The
.Fn bcopy .Fn bcopy
function copies function copies
.Fa len .Fa len
bytes from string
bytes from buffer
.Fa src .Fa src
to string
to buffer
.Fa dst . .Fa dst .
The two strings may overlap.
The two buffers may overlap.
If If
.Fa len .Fa len
is zero, no bytes are copied. is zero, no bytes are copied.


+ 6
- 6
src/lib/libc/string/memcpy.3 View File

@ -29,14 +29,14 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" SUCH DAMAGE.
.\" .\"
.\" $OpenBSD: memcpy.3,v 1.5 2003/06/02 20:18:38 millert Exp $
.\" $OpenBSD: memcpy.3,v 1.6 2003/06/21 12:04:01 avsm Exp $
.\" .\"
.Dd June 29, 1991 .Dd June 29, 1991
.Dt MEMCPY 3 .Dt MEMCPY 3
.Os .Os
.Sh NAME .Sh NAME
.Nm memcpy .Nm memcpy
.Nd copy byte string
.Nd copy bytes
.Sh SYNOPSIS .Sh SYNOPSIS
.Fd #include <string.h> .Fd #include <string.h>
.Ft void * .Ft void *
@ -46,9 +46,9 @@ The
.Fn memcpy .Fn memcpy
function copies function copies
.Fa len .Fa len
bytes from string
bytes from buffer
.Fa src .Fa src
to string
to buffer
.Fa dst . .Fa dst .
.Sh RETURN VALUES .Sh RETURN VALUES
The The
@ -71,7 +71,7 @@ In this implementation
.Fn memcpy .Fn memcpy
is implemented using is implemented using
.Xr bcopy 3 , .Xr bcopy 3 ,
and therefore the strings may overlap.
On other systems, copying overlapping strings may produce surprises.
and therefore the buffers may overlap.
On other systems, copying overlapping buffers may produce surprises.
A simpler solution is to not use A simpler solution is to not use
.Fn memcpy . .Fn memcpy .

+ 5
- 5
src/lib/libc/string/memmove.3 View File

@ -29,14 +29,14 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" SUCH DAMAGE.
.\" .\"
.\" $OpenBSD: memmove.3,v 1.5 2003/06/02 20:18:38 millert Exp $
.\" $OpenBSD: memmove.3,v 1.6 2003/06/21 12:04:01 avsm Exp $
.\" .\"
.Dd June 29, 1991 .Dd June 29, 1991
.Dt MEMMOVE 3 .Dt MEMMOVE 3
.Os .Os
.Sh NAME .Sh NAME
.Nm memmove .Nm memmove
.Nd copy byte string
.Nd copy bytes
.Sh SYNOPSIS .Sh SYNOPSIS
.Fd #include <string.h> .Fd #include <string.h>
.Ft void * .Ft void *
@ -46,11 +46,11 @@ The
.Fn memmove .Fn memmove
function copies function copies
.Fa len .Fa len
bytes from string
bytes from buffer
.Fa src .Fa src
to string
to buffer
.Fa dst . .Fa dst .
The two strings may overlap;
The two buffers may overlap;
the copy is always done in a non-destructive manner. the copy is always done in a non-destructive manner.
.Sh RETURN VALUES .Sh RETURN VALUES
The The


Loading…
Cancel
Save