swab()

swap bytes 

Function


SYNOPSIS

#include <unistd.h>

void swab(const void *src, void *dst, ssize_t nbytes);


DESCRIPTION

The swab() function copies the specified number of bytes from the specified source to the specified destination, exchanging adjacent bytes. The number of bytes should be even. If the number of bytes is odd, swab() copies and exchanges (nbytes-1) bytes and the disposition of the last byte is unspecified. If the source and destination regions overlap, the behavior is unspecified. If the specified number of bytes is negative, swab() does nothing.


PARAMETERS

src 

Points to a source of memory to be copied.

dst 

Points to the destination of the copy.

nbytes 

Is the number of bytes to copy.


RETURN VALUES

None.


CONFORMANCE

UNIX 98.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
memcpy(), memmove()


PTC MKS Toolkit 10.3 Documentation Build 39.