1 /* 2 * A bunch of global variable declarations lie herein. 3 * def.h must be included first. 4 */ 5 6 /* 7 * Sccs Id = "@(#)glob.h 1.2 10/10/80"; 8 */ 9 10 int msgCount; /* Count of messages read in */ 11 int mypid; /* Current process id */ 12 int rcvmode; /* True if receiving mail */ 13 int sawcom; /* Set after first command */ 14 int hflag; /* Sequence number for network -h */ 15 char *rflag; /* -r address for network */ 16 char nosrc; /* Don't source /usr/lib/Mail.rc */ 17 int selfsent; /* User sent self something */ 18 int senderr; /* An error while checking */ 19 int edit; /* Indicates editing a file */ 20 int readonly; /* Will be unable to rewrite file */ 21 int noreset; /* String resets suspended */ 22 int sourcing; /* Currently reading variant file */ 23 FILE *itf; /* Input temp file buffer */ 24 FILE *otf; /* Output temp file buffer */ 25 FILE *pipef; /* Pipe file we have opened */ 26 int image; /* File descriptor for image of msg */ 27 FILE *input; /* Current command input file */ 28 char *editfile; /* Name of file being edited */ 29 char *sflag; /* Subject given from non tty */ 30 int outtty; /* True if standard output a tty */ 31 int intty; /* True if standard input a tty */ 32 char mbox[PATHSIZE]; /* Name of mailbox file */ 33 char *mailname; /* Name of system mailbox */ 34 char mailspace[PATHSIZE]; /* Space norm alloc'd for name */ 35 int uid; /* The invoker's user id */ 36 char mailrc[PATHSIZE]; /* Name of startup file */ 37 char deadletter[PATHSIZE]; /* Name of #/dead.letter */ 38 char homedir[PATHSIZE]; /* Path name of home directory */ 39 char myname[9]; /* My login id */ 40 off_t mailsize; /* Size of system mailbox */ 41 int lexnumber; /* Number of TNUMBER from scan() */ 42 char lexstring[STRINGLEN]; /* String from TSTRING, scan() */ 43 int regretp; /* Pointer to TOS of regret tokens */ 44 int regretstack[REGDEP]; /* Stack of regretted tokens */ 45 char *stringstack[REGDEP]; /* Stack of regretted strings */ 46 int numberstack[REGDEP]; /* Stack of regretted numbers */ 47 struct message *dot; /* Pointer to current message */ 48 struct message *message; /* The actual message structure */ 49 struct var *variables[HSHSIZE]; /* Pointer to active var list */ 50 struct grouphead *groups[HSHSIZE];/* Pointer to active groups */ 51 int debug; /* Debug flag set */ 52 int rmail; /* Being called as rmail */ 53 54 #include <setjmp.h> 55 56 jmp_buf srbuf; 57 58 59 /* 60 * The pointers for the string allocation routines, 61 * there are NSPACE independent areas. 62 * The first holds STRINGSIZE bytes, the next 63 * twice as much, and so on. 64 */ 65 66 #define NSPACE 8 /* Total number of string spaces */ 67 struct strings { 68 char *s_topFree; /* Beginning of this area */ 69 char *s_nextFree; /* Next alloctable place here */ 70 unsigned s_nleft; /* Number of bytes left here */ 71 } stringdope[NSPACE]; 72