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