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:     register unsigned long temp;
  15: 
  16:     n >>= 1; n++;
  17: #define STEP    temp = *from++,*to++ = *from++,*to++ = temp
  18:     /* round to multiple of 8 */
  19:     while ((--n) & 07)
  20:         STEP;
  21:     n >>= 3;
  22:     while (--n >= 0) {
  23:         STEP; STEP; STEP; STEP;
  24:         STEP; STEP; STEP; STEP;
  25:     }
  26: }

Defined functions

Defined variables

sccsid defined in line 2; never used

Defined macros

STEP defined in line 17; used 9 times
Last modified: 1986-03-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 771
Valid CSS Valid XHTML 1.0 Strict