SWAP(3ast)

NAME
swap - integral representation conversion routines

SYNOPSIS

DESCRIPTION
These routines convert integral constants between internal and external representations. They are used to handle binary data generated by foreign programs. New binary data representations should use the compact canonical form provided by the sfio(3) routines and

returns the swap operation required to convert the byte integer to the byte integer The swap operation is a bit mask:

No swapping necessary.

Swap byte
    with byte

Swap bytes
    and with bytes and

Swap bytes
    with bytes and so on. The largest native integral type is defined by the macro in the header described in int(3).

returns the byte integer in the buffer swapped according to

copies the byte integer into the buffer swapped according to is returned.

swaps bytes from the buffer to the buffer according to and may be the same.

SEE ALSO
int(3)