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 *LastFolder;
160
161 WHERE LIST *AutoViewList INITVAL(0);
162 WHERE LIST *AlternativeOrderList INITVAL(0);
163 WHERE LIST *HeaderOrderList INITVAL(0);
164 WHERE LIST *Ignore INITVAL(0);
165 WHERE LIST *MimeLookupList INITVAL(0);
166 WHERE LIST *UnIgnore INITVAL(0);
167
168 WHERE RX_LIST *Alternates INITVAL(0);
169 WHERE RX_LIST *UnAlternates INITVAL(0);
170 WHERE RX_LIST *MailLists INITVAL(0);
171 WHERE RX_LIST *UnMailLists INITVAL(0);
172 WHERE RX_LIST *SubscribedLists INITVAL(0);
173 WHERE RX_LIST *UnSubscribedLists INITVAL(0);
174 WHERE SPAM_LIST *SpamList INITVAL(0);
175 WHERE RX_LIST *NoSpamList INITVAL(0);
176
177 /* bit vector for boolean variables */
178 #ifdef MAIN_C
179 unsigned char Options[(OPTMAX + 7)/8];
180 #else
181 extern unsigned char Options[];
182 #endif
183
184 /* bit vector for the yes/no/ask variable type */
185 #ifdef MAIN_C
186 unsigned char QuadOptions[(OPT_MAX*2 + 7) / 8];
187 #else
188 extern unsigned char QuadOptions[];
189 #endif
190
191 WHERE unsigned short Counter INITVAL (0);
192
193 #ifdef USE_NNTP
194 WHERE short NewsPollTimeout;
195 WHERE short NntpContext;
196 #endif
197
198 WHERE short ConnectTimeout;
199 WHERE short HistSize;
200 WHERE short MenuContext;
201 WHERE short PagerContext;
202 WHERE short PagerIndexLines;
203 WHERE short ReadInc;
204 WHERE short SendmailWait;
205 WHERE short SleepTime INITVAL (1);
206 WHERE short Timeout;
207 WHERE short Umask INITVAL(0077);
208 WHERE short WrapMargin;
209 WHERE short WriteInc;
210
211 WHERE short ScoreThresholdDelete;
212 WHERE short ScoreThresholdRead;
213 WHERE short ScoreThresholdFlag;
214
215 WHERE struct buffy_t *CurBuffy INITVAL(0);
216 WHERE short DrawFullLine INITVAL(0);
217 WHERE short SidebarWidth;
218 #ifdef USE_IMAP
219 WHERE short ImapKeepalive;
220 #endif
221
222 /* flags for received signals */
223 WHERE SIG_ATOMIC_VOLATILE_T SigAlrm INITVAL (0);
224 WHERE SIG_ATOMIC_VOLATILE_T SigInt INITVAL (0);
225 WHERE SIG_ATOMIC_VOLATILE_T SigWinch INITVAL (0);
226
227 WHERE int CurrentMenu;
228
229 WHERE ALIAS *Aliases INITVAL (0);
230 WHERE LIST *UserHeader INITVAL (0);
231
232 /*-- formerly in pgp.h --*/
233 WHERE REGEXP PgpGoodSign;
234 WHERE char *PgpSignAs;
235 WHERE short PgpTimeout;
236 WHERE char *PgpEntryFormat;
237 WHERE char *PgpClearSignCommand;
238 WHERE char *PgpDecodeCommand;
239 WHERE char *PgpVerifyCommand;
240 WHERE char *PgpDecryptCommand;
241 WHERE char *PgpSignCommand;
242 WHERE char *PgpEncryptSignCommand;
243 WHERE char *PgpEncryptOnlyCommand;
244 WHERE char *PgpImportCommand;
245 WHERE char *PgpExportCommand;
246 WHERE char *PgpVerifyKeyCommand;
247 WHERE char *PgpListSecringCommand;
248 WHERE char *PgpListPubringCommand;
249 WHERE char *PgpGetkeysCommand;
250
251 /*-- formerly in smime.h --*/
252 WHERE char *SmimeDefaultKey;
253 WHERE char *SmimeCryptAlg;
254 WHERE short SmimeTimeout;
255 WHERE char *SmimeCertificates;
256 WHERE char *SmimeKeys;
257 WHERE char *SmimeCryptAlg;
258 WHERE char *SmimeCALocation;
259 WHERE char *SmimeVerifyCommand;
260 WHERE char *SmimeVerifyOpaqueCommand;
261 WHERE char *SmimeDecryptCommand;
262 WHERE char *SmimeSignCommand;
263 WHERE char *SmimeSignOpaqueCommand;
264 WHERE char *SmimeEncryptCommand;
265 WHERE char *SmimeGetSignerCertCommand;
266 WHERE char *SmimePk7outCommand;
267 WHERE char *SmimeGetCertCommand;
268 WHERE char *SmimeImportCertCommand;
269 WHERE char *SmimeGetCertEmailCommand;
270
271
272
273 #ifdef DEBUG
274 WHERE FILE *debugfile INITVAL (0);
275 WHERE int debuglevel INITVAL (0);
276 #endif
277
278 #ifdef MAIN_C
279 const char *Weekdays[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
280 const char *Months[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "ERR" };
281
282 const char *BodyTypes[] = { "x-unknown", "audio", "application", "image", "message", "model", "multipart", "text", "video" };
283 const char *BodyEncodings[] = { "x-unknown", "7bit", "8bit", "quoted-printable", "base64", "binary", "x-uuencoded" };
284 #else
285 extern const char *Weekdays[];
286 extern const char *Months[];
287 #endif
288
289 #ifdef MAIN_C
290 /* so that global vars get included */ 
291 #include "mx.h"
292 #include "mutt_regex.h"
293 #include "buffy.h"
294 #include "sort.h"
295 #include "mutt_crypt.h"
296 #endif /* MAIN_C */