1: #if defined(LIBC_SCCS) && !defined(lint)
   2: static char sccsid[] = "@(#)swab.c	5.3 (Berkeley) 3/9/86";
   3: #endif LIBC_SCCS and not lint
   4: 
   5: /*
   6:  * Swab bytes
   7:  * Jeffrey Mogul, Stanford
   8:  */
   9: 
  10: swab(from, to, n)
  11:     register char *from, *to;
  12:     register int n;
  13: {
  14: #ifdef pdp11
  15:     register int temp;
  16: #else !pdp11
  17:     register unsigned long temp;
  18: #endif pdp11
  19: 
  20:     n >>= 1; n++;
  21: #define STEP    temp = *from++,*to++ = *from++,*to++ = temp
  22:     /* round to multiple of 8 */
  23:     while ((--n) & 07)
  24:         STEP;
  25:     n >>= 3;
  26:     while (--n >= 0) {
  27:         STEP; STEP; STEP; STEP;
  28:         STEP; STEP; STEP; STEP;
  29:     }
  30: }

Defined functions

swab defined in line 10; used 9 times

Defined variables

sccsid defined in line 2; never used

Defined macros

STEP defined in line 21; used 9 times
Last modified: 1987-01-18
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1820
Valid CSS Valid XHTML 1.0 Strict