-struct inode {
- char i_minor; /* +0: minor device of i-node */
- char i_major; /* +1: major device */
- int i_number; /* +2 */
- int i_flags; /* +4: see below */
- char i_nlinks; /* +6: number of links to file */
- char i_uid; /* +7: user ID of owner */
- char i_gid; /* +8: group ID of owner */
- char i_size0; /* +9: high byte of 24-bit size */
- int i_size1; /* +10: low word of 24-bit size */
- int i_addr[8]; /* +12: block numbers or device number */
- int i_actime[2]; /* +28: time of last access */
- int i_modtime[2]; /* +32: time of last modification */
-};
-
-#define IALLOC 0100000
-#define IFMT 060000
-#define IFDIR 040000
-#define IFCHR 020000
-#define IFBLK 060000
-#define MODE i_flags
-#define STAT inode
-#endif
-
-char *tty; /* name of users tty so can turn off writes */
-char *ttyname(); /* std subroutine */
-int mode = 0622; /* old permission bits for users tty */
-int outpipe[2]; /* pipe from shell to output */
-int fd; /* file descriptor of typescript file */
-int inpipe[2]; /* pipe from input to shell */
-long tvec; /* current time */
-char buffer[256]; /* for block I/O's */
-int n; /* number of chars read */
-int status; /* dummy for wait sys call */
-char *fname; /* name of typescript file */
-int forkval, ttn; /* temps for error checking */
-int qflg; /* true if -q (quiet) flag */
-int aflg; /* true if -q (append) flag */
-struct STAT sbuf;
-int flsh();
-
-main(argc,argv) int argc; char **argv; {
-
- if ((tty = ttyname(2)) < 0) {
- printf("Nested script not allowed.\n");
- fail();
- }