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