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