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