1: /* @(#)l3.c 2.1 SCCS id keyword */
2: /*
3: * Convert longs to and from 3-byte disk addresses
4: */
5: ltol3(cp, lp, n)
6: char *cp;
7: long *lp;
8: int n;
9: {
10: register i;
11: register char *a, *b;
12:
13: a = cp;
14: b = (char *)lp;
15: for(i=0;i<n;i++) {
16: #ifdef interdata
17: b++;
18: *a++ = *b++;
19: *a++ = *b++;
20: *a++ = *b++;
21: #else
22: *a++ = *b++;
23: b++;
24: *a++ = *b++;
25: *a++ = *b++;
26: #endif
27: }
28: }
29:
30: l3tol(lp, cp, n)
31: long *lp;
32: char *cp;
33: int n;
34: {
35: register i;
36: register char *a, *b;
37:
38: a = (char *)lp;
39: b = cp;
40: for(i=0;i<n;i++) {
41: #ifdef interdata
42: *a++ = 0;
43: *a++ = *b++;
44: *a++ = *b++;
45: *a++ = *b++;
46: #else
47: *a++ = *b++;
48: *a++ = 0;
49: *a++ = *b++;
50: *a++ = *b++;
51: #endif
52: }
53: }
Defined functions
l3tol
defined in line
30; used 11 times
ltol3
defined in line
5; used 3 times