small leftovers
[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 #ifdef USE_SOCKET
95 WHERE char *Preconnect INITVAL (NULL);
96 WHERE char *Tunnel INITVAL (NULL);
97 WHERE short NetInc;
98 #endif /* USE_SOCKET */
99
100 #ifdef MIXMASTER
101 WHERE char *Mixmaster;
102 WHERE char *MixEntryFormat;
103 #endif
104
105 WHERE char *OperatingSystem INITVAL (NULL);
106
107 WHERE char *Muttrc INITVAL (NULL);
108
109 #ifdef USE_NNTP
110 WHERE char *NewsCacheDir;
111 WHERE char *GroupFormat;
112 WHERE char *Inews;
113 WHERE char *NewsServer;
114 WHERE char *NntpUser;
115 WHERE char *NntpPass;
116 WHERE char *NewsRc;
117 #endif
118 WHERE char *Outbox;
119 WHERE char *Pager;
120 WHERE char *PagerFmt;
121 WHERE char *PipeSep;
122
123 #ifdef USE_POP
124 WHERE char *PopAuthenticators INITVAL (NULL);
125 WHERE short PopCheckTimeout;
126 WHERE char *PopHost;
127 WHERE char *PopPass INITVAL (NULL);
128 WHERE char *PopUser INITVAL (NULL);
129 #endif
130 WHERE char *PostIndentString;
131 WHERE char *Postponed;
132 WHERE char *Prefix;
133 WHERE char *PrintCmd;
134 WHERE char *QueryCmd;
135 WHERE char *Realname;
136 WHERE char *SendCharset;
137 WHERE char *Sendmail;
138 WHERE char *Shell;
139 WHERE char *SidebarDelim;
140 WHERE char *SidebarNumberFormat;
141 WHERE char *SidebarBoundary;
142 WHERE char *Signature;
143 WHERE char *SignOffString;
144 WHERE char *SimpleSearch;
145
146 #if defined(USE_LIBESMTP)
147 WHERE char *SmtpAuthUser;
148 WHERE char *SmtpAuthPass;
149 WHERE char *SmtpHost;
150 WHERE unsigned short SmtpPort;
151 WHERE char *SmtpUseTLS;
152 #endif
153 WHERE char *Spoolfile;
154 WHERE char *SpamSep;
155
156 #if defined(USE_SSL) || defined(USE_GNUTLS)
157 WHERE char *SslCertFile INITVAL (NULL);
158 #endif
159 #if defined(USE_SSL)
160 WHERE char *SslEntropyFile INITVAL (NULL);
161 #endif
162 #ifdef USE_SSL
163 WHERE char *SslClientCert INITVAL (NULL);
164 WHERE LIST *SslSessionCerts INITVAL (NULL);
165 #endif
166 #ifdef USE_GNUTLS
167 WHERE short SslDHPrimeBits;
168 WHERE char *SslCACertFile INITVAL (NULL);
169 #endif
170 WHERE char *StChars;
171 WHERE char *Status;
172 WHERE char *Tempdir;
173 WHERE char *Tochars;
174 WHERE char *TrashPath;
175 WHERE char *Username;
176 WHERE char *Visual;
177 WHERE char *XtermTitle;
178 WHERE char *XtermLeave;
179 WHERE char *XtermIcon;
180
181 WHERE char *CurrentFolder;
182 WHERE char *LastFolder;
183
184 WHERE LIST *AutoViewList INITVAL (0);
185 WHERE LIST *AlternativeOrderList INITVAL (0);
186 WHERE LIST *AttachAllow INITVAL(0);
187 WHERE LIST *AttachExclude INITVAL(0);
188 WHERE LIST *InlineAllow INITVAL(0);
189 WHERE LIST *InlineExclude INITVAL(0);
190 WHERE LIST *HeaderOrderList INITVAL (0);
191 WHERE LIST *Ignore INITVAL (0);
192 WHERE LIST *MimeLookupList INITVAL (0);
193 WHERE LIST *UnIgnore INITVAL (0);
194
195 WHERE list2_t *Alternates INITVAL (0);
196 WHERE list2_t *UnAlternates INITVAL (0);
197 WHERE list2_t *MailLists INITVAL (0);
198 WHERE list2_t *UnMailLists INITVAL (0);
199 WHERE list2_t *SubscribedLists INITVAL (0);
200 WHERE list2_t *UnSubscribedLists INITVAL (0);
201 WHERE SPAM_LIST *SpamList INITVAL (0);
202 WHERE list2_t *NoSpamList INITVAL (0);
203
204 /* bit vector for boolean variables */
205 #ifdef MAIN_C
206 unsigned char Options[(OPTMAX + 7) / 8];
207 #else
208 extern unsigned char Options[];
209 #endif
210
211 /* bit vector for the yes/no/ask variable type */
212 #ifdef MAIN_C
213 unsigned char QuadOptions[(OPT_MAX * 2 + 7) / 8];
214 #else
215 extern unsigned char QuadOptions[];
216 #endif
217
218 WHERE unsigned short Counter INITVAL (0);
219
220 #ifdef USE_NNTP
221 WHERE short NewsPollTimeout;
222 WHERE short NntpContext;
223 #endif
224
225 WHERE short ConnectTimeout;
226 WHERE short HistSize;
227 WHERE short MenuContext;
228 WHERE short PagerContext;
229 WHERE short PagerIndexLines;
230 WHERE short ReadInc;
231 WHERE short SendmailWait;
232 WHERE short SleepTime INITVAL (1);
233 WHERE short Timeout;
234 WHERE short Umask INITVAL (0077);
235 WHERE short WrapMargin;
236 WHERE short WriteInc;
237 WHERE short MaxDispRecips;
238 WHERE short MaxLineLength;
239
240 WHERE short ScoreThresholdDelete;
241 WHERE short ScoreThresholdRead;
242 WHERE short ScoreThresholdFlag;
243
244 WHERE short DrawFullLine INITVAL (0);
245 WHERE short SidebarWidth;
246
247 #ifdef USE_IMAP
248 WHERE short ImapKeepalive;
249 WHERE short ImapBuffyTimeout;
250 #endif
251
252 /* flags for received signals */
253 WHERE SIG_ATOMIC_VOLATILE_T SigAlrm INITVAL (0);
254 WHERE SIG_ATOMIC_VOLATILE_T SigInt INITVAL (0);
255 WHERE SIG_ATOMIC_VOLATILE_T SigWinch INITVAL (0);
256
257 WHERE int CurrentMenu;
258
259 WHERE ALIAS *Aliases INITVAL (0);
260 WHERE LIST *UserHeader INITVAL (0);
261
262 /*-- formerly in pgp.h --*/
263 WHERE rx_t PgpGoodSign;
264 WHERE char *PgpSignAs;
265 WHERE short PgpTimeout;
266 WHERE char *PgpEntryFormat;
267 WHERE char *PgpClearSignCommand;
268 WHERE char *PgpDecodeCommand;
269 WHERE char *PgpVerifyCommand;
270 WHERE char *PgpDecryptCommand;
271 WHERE char *PgpSignCommand;
272 WHERE char *PgpEncryptSignCommand;
273 WHERE char *PgpEncryptOnlyCommand;
274 WHERE char *PgpImportCommand;
275 WHERE char *PgpExportCommand;
276 WHERE char *PgpVerifyKeyCommand;
277 WHERE char *PgpListSecringCommand;
278 WHERE char *PgpListPubringCommand;
279 WHERE char *PgpGetkeysCommand;
280
281 /*-- formerly in smime.h --*/
282 WHERE char *SmimeDefaultKey;
283 WHERE char *SmimeCryptAlg;
284 WHERE short SmimeTimeout;
285 WHERE char *SmimeCertificates;
286 WHERE char *SmimeKeys;
287 WHERE char *SmimeCALocation;
288 WHERE char *SmimeVerifyCommand;
289 WHERE char *SmimeVerifyOpaqueCommand;
290 WHERE char *SmimeDecryptCommand;
291 WHERE char *SmimeSignCommand;
292 WHERE char *SmimeSignOpaqueCommand;
293 WHERE char *SmimeEncryptCommand;
294 WHERE char *SmimeGetSignerCertCommand;
295 WHERE char *SmimePk7outCommand;
296 WHERE char *SmimeGetCertCommand;
297 WHERE char *SmimeImportCertCommand;
298 WHERE char *SmimeGetCertEmailCommand;
299
300 #ifdef MAIN_C
301 const char *Weekdays[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
302 const char *Months[] =
303   { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct",
304 "Nov", "Dec", "ERR" };
305 #else
306 extern const char *Weekdays[];
307 extern const char *Months[];
308 #endif
309
310 #endif /* !_GLOBALS_H */