xref: /original-bsd/usr.bin/mail/glob.h (revision 0b685140)
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	2.6 02/13/82";
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	*Tflag;				/* -T temp file for netnews */
17 char	nosrc;				/* Don't source /usr/lib/Mail.rc */
18 char	noheader;			/* Suprress initial header listing */
19 int	selfsent;			/* User sent self something */
20 int	senderr;			/* An error while checking */
21 int	edit;				/* Indicates editing a file */
22 int	readonly;			/* Will be unable to rewrite file */
23 int	noreset;			/* String resets suspended */
24 int	sourcing;			/* Currently reading variant file */
25 int	loading;			/* Loading user definitions */
26 int	shudann;			/* Print headers when possible */
27 int	cond;				/* Current state of conditional exc. */
28 FILE	*itf;				/* Input temp file buffer */
29 FILE	*otf;				/* Output temp file buffer */
30 FILE	*pipef;				/* Pipe file we have opened */
31 int	image;				/* File descriptor for image of msg */
32 FILE	*input;				/* Current command input file */
33 char	*editfile;			/* Name of file being edited */
34 char	*sflag;				/* Subject given from non tty */
35 int	outtty;				/* True if standard output a tty */
36 int	intty;				/* True if standard input a tty */
37 int	baud;				/* Output baud rate */
38 char	mbox[PATHSIZE];			/* Name of mailbox file */
39 char	*mailname;			/* Name of system mailbox */
40 char	mailspace[PATHSIZE];		/* Space norm alloc'd for name */
41 int	uid;				/* The invoker's user id */
42 char	mailrc[PATHSIZE];		/* Name of startup file */
43 char	deadletter[PATHSIZE];		/* Name of #/dead.letter */
44 char	homedir[PATHSIZE];		/* Path name of home directory */
45 char	myname[PATHSIZE];		/* My login id */
46 off_t	mailsize;			/* Size of system mailbox */
47 int	lexnumber;			/* Number of TNUMBER from scan() */
48 char	lexstring[STRINGLEN];		/* String from TSTRING, scan() */
49 int	regretp;			/* Pointer to TOS of regret tokens */
50 int	regretstack[REGDEP];		/* Stack of regretted tokens */
51 char	*stringstack[REGDEP];		/* Stack of regretted strings */
52 int	numberstack[REGDEP];		/* Stack of regretted numbers */
53 struct	message	*dot;			/* Pointer to current message */
54 struct	message	*message;		/* The actual message structure */
55 struct	var	*variables[HSHSIZE];	/* Pointer to active var list */
56 struct	grouphead	*groups[HSHSIZE];/* Pointer to active groups */
57 char	**altnames;			/* List of alternate names for user */
58 int	debug;				/* Debug flag set */
59 int	rmail;				/* Being called as rmail */
60 
61 #include <setjmp.h>
62 
63 jmp_buf	srbuf;
64 
65 
66 /*
67  * The pointers for the string allocation routines,
68  * there are NSPACE independent areas.
69  * The first holds STRINGSIZE bytes, the next
70  * twice as much, and so on.
71  */
72 
73 #define	NSPACE	25			/* Total number of string spaces */
74 struct strings {
75 	char	*s_topFree;		/* Beginning of this area */
76 	char	*s_nextFree;		/* Next alloctable place here */
77 	unsigned s_nleft;		/* Number of bytes left here */
78 } stringdope[NSPACE];
79