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