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