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