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