swab (SunOS) swab (SunOS)
NAME
swab - Swaps bytes
LIBRARY
Standard C Library (libc.a) System V Compatibility Library (libsys5.a)
SUN OS AND SYSTEM V SYNOPSIS
void swab(
const char *from,
char *to,
int nbytes);
DIGITAL UNIX SYNOPSIS
#include <unistd.h>
void swab(
const void *src,
void *dest,
ssize_t nbytes);
The following definition of the swab() function does not conform to
current standards and is supported only for System V compatibility:
void swab(
const char *from,
char *to,
int nbytes);
PARAMETERS
Points to the location of the string to copy. Points to the location
to which the resulting string is copied. Specifies the number of bytes
to be copied. The nbytes parameter should have an even value. When
the nbytes parameter is odd, the swab() function uses nbytes-1 instead.
For the System V version of the swab() function, nbytes must also be
non-negative. If nbytes is negative, nothing is done.
DIFFERENCES
Requires the unistd.h header file. Declaration types have changed.
SYSTEM V COMPATIBILITY
Digital UNIX provides the libsys5.a library to allow you to use library
functions that are compatible with System V library functions. This
library contains functions for those libc functions whose behavior is
incompatible with POSIX or X/Open standards. For more information
about the System V (SVID-2) features in Digital UNIX, please refer to
the System V Compatibility User's Guide.
You must link with the libsys5 library before you link with libc.
RELATED INFORMATION
Digital UNIX Functions:
swab(3) delim off
swab (SunOS)