Loading...
--- Libc/Libc-763.13/string/swab.3
+++ Libc/Libc-262.2.12/string/swab.3
@@ -9,6 +9,10 @@
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
@@ -26,9 +30,9 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)swab.3 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/string/swab.3,v 1.10 2007/01/09 00:28:12 imp Exp $
+.\" $FreeBSD: src/lib/libc/string/swab.3,v 1.6 2001/10/01 16:09:00 ru Exp $
.\"
-.Dd February 24, 2010
+.Dd June 4, 1993
.Dt SWAB 3
.Os
.Sh NAME
@@ -37,43 +41,26 @@
.Sh LIBRARY
.Lb libc
.Sh SYNOPSIS
-.In unistd.h
+.In string.h
.Ft void
-.Fo swab
-.Fa "const void *restrict src"
-.Fa "void *restrict dest"
-.Fa "ssize_t nbytes"
-.Fc
+.Fn swab "const void *src" "void *dst" "size_t len"
.Sh DESCRIPTION
The function
.Fn swab
copies
-.Fa nbytes
+.Fa len
bytes from the location referenced by
.Fa src
to the location referenced by
-.Fa dest ,
+.Fa dst ,
swapping adjacent bytes.
.Pp
The argument
-.Fa nbytes
-should be an even number. If
-.Fa nbytes
-is odd,
-.Fn swab
-copies and exchanges
-.Fa nbytes
--1 bytes and the disposition of the last byte is unspecified.
-If copying takes place between objects that overlap,
-the behavior is undefined. If
-.Fa nbytes
-is negative,
-.Fn swab
-does nothing.
+.Fa len
+must be an even number.
.Sh SEE ALSO
.Xr bzero 3 ,
-.Xr memset 3 ,
-.Xr compat 5
+.Xr memset 3
.Sh HISTORY
A
.Fn swab