Loading...
--- Libc/Libc-498/string/swab.3
+++ Libc/Libc-763.11/string/swab.3
@@ -9,10 +9,6 @@
.\" 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.
@@ -30,9 +26,9 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)swab.3 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/string/swab.3,v 1.7 2002/08/30 21:18:39 robert Exp $
+.\" $FreeBSD: src/lib/libc/string/swab.3,v 1.10 2007/01/09 00:28:12 imp Exp $
.\"
-.Dd June 4, 1993
+.Dd February 24, 2010
.Dt SWAB 3
.Os
.Sh NAME
@@ -61,24 +57,19 @@
.Pp
The argument
.Fa nbytes
-must be an even number.
-.Sh LEGACY SYNOPSIS
-.Fd #include <string.h>
-.Pp
-.Ft void
-.br
-.Fo swab
-.Fa "const void *restrict src"
-.Fa "void *restrict dest"
-.Fa "size_t nbytes"
-.Fc ;
-.Pp
-The include file
-.In string.h
-is necessary for this function.
-The type of
+should be an even number. If
.Fa nbytes
-has changed.
+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.
.Sh SEE ALSO
.Xr bzero 3 ,
.Xr memset 3 ,