|
|
1.1 root 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
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.