Andreas Krennmair:
[apps/madmutt.git] / globals.h
1 /*
2  * Copyright (C) 1996-2002 Michael R. Elkins <me@mutt.org>
3  * 
4  *     This program is free software; you can redistribute it and/or modify
5  *     it under the terms of the GNU General Public License as published by
6  *     the Free Software Foundation; either version 2 of the License, or
7  *     (at your option) any later version.
8  * 
9  *     This program is distributed in the hope that it will be useful,
10  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *     GNU General Public License for more details.
13  * 
14  *     You should have received a copy of the GNU General Public License
15  *     along with this program; if not, write to the Free Software
16  *     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
17  */ 
18
19 WHERE void (*mutt_error) (const char *, ...);
20 WHERE void (*mutt_message) (const char *, ...);
21
22 WHERE CONTEXT *Context;
23
24 WHERE char Errorbuf[STRING];
25 WHERE char AttachmentMarker[STRING];
26
27 WHERE char Quotebuf[SHORT_STRING];
28
29 #if defined(DL_STANDALONE) && defined(USE_DOTLOCK)
30 WHERE char *MuttDotlock;
31 #endif
32
33 WHERE ADDRESS *From;
34
35 WHERE char *AliasFile;
36 WHERE char *AliasFmt;
37 WHERE char *AttachSep;
38 WHERE char *Attribution;
39 WHERE char *AttachFormat;
40 WHERE char *Charset;
41 WHERE char *ComposeFormat;
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 *EscChar;
50 WHERE char *FolderFormat;
51 WHERE char *ForwFmt;
52 WHERE char *Fqdn;
53 WHERE char *HdrFmt;
54 WHERE char *Homedir;
55 WHERE char *Hostname;
56 #ifdef USE_IMAP
57 WHERE char *ImapAuthenticators INITVAL (NULL);
58 WHERE char *ImapDelimChars INITVAL (NULL);
59 WHERE char *ImapHomeNamespace INITVAL (NULL);
60 WHERE char *ImapPass INITVAL (NULL);
61 WHERE char *ImapUser INITVAL (NULL);
62 #endif
63 WHERE char *Inbox;
64 WHERE char *Ispell;
65 WHERE char *Locale;
66 WHERE char *MailcapPath;
67 WHERE char *Maildir;
68 WHERE char *MhFlagged;
69 WHERE char *MhReplied;
70 WHERE char *MhUnseen;
71 WHERE char *MsgFmt;
72
73 #ifdef USE_SOCKET
74 WHERE char *Preconnect INITVAL (NULL);
75 WHERE char *Tunnel INITVAL (NULL);
76 #endif /* USE_SOCKET */
77
78 #ifdef MIXMASTER
79 WHERE char *Mixmaster;
80 WHERE char *MixEntryFormat;
81 #endif
82
83 WHERE char *OperatingSystem INITVAL (NULL);
84
85 WHERE char *Muttrc INITVAL (NULL);
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 #ifdef USE_POP
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 #endif
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 *SendCharset;
113 WHERE char *Sendmail;
114 WHERE char *Shell;
115 WHERE char *Signature;
116 WHERE char *SimpleSearch;
117 #if defined(USE_LIBESMTP)
118 WHERE char *SmtpAuthUser;
119 WHERE char *SmtpAuthPass;
120 WHERE char *SmtpHost;
121 WHERE unsigned short SmtpPort;
122 #endif
123 WHERE char *Spoolfile;
124 #if defined(USE_SSL) || defined(USE_NSS) || defined(USE_GNUTLS)
125 WHERE char *SslCertFile INITVAL (NULL);
126 #endif
127 #if defined(USE_SSL) || defined(USE_NSS)
128 WHERE char *SslEntropyFile INITVAL (NULL);
129 #endif
130 #ifdef USE_GNUTLS
131 WHERE short SslDHPrimeBits;
132 WHERE char *SslCACertFile INITVAL (NULL);
133 #endif
134 WHERE char *StChars;
135 WHERE char *Status;
136 WHERE char *Tempdir;
137 WHERE char *Tochars;
138 WHERE char *TrashPath;
139 WHERE char *Username;
140 WHERE char *Visual;
141 WHERE char *XtermTitle;
142 WHERE char *XtermIcon;
143
144 WHERE char *LastFolder;
145
146 WHERE LIST *AutoViewList INITVAL(0);
147 WHERE LIST *AlternativeOrderList INITVAL(0);
148 WHERE LIST *HeaderOrderList INITVAL(0);
149 WHERE LIST *Ignore INITVAL(0);
150 WHERE LIST *MimeLookupList INITVAL(0);
151 WHERE LIST *UnIgnore INITVAL(0);
152
153 WHERE RX_LIST *Alternates INITVAL(0);
154 WHERE RX_LIST *MailLists INITVAL(0);
155 WHERE RX_LIST *SubscribedLists INITVAL(0);
156
157 /* bit vector for boolean variables */
158 #ifdef MAIN_C
159 unsigned char Options[(OPTMAX + 7)/8];
160 #else
161 extern unsigned char Options[];
162 #endif
163
164 /* bit vector for the yes/no/ask variable type */
165 #ifdef MAIN_C
166 unsigned char QuadOptions[(OPT_MAX*2 + 7) / 8];
167 #else
168 extern unsigned char QuadOptions[];
169 #endif
170
171 WHERE unsigned short Counter INITVAL (0);
172
173 #ifdef USE_NNTP
174 WHERE short NewsPollTimeout;
175 WHERE short NntpContext;
176 #endif
177
178 WHERE short ConnectTimeout;
179 WHERE short HistSize;
180 WHERE short PagerContext;
181 WHERE short PagerIndexLines;
182 WHERE short ReadInc;
183 WHERE short SendmailWait;
184 WHERE short SleepTime INITVAL (1);
185 WHERE short Timeout;
186 WHERE short WrapMargin;
187 WHERE short WriteInc;
188
189 WHERE short ScoreThresholdDelete;
190 WHERE short ScoreThresholdRead;
191 WHERE short ScoreThresholdFlag;
192
193 WHERE struct buffy_t *CurBuffy INITVAL(0);
194 WHERE short DrawFullLine INITVAL(0);
195 WHERE short SidebarWidth;
196 #ifdef USE_IMAP
197 WHERE short ImapKeepalive;
198 #endif
199
200 /* flags for received signals */
201 WHERE SIG_ATOMIC_VOLATILE_T SigAlrm INITVAL (0);
202 WHERE SIG_ATOMIC_VOLATILE_T SigInt INITVAL (0);
203 WHERE SIG_ATOMIC_VOLATILE_T SigWinch INITVAL (0);
204
205 WHERE int CurrentMenu;
206
207 WHERE ALIAS *Aliases INITVAL (0);
208 WHERE LIST *UserHeader INITVAL (0);
209
210 /*-- formerly in pgp.h --*/
211 WHERE REGEXP PgpGoodSign;
212 WHERE char *PgpSignAs;
213 WHERE short PgpTimeout;
214 WHERE char *PgpEntryFormat;
215 WHERE char *PgpClearSignCommand;
216 WHERE char *PgpDecodeCommand;
217 WHERE char *PgpVerifyCommand;
218 WHERE char *PgpDecryptCommand;
219 WHERE char *PgpSignCommand;
220 WHERE char *PgpEncryptSignCommand;
221 WHERE char *PgpEncryptOnlyCommand;
222 WHERE char *PgpImportCommand;
223 WHERE char *PgpExportCommand;
224 WHERE char *PgpVerifyKeyCommand;
225 WHERE char *PgpListSecringCommand;
226 WHERE char *PgpListPubringCommand;
227 WHERE char *PgpGetkeysCommand;
228
229 /*-- formerly in smime.h --*/
230 WHERE char *SmimeDefaultKey;
231 WHERE char *SmimeCryptAlg;
232 WHERE short SmimeTimeout;
233 WHERE char *SmimeCertificates;
234 WHERE char *SmimeKeys;
235 WHERE char *SmimeCryptAlg;
236 WHERE char *SmimeCALocation;
237 WHERE char *SmimeVerifyCommand;
238 WHERE char *SmimeVerifyOpaqueCommand;
239 WHERE char *SmimeDecryptCommand;
240 WHERE char *SmimeSignCommand;
241 WHERE char *SmimeSignOpaqueCommand;
242 WHERE char *SmimeEncryptCommand;
243 WHERE char *SmimeGetSignerCertCommand;
244 WHERE char *SmimePk7outCommand;
245 WHERE char *SmimeGetCertCommand;
246 WHERE char *SmimeImportCertCommand;
247 WHERE char *SmimeGetCertEmailCommand;
248
249
250
251 #ifdef DEBUG
252 WHERE FILE *debugfile INITVAL (0);
253 WHERE int debuglevel INITVAL (0);
254 #endif
255
256 #ifdef MAIN_C
257 const char *Weekdays[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
258 const char *Months[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "ERR" };
259
260 const char *BodyTypes[] = { "x-unknown", "audio", "application", "image", "message", "model", "multipart", "text", "video" };
261 const char *BodyEncodings[] = { "x-unknown", "7bit", "8bit", "quoted-printable", "base64", "binary", "x-uuencoded" };
262 #else
263 extern const char *Weekdays[];
264 extern const char *Months[];
265 #endif
266
267 #ifdef MAIN_C
268 /* so that global vars get included */ 
269 #include "mx.h"
270 #include "mutt_regex.h"
271 #include "buffy.h"
272 #include "sort.h"
273 #include "mutt_crypt.h"
274 #endif /* MAIN_C */