more simplifications and header moves
[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 "alias.h"
13
14 #include <lib-lib/str.h>
15 #include <lib-lib/date.h>
16
17 #include "lib/list.h"
18 #include "lib/rx.h"
19
20 WHERE void (*mutt_error) (const char *, ...);
21 WHERE void (*mutt_message) (const char *, ...);
22
23 WHERE CONTEXT *Context;
24
25 WHERE char Errorbuf[STRING];
26 WHERE char AttachmentMarker[STRING];
27
28 WHERE char Quotebuf[SHORT_STRING];
29
30 WHERE char *MuttDotlock;
31
32 WHERE address_t *EnvFrom;
33 WHERE address_t *From;
34
35 WHERE char *AliasFile;
36 WHERE char *AliasFmt;
37 WHERE char *AssumedCharset;
38 WHERE char *AttachSep;
39 WHERE char *Attribution;
40 WHERE char *AttachFormat;
41 WHERE char *Charset;
42 WHERE char *ComposeFormat;
43 WHERE char *ConfigCharset;
44 WHERE char *ContentType;
45 WHERE char *DefaultHook;
46 WHERE char *DateFmt;
47 WHERE char *DisplayFilter;
48 WHERE char *DsnNotify;
49 WHERE char *DsnReturn;
50 WHERE char *Editor;
51 WHERE char *EditorHeaders;
52 WHERE char *FileCharset;
53 WHERE char *FolderFormat;
54 WHERE char *ForwFmt;
55 WHERE char *Fqdn;
56 WHERE char *HdrFmt;
57 WHERE char *Homedir;
58 WHERE char *Hostname;
59
60 WHERE char *ImapAuthenticators INITVAL (NULL);
61 WHERE char *ImapDelimChars INITVAL (NULL);
62 WHERE char *ImapHeaders;
63 WHERE char *ImapHomeNamespace INITVAL (NULL);
64 WHERE char *ImapLogin INITVAL (NULL);
65 WHERE char *ImapPass INITVAL (NULL);
66 WHERE char *ImapUser INITVAL (NULL);
67 WHERE char *Inbox;
68 WHERE char *Ispell;
69 WHERE char *Locale;
70 WHERE char *MailcapPath;
71 WHERE char *Maildir;
72
73 #ifdef USE_HCACHE
74 WHERE char *HeaderCache;
75 #if HAVE_GDBM || HAVE_DB4
76 WHERE char *HeaderCachePageSize;
77 #endif /* HAVE_GDBM || HAVE_DB4 */
78 #endif /* USE_HCACHE */
79 WHERE char *MhFlagged;
80 WHERE char *MhReplied;
81 WHERE char *MhUnseen;
82 WHERE char *MsgFmt;
83 WHERE char *MsgIdFormat;
84
85 WHERE rx_t AttachRemindRegexp;
86 WHERE rx_t Mask;
87 WHERE rx_t QuoteRegexp;
88 WHERE rx_t ReplyRegexp;
89 WHERE rx_t Smileys;
90 WHERE rx_t GecosMask;
91 WHERE rx_t StripWasRegexp;
92
93 WHERE char *Preconnect INITVAL (NULL);
94 WHERE char *Tunnel INITVAL (NULL);
95 WHERE short NetInc;
96
97 #ifdef MIXMASTER
98 WHERE char *Mixmaster;
99 WHERE char *MixEntryFormat;
100 #endif
101
102 WHERE char *OperatingSystem INITVAL (NULL);
103
104 WHERE char *Muttrc INITVAL (NULL);
105
106 #ifdef USE_NNTP
107 WHERE char *NewsCacheDir;
108 WHERE char *GroupFormat;
109 WHERE char *Inews;
110 WHERE char *NewsServer;
111 WHERE char *NntpUser;
112 WHERE char *NntpPass;
113 WHERE char *NewsRc;
114 #endif
115 WHERE char *Outbox;
116 WHERE char *Pager;
117 WHERE char *PagerFmt;
118 WHERE char *PipeSep;
119
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
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 WHERE char *SmtpUseTLS;
148 #endif
149 WHERE char *Spoolfile;
150 WHERE char *SpamSep;
151
152 #if defined(USE_SSL) || defined(USE_GNUTLS)
153 WHERE char *SslCertFile INITVAL (NULL);
154 #endif
155 #if defined(USE_SSL)
156 WHERE char *SslEntropyFile INITVAL (NULL);
157 #endif
158 #ifdef USE_SSL
159 WHERE char *SslClientCert INITVAL (NULL);
160 WHERE LIST *SslSessionCerts INITVAL (NULL);
161 #endif
162 #ifdef USE_GNUTLS
163 WHERE short SslDHPrimeBits;
164 WHERE char *SslCACertFile INITVAL (NULL);
165 #endif
166 WHERE char *StChars;
167 WHERE char *Status;
168 WHERE char *Tempdir;
169 WHERE char *Tochars;
170 WHERE char *TrashPath;
171 WHERE char *Username;
172 WHERE char *XtermTitle;
173 WHERE char *XtermLeave;
174 WHERE char *XtermIcon;
175
176 WHERE char *CurrentFolder;
177 WHERE char *LastFolder;
178
179 WHERE LIST *AutoViewList INITVAL (0);
180 WHERE LIST *AlternativeOrderList INITVAL (0);
181 WHERE LIST *AttachAllow INITVAL(0);
182 WHERE LIST *AttachExclude INITVAL(0);
183 WHERE LIST *InlineAllow INITVAL(0);
184 WHERE LIST *InlineExclude INITVAL(0);
185 WHERE LIST *HeaderOrderList INITVAL (0);
186 WHERE LIST *Ignore INITVAL (0);
187 WHERE LIST *MimeLookupList INITVAL (0);
188 WHERE LIST *UnIgnore INITVAL (0);
189
190 WHERE list2_t *Alternates INITVAL (0);
191 WHERE list2_t *UnAlternates INITVAL (0);
192 WHERE list2_t *MailLists INITVAL (0);
193 WHERE list2_t *UnMailLists INITVAL (0);
194 WHERE list2_t *SubscribedLists INITVAL (0);
195 WHERE list2_t *UnSubscribedLists INITVAL (0);
196 WHERE SPAM_LIST *SpamList INITVAL (0);
197 WHERE list2_t *NoSpamList INITVAL (0);
198
199 /* bit vector for boolean variables */
200 #ifdef MAIN_C
201 unsigned char Options[(OPTMAX + 7) / 8];
202 #else
203 extern unsigned char Options[];
204 #endif
205
206 /* bit vector for the yes/no/ask variable type */
207 #ifdef MAIN_C
208 unsigned char QuadOptions[(OPT_MAX * 2 + 7) / 8];
209 #else
210 extern unsigned char QuadOptions[];
211 #endif
212
213 WHERE unsigned short Counter INITVAL (0);
214
215 #ifdef USE_NNTP
216 WHERE short NewsPollTimeout;
217 WHERE short NntpContext;
218 #endif
219
220 WHERE short ConnectTimeout;
221 WHERE short HistSize;
222 WHERE short MenuContext;
223 WHERE short PagerContext;
224 WHERE short PagerIndexLines;
225 WHERE short ReadInc;
226 WHERE short SendmailWait;
227 WHERE short SleepTime INITVAL (1);
228 WHERE short Timeout;
229 WHERE short Umask INITVAL (0077);
230 WHERE short WrapMargin;
231 WHERE short WriteInc;
232 WHERE short MaxDispRecips;
233 WHERE short MaxLineLength;
234
235 WHERE short ScoreThresholdDelete;
236 WHERE short ScoreThresholdRead;
237 WHERE short ScoreThresholdFlag;
238
239 WHERE short DrawFullLine INITVAL (0);
240 WHERE short SidebarWidth;
241
242 WHERE short ImapKeepalive;
243 WHERE short ImapBuffyTimeout;
244
245 /* flags for received signals */
246 WHERE SIG_ATOMIC_VOLATILE_T SigAlrm INITVAL (0);
247 WHERE SIG_ATOMIC_VOLATILE_T SigInt INITVAL (0);
248 WHERE SIG_ATOMIC_VOLATILE_T SigWinch INITVAL (0);
249
250 WHERE int CurrentMenu;
251
252 WHERE ALIAS *Aliases INITVAL (0);
253 WHERE LIST *UserHeader INITVAL (0);
254
255 /*-- formerly in pgp.h --*/
256 WHERE rx_t PgpGoodSign;
257 WHERE char *PgpSignAs;
258 WHERE short PgpTimeout;
259 WHERE char *PgpEntryFormat;
260 WHERE char *PgpClearSignCommand;
261 WHERE char *PgpDecodeCommand;
262 WHERE char *PgpVerifyCommand;
263 WHERE char *PgpDecryptCommand;
264 WHERE char *PgpSignCommand;
265 WHERE char *PgpEncryptSignCommand;
266 WHERE char *PgpEncryptOnlyCommand;
267 WHERE char *PgpImportCommand;
268 WHERE char *PgpExportCommand;
269 WHERE char *PgpVerifyKeyCommand;
270 WHERE char *PgpListSecringCommand;
271 WHERE char *PgpListPubringCommand;
272 WHERE char *PgpGetkeysCommand;
273
274 /*-- formerly in smime.h --*/
275 WHERE char *SmimeDefaultKey;
276 WHERE char *SmimeCryptAlg;
277 WHERE short SmimeTimeout;
278 WHERE char *SmimeCertificates;
279 WHERE char *SmimeKeys;
280 WHERE char *SmimeCALocation;
281 WHERE char *SmimeVerifyCommand;
282 WHERE char *SmimeVerifyOpaqueCommand;
283 WHERE char *SmimeDecryptCommand;
284 WHERE char *SmimeSignCommand;
285 WHERE char *SmimeSignOpaqueCommand;
286 WHERE char *SmimeEncryptCommand;
287 WHERE char *SmimeGetSignerCertCommand;
288 WHERE char *SmimePk7outCommand;
289 WHERE char *SmimeGetCertCommand;
290 WHERE char *SmimeImportCertCommand;
291 WHERE char *SmimeGetCertEmailCommand;
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 #else
299 extern const char *Weekdays[];
300 extern const char *Months[];
301 #endif
302
303 #endif /* !_GLOBALS_H */