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)
125 WHERE char *SslCertFile INITVAL (NULL);
126 WHERE char *SslEntropyFile INITVAL (NULL);
127 #endif
128 WHERE char *StChars;
129 WHERE char *Status;
130 WHERE char *Tempdir;
131 WHERE char *Tochars;
132 WHERE char *TrashPath;
133 WHERE char *Username;
134 WHERE char *Visual;
135 WHERE char *XtermTitle;
136 WHERE char *XtermIcon;
137
138 WHERE char *LastFolder;
139
140 WHERE LIST *AutoViewList INITVAL(0);
141 WHERE LIST *AlternativeOrderList INITVAL(0);
142 WHERE LIST *HeaderOrderList INITVAL(0);
143 WHERE LIST *Ignore INITVAL(0);
144 WHERE LIST *MimeLookupList INITVAL(0);
145 WHERE LIST *UnIgnore INITVAL(0);
146
147 WHERE RX_LIST *Alternates INITVAL(0);
148 WHERE RX_LIST *MailLists INITVAL(0);
149 WHERE RX_LIST *SubscribedLists INITVAL(0);
150
151 /* bit vector for boolean variables */
152 #ifdef MAIN_C
153 unsigned char Options[(OPTMAX + 7)/8];
154 #else
155 extern unsigned char Options[];
156 #endif
157
158 /* bit vector for the yes/no/ask variable type */
159 #ifdef MAIN_C
160 unsigned char QuadOptions[(OPT_MAX*2 + 7) / 8];
161 #else
162 extern unsigned char QuadOptions[];
163 #endif
164
165 WHERE unsigned short Counter INITVAL (0);
166
167 #ifdef USE_NNTP
168 WHERE short NewsPollTimeout;
169 WHERE short NntpContext;
170 #endif
171
172 WHERE short ConnectTimeout;
173 WHERE short HistSize;
174 WHERE short PagerContext;
175 WHERE short PagerIndexLines;
176 WHERE short ReadInc;
177 WHERE short SendmailWait;
178 WHERE short SleepTime INITVAL (1);
179 WHERE short Timeout;
180 WHERE short WrapMargin;
181 WHERE short WriteInc;
182
183 WHERE short ScoreThresholdDelete;
184 WHERE short ScoreThresholdRead;
185 WHERE short ScoreThresholdFlag;
186
187 WHERE struct buffy_t *CurBuffy INITVAL(0);
188 WHERE short DrawFullLine INITVAL(0);
189 WHERE short SidebarWidth;
190 #ifdef USE_IMAP
191 WHERE short ImapKeepalive;
192 #endif
193
194 /* flags for received signals */
195 WHERE SIG_ATOMIC_VOLATILE_T SigAlrm INITVAL (0);
196 WHERE SIG_ATOMIC_VOLATILE_T SigInt INITVAL (0);
197 WHERE SIG_ATOMIC_VOLATILE_T SigWinch INITVAL (0);
198
199 WHERE int CurrentMenu;
200
201 WHERE ALIAS *Aliases INITVAL (0);
202 WHERE LIST *UserHeader INITVAL (0);
203
204 /*-- formerly in pgp.h --*/
205 WHERE REGEXP PgpGoodSign;
206 WHERE char *PgpSignAs;
207 WHERE short PgpTimeout;
208 WHERE char *PgpEntryFormat;
209 WHERE char *PgpClearSignCommand;
210 WHERE char *PgpDecodeCommand;
211 WHERE char *PgpVerifyCommand;
212 WHERE char *PgpDecryptCommand;
213 WHERE char *PgpSignCommand;
214 WHERE char *PgpEncryptSignCommand;
215 WHERE char *PgpEncryptOnlyCommand;
216 WHERE char *PgpImportCommand;
217 WHERE char *PgpExportCommand;
218 WHERE char *PgpVerifyKeyCommand;
219 WHERE char *PgpListSecringCommand;
220 WHERE char *PgpListPubringCommand;
221 WHERE char *PgpGetkeysCommand;
222
223 /*-- formerly in smime.h --*/
224 WHERE char *SmimeDefaultKey;
225 WHERE char *SmimeCryptAlg;
226 WHERE short SmimeTimeout;
227 WHERE char *SmimeCertificates;
228 WHERE char *SmimeKeys;
229 WHERE char *SmimeCryptAlg;
230 WHERE char *SmimeCALocation;
231 WHERE char *SmimeVerifyCommand;
232 WHERE char *SmimeVerifyOpaqueCommand;
233 WHERE char *SmimeDecryptCommand;
234 WHERE char *SmimeSignCommand;
235 WHERE char *SmimeSignOpaqueCommand;
236 WHERE char *SmimeEncryptCommand;
237 WHERE char *SmimeGetSignerCertCommand;
238 WHERE char *SmimePk7outCommand;
239 WHERE char *SmimeGetCertCommand;
240 WHERE char *SmimeImportCertCommand;
241 WHERE char *SmimeGetCertEmailCommand;
242
243
244
245 #ifdef DEBUG
246 WHERE FILE *debugfile INITVAL (0);
247 WHERE int debuglevel INITVAL (0);
248 #endif
249
250 #ifdef MAIN_C
251 const char *Weekdays[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
252 const char *Months[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "ERR" };
253
254 const char *BodyTypes[] = { "x-unknown", "audio", "application", "image", "message", "model", "multipart", "text", "video" };
255 const char *BodyEncodings[] = { "x-unknown", "7bit", "8bit", "quoted-printable", "base64", "binary", "x-uuencoded" };
256 #else
257 extern const char *Weekdays[];
258 extern const char *Months[];
259 #endif
260
261 #ifdef MAIN_C
262 /* so that global vars get included */ 
263 #include "mx.h"
264 #include "mutt_regex.h"
265 #include "buffy.h"
266 #include "sort.h"
267 #include "mutt_crypt.h"
268 #endif /* MAIN_C */