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