document distributed with 4.2BSD
[unix-history] / usr / src / usr.bin / mail / glob.h
CommitLineData
761330fe
DF
1/*
2 * Copyright (c) 1980 Regents of the University of California.
3 * All rights reserved. The Berkeley software License Agreement
4 * specifies the terms and conditions for redistribution.
5 *
6 * @(#)glob.h 5.1 (Berkeley) %G%
7 */
2ae9f53f 8
e6a88a51
KS
9/*
10 * A bunch of global variable declarations lie herein.
11 * def.h must be included first.
12 */
13
e6a88a51
KS
14int msgCount; /* Count of messages read in */
15int mypid; /* Current process id */
16int rcvmode; /* True if receiving mail */
17int sawcom; /* Set after first command */
18int hflag; /* Sequence number for network -h */
19char *rflag; /* -r address for network */
31840345 20char *Tflag; /* -T temp file for netnews */
e6a88a51 21char nosrc; /* Don't source /usr/lib/Mail.rc */
f9130461 22char noheader; /* Suprress initial header listing */
e6a88a51
KS
23int selfsent; /* User sent self something */
24int senderr; /* An error while checking */
25int edit; /* Indicates editing a file */
df1ae8ec 26int readonly; /* Will be unable to rewrite file */
e6a88a51
KS
27int noreset; /* String resets suspended */
28int sourcing; /* Currently reading variant file */
ef4abe32 29int loading; /* Loading user definitions */
798b9bdb 30int shudann; /* Print headers when possible */
b04d2a11 31int cond; /* Current state of conditional exc. */
e6a88a51
KS
32FILE *itf; /* Input temp file buffer */
33FILE *otf; /* Output temp file buffer */
df1ae8ec 34FILE *pipef; /* Pipe file we have opened */
e6a88a51
KS
35int image; /* File descriptor for image of msg */
36FILE *input; /* Current command input file */
37char *editfile; /* Name of file being edited */
38char *sflag; /* Subject given from non tty */
39int outtty; /* True if standard output a tty */
40int intty; /* True if standard input a tty */
b8200d6f 41int baud; /* Output baud rate */
e6a88a51 42char mbox[PATHSIZE]; /* Name of mailbox file */
b02711eb 43char mailname[PATHSIZE]; /* Name of system mailbox */
e6a88a51
KS
44int uid; /* The invoker's user id */
45char mailrc[PATHSIZE]; /* Name of startup file */
46char deadletter[PATHSIZE]; /* Name of #/dead.letter */
47char homedir[PATHSIZE]; /* Path name of home directory */
145d4d65 48char myname[PATHSIZE]; /* My login id */
e6a88a51
KS
49off_t mailsize; /* Size of system mailbox */
50int lexnumber; /* Number of TNUMBER from scan() */
51char lexstring[STRINGLEN]; /* String from TSTRING, scan() */
52int regretp; /* Pointer to TOS of regret tokens */
53int regretstack[REGDEP]; /* Stack of regretted tokens */
54char *stringstack[REGDEP]; /* Stack of regretted strings */
55int numberstack[REGDEP]; /* Stack of regretted numbers */
56struct message *dot; /* Pointer to current message */
57struct message *message; /* The actual message structure */
58struct var *variables[HSHSIZE]; /* Pointer to active var list */
59struct grouphead *groups[HSHSIZE];/* Pointer to active groups */
b1b8fd1c 60struct ignore *ignore[HSHSIZE];/* Pointer to ignored fields */
46053c99
S
61struct ignore *retain[HSHSIZE];/* Pointer to retained fields */
62int nretained; /* Number of retained fields */
d1361008 63char **altnames; /* List of alternate names for user */
fe9152c6 64char **localnames; /* List of aliases for our local host */
e6a88a51
KS
65int debug; /* Debug flag set */
66int rmail; /* Being called as rmail */
67
68#include <setjmp.h>
69
70jmp_buf srbuf;
71
72
73/*
74 * The pointers for the string allocation routines,
75 * there are NSPACE independent areas.
76 * The first holds STRINGSIZE bytes, the next
77 * twice as much, and so on.
78 */
79
c42869b9 80#define NSPACE 25 /* Total number of string spaces */
e6a88a51
KS
81struct strings {
82 char *s_topFree; /* Beginning of this area */
83 char *s_nextFree; /* Next alloctable place here */
84 unsigned s_nleft; /* Number of bytes left here */
85} stringdope[NSPACE];