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