rework m_strformat so that it takes the cols number to use in case of
[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[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 WHERE char *Mixmaster;
88 WHERE char *MixEntryFormat;
89
90 WHERE char *OperatingSystem INITVAL (NULL);
91
92 WHERE char *Muttrc INITVAL (NULL);
93
94 #ifdef USE_NNTP
95 WHERE char *NewsCacheDir;
96 WHERE char *GroupFormat;
97 WHERE char *Inews;
98 WHERE char *NewsServer;
99 WHERE char *NntpUser;
100 WHERE char *NntpPass;
101 WHERE char *NewsRc;
102 #endif
103 WHERE char *Outbox;
104 WHERE char *Pager;
105 WHERE char *PagerFmt;
106 WHERE char *PipeSep;
107
108 WHERE char *PopAuthenticators INITVAL (NULL);
109 WHERE short PopCheckTimeout;
110 WHERE char *PopHost;
111 WHERE char *PopPass INITVAL (NULL);
112 WHERE char *PopUser INITVAL (NULL);
113
114 WHERE char *PostIndentString;
115 WHERE char *Postponed;
116 WHERE char *Prefix;
117 WHERE char *PrintCmd;
118 WHERE char *QueryCmd;
119 WHERE char *Realname;
120 WHERE char *SendCharset;
121 WHERE char *Sendmail;
122 WHERE char *Shell;
123 WHERE char *SidebarDelim;
124 WHERE char *SidebarNumberFormat;
125 WHERE char *SidebarBoundary;
126 WHERE char *Signature;
127 WHERE char *SignOffString;
128 WHERE char *SimpleSearch;
129
130 #if defined(USE_LIBESMTP)
131 WHERE char *SmtpAuthUser;
132 WHERE char *SmtpAuthPass;
133 WHERE char *SmtpHost;
134 WHERE unsigned short SmtpPort;
135 WHERE char *SmtpUseTLS;
136 #endif
137 WHERE char *Spoolfile;
138 WHERE char *SpamSep;
139
140 #if defined(USE_SSL) || defined(USE_GNUTLS)
141 WHERE char *SslCertFile INITVAL (NULL);
142 #endif
143 #if defined(USE_SSL)
144 WHERE char *SslEntropyFile INITVAL (NULL);
145 #endif
146 #ifdef USE_SSL
147 WHERE char *SslClientCert INITVAL (NULL);
148 WHERE string_list_t *SslSessionCerts INITVAL (NULL);
149 #endif
150 #ifdef USE_GNUTLS
151 WHERE short SslDHPrimeBits;
152 WHERE char *SslCACertFile INITVAL (NULL);
153 #endif
154 WHERE char *StChars;
155 WHERE char *Status;
156 WHERE char *Tempdir;
157 WHERE char *Tochars;
158 WHERE char *TrashPath;
159 WHERE char *Username;
160 WHERE char *XtermTitle;
161 WHERE char *XtermLeave;
162 WHERE char *XtermIcon;
163
164 WHERE char *CurrentFolder;
165 WHERE char *LastFolder;
166
167 WHERE string_list_t *AutoViewList INITVAL (0);
168 WHERE string_list_t *AlternativeOrderList INITVAL (0);
169 WHERE string_list_t *AttachAllow INITVAL(0);
170 WHERE string_list_t *AttachExclude INITVAL(0);
171 WHERE string_list_t *InlineAllow INITVAL(0);
172 WHERE string_list_t *InlineExclude INITVAL(0);
173 WHERE string_list_t *HeaderOrderList INITVAL (0);
174 WHERE string_list_t *Ignore INITVAL (0);
175 WHERE string_list_t *MimeLookupList INITVAL (0);
176 WHERE string_list_t *UnIgnore INITVAL (0);
177
178 WHERE rx_t *Alternates INITVAL (0);
179 WHERE rx_t *UnAlternates INITVAL (0);
180 WHERE rx_t *MailLists INITVAL (0);
181 WHERE rx_t *UnMailLists INITVAL (0);
182 WHERE rx_t *SubscribedLists INITVAL (0);
183 WHERE rx_t *UnSubscribedLists INITVAL (0);
184 WHERE rx_t *SpamList INITVAL (0);
185 WHERE rx_t *NoSpamList INITVAL (0);
186
187 /* bit vector for boolean variables */
188 #ifdef MAIN_C
189 unsigned char Options[(OPTMAX + 7) / 8];
190 #else
191 extern unsigned char Options[];
192 #endif
193
194 /* bit vector for the yes/no/ask variable type */
195 #ifdef MAIN_C
196 unsigned char QuadOptions[(OPT_MAX * 2 + 7) / 8];
197 #else
198 extern unsigned char QuadOptions[];
199 #endif
200
201 #ifdef USE_NNTP
202 WHERE short NewsPollTimeout;
203 WHERE short NntpContext;
204 #endif
205
206 WHERE short ConnectTimeout;
207 WHERE short HistSize;
208 WHERE short MenuContext;
209 WHERE short PagerContext;
210 WHERE short PagerIndexLines;
211 WHERE short ReadInc;
212 WHERE short SendmailWait;
213 WHERE short SleepTime INITVAL (1);
214 WHERE short Timeout;
215 WHERE short Umask INITVAL (0077);
216 WHERE short WrapMargin;
217 WHERE short WriteInc;
218 WHERE short MaxDispRecips;
219 WHERE short MaxLineLength;
220
221 WHERE short ScoreThresholdDelete;
222 WHERE short ScoreThresholdRead;
223 WHERE short ScoreThresholdFlag;
224
225 WHERE short DrawFullLine INITVAL (0);
226 WHERE short SidebarWidth;
227
228 WHERE short ImapKeepalive;
229 WHERE short ImapBuffyTimeout;
230
231 /* flags for received signals */
232 WHERE SIG_ATOMIC_VOLATILE_T SigAlrm INITVAL (0);
233 WHERE SIG_ATOMIC_VOLATILE_T SigInt INITVAL (0);
234 WHERE SIG_ATOMIC_VOLATILE_T SigWinch INITVAL (0);
235
236 WHERE int CurrentMenu;
237
238 WHERE string_list_t *UserHeader INITVAL (0);
239
240 /*-- formerly in pgp.h --*/
241 WHERE rx_t PgpGoodSign;
242 WHERE char *PgpSignAs;
243 WHERE short PgpTimeout;
244 WHERE char *PgpEntryFormat;
245 WHERE char *PgpClearSignCommand;
246 WHERE char *PgpDecodeCommand;
247 WHERE char *PgpVerifyCommand;
248 WHERE char *PgpDecryptCommand;
249 WHERE char *PgpSignCommand;
250 WHERE char *PgpEncryptSignCommand;
251 WHERE char *PgpEncryptOnlyCommand;
252 WHERE char *PgpImportCommand;
253 WHERE char *PgpExportCommand;
254 WHERE char *PgpVerifyKeyCommand;
255 WHERE char *PgpListSecringCommand;
256 WHERE char *PgpListPubringCommand;
257 WHERE char *PgpGetkeysCommand;
258
259 /*-- formerly in smime.h --*/
260 WHERE char *SmimeDefaultKey;
261 WHERE char *SmimeCryptAlg;
262 WHERE short SmimeTimeout;
263 WHERE char *SmimeCertificates;
264 WHERE char *SmimeKeys;
265 WHERE char *SmimeCALocation;
266 WHERE char *SmimeVerifyCommand;
267 WHERE char *SmimeVerifyOpaqueCommand;
268 WHERE char *SmimeDecryptCommand;
269 WHERE char *SmimeSignCommand;
270 WHERE char *SmimeSignOpaqueCommand;
271 WHERE char *SmimeEncryptCommand;
272 WHERE char *SmimeGetSignerCertCommand;
273 WHERE char *SmimePk7outCommand;
274 WHERE char *SmimeGetCertCommand;
275 WHERE char *SmimeImportCertCommand;
276 WHERE char *SmimeGetCertEmailCommand;
277
278 #ifdef MAIN_C
279 const char *Weekdays[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
280 const char *Months[] =
281   { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct",
282 "Nov", "Dec", "ERR" };
283 #else
284 extern const char *Weekdays[];
285 extern const char *Months[];
286 #endif
287
288 #endif /* !_GLOBALS_H */