mutt stable branch with some hacks
1/*
2 * Copyright (C) 1996-2002,2010,2016 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 */
18
19WHERE void (*mutt_error) (const char *, ...);
20WHERE void (*mutt_message) (const char *, ...);
21
22WHERE CONTEXT *Context;
23
24WHERE char Errorbuf[STRING];
25WHERE char AttachmentMarker[STRING];
26
27#if defined(DL_STANDALONE) && defined(USE_DOTLOCK)
28WHERE char *MuttDotlock;
29#endif
30
31WHERE ADDRESS *EnvFrom;
32WHERE ADDRESS *From;
33
34WHERE char *AliasFile;
35WHERE char *AliasFmt;
36WHERE char *AssumedCharset;
37WHERE char *AttachSep;
38WHERE char *Attribution;
39WHERE char *AttributionLocale;
40WHERE char *AttachCharset;
41WHERE char *AttachFormat;
42WHERE char *Charset;
43WHERE char *ComposeFormat;
44WHERE char *ConfigCharset;
45WHERE char *ContentType;
46WHERE char *DefaultHook;
47WHERE char *DateFmt;
48WHERE char *DisplayFilter;
49WHERE char *DsnNotify;
50WHERE char *DsnReturn;
51WHERE char *Editor;
52WHERE char *EscChar;
53WHERE char *FolderFormat;
54WHERE char *ForwFmt;
55WHERE char *Fqdn;
56WHERE char *HdrFmt;
57WHERE char *HistFile;
58WHERE char *Homedir;
59WHERE char *Hostname;
60#ifdef USE_IMAP
61WHERE char *ImapAuthenticators INITVAL (NULL);
62WHERE char *ImapDelimChars INITVAL (NULL);
63WHERE char *ImapHeaders;
64WHERE char *ImapLogin INITVAL (NULL);
65WHERE char *ImapPass INITVAL (NULL);
66WHERE char *ImapUser INITVAL (NULL);
67#endif
68WHERE char *Inbox;
69WHERE char *Ispell;
70WHERE char *MailcapPath;
71WHERE char *Maildir;
72#if defined(USE_IMAP) || defined(USE_POP)
73WHERE char *MessageCachedir;
74#endif
75#if USE_HCACHE
76WHERE char *HeaderCache;
77#if HAVE_GDBM || HAVE_DB4
78WHERE char *HeaderCachePageSize;
79#endif /* HAVE_GDBM || HAVE_DB4 */
80#endif /* USE_HCACHE */
81WHERE char *MarkMacroPrefix;
82WHERE char *MhFlagged;
83WHERE char *MhReplied;
84WHERE char *MhUnseen;
85WHERE char *MsgFmt;
86
87#ifdef USE_SOCKET
88WHERE char *Preconnect INITVAL (NULL);
89WHERE char *Tunnel INITVAL (NULL);
90WHERE short NetInc;
91#endif /* USE_SOCKET */
92
93#ifdef MIXMASTER
94WHERE char *Mixmaster;
95WHERE char *MixEntryFormat;
96#endif
97
98WHERE char *Muttrc INITVAL (NULL);
99WHERE char *Outbox;
100WHERE char *Pager;
101WHERE char *PagerFmt;
102WHERE char *PipeSep;
103#ifdef USE_POP
104WHERE char *PopAuthenticators INITVAL (NULL);
105WHERE short PopCheckTimeout;
106WHERE char *PopHost;
107WHERE char *PopPass INITVAL (NULL);
108WHERE char *PopUser INITVAL (NULL);
109#endif
110WHERE char *PostIndentString;
111WHERE char *Postponed;
112WHERE char *PostponeEncryptAs;
113WHERE char *Prefix;
114WHERE char *PrintCmd;
115WHERE char *QueryCmd;
116WHERE char *QueryFormat;
117WHERE char *Realname;
118WHERE short SearchContext;
119WHERE char *SendCharset;
120WHERE char *Sendmail;
121WHERE char *Shell;
122#ifdef USE_SIDEBAR
123WHERE char *SidebarDelimChars;
124WHERE char *SidebarDividerChar;
125WHERE char *SidebarFormat;
126WHERE char *SidebarIndentString;
127#endif
128WHERE char *Signature;
129WHERE char *SimpleSearch;
130#if USE_SMTP
131WHERE char *SmtpAuthenticators INITVAL (NULL);
132WHERE char *SmtpPass INITVAL (NULL);
133WHERE char *SmtpUrl INITVAL (NULL);
134#endif /* USE_SMTP */
135WHERE char *Spoolfile;
136WHERE char *SpamSep;
137#if defined(USE_SSL)
138WHERE char *SslCertFile INITVAL (NULL);
139WHERE char *SslClientCert INITVAL (NULL);
140WHERE char *SslEntropyFile INITVAL (NULL);
141WHERE char *SslCiphers INITVAL (NULL);
142#ifdef USE_SSL_GNUTLS
143WHERE short SslDHPrimeBits;
144WHERE char *SslCACertFile INITVAL (NULL);
145#endif
146#endif
147WHERE mbchar_table *StChars;
148WHERE char *Status;
149WHERE char *Tempdir;
150WHERE mbchar_table *Tochars;
151WHERE char *TrashPath;
152WHERE char *TSStatusFormat;
153WHERE char *TSIconFormat;
154WHERE short TSSupported;
155WHERE char *Username;
156WHERE char *Visual;
157
158WHERE char *CurrentFolder;
159WHERE char *LastFolder;
160
161
162WHERE const char *ReleaseDate;
163
164WHERE HASH *Groups;
165WHERE HASH *ReverseAlias;
166
167WHERE LIST *AutoViewList INITVAL(0);
168WHERE LIST *AlternativeOrderList INITVAL(0);
169WHERE LIST *AttachAllow INITVAL(0);
170WHERE LIST *AttachExclude INITVAL(0);
171WHERE LIST *InlineAllow INITVAL(0);
172WHERE LIST *InlineExclude INITVAL(0);
173WHERE LIST *HeaderOrderList INITVAL(0);
174WHERE LIST *Ignore INITVAL(0);
175WHERE LIST *MailtoAllow INITVAL(0);
176WHERE LIST *MimeLookupList INITVAL(0);
177WHERE LIST *UnIgnore INITVAL(0);
178
179WHERE RX_LIST *Alternates INITVAL(0);
180WHERE RX_LIST *UnAlternates INITVAL(0);
181WHERE RX_LIST *MailLists INITVAL(0);
182WHERE RX_LIST *UnMailLists INITVAL(0);
183WHERE RX_LIST *SubscribedLists INITVAL(0);
184WHERE RX_LIST *UnSubscribedLists INITVAL(0);
185WHERE SPAM_LIST *SpamList INITVAL(0);
186WHERE RX_LIST *NoSpamList INITVAL(0);
187
188
189/* bit vector for boolean variables */
190#ifdef MAIN_C
191unsigned char Options[(OPTMAX + 7)/8];
192#else
193extern unsigned char Options[];
194#endif
195
196/* bit vector for the yes/no/ask variable type */
197#ifdef MAIN_C
198unsigned char QuadOptions[(OPT_MAX*2 + 7) / 8];
199#else
200extern unsigned char QuadOptions[];
201#endif
202
203WHERE unsigned short Counter INITVAL (0);
204
205WHERE short ConnectTimeout;
206WHERE short HistSize;
207WHERE short MenuContext;
208WHERE short PagerContext;
209WHERE short PagerIndexLines;
210WHERE short ReadInc;
211WHERE short ReflowWrap;
212WHERE short SaveHist;
213WHERE short SendmailWait;
214WHERE short SleepTime INITVAL (1);
215WHERE short TimeInc;
216WHERE short Timeout;
217WHERE short Wrap;
218WHERE short WrapHeaders;
219WHERE short WriteInc;
220
221WHERE short ScoreThresholdDelete;
222WHERE short ScoreThresholdRead;
223WHERE short ScoreThresholdFlag;
224
225#ifdef USE_SIDEBAR
226WHERE short SidebarWidth;
227WHERE LIST *SidebarWhitelist INITVAL(0);
228WHERE int SidebarNeedsRedraw INITVAL (0);
229#endif
230
231#ifdef USE_IMAP
232WHERE short ImapKeepalive;
233WHERE short ImapPipelineDepth;
234#endif
235
236/* flags for received signals */
237WHERE SIG_ATOMIC_VOLATILE_T SigAlrm INITVAL (0);
238WHERE SIG_ATOMIC_VOLATILE_T SigInt INITVAL (0);
239WHERE SIG_ATOMIC_VOLATILE_T SigWinch INITVAL (0);
240
241WHERE int CurrentMenu;
242
243WHERE ALIAS *Aliases INITVAL (0);
244WHERE LIST *UserHeader INITVAL (0);
245
246/*-- formerly in pgp.h --*/
247WHERE REGEXP PgpGoodSign;
248WHERE REGEXP PgpDecryptionOkay;
249WHERE char *PgpSignAs;
250WHERE short PgpTimeout;
251WHERE char *PgpEntryFormat;
252WHERE char *PgpClearSignCommand;
253WHERE char *PgpDecodeCommand;
254WHERE char *PgpVerifyCommand;
255WHERE char *PgpDecryptCommand;
256WHERE char *PgpSignCommand;
257WHERE char *PgpEncryptSignCommand;
258WHERE char *PgpEncryptOnlyCommand;
259WHERE char *PgpImportCommand;
260WHERE char *PgpExportCommand;
261WHERE char *PgpVerifyKeyCommand;
262WHERE char *PgpListSecringCommand;
263WHERE char *PgpListPubringCommand;
264WHERE char *PgpGetkeysCommand;
265
266/*-- formerly in smime.h --*/
267WHERE char *SmimeDefaultKey;
268WHERE short SmimeTimeout;
269WHERE char *SmimeCertificates;
270WHERE char *SmimeKeys;
271WHERE char *SmimeCryptAlg;
272WHERE char *SmimeCALocation;
273WHERE char *SmimeVerifyCommand;
274WHERE char *SmimeVerifyOpaqueCommand;
275WHERE char *SmimeDecryptCommand;
276WHERE char *SmimeSignCommand;
277WHERE char *SmimeDigestAlg;
278WHERE char *SmimeSignOpaqueCommand;
279WHERE char *SmimeEncryptCommand;
280WHERE char *SmimeGetSignerCertCommand;
281WHERE char *SmimePk7outCommand;
282WHERE char *SmimeGetCertCommand;
283WHERE char *SmimeImportCertCommand;
284WHERE char *SmimeGetCertEmailCommand;
285
286
287
288
289#ifdef MAIN_C
290const char * const Weekdays[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
291const char * const Months[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "ERR" };
292
293const char * const BodyTypes[] = { "x-unknown", "audio", "application", "image", "message", "model", "multipart", "text", "video" };
294const char * const BodyEncodings[] = { "x-unknown", "7bit", "8bit", "quoted-printable", "base64", "binary", "x-uuencoded" };
295#else
296extern const char * const Weekdays[];
297extern const char * const Months[];
298#endif
299
300#ifdef MAIN_C
301/* so that global vars get included */
302#include "mx.h"
303#include "mutt_regex.h"
304#include "buffy.h"
305#include "sort.h"
306#include "mutt_crypt.h"
307#include "reldate.h"
308#endif /* MAIN_C */