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