xref: /original-bsd/usr.bin/mail/glob.h (revision b7261a4b)
1 /*
2  * Copyright (c) 1980 Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)glob.h	5.19 (Berkeley) 06/01/90
8  */
9 
10 /*
11  * A bunch of global variable declarations lie herein.
12  * def.h must be included first.
13  */
14 
15 int	msgCount;			/* Count of messages read in */
16 int	rcvmode;			/* True if receiving mail */
17 int	sawcom;				/* Set after first command */
18 char	*Tflag;				/* -T temp file for netnews */
19 int	senderr;			/* An error while checking */
20 int	edit;				/* Indicates editing a file */
21 int	readonly;			/* Will be unable to rewrite file */
22 int	noreset;			/* String resets suspended */
23 int	sourcing;			/* Currently reading variant file */
24 int	loading;			/* Loading user definitions */
25 int	cond;				/* Current state of conditional exc. */
26 FILE	*itf;				/* Input temp file buffer */
27 FILE	*otf;				/* Output temp file buffer */
28 FILE	*pipef;				/* Pipe file we have opened */
29 int	image;				/* File descriptor for image of msg */
30 FILE	*input;				/* Current command input file */
31 char	mailname[PATHSIZE];		/* Name of current file */
32 char	prevfile[PATHSIZE];		/* Name of previous file */
33 char	*homedir;			/* Path name of home directory */
34 char	*myname;			/* My login name */
35 off_t	mailsize;			/* Size of system mailbox */
36 int	lexnumber;			/* Number of TNUMBER from scan() */
37 char	lexstring[STRINGLEN];		/* String from TSTRING, scan() */
38 int	regretp;			/* Pointer to TOS of regret tokens */
39 int	regretstack[REGDEP];		/* Stack of regretted tokens */
40 char	*string_stack[REGDEP];		/* Stack of regretted strings */
41 int	numberstack[REGDEP];		/* Stack of regretted numbers */
42 struct	message	*dot;			/* Pointer to current message */
43 struct	message	*message;		/* The actual message structure */
44 struct	var	*variables[HSHSIZE];	/* Pointer to active var list */
45 struct	grouphead	*groups[HSHSIZE];/* Pointer to active groups */
46 struct	ignoretab	ignore[2];	/* ignored and retained fields
47 					   0 is ignore, 1 is retain */
48 struct	ignoretab	saveignore[2];	/* ignored and retained fields
49 					   on save to folder */
50 struct	ignoretab	ignoreall[2];	/* special, ignore all headers */
51 char	**altnames;			/* List of alternate names for user */
52 int	debug;				/* Debug flag set */
53 int	screenwidth;			/* Screen width, or best guess */
54 int	screenheight;			/* Screen height, or best guess,
55 					   for "header" command */
56 int	realscreenheight;		/* the real screen height */
57 
58 #include <setjmp.h>
59 
60 jmp_buf	srbuf;
61 
62 
63 /*
64  * The pointers for the string allocation routines,
65  * there are NSPACE independent areas.
66  * The first holds STRINGSIZE bytes, the next
67  * twice as much, and so on.
68  */
69 
70 #define	NSPACE	25			/* Total number of string spaces */
71 struct strings {
72 	char	*s_topFree;		/* Beginning of this area */
73 	char	*s_nextFree;		/* Next alloctable place here */
74 	unsigned s_nleft;		/* Number of bytes left here */
75 } stringdope[NSPACE];
76