| 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.4 %G%"; |
| 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 | int shudann; /* Print headers when possible */ |
| 24 | FILE *itf; /* Input temp file buffer */ |
| 25 | FILE *otf; /* Output temp file buffer */ |
| 26 | FILE *pipef; /* Pipe file we have opened */ |
| 27 | int image; /* File descriptor for image of msg */ |
| 28 | FILE *input; /* Current command input file */ |
| 29 | char *editfile; /* Name of file being edited */ |
| 30 | char *sflag; /* Subject given from non tty */ |
| 31 | int outtty; /* True if standard output a tty */ |
| 32 | int intty; /* True if standard input a tty */ |
| 33 | char mbox[PATHSIZE]; /* Name of mailbox file */ |
| 34 | char *mailname; /* Name of system mailbox */ |
| 35 | char mailspace[PATHSIZE]; /* Space norm alloc'd for name */ |
| 36 | int uid; /* The invoker's user id */ |
| 37 | char mailrc[PATHSIZE]; /* Name of startup file */ |
| 38 | char deadletter[PATHSIZE]; /* Name of #/dead.letter */ |
| 39 | char homedir[PATHSIZE]; /* Path name of home directory */ |
| 40 | char myname[PATHSIZE]; /* My login id */ |
| 41 | off_t mailsize; /* Size of system mailbox */ |
| 42 | int lexnumber; /* Number of TNUMBER from scan() */ |
| 43 | char lexstring[STRINGLEN]; /* String from TSTRING, scan() */ |
| 44 | int regretp; /* Pointer to TOS of regret tokens */ |
| 45 | int regretstack[REGDEP]; /* Stack of regretted tokens */ |
| 46 | char *stringstack[REGDEP]; /* Stack of regretted strings */ |
| 47 | int numberstack[REGDEP]; /* Stack of regretted numbers */ |
| 48 | struct message *dot; /* Pointer to current message */ |
| 49 | struct message *message; /* The actual message structure */ |
| 50 | struct var *variables[HSHSIZE]; /* Pointer to active var list */ |
| 51 | struct grouphead *groups[HSHSIZE];/* Pointer to active groups */ |
| 52 | int debug; /* Debug flag set */ |
| 53 | int rmail; /* Being called as rmail */ |
| 54 | |
| 55 | #include <setjmp.h> |
| 56 | |
| 57 | jmp_buf srbuf; |
| 58 | |
| 59 | |
| 60 | /* |
| 61 | * The pointers for the string allocation routines, |
| 62 | * there are NSPACE independent areas. |
| 63 | * The first holds STRINGSIZE bytes, the next |
| 64 | * twice as much, and so on. |
| 65 | */ |
| 66 | |
| 67 | #define NSPACE 8 /* Total number of string spaces */ |
| 68 | struct strings { |
| 69 | char *s_topFree; /* Beginning of this area */ |
| 70 | char *s_nextFree; /* Next alloctable place here */ |
| 71 | unsigned s_nleft; /* Number of bytes left here */ |
| 72 | } stringdope[NSPACE]; |