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