1*16648Sralph /* @(#)tp.h 4.2 06/28/84 */ 29827Ssam 39827Ssam /* c-version of tp?.s 49827Ssam * 59827Ssam * M. Ferentz 69827Ssam * August 1976 79827Ssam * 89827Ssam * revised July 1977 BTL 99827Ssam */ 109827Ssam 119827Ssam #define MDIRENT 496 /* must be zero mod 8 */ 129827Ssam #define DIRSZ sizeof(struct dent) 139827Ssam #define MAPSIZE 4096 149827Ssam #define MAPMASK 07777 159827Ssam #define NAMELEN 32 169827Ssam #define BSIZE 512 179827Ssam #define TCSIZ 578 189827Ssam #define TCDIRS 192 199827Ssam #define MTSIZ 32767 209827Ssam #define TPB (BSIZE/sizeof(struct tent)) 219827Ssam #define OK 0100000 229827Ssam #define BRKINCR 512 239827Ssam 249827Ssam #define tapeblk &tpentry[0] 259827Ssam #define tapeb &tpentry[0] 269827Ssam 279827Ssam struct tent { /* Structure of a tape directory block */ 289827Ssam char pathnam[NAMELEN]; 299827Ssam short mode; 309827Ssam char uid; 319827Ssam char gid; 329827Ssam char spare; 339827Ssam char size0; 349827Ssam unsigned short size1; 359827Ssam long time; 369827Ssam unsigned short tapea; /* tape address */ 379827Ssam short unused[8]; 389827Ssam short cksum; 399827Ssam } tpentry[TPB]; 409827Ssam 419827Ssam struct dent { /* in core version of tent with "unused" removed 429827Ssam * and pathname replaced by pointer to same in a 439827Ssam * packed area (nameblock). 449827Ssam */ 459827Ssam char *d_namep; 469827Ssam int d_mode; 479827Ssam int d_uid; 489827Ssam int d_gid; 499827Ssam long d_size; 509827Ssam long d_time; 519827Ssam int d_tapea; 529827Ssam } dir[MDIRENT]; 539827Ssam 549827Ssam char map[MAPSIZE]; 559827Ssam char name[NAMELEN]; 569827Ssam char name1[NAMELEN]; 579827Ssam extern char mt[]; 589827Ssam extern char tc[]; 599827Ssam char *tname; 609827Ssam extern char mheader[]; 619827Ssam extern char theader[]; 629827Ssam 639827Ssam int narg, rnarg; 649827Ssam char **parg; 659827Ssam int wseeka,rseeka; 669827Ssam int tapsiz; 679827Ssam int fio; 689827Ssam short ndirent, ndentb; 699827Ssam struct dent *edir; 709827Ssam struct dent *lastd; /* for improvement */ 719827Ssam char *sbrk(); 729827Ssam char *strcpy(); 739827Ssam long lseek(); 749827Ssam int (*command)(); 759827Ssam 769827Ssam extern int flags; 779827Ssam #define flc 0001 789827Ssam #define fli 0004 799827Ssam #define flm 0010 809827Ssam #define flu 0020 819827Ssam #define flv 0040 829827Ssam #define flw 0100 839827Ssam #define fls 0200 84