Commit | Line | Data |
---|---|---|
761330fe DF |
1 | /* |
2 | * Copyright (c) 1980 Regents of the University of California. | |
0c5f72fb | 3 | * All rights reserved. |
761330fe | 4 | * |
0c5f72fb KB |
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% | |
761330fe | 13 | */ |
2ae9f53f | 14 | |
e6a88a51 KS |
15 | /* |
16 | * A bunch of global variable declarations lie herein. | |
17 | * def.h must be included first. | |
18 | */ | |
19 | ||
e6a88a51 KS |
20 | int msgCount; /* Count of messages read in */ |
21 | int mypid; /* Current process id */ | |
22 | int rcvmode; /* True if receiving mail */ | |
23 | int sawcom; /* Set after first command */ | |
24 | int hflag; /* Sequence number for network -h */ | |
25 | char *rflag; /* -r address for network */ | |
31840345 | 26 | char *Tflag; /* -T temp file for netnews */ |
e6a88a51 | 27 | char nosrc; /* Don't source /usr/lib/Mail.rc */ |
f9130461 | 28 | char noheader; /* Suprress initial header listing */ |
e6a88a51 KS |
29 | int selfsent; /* User sent self something */ |
30 | int senderr; /* An error while checking */ | |
31 | int edit; /* Indicates editing a file */ | |
df1ae8ec | 32 | int readonly; /* Will be unable to rewrite file */ |
e6a88a51 KS |
33 | int noreset; /* String resets suspended */ |
34 | int sourcing; /* Currently reading variant file */ | |
ef4abe32 | 35 | int loading; /* Loading user definitions */ |
b04d2a11 | 36 | int cond; /* Current state of conditional exc. */ |
e6a88a51 KS |
37 | FILE *itf; /* Input temp file buffer */ |
38 | FILE *otf; /* Output temp file buffer */ | |
df1ae8ec | 39 | FILE *pipef; /* Pipe file we have opened */ |
e6a88a51 KS |
40 | int image; /* File descriptor for image of msg */ |
41 | FILE *input; /* Current command input file */ | |
42 | char *editfile; /* Name of file being edited */ | |
43 | char *sflag; /* Subject given from non tty */ | |
44 | int outtty; /* True if standard output a tty */ | |
45 | int intty; /* True if standard input a tty */ | |
b8200d6f | 46 | int baud; /* Output baud rate */ |
e6a88a51 | 47 | char mbox[PATHSIZE]; /* Name of mailbox file */ |
b02711eb | 48 | char mailname[PATHSIZE]; /* Name of system mailbox */ |
e6a88a51 KS |
49 | int uid; /* The invoker's user id */ |
50 | char mailrc[PATHSIZE]; /* Name of startup file */ | |
51 | char deadletter[PATHSIZE]; /* Name of #/dead.letter */ | |
52 | char homedir[PATHSIZE]; /* Path name of home directory */ | |
145d4d65 | 53 | char myname[PATHSIZE]; /* My login id */ |
e6a88a51 KS |
54 | off_t mailsize; /* Size of system mailbox */ |
55 | int lexnumber; /* Number of TNUMBER from scan() */ | |
56 | char lexstring[STRINGLEN]; /* String from TSTRING, scan() */ | |
57 | int regretp; /* Pointer to TOS of regret tokens */ | |
58 | int regretstack[REGDEP]; /* Stack of regretted tokens */ | |
59 | char *stringstack[REGDEP]; /* Stack of regretted strings */ | |
60 | int numberstack[REGDEP]; /* Stack of regretted numbers */ | |
61 | struct message *dot; /* Pointer to current message */ | |
62 | struct message *message; /* The actual message structure */ | |
63 | struct var *variables[HSHSIZE]; /* Pointer to active var list */ | |
64 | struct grouphead *groups[HSHSIZE];/* Pointer to active groups */ | |
b1b8fd1c | 65 | struct ignore *ignore[HSHSIZE];/* Pointer to ignored fields */ |
46053c99 S |
66 | struct ignore *retain[HSHSIZE];/* Pointer to retained fields */ |
67 | int nretained; /* Number of retained fields */ | |
d1361008 | 68 | char **altnames; /* List of alternate names for user */ |
fe9152c6 | 69 | char **localnames; /* List of aliases for our local host */ |
e6a88a51 KS |
70 | int debug; /* Debug flag set */ |
71 | int rmail; /* Being called as rmail */ | |
828615a1 EW |
72 | int screenwidth; /* Screen width, or best guess */ |
73 | int screenheight; /* Screen height, or best guess */ | |
e6a88a51 KS |
74 | |
75 | #include <setjmp.h> | |
76 | ||
77 | jmp_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 | ||
c42869b9 | 87 | #define NSPACE 25 /* Total number of string spaces */ |
e6a88a51 KS |
88 | struct 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]; |