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