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