simplify some mime things
[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 *Maildir;
53
54 #ifdef USE_HCACHE
55 WHERE char *HeaderCache;
56 #if defined(HAVE_GDBM) || defined(HAVE_DB4)
57 WHERE char *HeaderCachePageSize;
58 #endif /* HAVE_GDBM || HAVE_DB4 */
59 #endif /* USE_HCACHE */
60 WHERE char *MhFlagged;
61 WHERE char *MhReplied;
62 WHERE char *MhUnseen;
63 WHERE char *MsgFmt;
64 WHERE char *MsgIdFormat;
65
66 WHERE rx_t AttachRemindRegexp;
67 WHERE rx_t Mask;
68 WHERE rx_t QuoteRegexp;
69 WHERE rx_t ReplyRegexp;
70 WHERE rx_t Smileys;
71 WHERE rx_t StripWasRegexp;
72
73 WHERE char *Preconnect INITVAL (NULL);
74 WHERE char *Tunnel INITVAL (NULL);
75 WHERE short NetInc;
76
77 WHERE char *Mixmaster;
78 WHERE char *MixEntryFormat;
79
80 WHERE char *OperatingSystem INITVAL (NULL);
81
82 WHERE char *Muttrc INITVAL (NULL);
83
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
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
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 *SidebarDelim;
111 WHERE char *SidebarNumberFormat;
112 WHERE char *SidebarBoundary;
113 WHERE char *Signature;
114 WHERE char *SignOffString;
115 WHERE char *SimpleSearch;
116
117 #if defined(USE_LIBESMTP)
118 WHERE char *SmtpAuthUser;
119 WHERE char *SmtpAuthPass;
120 WHERE char *SmtpHost;
121 WHERE unsigned short SmtpPort;
122 WHERE char *SmtpUseTLS;
123 #endif
124 WHERE char *Spoolfile;
125
126 #if defined(USE_SSL) || defined(USE_GNUTLS)
127 WHERE char *SslCertFile INITVAL (NULL);
128 #endif
129 #if defined(USE_SSL)
130 WHERE char *SslEntropyFile INITVAL (NULL);
131 #endif
132 #ifdef USE_SSL
133 WHERE char *SslClientCert INITVAL (NULL);
134 WHERE string_list_t *SslSessionCerts INITVAL (NULL);
135 #endif
136 #ifdef USE_GNUTLS
137 WHERE short SslDHPrimeBits;
138 WHERE char *SslCACertFile INITVAL (NULL);
139 #endif
140 WHERE char *StChars;
141 WHERE char *Status;
142 WHERE char *Tochars;
143 WHERE char *TrashPath;
144 WHERE char *XtermTitle;
145 WHERE char *XtermLeave;
146 WHERE char *XtermIcon;
147
148 WHERE char *CurrentFolder;
149 WHERE char *LastFolder;
150
151 WHERE string_list_t *AutoViewList INITVAL (0);
152 WHERE string_list_t *AlternativeOrderList INITVAL (0);
153 WHERE string_list_t *AttachAllow INITVAL(0);
154 WHERE string_list_t *AttachExclude INITVAL(0);
155 WHERE string_list_t *InlineAllow INITVAL(0);
156 WHERE string_list_t *InlineExclude INITVAL(0);
157 WHERE string_list_t *HeaderOrderList INITVAL (0);
158 WHERE string_list_t *Ignore INITVAL (0);
159 WHERE string_list_t *MimeLookupList INITVAL (0);
160 WHERE string_list_t *UnIgnore INITVAL (0);
161
162 /* bit vector for boolean variables */
163 #ifdef MAIN_C
164 unsigned char Options[(OPTMAX + 7) / 8];
165 #else
166 extern unsigned char Options[];
167 #endif
168
169 /* bit vector for the yes/no/ask variable type */
170 #ifdef MAIN_C
171 unsigned char QuadOptions[(OPT_MAX * 2 + 7) / 8];
172 #else
173 extern unsigned char QuadOptions[];
174 #endif
175
176 #ifdef USE_NNTP
177 WHERE short NewsPollTimeout;
178 WHERE short NntpContext;
179 #endif
180
181 WHERE short ConnectTimeout;
182 WHERE short HistSize;
183 WHERE short MenuContext;
184 WHERE short PagerContext;
185 WHERE short PagerIndexLines;
186 WHERE short ReadInc;
187 WHERE short SleepTime INITVAL (1);
188 WHERE short Timeout;
189 WHERE short Umask INITVAL (0077);
190 WHERE short WrapMargin;
191 WHERE short WriteInc;
192 WHERE short MaxDispRecips;
193 WHERE short MaxLineLength;
194
195 WHERE short ScoreThresholdDelete;
196 WHERE short ScoreThresholdRead;
197 WHERE short ScoreThresholdFlag;
198
199 WHERE short DrawFullLine INITVAL (0);
200 WHERE short SidebarWidth;
201
202 WHERE short ImapKeepalive;
203 WHERE short ImapBuffyTimeout;
204
205 /* flags for received signals */
206 WHERE SIG_ATOMIC_VOLATILE_T SigAlrm INITVAL (0);
207 WHERE SIG_ATOMIC_VOLATILE_T SigInt INITVAL (0);
208 WHERE SIG_ATOMIC_VOLATILE_T SigWinch INITVAL (0);
209
210 WHERE int CurrentMenu;
211
212 WHERE string_list_t *UserHeader INITVAL (0);
213
214 /*-- formerly in pgp.h --*/
215 WHERE rx_t PgpGoodSign;
216 WHERE char *PgpSignAs;
217 WHERE short PgpTimeout;
218 WHERE char *PgpEntryFormat;
219 WHERE char *PgpClearSignCommand;
220 WHERE char *PgpDecodeCommand;
221 WHERE char *PgpVerifyCommand;
222 WHERE char *PgpDecryptCommand;
223 WHERE char *PgpSignCommand;
224 WHERE char *PgpEncryptSignCommand;
225 WHERE char *PgpEncryptOnlyCommand;
226 WHERE char *PgpImportCommand;
227 WHERE char *PgpExportCommand;
228 WHERE char *PgpVerifyKeyCommand;
229 WHERE char *PgpListSecringCommand;
230 WHERE char *PgpListPubringCommand;
231 WHERE char *PgpGetkeysCommand;
232
233 /*-- formerly in smime.h --*/
234 WHERE char *SmimeDefaultKey;
235 WHERE char *SmimeCryptAlg;
236 WHERE short SmimeTimeout;
237 WHERE char *SmimeCertificates;
238 WHERE char *SmimeKeys;
239 WHERE char *SmimeCALocation;
240 WHERE char *SmimeVerifyCommand;
241 WHERE char *SmimeVerifyOpaqueCommand;
242 WHERE char *SmimeDecryptCommand;
243 WHERE char *SmimeSignCommand;
244 WHERE char *SmimeSignOpaqueCommand;
245 WHERE char *SmimeEncryptCommand;
246 WHERE char *SmimeGetSignerCertCommand;
247 WHERE char *SmimePk7outCommand;
248 WHERE char *SmimeGetCertCommand;
249 WHERE char *SmimeImportCertCommand;
250 WHERE char *SmimeGetCertEmailCommand;
251
252 #ifdef MAIN_C
253 const char *Weekdays[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
254 const char *Months[] =
255   { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct",
256 "Nov", "Dec", "ERR" };
257 #else
258 extern const char *Weekdays[];
259 extern const char *Months[];
260 #endif
261
262 #endif /* !_GLOBALS_H */