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