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