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