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