1: /*
   2:  * Copyright (c) 1987 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  */
   6: 
   7: #if defined(LIBC_SCCS) && !defined(lint)
   8: static char sccsid[] = "@(#)l3.c	2.3 (Berkeley) 1/25/87";
   9: #endif LIBC_SCCS and not lint
  10: 
  11: /*
  12:  * Convert longs to 3-byte disk addresses
  13:  */
  14: ltol3(cp, lp, n)
  15:     char *cp;
  16:     long *lp;
  17:     int n;
  18: {
  19:     register i;
  20:     register char *a, *b;
  21: 
  22:     a = cp;
  23:     b = (char *)lp;
  24:     for(i=0; i<n; i++) {
  25: #ifdef interdata
  26:         b++;
  27:         *a++ = *b++;
  28:         *a++ = *b++;
  29:         *a++ = *b++;
  30: #else
  31:         *a++ = *b++;
  32:         b++;
  33:         *a++ = *b++;
  34:         *a++ = *b++;
  35: #endif
  36:     }
  37: }
  38: 
  39: /*
  40:  * Convert 3-byte disk addresses to longs
  41:  */
  42: l3tol(lp, cp, n)
  43:     long *lp;
  44:     char *cp;
  45:     int n;
  46: {
  47:     register i;
  48:     register char *a, *b;
  49: 
  50:     a = (char *)lp;
  51:     b = cp;
  52:     for(i=0; i<n; i++) {
  53: #ifdef interdata
  54:         *a++ = 0;
  55:         *a++ = *b++;
  56:         *a++ = *b++;
  57:         *a++ = *b++;
  58: #else
  59:         *a++ = *b++;
  60:         *a++ = 0;
  61:         *a++ = *b++;
  62:         *a++ = *b++;
  63: #endif
  64:     }
  65: }

Defined functions

l3tol defined in line 42; used 3 times
ltol3 defined in line 14; used 1 times

Defined variables

sccsid defined in line 8; never used
Last modified: 1987-01-25
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: ?E00
Valid CSS Valid XHTML 1.0 Strict