blob: b2132884c3c4dfdbc971874221f76c19a3127c8e (
plain) (
tree)
|
|
#include <unistd.h>
void swab(const void *_src, void *_dest, ssize_t n)
{
const char *src = _src;
char *dest = _dest;
for (; n>0; n-=2) {
dest[0] = src[1];
dest[1] = src[0];
dest += 2;
src += 2;
}
}
|