b781d8726268786e740c983083dc9db79c956e58
[apps/madmutt.git] / globals.h
1 /*
2  * Copyright (C) 1996-2002 Michael R. Elkins <me@mutt.org>
3  * 
4  *     This program is free software; you can redistribute it and/or modify
5  *     it under the terms of the GNU General Public License as published by
6  *     the Free Software Foundation; either version 2 of the License, or
7  *     (at your option) any later version.
8  * 
9  *     This program is distributed in the hope that it will be useful,
10  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *     GNU General Public License for more details.
13  * 
14  *     You should have received a copy of the GNU General Public License
15  *     along with this program; if not, write to the Free Software
16  *     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
17  */ 
18
19 WHERE void (*mutt_error) (const char *, ...);
20 WHERE void (*mutt_message) (const char *, ...);
21
22 WHERE CONTEXT *Context;
23
24 WHERE char Errorbuf[STRING];
25 WHERE char AttachmentMarker[STRING];
26
27 WHERE char Quotebuf[SHORT_STRING];
28
29 #if defined(DL_STANDALONE) && defined(USE_DOTLOCK)
30 WHERE char *MuttDotlock;
31 #endif
32
33 WHERE ADDRESS *From;
34
35 WHERE char *AliasFile;
36 WHERE char *AliasFmt;
37 WHERE char *AttachSep;
38 WHERE char *Attribution;
39 WHERE char *AttachFormat;
40 WHERE char *Charset;
41 WHERE char *ComposeFormat;
42 WHERE char *ConfigCharset;
43 WHERE char *ContentType;
44 WHERE char *DefaultHook;
45 WHERE char *DateFmt;
46 WHERE char *DisplayFilter;
47 WHERE char *DsnNotify;
48 WHERE char *DsnReturn;
49 WHERE char *Editor;
50 WHERE char *EscChar;
51 WHERE char *FolderFormat;
52 WHERE char *ForwFmt;
53 WHERE char *Fqdn;
54 WHERE char *HdrFmt;
55 WHERE char *Homedir;
56 WHERE char *Hostname;
57 #ifdef USE_IMAP
58 WHERE char *ImapAuthenticators INITVAL (NULL);
59 WHERE char *ImapDelimChars INITVAL (NULL);
60 WHERE char *ImapHeaders;
61 WHERE char *ImapHomeNamespace INITVAL (NULL);
62 WHERE char *ImapPass INITVAL (NULL);
63 WHERE char *ImapUser INITVAL (NULL);
64 #endif
65 WHERE char *Inbox;
66 WHERE char *Ispell;
67 WHERE char *Locale;
68 WHERE char *MailcapPath;
69 WHERE char *Maildir;
70 #if USE_HCACHE
71 WHERE char *HeaderCache;
72 WHERE char *HeaderCachePageSize;
73 #endif
74 WHERE char *MhFlagged;
75 WHERE char *MhReplied;
76 WHERE char *MhUnseen;
77 WHERE char *MsgFmt;
78 WHERE char *MsgIdFormat;
79
80 #ifdef USE_SOCKET
81 WHERE char *Preconnect INITVAL (NULL);
82 WHERE char *Tunnel INITVAL (NULL);
83 #endif /* USE_SOCKET */
84
85 #ifdef MIXMASTER
86 WHERE char *Mixmaster;
87 WHERE char *MixEntryFormat;
88 #endif
89
90 WHERE char *OperatingSystem INITVAL (NULL);
91
92 WHERE char *Muttrc INITVAL (NULL);
93 #ifdef USE_NNTP
94 WHERE char *NewsCacheDir;
95 WHERE char *GroupFormat;
96 WHERE char *Inews;
97 WHERE char *NewsServer;
98 WHERE char *NntpUser;
99 WHERE char *NntpPass;
100 WHERE char *NewsRc;
101 #endif
102 WHERE char *Outbox;
103 WHERE char *Pager;
104 WHERE char *PagerFmt;
105 WHERE char *PipeSep;
106 #ifdef USE_POP
107 WHERE char *PopAuthenticators INITVAL (NULL);
108 WHERE short PopCheckTimeout;
109 WHERE char *PopHost;
110 WHERE char *PopPass INITVAL (NULL);
111 WHERE char *PopUser INITVAL (NULL);
112 #endif
113 WHERE char *PostIndentString;
114 WHERE char *Postponed;
115 WHERE char *Prefix;
116 WHERE char *PrintCmd;
117 WHERE char *QueryCmd;
118 WHERE char *Realname;
119 WHERE char *SendCharset;
120 WHERE char *Sendmail;
121 WHERE char *Shell;
122 WHERE char *Signature;
123 WHERE char *SimpleSearch;
124 #if defined(USE_LIBESMTP)
125 WHERE char *SmtpAuthUser;
126 WHERE char *SmtpAuthPass;
127 WHERE char *SmtpHost;
128 WHERE unsigned short SmtpPort;
129 #endif
130 WHERE char *Spoolfile;
131 WHERE char *SpamSep;
132 #if defined(USE_SSL) || defined(USE_NSS) || defined(USE_GNUTLS)
133 WHERE char *SslCertFile INITVAL (NULL);
134 #endif
135 #if defined(USE_SSL) || defined(USE_NSS)
136 WHERE char *SslEntropyFile INITVAL (NULL);
137 #endif
138 WHERE char *SslClientCert INITVAL (NULL);
139 #ifdef USE_GNUTLS
140 WHERE short SslDHPrimeBits;
141 WHERE char *SslCACertFile INITVAL (NULL);
142 #endif
143 WHERE char *StChars;
144 WHERE char *Status;
145 WHERE char *Tempdir;
146 WHERE char *Tochars;
147 WHERE char *TrashPath;
148 WHERE char *Username;
149 WHERE char *Visual;
150 WHERE char *XtermTitle;
151 WHERE char *XtermIcon;
152
153 WHERE char *LastFolder;
154
155 WHERE LIST *AutoViewList INITVAL(0);
156 WHERE LIST *AlternativeOrderList INITVAL(0);
157 WHERE LIST *HeaderOrderList INITVAL(0);
158 WHERE LIST *Ignore INITVAL(0);
159 WHERE LIST *MimeLookupList INITVAL(0);
160 WHERE LIST *UnIgnore INITVAL(0);
161
162 WHERE RX_LIST *Alternates INITVAL(0);
163 WHERE RX_LIST *MailLists INITVAL(0);
164 WHERE RX_LIST *SubscribedLists INITVAL(0);
165 WHERE SPAM_LIST *SpamList INITVAL(0);
166 WHERE RX_LIST *NoSpamList INITVAL(0);
167
168 /* bit vector for boolean variables */
169 #ifdef MAIN_C
170 unsigned char Options[(OPTMAX + 7)/8];
171 #else
172 extern unsigned char Options[];
173 #endif
174
175 /* bit vector for the yes/no/ask variable type */
176 #ifdef MAIN_C
177 unsigned char QuadOptions[(OPT_MAX*2 + 7) / 8];
178 #else
179 extern unsigned char QuadOptions[];
180 #endif
181
182 WHERE unsigned short Counter INITVAL (0);
183
184 #ifdef USE_NNTP
185 WHERE short NewsPollTimeout;
186 WHERE short NntpContext;
187 #endif
188
189 WHERE short ConnectTimeout;
190 WHERE short HistSize;
191 WHERE short PagerContext;
192 WHERE short PagerIndexLines;
193 WHERE short ReadInc;
194 WHERE short SendmailWait;
195 WHERE short SleepTime INITVAL (1);
196 WHERE short Timeout;
197 WHERE short Umask INITVAL(0077);
198 WHERE short WrapMargin;
199 WHERE short WriteInc;
200
201 WHERE short ScoreThresholdDelete;
202 WHERE short ScoreThresholdRead;
203 WHERE short ScoreThresholdFlag;
204
205 WHERE struct buffy_t *CurBuffy INITVAL(0);
206 WHERE short DrawFullLine INITVAL(0);
207 WHERE short SidebarWidth;
208 #ifdef USE_IMAP
209 WHERE short ImapKeepalive;
210 #endif
211
212 /* flags for received signals */
213 WHERE SIG_ATOMIC_VOLATILE_T SigAlrm INITVAL (0);
214 WHERE SIG_ATOMIC_VOLATILE_T SigInt INITVAL (0);
215 WHERE SIG_ATOMIC_VOLATILE_T SigWinch INITVAL (0);
216
217 WHERE int CurrentMenu;
218
219 WHERE ALIAS *Aliases INITVAL (0);
220 WHERE LIST *UserHeader INITVAL (0);
221
222 /*-- formerly in pgp.h --*/
223 WHERE REGEXP PgpGoodSign;
224 WHERE char *PgpSignAs;
225 WHERE short PgpTimeout;
226 WHERE char *PgpEntryFormat;
227 WHERE char *PgpClearSignCommand;
228 WHERE char *PgpDecodeCommand;
229 WHERE char *PgpVerifyCommand;
230 WHERE char *PgpDecryptCommand;
231 WHERE char *PgpSignCommand;
232 WHERE char *PgpEncryptSignCommand;
233 WHERE char *PgpEncryptOnlyCommand;
234 WHERE char *PgpImportCommand;
235 WHERE char *PgpExportCommand;
236 WHERE char *PgpVerifyKeyCommand;
237 WHERE char *PgpListSecringCommand;
238 WHERE char *PgpListPubringCommand;
239 WHERE char *PgpGetkeysCommand;
240
241 /*-- formerly in smime.h --*/
242 WHERE char *SmimeDefaultKey;
243 WHERE char *SmimeCryptAlg;
244 WHERE short SmimeTimeout;
245 WHERE char *SmimeCertificates;
246 WHERE char *SmimeKeys;
247 WHERE char *SmimeCryptAlg;
248 WHERE char *SmimeCALocation;
249 WHERE char *SmimeVerifyCommand;
250 WHERE char *SmimeVerifyOpaqueCommand;
251 WHERE char *SmimeDecryptCommand;
252 WHERE char *SmimeSignCommand;
253 WHERE char *SmimeSignOpaqueCommand;
254 WHERE char *SmimeEncryptCommand;
255 WHERE char *SmimeGetSignerCertCommand;
256 WHERE char *SmimePk7outCommand;
257 WHERE char *SmimeGetCertCommand;
258 WHERE char *SmimeImportCertCommand;
259 WHERE char *SmimeGetCertEmailCommand;
260
261
262
263 #ifdef DEBUG
264 WHERE FILE *debugfile INITVAL (0);
265 WHERE int debuglevel INITVAL (0);
266 #endif
267
268 #ifdef MAIN_C
269 const char *Weekdays[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
270 const char *Months[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "ERR" };
271
272 const char *BodyTypes[] = { "x-unknown", "audio", "application", "image", "message", "model", "multipart", "text", "video" };
273 const char *BodyEncodings[] = { "x-unknown", "7bit", "8bit", "quoted-printable", "base64", "binary", "x-uuencoded" };
274 #else
275 extern const char *Weekdays[];
276 extern const char *Months[];
277 #endif
278
279 #ifdef MAIN_C
280 /* so that global vars get included */ 
281 #include "mx.h"
282 #include "mutt_regex.h"
283 #include "buffy.h"
284 #include "sort.h"
285 #include "mutt_crypt.h"
286 #endif /* MAIN_C */