Initial import of mutt-ng.
[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 *Muttrc INITVAL (NULL);
84 #ifdef USE_NNTP
85 WHERE char *NewsCacheDir;
86 WHERE char *GroupFormat;
87 WHERE char *Inews;
88 WHERE char *NewsServer;
89 WHERE char *NntpUser;
90 WHERE char *NntpPass;
91 WHERE char *NewsRc;
92 #endif
93 WHERE char *Outbox;
94 WHERE char *Pager;
95 WHERE char *PagerFmt;
96 WHERE char *PipeSep;
97 #ifdef USE_POP
98 WHERE char *PopAuthenticators INITVAL (NULL);
99 WHERE short PopCheckTimeout;
100 WHERE char *PopHost;
101 WHERE char *PopPass INITVAL (NULL);
102 WHERE char *PopUser INITVAL (NULL);
103 #endif
104 WHERE char *PostIndentString;
105 WHERE char *Postponed;
106 WHERE char *Prefix;
107 WHERE char *PrintCmd;
108 WHERE char *QueryCmd;
109 WHERE char *Realname;
110 WHERE char *SendCharset;
111 WHERE char *Sendmail;
112 WHERE char *Shell;
113 WHERE char *Signature;
114 WHERE char *SimpleSearch;
115 #if defined(USE_LIBESMTP)
116 WHERE char *SmtpAuthUser;
117 WHERE char *SmtpAuthPass;
118 WHERE char *SmtpHost;
119 WHERE unsigned short SmtpPort;
120 #endif
121 WHERE char *Spoolfile;
122 #if defined(USE_SSL) || defined(USE_NSS)
123 WHERE char *SslCertFile INITVAL (NULL);
124 WHERE char *SslEntropyFile INITVAL (NULL);
125 #endif
126 WHERE char *StChars;
127 WHERE char *Status;
128 WHERE char *Tempdir;
129 WHERE char *Tochars;
130 WHERE char *TrashPath;
131 WHERE char *Username;
132 WHERE char *Visual;
133
134 WHERE char *LastFolder;
135
136 WHERE LIST *AutoViewList INITVAL(0);
137 WHERE LIST *AlternativeOrderList INITVAL(0);
138 WHERE LIST *HeaderOrderList INITVAL(0);
139 WHERE LIST *Ignore INITVAL(0);
140 WHERE LIST *MimeLookupList INITVAL(0);
141 WHERE LIST *UnIgnore INITVAL(0);
142
143 WHERE RX_LIST *Alternates INITVAL(0);
144 WHERE RX_LIST *MailLists INITVAL(0);
145 WHERE RX_LIST *SubscribedLists INITVAL(0);
146
147 /* bit vector for boolean variables */
148 #ifdef MAIN_C
149 unsigned char Options[(OPTMAX + 7)/8];
150 #else
151 extern unsigned char Options[];
152 #endif
153
154 /* bit vector for the yes/no/ask variable type */
155 #ifdef MAIN_C
156 unsigned char QuadOptions[(OPT_MAX*2 + 7) / 8];
157 #else
158 extern unsigned char QuadOptions[];
159 #endif
160
161 WHERE unsigned short Counter INITVAL (0);
162
163 #ifdef USE_NNTP
164 WHERE short NewsPollTimeout;
165 WHERE short NntpContext;
166 #endif
167
168 WHERE short ConnectTimeout;
169 WHERE short HistSize;
170 WHERE short PagerContext;
171 WHERE short PagerIndexLines;
172 WHERE short ReadInc;
173 WHERE short SendmailWait;
174 WHERE short SleepTime INITVAL (1);
175 WHERE short Timeout;
176 WHERE short WrapMargin;
177 WHERE short WriteInc;
178
179 WHERE short ScoreThresholdDelete;
180 WHERE short ScoreThresholdRead;
181 WHERE short ScoreThresholdFlag;
182
183 #ifdef USE_IMAP
184 WHERE short ImapKeepalive;
185 #endif
186
187 /* flags for received signals */
188 WHERE SIG_ATOMIC_VOLATILE_T SigAlrm INITVAL (0);
189 WHERE SIG_ATOMIC_VOLATILE_T SigInt INITVAL (0);
190 WHERE SIG_ATOMIC_VOLATILE_T SigWinch INITVAL (0);
191
192 WHERE int CurrentMenu;
193
194 WHERE ALIAS *Aliases INITVAL (0);
195 WHERE LIST *UserHeader INITVAL (0);
196
197 /*-- formerly in pgp.h --*/
198 WHERE REGEXP PgpGoodSign;
199 WHERE char *PgpSignAs;
200 WHERE short PgpTimeout;
201 WHERE char *PgpEntryFormat;
202 WHERE char *PgpClearSignCommand;
203 WHERE char *PgpDecodeCommand;
204 WHERE char *PgpVerifyCommand;
205 WHERE char *PgpDecryptCommand;
206 WHERE char *PgpSignCommand;
207 WHERE char *PgpEncryptSignCommand;
208 WHERE char *PgpEncryptOnlyCommand;
209 WHERE char *PgpImportCommand;
210 WHERE char *PgpExportCommand;
211 WHERE char *PgpVerifyKeyCommand;
212 WHERE char *PgpListSecringCommand;
213 WHERE char *PgpListPubringCommand;
214 WHERE char *PgpGetkeysCommand;
215
216 /*-- formerly in smime.h --*/
217 WHERE char *SmimeDefaultKey;
218 WHERE char *SmimeCryptAlg;
219 WHERE short SmimeTimeout;
220 WHERE char *SmimeCertificates;
221 WHERE char *SmimeKeys;
222 WHERE char *SmimeCryptAlg;
223 WHERE char *SmimeCALocation;
224 WHERE char *SmimeVerifyCommand;
225 WHERE char *SmimeVerifyOpaqueCommand;
226 WHERE char *SmimeDecryptCommand;
227 WHERE char *SmimeSignCommand;
228 WHERE char *SmimeSignOpaqueCommand;
229 WHERE char *SmimeEncryptCommand;
230 WHERE char *SmimeGetSignerCertCommand;
231 WHERE char *SmimePk7outCommand;
232 WHERE char *SmimeGetCertCommand;
233 WHERE char *SmimeImportCertCommand;
234 WHERE char *SmimeGetCertEmailCommand;
235
236
237
238 #ifdef DEBUG
239 WHERE FILE *debugfile INITVAL (0);
240 WHERE int debuglevel INITVAL (0);
241 #endif
242
243 #ifdef MAIN_C
244 const char *Weekdays[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
245 const char *Months[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "ERR" };
246
247 const char *BodyTypes[] = { "x-unknown", "audio", "application", "image", "message", "model", "multipart", "text", "video" };
248 const char *BodyEncodings[] = { "x-unknown", "7bit", "8bit", "quoted-printable", "base64", "binary", "x-uuencoded" };
249 #else
250 extern const char *Weekdays[];
251 extern const char *Months[];
252 #endif
253
254 #ifdef MAIN_C
255 /* so that global vars get included */ 
256 #include "mx.h"
257 #include "mutt_regex.h"
258 #include "buffy.h"
259 #include "sort.h"
260 #include "mutt_crypt.h"
261 #endif /* MAIN_C */