Rocco Rutte:
[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 #ifndef _GLOBALS_H
10 #define _GLOBALS_H
11
12 #include "alias.h"
13
14 #include "lib/str.h"
15 #include "lib/list.h"
16 #include "lib/rx.h"
17
18 WHERE void (*mutt_error) (const char *, ...);
19 WHERE void (*mutt_message) (const char *, ...);
20
21 WHERE CONTEXT *Context;
22
23 WHERE char Errorbuf[STRING];
24 WHERE char AttachmentMarker[STRING];
25
26 WHERE char Quotebuf[SHORT_STRING];
27
28 #if defined(DL_STANDALONE) && defined(USE_DOTLOCK)
29 WHERE char *MuttDotlock;
30 #endif
31
32 WHERE ADDRESS *From;
33
34 WHERE char *AliasFile;
35 WHERE char *AliasFmt;
36 WHERE char *AssumedCharset;
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 *EditorHeaders;
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 *ImapLogin INITVAL (NULL);
66 WHERE char *ImapPass INITVAL (NULL);
67 WHERE char *ImapUser INITVAL (NULL);
68 #endif
69 WHERE char *Inbox;
70 WHERE char *Ispell;
71 WHERE char *Locale;
72 WHERE char *MailcapPath;
73 WHERE char *Maildir;
74
75 #if USE_HCACHE
76 WHERE char *HeaderCache;
77 #if HAVE_GDBM || HAVE_DB4
78 WHERE char *HeaderCachePageSize;
79 #endif /* HAVE_GDBM || HAVE_DB4 */
80 #endif /* USE_HCACHE */
81 WHERE char *MhFlagged;
82 WHERE char *MhReplied;
83 WHERE char *MhUnseen;
84 WHERE char *MsgFmt;
85 WHERE char *MsgIdFormat;
86
87 WHERE rx_t AttachRemindRegexp;
88 WHERE rx_t Mask;
89 WHERE rx_t QuoteRegexp;
90 WHERE rx_t ReplyRegexp;
91 WHERE rx_t Smileys;
92 WHERE rx_t GecosMask;
93 WHERE rx_t StripWasRegexp;
94
95 #ifdef USE_SOCKET
96 WHERE char *Preconnect INITVAL (NULL);
97 WHERE char *Tunnel INITVAL (NULL);
98 #endif /* USE_SOCKET */
99
100 #ifdef MIXMASTER
101 WHERE char *Mixmaster;
102 WHERE char *MixEntryFormat;
103 #endif
104
105 WHERE char *OperatingSystem INITVAL (NULL);
106
107 WHERE char *Muttrc INITVAL (NULL);
108
109 #ifdef USE_NNTP
110 WHERE char *NewsCacheDir;
111 WHERE char *GroupFormat;
112 WHERE char *Inews;
113 WHERE char *NewsServer;
114 WHERE char *NntpUser;
115 WHERE char *NntpPass;
116 WHERE char *NewsRc;
117 #endif
118 WHERE char *Outbox;
119 WHERE char *Pager;
120 WHERE char *PagerFmt;
121 WHERE char *PipeSep;
122
123 #ifdef USE_POP
124 WHERE char *PopAuthenticators INITVAL (NULL);
125 WHERE short PopCheckTimeout;
126 WHERE char *PopHost;
127 WHERE char *PopPass INITVAL (NULL);
128 WHERE char *PopUser INITVAL (NULL);
129 #endif
130 WHERE char *PostIndentString;
131 WHERE char *Postponed;
132 WHERE char *Prefix;
133 WHERE char *PrintCmd;
134 WHERE char *QueryCmd;
135 WHERE char *Realname;
136 WHERE char *SendCharset;
137 WHERE char *Sendmail;
138 WHERE char *Shell;
139 WHERE char *SidebarDelim;
140 WHERE char *SidebarNumberFormat;
141 WHERE char *SidebarBoundary;
142 WHERE char *Signature;
143 WHERE char *SignOffString;
144 WHERE char *SimpleSearch;
145
146 #if defined(USE_LIBESMTP)
147 WHERE char *SmtpAuthUser;
148 WHERE char *SmtpAuthPass;
149 WHERE char *SmtpEnvFrom;
150 WHERE char *SmtpHost;
151 WHERE unsigned short SmtpPort;
152 WHERE char *SmtpUseTLS;
153 #endif
154 WHERE char *Spoolfile;
155 WHERE char *SpamSep;
156
157 #if defined(USE_SSL) || defined(USE_GNUTLS)
158 WHERE char *SslCertFile INITVAL (NULL);
159 #endif
160 #if defined(USE_SSL)
161 WHERE char *SslEntropyFile INITVAL (NULL);
162 #endif
163 #ifdef USE_SSL
164 WHERE char *SslClientCert INITVAL (NULL);
165 WHERE LIST *SslSessionCerts INITVAL (NULL);
166 #endif
167 #ifdef USE_GNUTLS
168 WHERE short SslDHPrimeBits;
169 WHERE char *SslCACertFile INITVAL (NULL);
170 #endif
171 WHERE char *StChars;
172 WHERE char *Status;
173 WHERE char *Tempdir;
174 WHERE char *Tochars;
175 WHERE char *TrashPath;
176 WHERE char *Username;
177 WHERE char *Visual;
178 WHERE char *XtermTitle;
179 WHERE char *XtermLeave;
180 WHERE char *XtermIcon;
181
182 WHERE char *CurrentFolder;
183 WHERE char *LastFolder;
184
185 WHERE LIST *AutoViewList INITVAL (0);
186 WHERE LIST *AlternativeOrderList INITVAL (0);
187 WHERE LIST *HeaderOrderList INITVAL (0);
188 WHERE LIST *Ignore INITVAL (0);
189 WHERE LIST *MimeLookupList INITVAL (0);
190 WHERE LIST *UnIgnore INITVAL (0);
191
192 WHERE list2_t *Alternates INITVAL (0);
193 WHERE list2_t *UnAlternates INITVAL (0);
194 WHERE list2_t *MailLists INITVAL (0);
195 WHERE list2_t *UnMailLists INITVAL (0);
196 WHERE list2_t *SubscribedLists INITVAL (0);
197 WHERE list2_t *UnSubscribedLists INITVAL (0);
198 WHERE SPAM_LIST *SpamList INITVAL (0);
199 WHERE list2_t *NoSpamList INITVAL (0);
200
201 /* bit vector for boolean variables */
202 #ifdef MAIN_C
203 unsigned char Options[(OPTMAX + 7) / 8];
204 #else
205 extern unsigned char Options[];
206 #endif
207
208 /* bit vector for the yes/no/ask variable type */
209 #ifdef MAIN_C
210 unsigned char QuadOptions[(OPT_MAX * 2 + 7) / 8];
211 #else
212 extern unsigned char QuadOptions[];
213 #endif
214
215 WHERE unsigned short Counter INITVAL (0);
216
217 #ifdef USE_NNTP
218 WHERE short NewsPollTimeout;
219 WHERE short NntpContext;
220 #endif
221
222 WHERE short ConnectTimeout;
223 WHERE short HistSize;
224 WHERE short MenuContext;
225 WHERE short PagerContext;
226 WHERE short PagerIndexLines;
227 WHERE short ReadInc;
228 WHERE short SendmailWait;
229 WHERE short SleepTime INITVAL (1);
230 WHERE short Timeout;
231 WHERE short Umask INITVAL (0077);
232 WHERE short WrapMargin;
233 WHERE short WriteInc;
234 WHERE short MaxDispRecips;
235 WHERE short MaxLineLength;
236
237 WHERE short ScoreThresholdDelete;
238 WHERE short ScoreThresholdRead;
239 WHERE short ScoreThresholdFlag;
240
241 WHERE short DrawFullLine INITVAL (0);
242 WHERE short SidebarWidth;
243
244 #ifdef USE_IMAP
245 WHERE short ImapKeepalive;
246 WHERE short ImapBuffyTimeout;
247 #endif
248
249 /* flags for received signals */
250 WHERE SIG_ATOMIC_VOLATILE_T SigAlrm INITVAL (0);
251 WHERE SIG_ATOMIC_VOLATILE_T SigInt INITVAL (0);
252 WHERE SIG_ATOMIC_VOLATILE_T SigWinch INITVAL (0);
253
254 WHERE int CurrentMenu;
255
256 WHERE ALIAS *Aliases INITVAL (0);
257 WHERE LIST *UserHeader INITVAL (0);
258
259 /*-- formerly in pgp.h --*/
260 WHERE rx_t PgpGoodSign;
261 WHERE char *PgpSignAs;
262 WHERE short PgpTimeout;
263 WHERE char *PgpEntryFormat;
264 WHERE char *PgpClearSignCommand;
265 WHERE char *PgpDecodeCommand;
266 WHERE char *PgpVerifyCommand;
267 WHERE char *PgpDecryptCommand;
268 WHERE char *PgpSignCommand;
269 WHERE char *PgpEncryptSignCommand;
270 WHERE char *PgpEncryptOnlyCommand;
271 WHERE char *PgpImportCommand;
272 WHERE char *PgpExportCommand;
273 WHERE char *PgpVerifyKeyCommand;
274 WHERE char *PgpListSecringCommand;
275 WHERE char *PgpListPubringCommand;
276 WHERE char *PgpGetkeysCommand;
277
278 /*-- formerly in smime.h --*/
279 WHERE char *SmimeDefaultKey;
280 WHERE char *SmimeCryptAlg;
281 WHERE short SmimeTimeout;
282 WHERE char *SmimeCertificates;
283 WHERE char *SmimeKeys;
284 WHERE char *SmimeCryptAlg;
285 WHERE char *SmimeCALocation;
286 WHERE char *SmimeVerifyCommand;
287 WHERE char *SmimeVerifyOpaqueCommand;
288 WHERE char *SmimeDecryptCommand;
289 WHERE char *SmimeSignCommand;
290 WHERE char *SmimeSignOpaqueCommand;
291 WHERE char *SmimeEncryptCommand;
292 WHERE char *SmimeGetSignerCertCommand;
293 WHERE char *SmimePk7outCommand;
294 WHERE char *SmimeGetCertCommand;
295 WHERE char *SmimeImportCertCommand;
296 WHERE char *SmimeGetCertEmailCommand;
297
298 #ifdef MAIN_C
299 const char *Weekdays[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
300 const char *Months[] =
301   { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct",
302 "Nov", "Dec", "ERR" };
303
304 const char *BodyTypes[] =
305   { "x-unknown", "audio", "application", "image", "message", "model",
306 "multipart", "text", "video" };
307 const char *BodyEncodings[] =
308   { "x-unknown", "7bit", "8bit", "quoted-printable", "base64", "binary",
309 "x-uuencoded" };
310 #else
311 extern const char *Weekdays[];
312 extern const char *Months[];
313 #endif
314
315 #ifdef MAIN_C
316 /* so that global vars get included
317  * FIXME WTF IS THIS?!?!???!?!??!?!??
318  */
319 #include "mx.h"
320 #include "buffy.h"
321 #include "sort.h"
322 #include "mutt_crypt.h"
323 #endif /* MAIN_C */
324
325 #endif /* !_GLOBALS_H */