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