T#include <unistd.h>
Tint main(int argc, char **argv)
T{
T short src, dest;
T src = 1;
T swab((const void *)&src, (void *)&dest, sizeof(src));
T return dest==256 ? 0 : 1;
T}
H
H#include <sys/types.h>
H	extern "C" void swab(const void *src, void *dest, size_t n);
H
C
C#include "gpk_std.h"
C
Cextern "C" void swab(const void *src, void *dest, size_t n)
C{
C const char *s = (const char *)src;
C char *d = (char *)dest;
C const char *e = s + (n - n%2);
C while(s < e) {
C	const char t1 = *(s++);
C	const char t2 = *(s++);
C	*(d++) = t2;
C	*(d++) = t1;
C }
C}
C
ENDEND
fi
