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