new copyright notice
[unix-history] / usr / src / usr.bin / mail / glob.h
CommitLineData
761330fe
DF
1/*
2 * Copyright (c) 1980 Regents of the University of California.
0c5f72fb 3 * All rights reserved.
761330fe 4 *
f15db449 5 * %sccs.include.redist.c%
0c5f72fb 6 *
f15db449 7 * @(#)glob.h 5.19 (Berkeley) %G%
761330fe 8 */
2ae9f53f 9
e6a88a51
KS
10/*
11 * A bunch of global variable declarations lie herein.
12 * def.h must be included first.
13 */
14
e6a88a51 15int msgCount; /* Count of messages read in */
e6a88a51
KS
16int rcvmode; /* True if receiving mail */
17int sawcom; /* Set after first command */
31840345 18char *Tflag; /* -T temp file for netnews */
e6a88a51
KS
19int senderr; /* An error while checking */
20int edit; /* Indicates editing a file */
df1ae8ec 21int readonly; /* Will be unable to rewrite file */
e6a88a51
KS
22int noreset; /* String resets suspended */
23int sourcing; /* Currently reading variant file */
ef4abe32 24int loading; /* Loading user definitions */
b04d2a11 25int cond; /* Current state of conditional exc. */
e6a88a51
KS
26FILE *itf; /* Input temp file buffer */
27FILE *otf; /* Output temp file buffer */
df1ae8ec 28FILE *pipef; /* Pipe file we have opened */
e6a88a51
KS
29int image; /* File descriptor for image of msg */
30FILE *input; /* Current command input file */
2a0f6531
EW
31char mailname[PATHSIZE]; /* Name of current file */
32char prevfile[PATHSIZE]; /* Name of previous file */
f674e088
EW
33char *homedir; /* Path name of home directory */
34char *myname; /* My login name */
e6a88a51
KS
35off_t mailsize; /* Size of system mailbox */
36int lexnumber; /* Number of TNUMBER from scan() */
37char lexstring[STRINGLEN]; /* String from TSTRING, scan() */
38int regretp; /* Pointer to TOS of regret tokens */
39int regretstack[REGDEP]; /* Stack of regretted tokens */
85d5837f 40char *string_stack[REGDEP]; /* Stack of regretted strings */
e6a88a51
KS
41int numberstack[REGDEP]; /* Stack of regretted numbers */
42struct message *dot; /* Pointer to current message */
43struct message *message; /* The actual message structure */
44struct var *variables[HSHSIZE]; /* Pointer to active var list */
45struct grouphead *groups[HSHSIZE];/* Pointer to active groups */
887efe38
EW
46struct ignoretab ignore[2]; /* ignored and retained fields
47 0 is ignore, 1 is retain */
48struct ignoretab saveignore[2]; /* ignored and retained fields
49 on save to folder */
2de8fc95 50struct ignoretab ignoreall[2]; /* special, ignore all headers */
d1361008 51char **altnames; /* List of alternate names for user */
e6a88a51 52int debug; /* Debug flag set */
828615a1 53int screenwidth; /* Screen width, or best guess */
d56fd190
EW
54int screenheight; /* Screen height, or best guess,
55 for "header" command */
56int realscreenheight; /* the real screen height */
e6a88a51
KS
57
58#include <setjmp.h>
59
60jmp_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
c42869b9 70#define NSPACE 25 /* Total number of string spaces */
e6a88a51
KS
71struct 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];