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