globals.h 8.33 KB
Newer Older
Thomas Roessler's avatar
Thomas Roessler committed
1
/*
2
 * Copyright (C) 1996-2002,2010,2016 Michael R. Elkins <me@mutt.org>
Thomas Roessler's avatar
Thomas Roessler committed
3 4 5 6 7 8 9 10 11 12 13 14 15
 * 
 *     This program is free software; you can redistribute it and/or modify
 *     it under the terms of the GNU General Public License as published by
 *     the Free Software Foundation; either version 2 of the License, or
 *     (at your option) any later version.
 * 
 *     This program is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 * 
 *     You should have received a copy of the GNU General Public License
 *     along with this program; if not, write to the Free Software
16
 *     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
Thomas Roessler's avatar
Thomas Roessler committed
17 18 19
 */ 

WHERE void (*mutt_error) (const char *, ...);
20
WHERE void (*mutt_message) (const char *, ...);
Thomas Roessler's avatar
Thomas Roessler committed
21 22 23

WHERE CONTEXT *Context;

24
WHERE char Errorbuf[STRING];
25
WHERE char AttachmentMarker[STRING];
Thomas Roessler's avatar
Thomas Roessler committed
26

27 28 29 30
#if defined(DL_STANDALONE) && defined(USE_DOTLOCK)
WHERE char *MuttDotlock;
#endif

31
WHERE ADDRESS *EnvFrom;
32 33
WHERE ADDRESS *From;

Thomas Roessler's avatar
Thomas Roessler committed
34 35
WHERE char *AliasFile;
WHERE char *AliasFmt;
36
WHERE char *AssumedCharset;
Thomas Roessler's avatar
Thomas Roessler committed
37
WHERE char *AttachSep;
Thomas Roessler's avatar
Thomas Roessler committed
38
WHERE char *Attribution;
39
WHERE char *AttributionLocale;
40
WHERE char *AttachCharset;
Thomas Roessler's avatar
Thomas Roessler committed
41
WHERE char *AttachFormat;
Thomas Roessler's avatar
Thomas Roessler committed
42
WHERE char *Charset;
43
WHERE char *ComposeFormat;
Joël Riou's avatar
Joël Riou committed
44
WHERE char *ConfigCharset;
45
WHERE char *ContentType;
Thomas Roessler's avatar
Thomas Roessler committed
46 47
WHERE char *DefaultHook;
WHERE char *DateFmt;
48
WHERE char *DisplayFilter;
Thomas Roessler's avatar
Thomas Roessler committed
49 50 51 52 53
WHERE char *DsnNotify;
WHERE char *DsnReturn;
WHERE char *Editor;
WHERE char *EscChar;
WHERE char *FolderFormat;
54 55
WHERE char *ForwardAttrIntro;
WHERE char *ForwardAttrTrailer;
Thomas Roessler's avatar
Thomas Roessler committed
56 57 58
WHERE char *ForwFmt;
WHERE char *Fqdn;
WHERE char *HdrFmt;
59
WHERE char *HistFile;
Thomas Roessler's avatar
Thomas Roessler committed
60 61
WHERE char *Homedir;
WHERE char *Hostname;
Thomas Roessler's avatar
Thomas Roessler committed
62
#ifdef USE_IMAP
63
WHERE char *ImapAuthenticators INITVAL (NULL);
64
WHERE char *ImapDelimChars INITVAL (NULL);
65
WHERE char *ImapHeaders;
66
WHERE char *ImapLogin INITVAL (NULL);
67 68
WHERE char *ImapPass INITVAL (NULL);
WHERE char *ImapUser INITVAL (NULL);
Thomas Roessler's avatar
Thomas Roessler committed
69
#endif
Thomas Roessler's avatar
Thomas Roessler committed
70 71 72 73
WHERE char *Inbox;
WHERE char *Ispell;
WHERE char *MailcapPath;
WHERE char *Maildir;
74 75 76
#if defined(USE_IMAP) || defined(USE_POP)
WHERE char *MessageCachedir;
#endif
Thomas Glanzmann's avatar
Thomas Glanzmann committed
77 78
#if USE_HCACHE
WHERE char *HeaderCache;
79
#if HAVE_GDBM || HAVE_DB4
Thomas Glanzmann's avatar
Thomas Glanzmann committed
80
WHERE char *HeaderCachePageSize;
81 82
#endif /* HAVE_GDBM || HAVE_DB4 */
#endif /* USE_HCACHE */
83
WHERE char *MarkMacroPrefix;
84 85 86
WHERE char *MhFlagged;
WHERE char *MhReplied;
WHERE char *MhUnseen;
87
WHERE char *MimeTypeQueryCmd;
Thomas Roessler's avatar
Thomas Roessler committed
88
WHERE char *MsgFmt;
89

90 91
#ifdef USE_SOCKET
WHERE char *Preconnect INITVAL (NULL);
92
WHERE char *Tunnel INITVAL (NULL);
93
WHERE short NetInc;
94 95
#endif /* USE_SOCKET */

96 97
#ifdef MIXMASTER
WHERE char *Mixmaster;
98
WHERE char *MixEntryFormat;
99 100
#endif

Thomas Roessler's avatar
Thomas Roessler committed
101 102 103 104 105 106
WHERE char *Muttrc INITVAL (NULL);
WHERE char *Outbox;
WHERE char *Pager;
WHERE char *PagerFmt;
WHERE char *PipeSep;
#ifdef USE_POP
107
WHERE char *PopAuthenticators INITVAL (NULL);
108
WHERE short PopCheckTimeout;
Thomas Roessler's avatar
Thomas Roessler committed
109
WHERE char *PopHost;
110 111
WHERE char *PopPass INITVAL (NULL);
WHERE char *PopUser INITVAL (NULL);
Thomas Roessler's avatar
Thomas Roessler committed
112 113 114
#endif
WHERE char *PostIndentString;
WHERE char *Postponed;
115
WHERE char *PostponeEncryptAs;
Thomas Roessler's avatar
Thomas Roessler committed
116 117
WHERE char *Prefix;
WHERE char *PrintCmd;
118
WHERE char *NewMailCmd;
Thomas Roessler's avatar
Thomas Roessler committed
119
WHERE char *QueryCmd;
120
WHERE char *QueryFormat;
Thomas Roessler's avatar
Thomas Roessler committed
121
WHERE char *Realname;
122
WHERE short SearchContext;
123
WHERE char *SendCharset;
Thomas Roessler's avatar
Thomas Roessler committed
124 125
WHERE char *Sendmail;
WHERE char *Shell;
126 127 128 129 130 131
#ifdef USE_SIDEBAR
WHERE char *SidebarDelimChars;
WHERE char *SidebarDividerChar;
WHERE char *SidebarFormat;
WHERE char *SidebarIndentString;
#endif
Thomas Roessler's avatar
Thomas Roessler committed
132 133
WHERE char *Signature;
WHERE char *SimpleSearch;
134 135
#if USE_SMTP
WHERE char *SmtpAuthenticators INITVAL (NULL);
136 137
WHERE char *SmtpPass INITVAL (NULL);
WHERE char *SmtpUrl INITVAL (NULL);
138
#endif /* USE_SMTP */
Thomas Roessler's avatar
Thomas Roessler committed
139
WHERE char *Spoolfile;
140
WHERE char *SpamSep;
141
#if defined(USE_SSL)
142
WHERE char *SslCertFile INITVAL (NULL);
143
WHERE char *SslClientCert INITVAL (NULL);
144
WHERE char *SslEntropyFile INITVAL (NULL);
145
WHERE char *SslCiphers INITVAL (NULL);
146
#ifdef USE_SSL_GNUTLS
147 148 149
WHERE short SslDHPrimeBits;
WHERE char *SslCACertFile INITVAL (NULL);
#endif
150
#endif
151
WHERE mbchar_table *StChars;
Thomas Roessler's avatar
Thomas Roessler committed
152 153
WHERE char *Status;
WHERE char *Tempdir;
154
WHERE mbchar_table *Tochars;
155
WHERE char *TrashPath;
156 157 158
WHERE char *TSStatusFormat;
WHERE char *TSIconFormat;
WHERE short TSSupported;
Thomas Roessler's avatar
Thomas Roessler committed
159 160 161
WHERE char *Username;
WHERE char *Visual;

162
WHERE char *CurrentFolder;
Thomas Roessler's avatar
Thomas Roessler committed
163 164
WHERE char *LastFolder;

165 166 167

WHERE const char *ReleaseDate;

168
WHERE HASH *Groups;
Thomas Roessler's avatar
Thomas Roessler committed
169
WHERE HASH *ReverseAlias;
170

Thomas Roessler's avatar
Thomas Roessler committed
171 172
WHERE LIST *AutoViewList INITVAL(0);
WHERE LIST *AlternativeOrderList INITVAL(0);
173 174 175 176
WHERE LIST *AttachAllow INITVAL(0);
WHERE LIST *AttachExclude INITVAL(0);
WHERE LIST *InlineAllow INITVAL(0);
WHERE LIST *InlineExclude INITVAL(0);
Thomas Roessler's avatar
Thomas Roessler committed
177 178
WHERE LIST *HeaderOrderList INITVAL(0);
WHERE LIST *Ignore INITVAL(0);
179
WHERE LIST *MailtoAllow INITVAL(0);
180
WHERE LIST *MimeLookupList INITVAL(0);
Thomas Roessler's avatar
Thomas Roessler committed
181
WHERE LIST *UnIgnore INITVAL(0);
182 183

WHERE RX_LIST *Alternates INITVAL(0);
184
WHERE RX_LIST *UnAlternates INITVAL(0);
185
WHERE RX_LIST *MailLists INITVAL(0);
186
WHERE RX_LIST *UnMailLists INITVAL(0);
187
WHERE RX_LIST *SubscribedLists INITVAL(0);
188
WHERE RX_LIST *UnSubscribedLists INITVAL(0);
189
WHERE REPLACE_LIST *SpamList INITVAL(0);
190
WHERE RX_LIST *NoSpamList INITVAL(0);
191
WHERE REPLACE_LIST *SubjectRxList INITVAL(0);
Thomas Roessler's avatar
Thomas Roessler committed
192

193

Thomas Roessler's avatar
Thomas Roessler committed
194 195 196 197 198 199 200 201
/* bit vector for boolean variables */
#ifdef MAIN_C
unsigned char Options[(OPTMAX + 7)/8];
#else
extern unsigned char Options[];
#endif

/* bit vector for the yes/no/ask variable type */
202 203 204 205 206
#ifdef MAIN_C
unsigned char QuadOptions[(OPT_MAX*2 + 7) / 8];
#else
extern unsigned char QuadOptions[];
#endif
Thomas Roessler's avatar
Thomas Roessler committed
207 208 209

WHERE unsigned short Counter INITVAL (0);

Thomas Roessler's avatar
Thomas Roessler committed
210
WHERE short ConnectTimeout;
Thomas Roessler's avatar
Thomas Roessler committed
211
WHERE short HistSize;
212
WHERE short MenuContext;
Thomas Roessler's avatar
Thomas Roessler committed
213 214 215
WHERE short PagerContext;
WHERE short PagerIndexLines;
WHERE short ReadInc;
216
WHERE short ReflowWrap;
217
WHERE short SaveHist;
Thomas Roessler's avatar
Thomas Roessler committed
218
WHERE short SendmailWait;
219
WHERE short SleepTime INITVAL (1);
220
WHERE short TimeInc;
Thomas Roessler's avatar
Thomas Roessler committed
221
WHERE short Timeout;
222
WHERE short Wrap;
223
WHERE short WrapHeaders;
Thomas Roessler's avatar
Thomas Roessler committed
224
WHERE short WriteInc;
225

Thomas Roessler's avatar
Thomas Roessler committed
226 227 228
WHERE short ScoreThresholdDelete;
WHERE short ScoreThresholdRead;
WHERE short ScoreThresholdFlag;
229

230
#ifdef USE_SIDEBAR
231
WHERE short SidebarWidth;
232 233 234
WHERE LIST *SidebarWhitelist INITVAL(0);
#endif

235 236
#ifdef USE_IMAP
WHERE short ImapKeepalive;
237
WHERE short ImapPipelineDepth;
238
WHERE short ImapPollTimeout;
239
#endif
Thomas Roessler's avatar
Thomas Roessler committed
240

241
/* flags for received signals */
242 243 244
WHERE SIG_ATOMIC_VOLATILE_T SigAlrm INITVAL (0);
WHERE SIG_ATOMIC_VOLATILE_T SigInt INITVAL (0);
WHERE SIG_ATOMIC_VOLATILE_T SigWinch INITVAL (0);
Thomas Roessler's avatar
Thomas Roessler committed
245

246 247
WHERE int CurrentMenu;

Thomas Roessler's avatar
Thomas Roessler committed
248 249 250
WHERE ALIAS *Aliases INITVAL (0);
WHERE LIST *UserHeader INITVAL (0);

251 252
/*-- formerly in pgp.h --*/
WHERE REGEXP PgpGoodSign;
253
WHERE REGEXP PgpDecryptionOkay;
254
WHERE char *PgpDefaultKey;
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273
WHERE char *PgpSignAs;
WHERE short PgpTimeout;
WHERE char *PgpEntryFormat;
WHERE char *PgpClearSignCommand;
WHERE char *PgpDecodeCommand;
WHERE char *PgpVerifyCommand;
WHERE char *PgpDecryptCommand;
WHERE char *PgpSignCommand;
WHERE char *PgpEncryptSignCommand;
WHERE char *PgpEncryptOnlyCommand;
WHERE char *PgpImportCommand;
WHERE char *PgpExportCommand;
WHERE char *PgpVerifyKeyCommand;
WHERE char *PgpListSecringCommand;
WHERE char *PgpListPubringCommand;
WHERE char *PgpGetkeysCommand;

/*-- formerly in smime.h --*/
WHERE char *SmimeDefaultKey;
274
WHERE char *SmimeSignAs;
275 276 277 278 279 280 281 282 283
WHERE short SmimeTimeout;
WHERE char *SmimeCertificates;
WHERE char *SmimeKeys;
WHERE char *SmimeCryptAlg;
WHERE char *SmimeCALocation;
WHERE char *SmimeVerifyCommand;
WHERE char *SmimeVerifyOpaqueCommand;
WHERE char *SmimeDecryptCommand;
WHERE char *SmimeSignCommand;
284
WHERE char *SmimeDigestAlg;
285 286 287 288 289 290 291 292 293 294
WHERE char *SmimeSignOpaqueCommand;
WHERE char *SmimeEncryptCommand;
WHERE char *SmimeGetSignerCertCommand;
WHERE char *SmimePk7outCommand;
WHERE char *SmimeGetCertCommand;
WHERE char *SmimeImportCertCommand;
WHERE char *SmimeGetCertEmailCommand;



Thomas Roessler's avatar
Thomas Roessler committed
295 296

#ifdef MAIN_C
297 298
const char * const Weekdays[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
const char * const Months[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "ERR" };
Thomas Roessler's avatar
Thomas Roessler committed
299

300 301
const char * const BodyTypes[] = { "x-unknown", "audio", "application", "image", "message", "model", "multipart", "text", "video" };
const char * const BodyEncodings[] = { "x-unknown", "7bit", "8bit", "quoted-printable", "base64", "binary", "x-uuencoded" };
Thomas Roessler's avatar
Thomas Roessler committed
302
#else
303 304
extern const char * const Weekdays[];
extern const char * const Months[];
Thomas Roessler's avatar
Thomas Roessler committed
305 306 307 308 309 310 311 312
#endif

#ifdef MAIN_C
/* so that global vars get included */ 
#include "mx.h"
#include "mutt_regex.h"
#include "buffy.h"
#include "sort.h"
313
#include "mutt_crypt.h"
314
#include "reldate.h"
Thomas Roessler's avatar
Thomas Roessler committed
315
#endif /* MAIN_C */