1 /* @(#)swab.c 4.1 (Berkeley) 12/21/80 */ 2 /* 3 * Swap bytes in 16-bit [half-]words 4 * for going between the 11 and the interdata 5 */ 6 7 swab(pf, pt, n) 8 register short *pf, *pt; 9 register n; 10 { 11 12 n /= 2; 13 while (--n >= 0) { 14 *pt++ = (*pf << 8) + ((*pf >> 8) & 0377); 15 pf++; 16 } 17 } 18