1: /* c-version of tp?.s
2: *
3: * M. Ferentz
4: * August 1976
5: *
6: * revised July 1977 BTL
7: */
8:
9: #define MDIRENT 496 /* must be zero mod 8 */
10: #define DIRSZ sizeof(struct dent)
11: #define MAPSIZE 4096
12: #define MAPMASK 07777
13: #define NAMELEN 32
14: #define BSIZE 512
15: #define TCSIZ 578
16: #define TCDIRS 192
17: #define MTSIZ 32767
18: #define TPB (BSIZE/sizeof(struct tent))
19: #define OK 0100000
20: #define BRKINCR 512
21:
22: #define tapeblk &tpentry[0]
23: #define tapeb &tpentry[0]
24:
25: struct tent { /* Structure of a tape directory block */
26: char pathnam[NAMELEN];
27: short mode;
28: char uid;
29: char gid;
30: char spare;
31: char size0;
32: unsigned short size1;
33: long time;
34: unsigned short tapea; /* tape address */
35: short unused[8];
36: short cksum;
37: } tpentry[TPB];
38:
39: struct dent { /* in core version of tent with "unused" removed
40: * and pathname replaced by pointer to same in a
41: * packed area (nameblock).
42: */
43: char *d_namep;
44: int d_mode;
45: int d_uid;
46: int d_gid;
47: long d_size;
48: long d_time;
49: int d_tapea;
50: } dir[MDIRENT];
51:
52: char map[MAPSIZE];
53: char name[NAMELEN];
54: char name1[NAMELEN];
55: extern char mt[];
56: extern char tc[];
57: char *tname;
58: extern char mheader[];
59: extern char theader[];
60:
61: int narg, rnarg;
62: char **parg;
63: int wseeka,rseeka;
64: int tapsiz;
65: int fio;
66: short ndirent, ndentb;
67: struct dent *edir;
68: struct dent *lastd; /* for improvement */
69: char *sbrk();
70: char *strcpy();
71: long lseek();
72: int (*command)();
73:
74: char *nameblk;
75: char *top;
76: char *nptr;
77:
78: extern int flags;
79: #define flc 0001
80: #define fli 0004
81: #define flm 0010
82: #define flu 0020
83: #define flv 0040
84: #define flw 0100
85: #define fls 0200
Defined variables
dir
defined in line
50; used 11 times
edir
defined in line
67; used 2 times
fio
defined in line
65; used 10 times
lastd
defined in line
68; used 13 times
map
defined in line
52; used 6 times
name
defined in line
53; used 21 times
- in /usr/src/cmd/tp/tp2.c line
219,
239-242(2),
253,
264,
279,
290,
309,
332
- in /usr/src/cmd/tp/tp3.c line
15-17(2),
91-94(3),
111,
218,
230-232(3),
241,
247
name1
defined in line
54; used 2 times
narg
defined in line
61; used 7 times
nptr
defined in line
76; used 3 times
parg
defined in line
62; used 6 times
rnarg
defined in line
61; used 4 times
tname
defined in line
57; used 5 times
top
defined in line
75; used 3 times
Defined struct's
dent
defined in line
39; used 38 times
- in line 67-68(4)
- in /usr/src/cmd/tp/tp1.c line
165(2),
191(2)
- in /usr/src/cmd/tp/tp2.c line
21(2),
41-42(4),
109-110(4),
285-287(4)
- in /usr/src/cmd/tp/tp3.c line
7(2),
34(2),
43(2),
73(2),
118(2),
131(2),
191(2),
223(2)
tent
defined in line
25; used 14 times
Defined macros
BSIZE
defined in line
14; used 22 times
DIRSZ
defined in line
10; used 2 times
MTSIZ
defined in line
17; used 2 times
OK
defined in line
19; used 6 times
TCSIZ
defined in line
15; used 1 times
TPB
defined in line
18; used 9 times
flc
defined in line
79; used 5 times
fli
defined in line
80; used 4 times
flm
defined in line
81; used 8 times
fls
defined in line
85; used 9 times
flu
defined in line
82; used 3 times
flv
defined in line
83; used 4 times
flw
defined in line
84; used 4 times
tapeb
defined in line
23; used 9 times
Usage of this include