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