date and time created 91/04/12 13:40:37 by bostic
[unix-history] / usr / src / lib / libc / string / swab.3
index 4328ad9..38d7ae8 100644 (file)
@@ -1,24 +1,36 @@
-.\"    @(#)swab.3      4.1 (Berkeley) %G%
+.\" Copyright (c) 1990 The Regents of the University of California.
+.\" All rights reserved.
 .\"
 .\"
-.TH SWAB 3 
+.\" %sccs.include.redist.man%
+.\"
+.\"    @(#)swab.3      6.3 (Berkeley) %G%
+.\"
+.TH SWAB 3  ""
 .AT 3
 .AT 3
+.nf
 .SH NAME
 swab \- swap bytes
 .SH SYNOPSIS
 .nf
 .SH NAME
 swab \- swap bytes
 .SH SYNOPSIS
 .nf
-.B swab(from, to, nbytes)
-.B char *from, *to;
+.ft B
+#include <string.h>
+
+void
+swab(const char *src, char *dst, size_t len);
+.ft R
 .fi
 .SH DESCRIPTION
 .fi
 .SH DESCRIPTION
-.I Swab
+The function
+.I swab
 copies
 copies
-.I nbytes
-bytes pointed to by
-.I from
-to the position pointed to by
-.I to,
-exchanging adjacent even and odd bytes.
-It is useful for carrying binary data between
-PDP11's and other machines.
-.I Nbytes
+.I len
+bytes from the location referenced by
+.I src
+to the location referenced by
+.IR dst ,
+swapping adjacent bytes.
+.PP
+.I Len
 should be even.
 should be even.
+.SH SEE ALSO
+bzero(3), memset(3)