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