ADC Home > Reference Library > Reference > Mac OS X > Mac OS X Man Pages

 

This document is a Mac OS X manual page. Manual pages are a command-line technology for providing documentation. You can view these manual pages locally using the man(1) command. These manual pages come from many different sources, and thus, have a variety of writing styles.

For more information about the manual page format, see the manual page for manpages(5).



SWAB(3)                  BSD Library Functions Manual                  SWAB(3)

NAME
     swab -- swap adjacent bytes

LIBRARY
     Standard C Library (libc, -lc)

SYNOPSIS
     #include <unistd.h>

     void
     swab(const void *restrict src, void *restrict dest, ssize_t nbytes);

DESCRIPTION
     The function swab() copies nbytes bytes from the location referenced by src to the location referenced
     by dest, swapping adjacent bytes.

     The argument nbytes must be an even number.

LEGACY SYNOPSIS
     #include <string.h>

     void
     swab(const void *restrict src, void *restrict dest, size_t nbytes);

     The include file <string.h> is necessary for this function.  The type of nbytes has changed.

SEE ALSO
     bzero(3), memset(3), compat(5)

HISTORY
     A swab() function appeared in Version 7 AT&T UNIX.

BSD                              June 4, 1993                              BSD

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.