NeoMutt  2018-07-16 +2481-68dcde
Teaching an old dog new tricks
DOXYGEN
globals.h
Go to the documentation of this file.
1 
23 #ifndef MUTT_GLOBALS_H
24 #define MUTT_GLOBALS_H
25 
26 #include "config.h"
27 #include <signal.h>
28 #include <stdbool.h>
29 #include "mutt/mutt.h"
30 #include "keymap.h"
31 #include "where.h"
32 
33 #ifdef MAIN_C
34 /* so that global vars get included */
35 #include "mx.h"
36 #include "ncrypt/ncrypt.h"
37 #include "sort.h"
38 #endif /* MAIN_C */
39 
41 
42 WHERE struct Context *Context;
43 
45 WHERE char ErrorBuf[256];
48 
49 WHERE char *HomeDir;
51 
52 WHERE char *Username;
53 
56 
57 extern const char *GitVer;
58 
61 
62 /* Lists of strings */
63 WHERE struct ListHead AlternativeOrderList INITVAL(STAILQ_HEAD_INITIALIZER(AlternativeOrderList));
64 WHERE struct ListHead AutoViewList INITVAL(STAILQ_HEAD_INITIALIZER(AutoViewList));
65 WHERE struct ListHead HeaderOrderList INITVAL(STAILQ_HEAD_INITIALIZER(HeaderOrderList));
66 WHERE struct ListHead MimeLookupList INITVAL(STAILQ_HEAD_INITIALIZER(MimeLookupList));
67 WHERE struct ListHead Muttrc INITVAL(STAILQ_HEAD_INITIALIZER(Muttrc));
68 #ifdef USE_SIDEBAR
69 WHERE struct ListHead SidebarWhitelist INITVAL(STAILQ_HEAD_INITIALIZER(SidebarWhitelist));
70 #endif
71 WHERE struct ListHead TempAttachmentsList INITVAL(STAILQ_HEAD_INITIALIZER(TempAttachmentsList));
72 WHERE struct ListHead UserHeader INITVAL(STAILQ_HEAD_INITIALIZER(UserHeader));
73 
74 /* Lists of AttachMatch */
75 WHERE struct ListHead AttachAllow INITVAL(STAILQ_HEAD_INITIALIZER(AttachAllow));
76 WHERE struct ListHead AttachExclude INITVAL(STAILQ_HEAD_INITIALIZER(AttachExclude));
77 WHERE struct ListHead InlineAllow INITVAL(STAILQ_HEAD_INITIALIZER(InlineAllow));
78 WHERE struct ListHead InlineExclude INITVAL(STAILQ_HEAD_INITIALIZER(InlineExclude));
79 WHERE struct RegexList Alternates INITVAL(STAILQ_HEAD_INITIALIZER(Alternates));
80 WHERE struct RegexList UnAlternates INITVAL(STAILQ_HEAD_INITIALIZER(UnAlternates));
81 
82 /* flags for received signals */
83 WHERE SIG_ATOMIC_VOLATILE_T SigAlrm;
84 WHERE SIG_ATOMIC_VOLATILE_T SigInt;
85 WHERE SIG_ATOMIC_VOLATILE_T SigWinch;
86 
88 
89 WHERE struct AliasList Aliases INITVAL(TAILQ_HEAD_INITIALIZER(Aliases));
90 
91 #ifdef USE_AUTOCRYPT
94 #endif
95 
96 /* All the variables below are backing for config items */
97 
99 WHERE struct Address *C_From;
100 
105 #ifdef USE_AUTOCRYPT
108 #endif
118 
119 #ifdef USE_IMAP
121 #endif
122 WHERE char *C_Mbox;
125 #ifdef USE_HCACHE
127 #if defined(HAVE_GDBM) || defined(HAVE_BDB)
129 #endif /* HAVE_GDBM || HAVE_BDB */
130 #endif /* USE_HCACHE */
131 
132 
133 #ifdef USE_NNTP
135 #endif
137 WHERE char *C_Pager;
144 WHERE char *C_Shell;
146 #ifdef USE_SMTP
148 #endif /* USE_SMTP */
154 
157 WHERE short C_Wrap;
158 
159 #ifdef USE_SIDEBAR
161 #endif
162 #ifdef USE_IMAP
165 #endif
166 
170 
174 
175 #ifdef USE_NOTMUCH
178 #endif
179 
180 /* These variables are backing for config items */
181 WHERE struct Regex *C_Mask;
183 
184 /* Quad-options */
185 WHERE unsigned char C_Bounce;
186 WHERE unsigned char C_Copy;
187 WHERE unsigned char C_Delete;
189 WHERE unsigned char C_MimeForward;
190 WHERE unsigned char C_Print;
191 WHERE unsigned char C_Quit;
192 #ifdef USE_SSL
193 WHERE unsigned char C_SslStarttls;
194 #endif
195 #ifdef USE_NNTP
196 WHERE unsigned char C_PostModerated;
197 WHERE unsigned char C_FollowupToPoster;
198 #endif
199 
204 #ifdef USE_AUTOCRYPT
207 #endif
210 WHERE bool C_Beep;
221 #ifdef USE_HCACHE
222 #if defined(HAVE_QDBM) || defined(HAVE_TC) || defined(HAVE_KC)
224 #endif /* HAVE_QDBM | HAVE_TC | HAVE_KC */
225 #endif /* USE_HCACHE */
227 WHERE bool C_Help;
228 #ifdef USE_IMAP
235 #endif
236 #ifdef USE_SSL
237 #ifndef USE_SSL_GNUTLS
238 WHERE bool C_SslUsesystemcerts;
239 WHERE bool C_SslUseSslv2;
240 #endif /* USE_SSL_GNUTLS */
242 #if defined(USE_SSL_OPENSSL) && defined(HAVE_SSL_PARTIAL_CHAIN)
244 #endif /* USE_SSL_OPENSSL */
245 #endif /* defined(USE_SSL) */
249 #if defined(USE_IMAP) || defined(USE_POP)
251 #endif
258 #ifdef USE_SIDEBAR
261 #endif
274 
276 
277 /* PGP options */
278 
289 
290 /* news options */
291 
292 #ifdef USE_NNTP
295 #endif
296 
297 #ifdef USE_NOTMUCH
299 #endif
300 
301 #endif /* MUTT_GLOBALS_H */
WHERE unsigned char C_Bounce
Config: Confirm before bouncing a message.
Definition: globals.h:185
WHERE char * Username
User&#39;s login name.
Definition: globals.h:52
WHERE bool C_StatusOnTop
Config: Display the status bar at the top.
Definition: globals.h:266
WHERE char * C_SmtpUrl
Config: (smtp) Url of the SMTP server.
Definition: globals.h:147
WHERE char * C_TsIconFormat
Config: printf-like format string for the terminal&#39;s icon title.
Definition: globals.h:152
WHERE bool C_ImapListSubscribed
Config: (imap) When browsing a mailbox, only display subscribed folders.
Definition: globals.h:231
Container for lots of config items.
Definition: set.h:187
WHERE bool C_MessageCacheClean
Config: (imap/pop) Clean out obsolete entries from the message cache.
Definition: globals.h:250
Manage keymappings.
WHERE bool C_Autocrypt
Config: Enables the Autocrypt feature.
Definition: globals.h:205
WHERE bool C_CryptConfirmhook
Config: Prompt the user to confirm keys before use.
Definition: globals.h:279
WHERE bool C_MailCheckRecent
Config: Notify the user about new mail since the last time the mailbox was opened.
Definition: globals.h:246
WHERE bool C_WriteBcc
Config: Write out the &#39;Bcc&#39; field when preparing to send a mail.
Definition: globals.h:273
WHERE char * C_AttributionLocale
Config: Locale for dates in the attribution message.
Definition: globals.h:103
WHERE bool C_BeepNew
Config: Make a noise when new mail arrives.
Definition: globals.h:211
WHERE bool C_AutocryptReply
Config: Replying to an autocrypt email automatically enables autocrypt in the reply.
Definition: globals.h:206
WHERE unsigned char C_Print
Config: Confirm before printing a message.
Definition: globals.h:190
WHERE char * C_AttachFormat
Config: printf-like format string for the attachment menu.
Definition: globals.h:104
WHERE char * C_IndentString
Config: String used to indent &#39;reply&#39; text.
Definition: globals.h:140
WHERE short C_ImapPollTimeout
Config: (imap) Maximum time to wait for a server response.
Definition: globals.h:164
A Hash Table.
Definition: hash.h:61
WHERE bool C_ForwardDecode
Config: Decode the message when forwarding it.
Definition: globals.h:219
MenuType
Types of GUI selections.
Definition: keymap.h:60
WHERE bool C_Confirmappend
Config: Confirm before appending emails to a mailbox.
Definition: globals.h:214
WHERE char * C_SmimeDefaultKey
Config: Default key for SMIME operations.
Definition: globals.h:171
WHERE SIG_ATOMIC_VOLATILE_T SigInt
true after SIGINT is received
Definition: globals.h:84
WHERE unsigned char C_Quit
Config: Prompt before exiting NeoMutt.
Definition: globals.h:191
WHERE short C_SleepTime
Config: Time to pause after certain info messages.
Definition: globals.h:155
WHERE char * C_CryptProtectedHeadersSubject
Config: Use this as the subject for encrypted emails.
Definition: globals.h:110
WHERE char * AutocryptDefaultKey
Autocrypt default key id (used for postponing messages)
Definition: globals.h:93
WHERE SIG_ATOMIC_VOLATILE_T SigAlrm
true after SIGALRM is received
Definition: globals.h:83
WHERE unsigned char C_FollowupToPoster
Config: (nntp) Reply to the poster if &#39;poster&#39; is in the &#39;Followup-To&#39; header.
Definition: globals.h:197
WHERE long C_HeaderCachePagesize
Config: (hcache) Database page size (gdbm,bdb4)
Definition: globals.h:128
WHERE struct ListHead AlternativeOrderList INITVAL(STAILQ_HEAD_INITIALIZER(AlternativeOrderList))
List of preferred mime types to display.
WHERE bool C_Help
Config: Display a help line with common key bindings.
Definition: globals.h:227
WHERE char AttachmentMarker[256]
Unique ANSI string to mark PGP messages in an email.
Definition: globals.h:46
WHERE char * C_NmQueryWindowCurrentSearch
Config: (notmuch) Current search parameters.
Definition: globals.h:177
WHERE enum MenuType CurrentMenu
Current Menu, e.g. MENU_PAGER.
Definition: globals.h:87
WHERE unsigned char C_Delete
Config: Really delete messages, when the mailbox is closed.
Definition: globals.h:187
WHERE bool C_CryptUsePka
Config: Use GPGME to use PKA (lookup PGP keys using DNS)
Definition: globals.h:275
WHERE bool C_SaveEmpty
Config: (mbox,mmdf) Preserve empty mailboxes.
Definition: globals.h:256
WHERE struct Hash * TagFormats
Hash table of tag-formats (tag -> format string)
Definition: globals.h:60
WHERE bool C_CryptProtectedHeadersWrite
Config: Generate protected header (Memory Hole) for signed and encrypted emails.
Definition: globals.h:283
WHERE bool C_ImapPeek
Config: (imap) Don&#39;t mark messages as read when fetching them from the server.
Definition: globals.h:233
WHERE struct ConfigSet * Config
Wrapper around the user&#39;s config settings.
Definition: globals.h:40
WHERE bool C_WrapSearch
Config: Wrap around when the search hits the end.
Definition: globals.h:272
WHERE char * C_ImapUser
Config: (imap) Username for the IMAP server.
Definition: globals.h:120
WHERE short C_Wrap
Config: Width to wrap text in the pager.
Definition: globals.h:157
WHERE bool C_PgpAutoinline
Config: Use old-style inline PGP messages (not recommended)
Definition: globals.h:288
WHERE bool C_BrailleFriendly
Config: Move the cursor to the beginning of the line.
Definition: globals.h:212
An email address.
Definition: address.h:34
WHERE unsigned char C_Copy
Config: Save outgoing emails to $record.
Definition: globals.h:186
WHERE char * LastFolder
Previously selected mailbox.
Definition: globals.h:55
WHERE char * C_AutocryptAcctFormat
Config: Format of the autocrypt account menu.
Definition: globals.h:106
#define WHERE
Definition: where.h:30
WHERE char * C_Record
Config: Folder to save &#39;sent&#39; messages.
Definition: globals.h:136
WHERE char * C_Shell
Config: External command to run subshells in.
Definition: globals.h:144
WHERE char * C_StatusFormat
Config: printf-like format string for the index&#39;s status line.
Definition: globals.h:150
WHERE bool C_PgpLongIds
Config: Display long PGP key IDs to the user.
Definition: globals.h:286
String list.
Definition: slist.h:43
WHERE bool C_SslForceTls
Config: (ssl) Require TLS encryption for all connections.
Definition: globals.h:241
WHERE char * C_HeaderCache
Config: (hcache) Directory/file for the header cache database.
Definition: globals.h:126
WHERE bool C_Confirmcreate
Config: Confirm before creating a new mailbox.
Definition: globals.h:215
WHERE bool C_TsEnabled
Config: Allow NeoMutt to set the terminal status line and icon.
Definition: globals.h:269
WHERE char * C_AliasFile
Config: Save new aliases to this file.
Definition: globals.h:101
WHERE bool C_CheckMboxSize
Config: (mbox,mmdf) Use mailbox size as an indicator of new mail.
Definition: globals.h:213
WHERE char * C_ConfigCharset
Config: Character set that the config files are in.
Definition: globals.h:109
WHERE bool C_SizeShowFractions
Config: Show size fractions with a single decimal place.
Definition: globals.h:263
WHERE bool C_SmimeIsDefault
Config: Use SMIME rather than PGP by default.
Definition: globals.h:284
WHERE bool C_UseDomain
Config: Qualify local addresses using this domain.
Definition: globals.h:270
WHERE bool C_HeaderCacheCompress
Config: (hcache) Enable database compression (qdbm,tokyocabinet,kyotocabinet)
Definition: globals.h:223
WHERE bool C_EditHeaders
Config: Let the user edit the email headers whilst editing an email.
Definition: globals.h:217
WHERE bool C_SidebarOnRight
Config: (sidebar) Display the sidebar on the right.
Definition: globals.h:260
API for mailboxes.
WHERE bool C_SizeShowMb
Config: Show sizes in megabytes for sizes greater than 1 megabyte.
Definition: globals.h:264
WHERE unsigned char C_MimeForward
Config: Forward a message as a &#39;message/RFC822&#39; MIME part.
Definition: globals.h:189
WHERE char * C_Mbox
Config: Folder that receives read emails (see Move)
Definition: globals.h:122
WHERE struct Address * C_From
Config: Default &#39;From&#39; address to use, if isn&#39;t otherwise set.
Definition: globals.h:99
WHERE char * HomeDir
User&#39;s home directory.
Definition: globals.h:49
WHERE bool C_SizeUnitsOnLeft
Config: Show the units as a prefix to the size.
Definition: globals.h:265
WHERE bool C_Autoedit
Config: Skip the initial compose menu and edit the email.
Definition: globals.h:208
WHERE SIG_ATOMIC_VOLATILE_T SigWinch
true after SIGWINCH is received
Definition: globals.h:85
WHERE char * CurrentFolder
Currently selected mailbox.
Definition: globals.h:54
WHERE bool C_SizeShowBytes
Config: Show smaller sizes in bytes.
Definition: globals.h:262
WHERE int C_NmQueryWindowDuration
Config: (notmuch) Time duration of the current search window.
Definition: globals.h:176
WHERE unsigned char C_PostModerated
Config: (nntp) Allow posting to moderated newsgroups.
Definition: globals.h:196
WHERE bool C_ReadOnly
Config: Open folders in read-only mode.
Definition: globals.h:252
WHERE char * C_NewsServer
Config: (nntp) Url of the news server.
Definition: globals.h:134
WHERE bool C_Header
Config: Include the message headers in the reply email (Weed applies)
Definition: globals.h:226
WHERE short C_ImapKeepalive
Config: (imap) Time to wait before polling an open IMAP connection.
Definition: globals.h:163
WHERE bool C_SidebarVisible
Config: (sidebar) Show the sidebar.
Definition: globals.h:259
WHERE struct Context * Context
Definition: globals.h:42
WHERE bool C_CryptOpportunisticEncrypt
Config: Enable encryption when the recipient&#39;s key is available.
Definition: globals.h:280
WHERE bool C_WaitKey
Config: Prompt to press a key after running external commands.
Definition: globals.h:271
WHERE struct Slist * C_MailcapPath
Config: Colon-separated list of mailcap files.
Definition: globals.h:123
WHERE char * C_Folder
Config: Base folder for a set of mailboxes.
Definition: globals.h:124
WHERE char * C_IndexFormat
Config: printf-like format string for the index menu (emails)
Definition: globals.h:117
const char * GitVer
WHERE bool C_SaveUnsubscribed
Config: (nntp) Save a list of unsubscribed newsgroups to the &#39;newsrc&#39;.
Definition: globals.h:293
WHERE bool C_MaildirTrash
Config: Use the maildir &#39;trashed&#39; flag, rather than deleting.
Definition: globals.h:247
WHERE bool C_ImapQresync
Config: (imap) Enable the QRESYNC extension.
Definition: globals.h:234
WHERE char ErrorBuf[256]
Copy of the last error message.
Definition: globals.h:45
WHERE bool C_Resolve
Config: Move to the next email whenever a command modifies an email.
Definition: globals.h:253
WHERE char * C_PgpEntryFormat
Config: printf-like format string for the PGP key selection menu.
Definition: globals.h:169
WHERE bool C_AsciiChars
Config: Use plain ASCII characters, when drawing email threads.
Definition: globals.h:201
WHERE bool C_CryptProtectedHeadersSave
Config: Save the cleartext Subject with the headers.
Definition: globals.h:282
WHERE short C_Timeout
Config: Time to wait for user input in menus.
Definition: globals.h:156
WHERE char * C_SmimeEncryptWith
Config: Algorithm for encryption.
Definition: globals.h:173
WHERE char * C_NewMailCommand
Config: External command to run when new mail arrives.
Definition: globals.h:142
WHERE bool ErrorBufMessage
true if the last message was an error
Definition: globals.h:44
WHERE struct Regex * C_QuoteRegex
Config: Regex to match quoted text in a reply.
Definition: globals.h:182
WHERE bool C_ImapCheckSubscribed
Config: (imap) When opening a mailbox, ask the server for a list of subscribed folders.
Definition: globals.h:229
API for encryption/signing of emails.
An evil macro.
WHERE bool C_ImapCondstore
Config: (imap) Enable the CONDSTORE extension.
Definition: globals.h:230
WHERE bool C_CryptProtectedHeadersRead
Config: Display protected headers (Memory Hole) in the pager.
Definition: globals.h:281
WHERE char * C_TsStatusFormat
Config: printf-like format string for the terminal&#39;s status (window title)
Definition: globals.h:151
WHERE char * C_DsnReturn
Config: What to send as a notification of message delivery or delay.
Definition: globals.h:113
WHERE char ProtectedHeaderMarker[256]
Unique ANSI string to mark protected headers in an email.
Definition: globals.h:47
WHERE bool C_DeleteUntag
Config: Untag messages when they are marked for deletion.
Definition: globals.h:216
WHERE short C_SidebarWidth
Config: (sidebar) Width of the sidebar.
Definition: globals.h:160
WHERE char * C_SimpleSearch
Config: Pattern to search for when search doesn&#39;t contain ~&#39;s.
Definition: globals.h:145
WHERE struct Hash * ReverseAliases
Hash table of aliases (email address -> alias)
Definition: globals.h:59
WHERE bool C_TextFlowed
Config: Generate &#39;format=flowed&#39; messages.
Definition: globals.h:268
WHERE bool C_ResumeDraftFiles
Config: Process draft files like postponed messages.
Definition: globals.h:254
WHERE bool C_PgpIgnoreSubkeys
Config: Only use the principal PGP key.
Definition: globals.h:285
WHERE bool C_Suspend
Config: Allow the user to suspend NeoMutt using &#39;^Z&#39;.
Definition: globals.h:267
WHERE char * C_Spoolfile
Config: Inbox.
Definition: globals.h:149
WHERE bool C_XCommentTo
Config: (nntp) Add &#39;X-Comment-To&#39; header that contains article author.
Definition: globals.h:294
Cached regular expression.
Definition: regex3.h:57
WHERE struct Address * C_EnvelopeFromAddress
Config: Manually set the sender for outgoing messages.
Definition: globals.h:98
WHERE struct Regex * C_Mask
Config: Only display files/dirs matching this regex in the browser.
Definition: globals.h:181
WHERE char * C_PrintCommand
Config: External command to print a message.
Definition: globals.h:141
WHERE char * C_DateFormat
Config: strftime format string for the d expando.
Definition: globals.h:111
WHERE bool C_ImapPassive
Config: (imap) Reuse an existing IMAP connection to check for new mail.
Definition: globals.h:232
WHERE char * C_Editor
Config: External command to use as an email editor.
Definition: globals.h:114
WHERE bool C_ForwardQuote
Config: Automatically quote a forwarded message using C_IndentString.
Definition: globals.h:220
WHERE char * C_PgpDefaultKey
Config: Default key to use for PGP operations.
Definition: globals.h:167
WHERE char * ShortHostname
Short version of the hostname.
Definition: globals.h:50
WHERE char * C_Hostname
Config: Fully-qualified domain name of this machine.
Definition: globals.h:116
WHERE bool C_Beep
Config: Make a noise when an error occurs.
Definition: globals.h:210
WHERE bool C_Score
Config: Use message scoring.
Definition: globals.h:257
WHERE char * C_AutocryptDir
Config: Location of autocrypt files, including the GPG keyring and sqlite database.
Definition: globals.h:107
WHERE bool C_FlagSafe
Config: Protect flagged messages from deletion.
Definition: globals.h:218
#define STAILQ_HEAD_INITIALIZER(head)
Definition: queue.h:322
WHERE bool C_SslVerifyPartialChains
Config: (ssl) Allow verification using partial certificate chains.
Definition: globals.h:243
WHERE bool C_AutoTag
Config: Automatically apply actions to all tagged messages.
Definition: globals.h:209
WHERE char * C_Pager
Config: External command for viewing messages, or &#39;builtin&#39; to use NeoMutt&#39;s.
Definition: globals.h:137
WHERE char * C_Realname
Config: Real name of the user.
Definition: globals.h:143
WHERE char * C_Postponed
Config: Folder to store postponed messages.
Definition: globals.h:139
WHERE char * C_Attribution
Config: Message to start a reply, "On DATE, PERSON wrote:".
Definition: globals.h:102
WHERE char * C_ExternalSearchCommand
Config: External search command.
Definition: globals.h:115
WHERE char * C_PgpSignAs
Config: Use this alternative key for signing messages.
Definition: globals.h:168
WHERE char * C_SmimeSignAs
Config: Use this alternative key for signing messages.
Definition: globals.h:172
WHERE bool C_Markers
Config: Display a &#39;+&#39; at the beginning of wrapped lines in the pager.
Definition: globals.h:248
#define TAILQ_HEAD_INITIALIZER(head)
Definition: queue.h:631
WHERE bool C_Askbcc
Config: Ask the user for the blind-carbon-copy recipients.
Definition: globals.h:202
WHERE char * C_DsnNotify
Config: Request notification for message delivery or delay.
Definition: globals.h:112
WHERE unsigned char C_SslStarttls
Config: (ssl) Use STARTTLS on servers advertising the capability.
Definition: globals.h:193
WHERE bool C_Askcc
Config: Ask the user for the carbon-copy recipients.
Definition: globals.h:203
WHERE char * C_PagerFormat
Config: printf-like format string for the pager&#39;s status bar.
Definition: globals.h:138
WHERE bool C_SaveAddress
Config: Use sender&#39;s full address as a default save folder.
Definition: globals.h:255
WHERE char * C_Visual
Config: Editor to use when &#39;~v&#39; is given in the built-in editor.
Definition: globals.h:153
WHERE bool C_VirtualSpoolfile
Config: (notmuch) Use the first virtual mailbox as a spool file.
Definition: globals.h:298
WHERE char * AutocryptSignAs
Autocrypt Key id to sign as.
Definition: globals.h:92
WHERE bool C_ArrowCursor
Config: Use an arrow &#39;->&#39; instead of highlighting in the index.
Definition: globals.h:200
WHERE unsigned char C_ForwardAttachments
Config: Forward attachments when forwarding a message.
Definition: globals.h:188
WHERE bool C_PgpShowUnusable
Config: Show non-usable keys in the key selection.
Definition: globals.h:287