| SWAP(3) | C LIBRARY FUNCTIONS | SWAP(3) |
|---|
int swapop(const void* internal, const void* external, int width); int_max swapget(int op, const void* from, int width); void* swapput(int op, void* to, int width, int_max value); void* swapmem(int op, const void* from, void* to, size_t n);
swapop returns the swap operation required to convert the width byte integer external to the width byte integer internal. The swap operation is a bit mask:
swapget returns the width byte integer in the buffer from, swapped according to op.
swapput copies the width byte integer value into the buffer to, swapped according to op. to is returned.
swapmem swaps n bytes from the buffer from to the buffer to according to op. to and from may be the same.
| November 07, 2006 |