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