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