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 "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 *XtermIcon;
173
174 WHERE char *CurrentFolder;
175 WHERE char *LastFolder;
176
177 WHERE LIST *AutoViewList INITVAL (0);
178 WHERE LIST *AlternativeOrderList INITVAL (0);
179 WHERE LIST *HeaderOrderList INITVAL (0);
180 WHERE LIST *Ignore INITVAL (0);
181 WHERE LIST *MimeLookupList INITVAL (0);
182 WHERE LIST *UnIgnore INITVAL (0);
183
184 WHERE list2_t *Alternates INITVAL (0);
185 WHERE list2_t *UnAlternates INITVAL (0);
186 WHERE list2_t *MailLists INITVAL (0);
187 WHERE list2_t *UnMailLists INITVAL (0);
188 WHERE list2_t *SubscribedLists INITVAL (0);
189 WHERE list2_t *UnSubscribedLists INITVAL (0);
190 WHERE SPAM_LIST *SpamList INITVAL (0);
191 WHERE list2_t *NoSpamList INITVAL (0);
192
193 /* bit vector for boolean variables */
194 #ifdef MAIN_C
195 unsigned char Options[(OPTMAX + 7) / 8];
196 #else
197 extern unsigned char Options[];
198 #endif
199
200 /* bit vector for the yes/no/ask variable type */
201 #ifdef MAIN_C
202 unsigned char QuadOptions[(OPT_MAX * 2 + 7) / 8];
203 #else
204 extern unsigned char QuadOptions[];
205 #endif
206
207 WHERE unsigned short Counter INITVAL (0);
208
209 #ifdef USE_NNTP
210 WHERE short NewsPollTimeout;
211 WHERE short NntpContext;
212 #endif
213
214 WHERE short ConnectTimeout;
215 WHERE short HistSize;
216 WHERE short MenuContext;
217 WHERE short PagerContext;
218 WHERE short PagerIndexLines;
219 WHERE short ReadInc;
220 WHERE short SendmailWait;
221 WHERE short SleepTime INITVAL (1);
222 WHERE short Timeout;
223 WHERE short Umask INITVAL (0077);
224 WHERE short WrapMargin;
225 WHERE short WriteInc;
226 WHERE short MaxLineLength;
227
228 WHERE short ScoreThresholdDelete;
229 WHERE short ScoreThresholdRead;
230 WHERE short ScoreThresholdFlag;
231
232 WHERE short DrawFullLine INITVAL (0);
233 WHERE short SidebarWidth;
234
235 #ifdef USE_IMAP
236 WHERE short ImapKeepalive;
237 WHERE short ImapBuffyTimeout;
238 #endif
239
240 /* flags for received signals */
241 WHERE SIG_ATOMIC_VOLATILE_T SigAlrm INITVAL (0);
242 WHERE SIG_ATOMIC_VOLATILE_T SigInt INITVAL (0);
243 WHERE SIG_ATOMIC_VOLATILE_T SigWinch INITVAL (0);
244
245 WHERE int CurrentMenu;
246
247 WHERE ALIAS *Aliases INITVAL (0);
248 WHERE LIST *UserHeader INITVAL (0);
249
250 /*-- formerly in pgp.h --*/
251 WHERE rx_t PgpGoodSign;
252 WHERE char *PgpSignAs;
253 WHERE short PgpTimeout;
254 WHERE char *PgpEntryFormat;
255 WHERE char *PgpClearSignCommand;
256 WHERE char *PgpDecodeCommand;
257 WHERE char *PgpVerifyCommand;
258 WHERE char *PgpDecryptCommand;
259 WHERE char *PgpSignCommand;
260 WHERE char *PgpEncryptSignCommand;
261 WHERE char *PgpEncryptOnlyCommand;
262 WHERE char *PgpImportCommand;
263 WHERE char *PgpExportCommand;
264 WHERE char *PgpVerifyKeyCommand;
265 WHERE char *PgpListSecringCommand;
266 WHERE char *PgpListPubringCommand;
267 WHERE char *PgpGetkeysCommand;
268
269 /*-- formerly in smime.h --*/
270 WHERE char *SmimeDefaultKey;
271 WHERE char *SmimeCryptAlg;
272 WHERE short SmimeTimeout;
273 WHERE char *SmimeCertificates;
274 WHERE char *SmimeKeys;
275 WHERE char *SmimeCryptAlg;
276 WHERE char *SmimeCALocation;
277 WHERE char *SmimeVerifyCommand;
278 WHERE char *SmimeVerifyOpaqueCommand;
279 WHERE char *SmimeDecryptCommand;
280 WHERE char *SmimeSignCommand;
281 WHERE char *SmimeSignOpaqueCommand;
282 WHERE char *SmimeEncryptCommand;
283 WHERE char *SmimeGetSignerCertCommand;
284 WHERE char *SmimePk7outCommand;
285 WHERE char *SmimeGetCertCommand;
286 WHERE char *SmimeImportCertCommand;
287 WHERE char *SmimeGetCertEmailCommand;
288
289 #ifdef MAIN_C
290 const char *Weekdays[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
291 const char *Months[] =
292   { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct",
293 "Nov", "Dec", "ERR" };
294
295 const char *BodyTypes[] =
296   { "x-unknown", "audio", "application", "image", "message", "model",
297 "multipart", "text", "video" };
298 const char *BodyEncodings[] =
299   { "x-unknown", "7bit", "8bit", "quoted-printable", "base64", "binary",
300 "x-uuencoded" };
301 #else
302 extern const char *Weekdays[];
303 extern const char *Months[];
304 #endif
305
306 #ifdef MAIN_C
307 /* so that global vars get included
308  * FIXME WTF IS THIS?!?!???!?!??!?!??
309  */
310 #include "mx.h"
311 #include "buffy.h"
312 #include "sort.h"
313 #include "mutt_crypt.h"
314 #endif /* MAIN_C */
315
316 #endif /* !_GLOBALS_H */