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