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