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