From: Richard Russon Date: Sun, 8 Jul 2018 09:50:30 +0000 (+0100) Subject: split up globals X-Git-Tag: 2019-10-25~758^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2ed71531b794100a43b8f27a8ec804a5b665d612;p=neomutt split up globals --- diff --git a/addrbook.c b/addrbook.c index 13d2f1081..ea256b1ec 100644 --- a/addrbook.c +++ b/addrbook.c @@ -44,6 +44,10 @@ #include "protos.h" #include "sort.h" +/* These Config Variables are only used in addrbook.c */ +char *AliasFormat; +short SortAlias; + #define RSORT(x) (SortAlias & SORT_REVERSE) ? -x : x static const struct Mapping AliasHelp[] = { diff --git a/addrbook.h b/addrbook.h new file mode 100644 index 000000000..2ed67d09f --- /dev/null +++ b/addrbook.h @@ -0,0 +1,30 @@ +/** + * @file + * Address book handling aliases + * + * @authors + * Copyright (C) 2018 Richard Russon + * + * @copyright + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 2 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ + +#ifndef MUTT_ADDRBOOK_H +#define MUTT_ADDRBOOK_H + +/* These Config Variables are only used in addrbook.c */ +extern char *AliasFormat; +extern short SortAlias; + +#endif /* MUTT_ADDRBOOK_H */ diff --git a/bcache.c b/bcache.c index 63d3b7a4c..a95485f23 100644 --- a/bcache.c +++ b/bcache.c @@ -36,6 +36,9 @@ #include "protos.h" #include "url.h" +/* These Config Variables are only used in bcache.c */ +char *MessageCachedir; + /** * struct BodyCache - Local cache of email bodies */ diff --git a/bcache.h b/bcache.h index 842e4c1b7..056615e86 100644 --- a/bcache.h +++ b/bcache.h @@ -29,6 +29,9 @@ struct Account; struct BodyCache; +/* These Config Variables are only used in bcache.c */ +extern char *MessageCachedir; + /** * Callback function for mutt_bcache_list */ diff --git a/browser.c b/browser.c index 76bcd8188..7c336fc6d 100644 --- a/browser.c +++ b/browser.c @@ -67,6 +67,15 @@ #include "notmuch/mutt_notmuch.h" #endif +/* These Config Variables are only used in browser.c */ +bool BrowserAbbreviateMailboxes; +char *FolderFormat; +char *GroupIndexFormat; +char *NewsgroupsCharset; +bool ShowOnlyUnread; +short SortBrowser; +char *VfolderFormat; + static const struct Mapping FolderHelp[] = { { N_("Exit"), OP_EXIT }, { N_("Chdir"), OP_CHANGE_DIRECTORY }, diff --git a/browser.h b/browser.h index 8f8c9eb33..be1b87156 100644 --- a/browser.h +++ b/browser.h @@ -27,6 +27,15 @@ #include #include +/* These Config Variables are only used in browser.c */ +extern bool BrowserAbbreviateMailboxes; +extern char *FolderFormat; +extern char *GroupIndexFormat; +extern char *NewsgroupsCharset; +extern bool ShowOnlyUnread; +extern short SortBrowser; +extern char *VfolderFormat; + /** * struct FolderFile - Browser entry representing a folder/dir */ diff --git a/buffy.c b/buffy.c index b8c2851eb..4e062bba1 100644 --- a/buffy.c +++ b/buffy.c @@ -51,6 +51,12 @@ #include "notmuch/mutt_notmuch.h" #endif +/* These Config Variables are only used in buffy.c */ +short MailCheck; +bool MailCheckStats; +short MailCheckStatsInterval; +bool MaildirCheckCur; + static time_t BuffyTime = 0; /**< last time we started checking for mail */ static time_t BuffyStatsTime = 0; /**< last time we check performed mail_check_stats */ time_t BuffyDoneTime = 0; /**< last time we knew for sure how much mail there was. */ diff --git a/buffy.h b/buffy.h index 5e421881f..a47b61a09 100644 --- a/buffy.h +++ b/buffy.h @@ -31,6 +31,12 @@ struct stat; +/* These Config Variables are only used in buffy.c */ +extern short MailCheck; +extern bool MailCheckStats; +extern short MailCheckStatsInterval; +extern bool MaildirCheckCur; + /* parameter to mutt_parse_mailboxes */ #define MUTT_NAMED 1 #define MUTT_VIRTUAL 2 @@ -87,8 +93,4 @@ bool mutt_buffy_notify(void); int mutt_parse_mailboxes(struct Buffer *path, struct Buffer *s, unsigned long data, struct Buffer *err); int mutt_parse_unmailboxes(struct Buffer *path, struct Buffer *s, unsigned long data, struct Buffer *err); -/* These variables are backing for config items */ -WHERE short MailCheck; -WHERE short MailCheckStatsInterval; - #endif /* _MUTT_BUFFY_H */ diff --git a/commands.c b/commands.c index 360026b7e..2e1dc52e0 100644 --- a/commands.c +++ b/commands.c @@ -63,6 +63,16 @@ #include #endif +/* These Config Variables are only used in commands.c */ +unsigned char CryptVerifySig; /* verify PGP signatures */ +char * DisplayFilter; +bool PipeDecode; +char * PipeSep; +bool PipeSplit; +bool PrintDecode; +bool PrintSplit; +bool PromptAfter; + static const char *ExtPagerProgress = "all"; /** The folder the user last saved to. Used by ci_save_message() */ diff --git a/commands.h b/commands.h index 33d3f9dcf..4dfdecd21 100644 --- a/commands.h +++ b/commands.h @@ -30,6 +30,16 @@ struct Context; struct Envelope; struct Header; +/* These Config Variables are only used in commands.c */ +extern unsigned char CryptVerifySig; /* verify PGP signatures */ +extern char * DisplayFilter; +extern bool PipeDecode; +extern char * PipeSep; +extern bool PipeSplit; +extern bool PrintDecode; +extern bool PrintSplit; +extern bool PromptAfter; + void ci_bounce_message(struct Header *h); void mutt_check_stats(void); int mutt_check_traditional_pgp(struct Header *h, int *redraw); diff --git a/compose.c b/compose.c index 66d53cabf..f81e18cb9 100644 --- a/compose.c +++ b/compose.c @@ -62,6 +62,11 @@ #include "nntp/nntp.h" #endif +/* These Config Variables are only used in compose.c */ +char * ComposeFormat; +char * Ispell; +unsigned char Postpone; + static const char *There_are_no_attachments = N_("There are no attachments."); #define CHECK_COUNT \ diff --git a/compose.h b/compose.h new file mode 100644 index 000000000..7642b8ec2 --- /dev/null +++ b/compose.h @@ -0,0 +1,31 @@ +/** + * @file + * GUI editor for an email's headers + * + * @authors + * Copyright (C) 2018 Richard Russon + * + * @copyright + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 2 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ + +#ifndef MUTT_COMPOSE_H +#define MUTT_COMPOSE_H + +/* These Config Variables are only used in compose.c */ +extern char * ComposeFormat; +extern char * Ispell; +extern unsigned char Postpone; + +#endif /* MUTT_COMPOSE_H */ diff --git a/compress.c b/compress.c index 55462f3cd..a94ae753d 100644 --- a/compress.c +++ b/compress.c @@ -39,6 +39,7 @@ #include "compress.h" #include "context.h" #include "format_flags.h" +#include "globals.h" #include "mailbox.h" #include "mutt_curses.h" #include "mx.h" diff --git a/conn/conn_globals.c b/conn/conn_globals.c index ecbeda4be..892e0a12f 100644 --- a/conn/conn_globals.c +++ b/conn/conn_globals.c @@ -27,6 +27,7 @@ */ #include "config.h" +#include #include short ConnectTimeout = 0; /**< Config: Timeout for a network connection (for IMAP, POP or SMTP) */ @@ -46,3 +47,15 @@ short SslMinDhPrimeBits = 0; /**< Config: Minimum keysize for Diffie-Hellman key const char *Preconnect = NULL; /**< Config: Shell command to run before making a connection */ const char *Tunnel = NULL; /**< Config: Shell command to establish a tunnel */ #endif + +/* These Config Variables are only used in conn/conn_raw.c */ +extern bool UseIpv6; + +/* These Config Variables are only used in conn/ssl_gnutls.c */ +extern bool SslUseSslv3; +extern bool SslUseTlsv1; +extern bool SslUseTlsv11; +extern bool SslUseTlsv12; +extern bool SslVerifyDates; +extern bool SslVerifyHost; + diff --git a/conn/conn_globals.h b/conn/conn_globals.h index 3e4b91caa..6d4a41795 100644 --- a/conn/conn_globals.h +++ b/conn/conn_globals.h @@ -23,6 +23,8 @@ #ifndef _CONN_GLOBALS_H #define _CONN_GLOBALS_H +#include + /* These variables are backing for config items */ extern short ConnectTimeout; diff --git a/conn/conn_raw.c b/conn/conn_raw.c index ca5b00a5f..74d4dc3db 100644 --- a/conn/conn_raw.c +++ b/conn/conn_raw.c @@ -48,6 +48,9 @@ #include "options.h" #include "protos.h" +/* These Config Variables are only used in conn/conn_raw.c */ +extern bool UseIpv6; + /** * socket_connect - set up to connect to a socket fd * @param fd File descriptor to connect with diff --git a/conn/ssl_gnutls.c b/conn/ssl_gnutls.c index bccf41a8b..e50fc727b 100644 --- a/conn/ssl_gnutls.c +++ b/conn/ssl_gnutls.c @@ -49,6 +49,14 @@ #include "protos.h" #include "socket.h" +/* These Config Variables are only used in conn/ssl_gnutls.c */ +bool SslUseSslv3; +bool SslUseTlsv1; +bool SslUseTlsv11; +bool SslUseTlsv12; +bool SslVerifyDates; +bool SslVerifyHost; + /* certificate error bitmap values */ #define CERTERR_VALID 0 #define CERTERR_EXPIRED 1 diff --git a/curs_lib.c b/curs_lib.c index 614ed9aee..13f292290 100644 --- a/curs_lib.c +++ b/curs_lib.c @@ -58,6 +58,9 @@ #include "notmuch/mutt_notmuch.h" #endif +/* These Config Variables are only used in curs_lib.c */ +bool MetaKey; /**< interpret ALT-x as ESC-x */ + /* not possible to unget more than one char under some curses libs, and it * is impossible to unget function keys in SLang, so roll our own input * buffering routines. diff --git a/curs_lib.h b/curs_lib.h index 8e674a2dc..2e9e187fd 100644 --- a/curs_lib.h +++ b/curs_lib.h @@ -29,6 +29,9 @@ struct Context; +/* These Config Variables are only used in curs_lib.c */ +extern bool MetaKey; /**< interpret ALT-x as ESC-x */ + bool message_is_tagged(struct Context *ctx, int index); bool message_is_visible(struct Context *ctx, int index); int mutt_addwch(wchar_t wc); diff --git a/curs_main.c b/curs_main.c index 7773ae85f..3531b16e8 100644 --- a/curs_main.c +++ b/curs_main.c @@ -76,6 +76,16 @@ #include #endif +/* These Config Variables are only used in curs_main.c */ +bool ChangeFolderNext; +bool CollapseAll; +bool CollapseFlagged; +bool CollapseUnread; +char *MarkMacroPrefix; +bool PgpAutoDecode; +bool UncollapseJump; +bool UncollapseNew; + static const char *No_mailbox_is_open = N_("No mailbox is open."); static const char *There_are_no_messages = N_("There are no messages."); static const char *Mailbox_is_read_only = N_("Mailbox is read-only."); diff --git a/curs_main.h b/curs_main.h new file mode 100644 index 000000000..dcafa39c5 --- /dev/null +++ b/curs_main.h @@ -0,0 +1,36 @@ +/** + * @file + * GUI manage the main index (list of emails) + * + * @authors + * Copyright (C) 2018 Richard Russon + * + * @copyright + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 2 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ + +#ifndef MUTT_CURS_MAIN_H +#define MUTT_CURS_MAIN_H + +/* These Config Variables are only used in curs_main.c */ +extern bool ChangeFolderNext; +extern bool CollapseAll; +extern bool CollapseFlagged; +extern bool CollapseUnread; +extern char *MarkMacroPrefix; +extern bool PgpAutoDecode; +extern bool UncollapseJump; +extern bool UncollapseNew; + +#endif /* MUTT_CURS_MAIN_H */ diff --git a/edit.c b/edit.c index ea89df9c7..9f03adb00 100644 --- a/edit.c +++ b/edit.c @@ -41,6 +41,9 @@ #include "options.h" #include "protos.h" +/* These Config Variables are only used in edit.c */ +char *Escape; + /* * SLcurses_waddnstr() can't take a "const char *", so this is only * declared "static" (sigh) diff --git a/edit.h b/edit.h new file mode 100644 index 000000000..dc61ca75e --- /dev/null +++ b/edit.h @@ -0,0 +1,29 @@ +/** + * @file + * GUI basic built-in text editor + * + * @authors + * Copyright (C) 2018 Richard Russon + * + * @copyright + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 2 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ + +#ifndef MUTT_EDIT_H +#define MUTT_EDIT_H + +/* These Config Variables are only used in edit.c */ +extern char *Escape; + +#endif /* MUTT_EDIT_H */ diff --git a/email/tags.c b/email/tags.c index 5e258827b..e8c8d3e49 100644 --- a/email/tags.c +++ b/email/tags.c @@ -33,7 +33,9 @@ #include "mutt/mutt.h" #include "tags.h" -char *HiddenTags; /**< Config: Private tags which should not be displayed */ +/* These Config Variables are only used in email/tags.c */ +char *HiddenTags; + struct Hash *TagTransforms; /**< Lookup table of alternative tag names */ /** diff --git a/email/tags.h b/email/tags.h index df20db920..a177c4caa 100644 --- a/email/tags.h +++ b/email/tags.h @@ -26,7 +26,9 @@ #include #include "mutt/mutt.h" +/* These Config Variables are only used in email/tags.c */ extern char *HiddenTags; + extern struct Hash *TagTransforms; /** diff --git a/globals.h b/globals.h index 9021c3ed2..ab12ff142 100644 --- a/globals.h +++ b/globals.h @@ -103,225 +103,204 @@ WHERE struct Address *EnvelopeFromAddress; WHERE struct Address *From; WHERE char *AliasFile; -WHERE char *AliasFormat; -WHERE char *AttachSep; WHERE char *Attribution; WHERE char *AttributionLocale; -WHERE char *AttachCharset; WHERE char *AttachFormat; -WHERE char *ComposeFormat; WHERE char *ConfigCharset; -WHERE char *ContentType; -WHERE char *DefaultHook; WHERE char *DateFormat; -WHERE char *DisplayFilter; WHERE char *DsnNotify; WHERE char *DsnReturn; WHERE char *Editor; -WHERE char *EmptySubject; -WHERE char *Escape; -WHERE char *FolderFormat; -WHERE char *ForwardAttributionIntro; -WHERE char *ForwardAttributionTrailer; -WHERE char *ForwardFormat; WHERE char *Hostname; -WHERE struct MbTable *FromChars; WHERE char *IndexFormat; #ifdef USE_IMAP -WHERE char *ImapAuthenticators; -WHERE char *ImapDelimChars; -WHERE char *ImapHeaders; -WHERE char *ImapLogin; -WHERE char *ImapPass; WHERE char *ImapUser; #endif WHERE char *Mbox; -WHERE char *Ispell; WHERE char *MailcapPath; WHERE char *Folder; -#if defined(USE_IMAP) || defined(USE_POP) || defined(USE_NNTP) -WHERE char *MessageCachedir; -#endif #ifdef USE_HCACHE WHERE char *HeaderCache; -WHERE char *HeaderCacheBackend; #if defined(HAVE_GDBM) || defined(HAVE_BDB) WHERE char *HeaderCachePagesize; #endif /* HAVE_GDBM || HAVE_BDB */ #endif /* USE_HCACHE */ -WHERE char *MarkMacroPrefix; -WHERE char *MhSeqFlagged; -WHERE char *MhSeqReplied; -WHERE char *MhSeqUnseen; -WHERE char *MimeTypeQueryCommand; -WHERE char *MessageFormat; #ifdef USE_SOCKET WHERE short NetInc; #endif /* USE_SOCKET */ -#ifdef MIXMASTER -WHERE char *Mixmaster; -WHERE char *MixEntryFormat; -#endif - #ifdef USE_NNTP -WHERE char *GroupIndexFormat; -WHERE char *Inews; -WHERE char *NewsCacheDir; WHERE char *NewsServer; -WHERE char *NewsgroupsCharset; -WHERE char *Newsrc; -WHERE char *NntpAuthenticators; -WHERE char *NntpUser; -WHERE char *NntpPass; #endif WHERE char *Record; WHERE char *Pager; WHERE char *PagerFormat; -WHERE char *PipeSep; -#ifdef USE_POP -WHERE char *PopAuthenticators; -WHERE short PopCheckinterval; -WHERE char *PopHost; -WHERE char *PopPass; -WHERE char *PopUser; -#endif -WHERE char *PostIndentString; WHERE char *Postponed; -WHERE char *PostponeEncryptAs; WHERE char *IndentString; WHERE char *PrintCommand; WHERE char *NewMailCommand; -WHERE char *QueryCommand; -WHERE char *QueryFormat; WHERE char *Realname; -WHERE short SearchContext; WHERE char *SendCharset; -WHERE char *Sendmail; WHERE char *Shell; -WHERE char *ShowMultipartAlternative; -#ifdef USE_SIDEBAR -WHERE char *SidebarDelimChars; -WHERE char *SidebarDividerChar; -WHERE char *SidebarFormat; -WHERE char *SidebarIndentString; -#endif -WHERE char *Signature; WHERE char *SimpleSearch; #ifdef USE_SMTP -WHERE char *SmtpAuthenticators; -WHERE char *SmtpPass; WHERE char *SmtpUrl; #endif /* USE_SMTP */ WHERE char *Spoolfile; -WHERE char *SpamSeparator; -WHERE struct MbTable *StatusChars; WHERE char *StatusFormat; -WHERE struct MbTable *ToChars; -WHERE struct MbTable *FlagChars; -WHERE char *Trash; WHERE char *TsStatusFormat; WHERE char *TsIconFormat; WHERE char *Visual; -#ifdef USE_NNTP -WHERE short NntpPoll; -WHERE short NntpContext; -#endif - -WHERE short MenuContext; -WHERE short PagerContext; -WHERE short PagerIndexLines; -WHERE char *PreferredLanguages; WHERE short ReadInc; -WHERE short ReflowWrap; -WHERE short SendmailWait; WHERE short SleepTime; -WHERE short SkipQuotedOffset; -WHERE short TimeInc; WHERE short Timeout; WHERE short Wrap; -WHERE short WrapHeaders; WHERE short WriteInc; -WHERE short ScoreThresholdDelete; -WHERE short ScoreThresholdRead; -WHERE short ScoreThresholdFlag; - #ifdef USE_SIDEBAR -WHERE short SidebarComponentDepth; WHERE short SidebarWidth; #endif #ifdef USE_IMAP WHERE short ImapKeepalive; -WHERE short ImapPipelineDepth; WHERE short ImapPollTimeout; #endif /* -- formerly in pgp.h -- */ -WHERE struct Regex *PgpGoodSign; -WHERE struct Regex *PgpDecryptionOkay; WHERE char *PgpDefaultKey; WHERE char *PgpSignAs; -WHERE long PgpTimeout; WHERE char *PgpEntryFormat; -WHERE char *PgpClearsignCommand; -WHERE char *PgpDecodeCommand; -WHERE char *PgpVerifyCommand; -WHERE char *PgpDecryptCommand; -WHERE char *PgpSignCommand; -WHERE char *PgpEncryptSignCommand; -WHERE char *PgpEncryptOnlyCommand; -WHERE char *PgpImportCommand; -WHERE char *PgpExportCommand; -WHERE char *PgpVerifyKeyCommand; -WHERE char *PgpListSecringCommand; -WHERE char *PgpListPubringCommand; -WHERE char *PgpGetkeysCommand; /* -- formerly in smime.h -- */ WHERE char *SmimeDefaultKey; WHERE char *SmimeSignAs; -WHERE long SmimeTimeout; -WHERE char *SmimeCertificates; -WHERE char *SmimeKeys; WHERE char *SmimeEncryptWith; -WHERE char *SmimeCaLocation; -WHERE char *SmimeVerifyCommand; -WHERE char *SmimeVerifyOpaqueCommand; -WHERE char *SmimeDecryptCommand; -WHERE char *SmimeSignCommand; -WHERE char *SmimeSignDigestAlg; -WHERE char *SmimeEncryptCommand; -WHERE char *SmimeGetSignerCertCommand; -WHERE char *SmimePk7outCommand; -WHERE char *SmimeGetCertCommand; -WHERE char *SmimeImportCertCommand; -WHERE char *SmimeGetCertEmailCommand; #ifdef USE_NOTMUCH -WHERE int NmOpenTimeout; -WHERE char *NmDefaultUri; -WHERE char *NmExcludeTags; -WHERE char *NmUnreadTag; -WHERE char *VfolderFormat; -WHERE int NmDbLimit; -WHERE char *NmQueryType; -WHERE char *NmRecordTags; WHERE int NmQueryWindowDuration; -WHERE char *NmQueryWindowTimebase; -WHERE int NmQueryWindowCurrentPosition; WHERE char *NmQueryWindowCurrentSearch; #endif /* These variables are backing for config items */ -WHERE struct Regex *AbortNoattachRegex; -WHERE struct Regex *GecosMask; WHERE struct Regex *Mask; WHERE struct Regex *QuoteRegex; WHERE struct Regex *ReplyRegex; -WHERE struct Regex *Smileys; + +/* Quad-options */ +WHERE unsigned char Bounce; +WHERE unsigned char Copy; +WHERE unsigned char Delete; +WHERE unsigned char MimeForward; +WHERE unsigned char Print; +WHERE unsigned char Quit; +#ifdef USE_SSL +WHERE unsigned char SslStarttls; +#endif +#ifdef USE_NNTP +WHERE unsigned char PostModerated; +WHERE unsigned char FollowupToPoster; +#endif + +WHERE bool ArrowCursor; +WHERE bool AsciiChars; +WHERE bool Askbcc; +WHERE bool Askcc; +WHERE bool Autoedit; +WHERE bool AutoTag; +WHERE bool Beep; +WHERE bool BeepNew; +WHERE bool BrailleFriendly; +WHERE bool CheckMboxSize; +WHERE bool Confirmappend; +WHERE bool Confirmcreate; +WHERE bool DeleteUntag; +WHERE bool EditHeaders; +WHERE bool FlagSafe; +WHERE bool ForwardDecode; +WHERE bool ForwardQuote; +#ifdef USE_HCACHE +#if defined(HAVE_QDBM) || defined(HAVE_TC) || defined(HAVE_KC) +WHERE bool HeaderCacheCompress; +#endif /* HAVE_QDBM */ +#endif +WHERE bool Header; +WHERE bool Help; +#ifdef USE_IMAP +WHERE bool ImapCheckSubscribed; +WHERE bool ImapListSubscribed; +WHERE bool ImapPassive; +WHERE bool ImapPeek; +#endif +#ifdef USE_SSL +#ifndef USE_SSL_GNUTLS +WHERE bool SslUsesystemcerts; +WHERE bool SslUseSslv2; +#endif /* USE_SSL_GNUTLS */ +WHERE bool SslUseSslv3; +WHERE bool SslUseTlsv1; +WHERE bool SslUseTlsv11; +WHERE bool SslUseTlsv12; +WHERE bool SslForceTls; +WHERE bool SslVerifyDates; +WHERE bool SslVerifyHost; +#if defined(USE_SSL_OPENSSL) && defined(HAVE_SSL_PARTIAL_CHAIN) +WHERE bool SslVerifyPartialChains; +#endif /* USE_SSL_OPENSSL */ +#endif /* defined(USE_SSL) */ +WHERE bool MailCheckRecent; +WHERE bool MaildirTrash; +WHERE bool Markers; +WHERE bool MarkOld; +#if defined(USE_IMAP) || defined(USE_POP) +WHERE bool MessageCacheClean; +#endif +WHERE bool ReadOnly; +WHERE bool Resolve; +WHERE bool ResumeDraftFiles; +WHERE bool ResumeEditedDraftFiles; +WHERE bool SaveAddress; +WHERE bool SaveEmpty; +WHERE bool Score; +#ifdef USE_SIDEBAR +WHERE bool SidebarVisible; +WHERE bool SidebarOnRight; +#endif +WHERE bool StatusOnTop; +WHERE bool Suspend; +WHERE bool TextFlowed; +WHERE bool TsEnabled; +WHERE bool UseDomain; +#ifdef HAVE_GETADDRINFO +WHERE bool UseIpv6; +#endif +WHERE bool WaitKey; +WHERE bool Weed; +WHERE bool WrapSearch; +WHERE bool WriteBcc; /**< write out a bcc header? */ + +WHERE bool CryptUsePka; + +/* PGP options */ + +WHERE bool CryptConfirmhook; +WHERE bool CryptOpportunisticEncrypt; +WHERE bool SmimeIsDefault; +WHERE bool PgpIgnoreSubkeys; +WHERE bool PgpLongIds; +WHERE bool PgpShowUnusable; +WHERE bool PgpAutoinline; + +/* news options */ + +#ifdef USE_NNTP +WHERE bool SaveUnsubscribed; +WHERE bool XCommentTo; +#endif + +#ifdef USE_NOTMUCH +WHERE bool VirtualSpoolfile; +#endif #endif /* _MUTT_GLOBALS_H */ diff --git a/handler.c b/handler.c index 9aac9d22a..e945f4474 100644 --- a/handler.c +++ b/handler.c @@ -55,6 +55,14 @@ #include #endif +/* These Config Variables are only used in handler.c */ +bool HonorDisposition; +bool ImplicitAutoview; +bool IncludeOnlyfirst; +char *PreferredLanguages; +bool ReflowText; +char *ShowMultipartAlternative; + #define BUFI_SIZE 1000 #define BUFO_SIZE 2000 diff --git a/handler.h b/handler.h index e452c1521..be2cd8415 100644 --- a/handler.h +++ b/handler.h @@ -30,6 +30,14 @@ struct Body; struct State; +/* These Config Variables are only used in handler.c */ +extern bool HonorDisposition; +extern bool ImplicitAutoview; +extern bool IncludeOnlyfirst; +extern char *PreferredLanguages; +extern bool ReflowText; +extern char *ShowMultipartAlternative; + int mutt_body_handler(struct Body *b, struct State *s); bool mutt_can_decode(struct Body *a); void mutt_decode_attachment(struct Body *b, struct State *s); diff --git a/hcache/hcache.c b/hcache/hcache.c index 831458eea..46799a4ae 100644 --- a/hcache/hcache.c +++ b/hcache/hcache.c @@ -54,6 +54,9 @@ #include "hcache/hcversion.h" #include "protos.h" +/* These Config Variables are only used in hcache/hcache.c */ +char *HeaderCacheBackend; + static unsigned int hcachever = 0x0; /** diff --git a/hcache/hcache.h b/hcache/hcache.h index 3ddf39562..2fa6e7db8 100644 --- a/hcache/hcache.h +++ b/hcache/hcache.h @@ -54,6 +54,9 @@ typedef struct HeaderCache header_cache_t; typedef int (*hcache_namer_t)(const char *path, char *dest, size_t dlen); +/* These Config Variables are only used in hcache/hcache.c */ +extern char *HeaderCacheBackend; + /** * mutt_hcache_open - open the connection to the header cache * @param path Location of the header cache (often as specified by the user) diff --git a/hcache/kc.c b/hcache/kc.c index a78724803..1678d9efa 100644 --- a/hcache/kc.c +++ b/hcache/kc.c @@ -35,6 +35,7 @@ #include #include "mutt/mutt.h" #include "backend.h" +#include "globals.h" #include "options.h" /** diff --git a/hcache/qdbm.c b/hcache/qdbm.c index 462c51a1e..6c052f19e 100644 --- a/hcache/qdbm.c +++ b/hcache/qdbm.c @@ -36,6 +36,7 @@ #include #include "mutt/mutt.h" #include "backend.h" +#include "globals.h" #include "options.h" /** diff --git a/hcache/tc.c b/hcache/tc.c index d52baa24a..1c788300e 100644 --- a/hcache/tc.c +++ b/hcache/tc.c @@ -35,6 +35,7 @@ #include #include "mutt/mutt.h" #include "backend.h" +#include "globals.h" #include "options.h" /** diff --git a/hdrline.c b/hdrline.c index d93a8483c..c70af2a43 100644 --- a/hdrline.c +++ b/hdrline.c @@ -45,6 +45,11 @@ #include "protos.h" #include "sort.h" +/* These Config Variables are only used in hdrline.c */ +struct MbTable *FlagChars; +struct MbTable *FromChars; +struct MbTable *ToChars; + /** * enum FlagChars - Index into the FlagChars variable ($flag_chars) */ diff --git a/hdrline.h b/hdrline.h new file mode 100644 index 000000000..f8cb07be7 --- /dev/null +++ b/hdrline.h @@ -0,0 +1,31 @@ +/** + * @file + * String processing routines to generate the mail index + * + * @authors + * Copyright (C) 2018 Richard Russon + * + * @copyright + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 2 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ + +#ifndef MUTT_HDRLINE_H +#define MUTT_HDRLINE_H + +/* These Config Variables are only used in hdrline.c */ +extern struct MbTable *FlagChars; +extern struct MbTable *FromChars; +extern struct MbTable *ToChars; + +#endif /* MUTT_HDRLINE_H */ diff --git a/history.c b/history.c index 06e6f02ac..61be6daed 100644 --- a/history.c +++ b/history.c @@ -85,6 +85,12 @@ #include "opcodes.h" #include "protos.h" +/* These Config Variables are only used in history.c */ +short History; +char *HistoryFile; +bool HistoryRemoveDups; +short SaveHistory; + #define HC_FIRST HC_CMD /** diff --git a/history.h b/history.h index 1ee004400..6928d42fc 100644 --- a/history.h +++ b/history.h @@ -26,6 +26,7 @@ #include #include +/* These Config Variables are only used in history.c */ extern short History; extern char *HistoryFile; extern bool HistoryRemoveDups; diff --git a/hook.c b/hook.c index a6cb0035f..e79017054 100644 --- a/hook.c +++ b/hook.c @@ -49,6 +49,11 @@ struct Context; +/* These Config Variables are only used in hook.c */ +char *DefaultHook; +bool ForceName; +bool SaveName; + /** * struct Hook - A list of user hooks */ diff --git a/hook.h b/hook.h index 163d48ff5..cd4f870fa 100644 --- a/hook.h +++ b/hook.h @@ -31,6 +31,11 @@ struct Context; struct Header; struct ListHead; +/* These Config Variables are only used in hook.c */ +extern char *DefaultHook; +extern bool ForceName; +extern bool SaveName; + void mutt_account_hook(const char *url); void mutt_crypt_hook(struct ListHead *list, struct Address *addr); void mutt_default_save(char *path, size_t pathlen, struct Header *hdr); diff --git a/imap/auth.c b/imap/auth.c index e69032297..7e5baab0e 100644 --- a/imap/auth.c +++ b/imap/auth.c @@ -34,6 +34,9 @@ #include "auth.h" #include "globals.h" +/* These Config Variables are only used in imap/auth.c */ +char *ImapAuthenticators; + /** * imap_authenticators - Accepted authentication methods */ diff --git a/imap/command.c b/imap/command.c index ec0abd329..fd8ab1a76 100644 --- a/imap/command.c +++ b/imap/command.c @@ -56,6 +56,9 @@ #include "protos.h" #include "url.h" +/* These Config Variables are only used in imap/command.c */ +bool ImapServernoise; + #define IMAP_CMD_BUFSIZE 512 /** diff --git a/imap/imap.c b/imap/imap.c index 206a06819..791968fa1 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -66,6 +66,9 @@ #include #endif +/* These Config Variables are only used in imap/imap.c */ +bool ImapIdle; + /** * check_capabilities - Make sure we can log in to this server * @param idata Server data diff --git a/imap/imap.h b/imap/imap.h index fe58aa8b2..7744de12a 100644 --- a/imap/imap.h +++ b/imap/imap.h @@ -57,6 +57,22 @@ struct Context; struct Header; struct Pattern; +/* These Config Variables are only used in imap/auth.c */ +extern char *ImapAuthenticators; + +/* These Config Variables are only used in imap/imap.c */ +extern bool ImapIdle; + +/* These Config Variables are only used in imap/message.c */ +extern char *ImapHeaders; + +/* These Config Variables are only used in imap/command.c */ +extern bool ImapServernoise; + +/* These Config Variables are only used in imap/util.c */ +extern char *ImapDelimChars; +extern short ImapPipelineDepth; + /** * struct ImapMbox - An IMAP mailbox */ diff --git a/imap/message.c b/imap/message.c index d68856dbd..a6748bf87 100644 --- a/imap/message.c +++ b/imap/message.c @@ -62,6 +62,9 @@ struct BodyCache; +/* These Config Variables are only used in imap/message.c */ +char *ImapHeaders; + /** * new_header_data - Create a new ImapHeaderData * @retval ptr New ImapHeaderData diff --git a/imap/util.c b/imap/util.c index 0bd6d7bba..0546e6364 100644 --- a/imap/util.c +++ b/imap/util.c @@ -59,6 +59,10 @@ #include "hcache/hcache.h" #endif +/* These Config Variables are only used in imap/util.c */ +char *ImapDelimChars; +short ImapPipelineDepth; + /** * imap_expand_path - Canonicalise an IMAP path * @param path Buffer containing path diff --git a/init.h b/init.h index 105af56f3..b8b1687a8 100644 --- a/init.h +++ b/init.h @@ -32,18 +32,56 @@ #include "mutt/mutt.h" #include "conn/conn.h" #include "mutt.h" +#include "addrbook.h" +#include "bcache.h" +#include "browser.h" #include "buffy.h" +#include "commands.h" +#include "compose.h" +#include "curs_lib.h" +#include "curs_main.h" +#include "edit.h" #include "globals.h" #include "group.h" +#include "handler.h" +#include "hdrline.h" #include "history.h" +#include "hook.h" +#include "imap/imap.h" #include "keymap.h" +#include "maildir/maildir.h" +#include "menu.h" +#include "mutt_account.h" #include "mutt_commands.h" #include "mutt_logging.h" #include "mutt_options.h" +#include "mutt_thread.h" +#include "muttlib.h" #include "mx.h" +#include "ncrypt/ncrypt.h" +#include "nntp/nntp.h" +#include "notmuch/mutt_notmuch.h" #include "options.h" +#include "pager.h" +#include "parse.h" +#include "pattern.h" +#include "pop/pop.h" +#include "progress.h" #include "protos.h" +#include "query.h" +#include "recvattach.h" +#include "recvcmd.h" +#include "remailer.h" +#include "rfc1524.h" +#include "rfc2231.h" +#include "rfc3676.h" +#include "score.h" +#include "send.h" +#include "sendlib.h" +#include "sidebar.h" +#include "smtp.h" #include "sort.h" +#include "status.h" #ifdef USE_LUA #include "mutt_lua.h" #endif @@ -2277,6 +2315,7 @@ struct Option MuttVars[] = { ** \fBdeprecated\fP. ** (PGP only) */ +#ifdef CRYPT_BACKEND_CLASSIC_PGP { "pgp_check_exit", DT_BOOL, R_NONE, &PgpCheckExit, true }, /* ** .pp @@ -2357,6 +2396,7 @@ struct Option MuttVars[] = { ** is ignored. ** (PGP only) */ +#endif { "pgp_default_key", DT_STRING, R_NONE, &PgpDefaultKey, 0 }, /* ** .pp @@ -2369,6 +2409,7 @@ struct Option MuttVars[] = { ** variable, and should no longer be used. ** (PGP only) */ +#ifdef CRYPT_BACKEND_CLASSIC_PGP { "pgp_encrypt_only_command", DT_COMMAND, R_NONE, &PgpEncryptOnlyCommand, 0 }, /* ** .pp @@ -2387,6 +2428,7 @@ struct Option MuttVars[] = { ** possible \fCprintf(3)\fP-like sequences. ** (PGP only) */ +#endif { "pgp_entry_format", DT_STRING, R_NONE, &PgpEntryFormat, IP "%4n %t%f %4l/0x%k %-4a %2c %u" }, /* ** .pp @@ -2408,6 +2450,7 @@ struct Option MuttVars[] = { ** .pp ** (PGP only) */ +#ifdef CRYPT_BACKEND_CLASSIC_PGP { "pgp_export_command", DT_COMMAND, R_NONE, &PgpExportCommand, 0 }, /* ** .pp @@ -2437,6 +2480,7 @@ struct Option MuttVars[] = { ** even for bad signatures. ** (PGP only) */ +#endif { "pgp_ignore_subkeys", DT_BOOL, R_NONE, &PgpIgnoreSubkeys, true }, /* ** .pp @@ -2445,6 +2489,7 @@ struct Option MuttVars[] = { ** if you want to play interesting key selection games. ** (PGP only) */ +#ifdef CRYPT_BACKEND_CLASSIC_PGP { "pgp_import_command", DT_COMMAND, R_NONE, &PgpImportCommand, 0 }, /* ** .pp @@ -2489,6 +2534,7 @@ struct Option MuttVars[] = { ** possible \fCprintf(3)\fP-like sequences. ** (PGP only) */ +#endif { "pgp_long_ids", DT_BOOL, R_NONE, &PgpLongIds, true }, /* ** .pp @@ -2567,7 +2613,8 @@ struct Option MuttVars[] = { ** to specify your key (e.g. \fC0x00112233\fP). ** (PGP only) */ - { "pgp_sign_command", DT_COMMAND, R_NONE, &PgpSignCommand, 0 }, +#ifdef CRYPT_BACKEND_CLASSIC_PGP +{ "pgp_sign_command", DT_COMMAND, R_NONE, &PgpSignCommand, 0 }, /* ** .pp ** This command is used to create the detached PGP signature for a @@ -2577,6 +2624,7 @@ struct Option MuttVars[] = { ** possible \fCprintf(3)\fP-like sequences. ** (PGP only) */ +#endif { "pgp_sort_keys", DT_SORT|DT_SORT_KEYS, R_NONE, &PgpSortKeys, SORT_ADDRESS }, /* ** .pp @@ -2602,6 +2650,7 @@ struct Option MuttVars[] = { ** this if you know what you are doing. ** (PGP only) */ +#ifdef CRYPT_BACKEND_CLASSIC_PGP { "pgp_timeout", DT_LONG, R_NONE, &PgpTimeout, 300 }, /* ** .pp @@ -2636,6 +2685,7 @@ struct Option MuttVars[] = { ** possible \fCprintf(3)\fP-like sequences. ** (PGP only) */ +#endif { "pipe_decode", DT_BOOL, R_NONE, &PipeDecode, false }, /* ** .pp @@ -3504,6 +3554,7 @@ struct Option MuttVars[] = { ** a line quoted text if it also matches $$smileys. This mostly ** happens at the beginning of a line. */ +#ifdef CRYPT_BACKEND_CLASSIC_SMIME { "smime_ask_cert_label", DT_BOOL, R_NONE, &SmimeAskCertLabel, true }, /* ** .pp @@ -3566,6 +3617,7 @@ struct Option MuttVars[] = { ** to determine the key to use. It will ask you to supply a key, if it can't find one. ** (S/MIME only) */ +#endif { "smime_default_key", DT_STRING, R_NONE, &SmimeDefaultKey, 0 }, /* ** .pp @@ -3584,6 +3636,7 @@ struct Option MuttVars[] = { ** variable, and should no longer be used. ** (S/MIME only) */ +#ifdef CRYPT_BACKEND_CLASSIC_SMIME { "smime_encrypt_command", DT_COMMAND, R_NONE, &SmimeEncryptCommand, 0 }, /* ** .pp @@ -3598,6 +3651,7 @@ struct Option MuttVars[] = { ** Encrypt the message to $$smime_default_key too. ** (S/MIME only) */ +#endif { "smime_encrypt_with", DT_STRING, R_NONE, &SmimeEncryptWith, IP "aes256" }, /* ** .pp @@ -3605,6 +3659,7 @@ struct Option MuttVars[] = { ** Valid choices are ``aes128'', ``aes192'', ``aes256'', ``des'', ``des3'', ``rc2-40'', ``rc2-64'', ``rc2-128''. ** (S/MIME only) */ +#ifdef CRYPT_BACKEND_CLASSIC_SMIME { "smime_get_cert_command", DT_COMMAND, R_NONE, &SmimeGetCertCommand, 0 }, /* ** .pp @@ -3646,6 +3701,7 @@ struct Option MuttVars[] = { ** to $$smime_sign_as if set, otherwise $$smime_default_key. ** (S/MIME only) */ +#endif { "smime_is_default", DT_BOOL, R_NONE, &SmimeIsDefault, false }, /* ** .pp @@ -3656,6 +3712,7 @@ struct Option MuttVars[] = { ** message. (Note that this variable can be overridden by unsetting $$crypt_autosmime.) ** (S/MIME only) */ +#ifdef CRYPT_BACKEND_CLASSIC_SMIME { "smime_keys", DT_PATH, R_NONE, &SmimeKeys, 0 }, /* ** .pp @@ -3677,6 +3734,7 @@ struct Option MuttVars[] = { ** possible \fCprintf(3)\fP-like sequences. ** (S/MIME only) */ +#endif { "smime_self_encrypt", DT_BOOL, R_NONE, &SmimeSelfEncrypt, true }, /* ** .pp @@ -3691,6 +3749,7 @@ struct Option MuttVars[] = { ** to the signing key. Most people will only need to set $$smime_default_key. ** (S/MIME only) */ +#ifdef CRYPT_BACKEND_CLASSIC_SMIME { "smime_sign_command", DT_COMMAND, R_NONE, &SmimeSignCommand, 0 }, /* ** .pp @@ -3734,6 +3793,7 @@ struct Option MuttVars[] = { ** possible \fCprintf(3)\fP-like sequences. ** (S/MIME only) */ +#endif #ifdef USE_SMTP { "smtp_authenticators", DT_STRING, R_NONE, &SmtpAuthenticators, 0 }, /* diff --git a/maildir/maildir.h b/maildir/maildir.h index 344793342..dbeb2c243 100644 --- a/maildir/maildir.h +++ b/maildir/maildir.h @@ -34,6 +34,14 @@ struct Buffy; struct Context; struct Header; +/* These Config Variables are only used in maildir/mh.c */ +extern bool CheckNew; +extern bool MaildirHeaderCacheVerify; +extern bool MhPurge; +extern char *MhSeqFlagged; +extern char *MhSeqReplied; +extern char *MhSeqUnseen; + extern struct MxOps mx_maildir_ops; extern struct MxOps mx_mh_ops; diff --git a/maildir/mh.c b/maildir/mh.c index 7409f4a46..c36629f97 100644 --- a/maildir/mh.c +++ b/maildir/mh.c @@ -60,6 +60,14 @@ #include "hcache/hcache.h" #endif +/* These Config Variables are only used in maildir/mh.c */ +bool CheckNew; +bool MaildirHeaderCacheVerify; +bool MhPurge; +char *MhSeqFlagged; +char *MhSeqReplied; +char *MhSeqUnseen; + #define INS_SORT_THRESHOLD 6 #define MH_SEQ_UNSEEN (1 << 0) diff --git a/main.c b/main.c index bc588be90..489414db4 100644 --- a/main.c +++ b/main.c @@ -74,6 +74,9 @@ #include "nntp/nntp.h" #endif +/* These Config Variables are only used in main.c */ +extern bool ResumeEditedDraftFiles; + #define MUTT_IGNORE (1 << 0) /* -z */ #define MUTT_BUFFY (1 << 1) /* -Z */ #define MUTT_NOSYSRC (1 << 2) /* -n */ diff --git a/main.h b/main.h new file mode 100644 index 000000000..bef7ce331 --- /dev/null +++ b/main.h @@ -0,0 +1,29 @@ +/** + * @file + * Command line processing + * + * @authors + * Copyright (C) 2018 Richard Russon + * + * @copyright + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 2 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ + +#ifndef MUTT_MAIN_H +#define MUTT_MAIN_H + +/* These Config Variables are only used in main.c */ +extern bool ResumeEditedDraftFiles; + +#endif /* MUTT_MAIN_H */ diff --git a/menu.c b/menu.c index 448a611cd..8a19ef767 100644 --- a/menu.c +++ b/menu.c @@ -45,6 +45,11 @@ #include "sidebar.h" #endif +/* These Config Variables are only used in menu.c */ +short MenuContext; +bool MenuMoveOff; /**< allow menu to scroll past last entry */ +bool MenuScroll; /**< scroll menu instead of implicit next-page */ + char *SearchBuffers[MENU_MAX]; /* These are used to track the active menus, for redraw operations. */ diff --git a/menu.h b/menu.h new file mode 100644 index 000000000..622b5e576 --- /dev/null +++ b/menu.h @@ -0,0 +1,31 @@ +/** + * @file + * GUI present the user with a selectable list + * + * @authors + * Copyright (C) 2018 Richard Russon + * + * @copyright + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 2 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ + +#ifndef MUTT_MENU_H +#define MUTT_MENU_H + +/* These Config Variables are only used in menu.c */ +extern short MenuContext; +extern bool MenuMoveOff; /**< allow menu to scroll past last entry */ +extern bool MenuScroll; /**< scroll menu instead of implicit next-page */ + +#endif /* MUTT_MENU_H */ diff --git a/mutt.h b/mutt.h index 469288b4d..95bb33636 100644 --- a/mutt.h +++ b/mutt.h @@ -311,40 +311,4 @@ void reset_value(const char *name); /* All the variables below are backing for config items */ -/* Quad-options */ -WHERE unsigned char AbortUnmodified; -WHERE unsigned char Bounce; -WHERE unsigned char Copy; -WHERE unsigned char Delete; -WHERE unsigned char ForwardEdit; -WHERE unsigned char FccAttach; -WHERE unsigned char Include; -WHERE unsigned char HonorFollowupTo; -WHERE unsigned char MimeForward; -WHERE unsigned char MimeForwardRest; -WHERE unsigned char Move; -WHERE unsigned char PgpMimeAuto; /* ask to revert to PGP/MIME when inline fails */ -WHERE unsigned char SmimeEncryptSelf; -WHERE unsigned char PgpEncryptSelf; -#ifdef USE_POP -WHERE unsigned char PopDelete; -WHERE unsigned char PopReconnect; -#endif -WHERE unsigned char Postpone; -WHERE unsigned char Print; -WHERE unsigned char Quit; -WHERE unsigned char ReplyTo; -WHERE unsigned char Recall; -#ifdef USE_SSL -WHERE unsigned char SslStarttls; -#endif -WHERE unsigned char AbortNosubject; -WHERE unsigned char CryptVerifySig; /* verify PGP signatures */ -#ifdef USE_NNTP -WHERE unsigned char PostModerated; -WHERE unsigned char CatchupNewsgroup; -WHERE unsigned char FollowupToPoster; -#endif -WHERE unsigned char AbortNoattach; /* forgotten attachment detector */ - #endif /* _MUTT_H */ diff --git a/mutt/idna.c b/mutt/idna.c index c1fb360ad..f39822ec3 100644 --- a/mutt/idna.c +++ b/mutt/idna.c @@ -50,6 +50,7 @@ #include #endif +/* These Config Variables are only used in mutt/idna.c */ #ifdef HAVE_LIBIDN bool IdnDecode; bool IdnEncode; diff --git a/mutt/idna2.h b/mutt/idna2.h index c22b629a3..972a6bc8e 100644 --- a/mutt/idna2.h +++ b/mutt/idna2.h @@ -25,6 +25,7 @@ #include +/* These Config Variables are only used in mutt/idna.c */ extern bool IdnDecode; extern bool IdnEncode; diff --git a/mutt_account.c b/mutt_account.c index 9c0ab82de..a9858be68 100644 --- a/mutt_account.c +++ b/mutt_account.c @@ -37,6 +37,15 @@ #include "protos.h" #include "url.h" +/* These Config Variables are only used in mutt_account.c */ +char *ImapLogin; +char *ImapPass; +char *NntpPass; +char *NntpUser; +char *PopPass; +char *PopUser; +char *SmtpPass; + /** * mutt_account_match - Compare account info (host/port/user) * @param a1 First Account diff --git a/mutt_account.h b/mutt_account.h index 786d2f9c4..7a597eabf 100644 --- a/mutt_account.h +++ b/mutt_account.h @@ -28,6 +28,15 @@ struct Account; struct Url; +/* These Config Variables are only used in mutt_account.c */ +extern char *ImapLogin; +extern char *ImapPass; +extern char *NntpPass; +extern char *NntpUser; +extern char *PopPass; +extern char *PopUser; +extern char *SmtpPass; + /** * enum AccountType - account types */ diff --git a/mutt_thread.c b/mutt_thread.c index 756dc7293..6106dd1a2 100644 --- a/mutt_thread.c +++ b/mutt_thread.c @@ -36,6 +36,18 @@ #include "protos.h" #include "sort.h" +/* These Config Variables are only used in mutt_thread.c */ +bool DuplicateThreads; +bool HideLimited; +bool HideMissing; +bool HideThreadSubject; +bool HideTopLimited; +bool HideTopMissing; +bool NarrowTree; +bool SortRe; +bool StrictThreads; +bool ThreadReceived; + static bool is_visible(struct Header *hdr, struct Context *ctx) { return (hdr->virtual >= 0 || (hdr->collapsed && (!ctx->pattern || hdr->limited))); diff --git a/mutt_thread.h b/mutt_thread.h index a032a9ae7..e3b52fa10 100644 --- a/mutt_thread.h +++ b/mutt_thread.h @@ -29,6 +29,18 @@ struct Context; struct Header; struct MuttThread; +/* These Config Variables are only used in mutt_thread.c */ +extern bool DuplicateThreads; +extern bool HideLimited; +extern bool HideMissing; +extern bool HideThreadSubject; +extern bool HideTopLimited; +extern bool HideTopMissing; +extern bool NarrowTree; +extern bool SortRe; +extern bool StrictThreads; +extern bool ThreadReceived; + int mutt_aside_thread(struct Header *hdr, short dir, short subthreads); #define mutt_next_thread(x) mutt_aside_thread(x, 1, 0) #define mutt_previous_thread(x) mutt_aside_thread(x, 0, 0) diff --git a/muttlib.c b/muttlib.c index d9f2b4e1d..7533f4899 100644 --- a/muttlib.c +++ b/muttlib.c @@ -58,6 +58,9 @@ #include "imap/imap.h" #endif +/* These Config Variables are only used in muttlib.c */ +struct Regex *GecosMask; + static const char *xdg_env_vars[] = { [XDG_CONFIG_HOME] = "XDG_CONFIG_HOME", [XDG_CONFIG_DIRS] = "XDG_CONFIG_DIRS", diff --git a/muttlib.h b/muttlib.h index 98fbfd68d..1f459f029 100644 --- a/muttlib.h +++ b/muttlib.h @@ -34,6 +34,9 @@ struct Body; struct passwd; struct stat; +/* These Config Variables are only used in muttlib.c */ +extern struct Regex *GecosMask; + void mutt_adv_mktemp(char *s, size_t l); int mutt_check_overwrite(const char *attname, const char *path, char *fname, size_t flen, int *append, char **directory); void mutt_encode_path(char *dest, size_t dlen, const char *src); diff --git a/mx.c b/mx.c index 594c9ad6c..92e55177b 100644 --- a/mx.c +++ b/mx.c @@ -81,6 +81,12 @@ #include #endif +/* These Config Variables are only used in mx.c */ +unsigned char CatchupNewsgroup; +bool KeepFlagged; +unsigned char Move; +char * Trash; + /** * mx_get_ops - Get mailbox operations * @param magic Mailbox magic number diff --git a/mx.h b/mx.h index 1d0ff7559..764000463 100644 --- a/mx.h +++ b/mx.h @@ -36,6 +36,12 @@ struct Context; struct Message; struct stat; +/* These Config Variables are only used in mx.c */ +extern unsigned char CatchupNewsgroup; +extern bool KeepFlagged; +extern unsigned char Move; +extern char * Trash; + /** * struct MxOps - The Mailbox API * diff --git a/ncrypt/crypt.c b/ncrypt/crypt.c index 701cb00f8..3c4b49407 100644 --- a/ncrypt/crypt.c +++ b/ncrypt/crypt.c @@ -53,6 +53,16 @@ #include "protos.h" #include "state.h" +/* These Config Variables are only used in ncrypt/crypt.c */ +bool CryptTimestamp; +unsigned char PgpEncryptSelf; +unsigned char PgpMimeAuto; /* ask to revert to PGP/MIME when inline fails */ +bool PgpRetainableSigs; +bool PgpSelfEncrypt; +bool PgpStrictEnc; +unsigned char SmimeEncryptSelf; +bool SmimeSelfEncrypt; + /** * crypt_current_time - Print the current time * diff --git a/ncrypt/cryptglue.c b/ncrypt/cryptglue.c index 195b1fa6a..d75927d45 100644 --- a/ncrypt/cryptglue.c +++ b/ncrypt/cryptglue.c @@ -45,6 +45,9 @@ struct State; +/* These Config Variables are only used in ncrypt/cryptglue.c */ +bool CryptUseGpgme; + #ifdef CRYPT_BACKEND_CLASSIC_PGP extern struct CryptModuleSpecs crypt_mod_pgp_classic; #endif diff --git a/ncrypt/gnupgparse.c b/ncrypt/gnupgparse.c index d00d3c687..f15104b93 100644 --- a/ncrypt/gnupgparse.c +++ b/ncrypt/gnupgparse.c @@ -43,6 +43,7 @@ #include #include "mutt/mutt.h" #include "filter.h" +#include "globals.h" #include "ncrypt.h" #include "options.h" #include "pgpinvoke.h" diff --git a/ncrypt/ncrypt.h b/ncrypt/ncrypt.h index b77d93c80..d5c4c527b 100644 --- a/ncrypt/ncrypt.h +++ b/ncrypt/ncrypt.h @@ -58,6 +58,61 @@ struct Envelope; struct Header; struct State; +/* These Config Variables are only used in ncrypt/crypt.c */ +extern bool CryptTimestamp; +extern unsigned char PgpEncryptSelf; +extern unsigned char PgpMimeAuto; /* ask to revert to PGP/MIME when inline fails */ +extern bool PgpRetainableSigs; +extern bool PgpSelfEncrypt; +extern bool PgpStrictEnc; +extern unsigned char SmimeEncryptSelf; +extern bool SmimeSelfEncrypt; + +/* These Config Variables are only used in ncrypt/cryptglue.c */ +extern bool CryptUseGpgme; + +/* These Config Variables are only used in ncrypt/pgp.c */ +extern bool PgpCheckExit; +extern bool PgpCheckGpgDecryptStatusFd; +extern struct Regex *PgpDecryptionOkay; +extern struct Regex *PgpGoodSign; +extern long PgpTimeout; +extern bool PgpUseGpgAgent; + +/* These Config Variables are only used in ncrypt/pgpinvoke.c */ +extern char *PgpClearsignCommand; +extern char *PgpDecodeCommand; +extern char *PgpDecryptCommand; +extern char *PgpEncryptOnlyCommand; +extern char *PgpEncryptSignCommand; +extern char *PgpExportCommand; +extern char *PgpGetkeysCommand; +extern char *PgpImportCommand; +extern char *PgpListPubringCommand; +extern char *PgpListSecringCommand; +extern char *PgpSignCommand; +extern char *PgpVerifyCommand; +extern char *PgpVerifyKeyCommand; + +/* These Config Variables are only used in ncrypt/smime.c */ +extern bool SmimeAskCertLabel; +extern char *SmimeCaLocation; +extern char *SmimeCertificates; +extern char *SmimeDecryptCommand; +extern bool SmimeDecryptUseDefaultKey; +extern char *SmimeEncryptCommand; +extern char *SmimeGetCertCommand; +extern char *SmimeGetCertEmailCommand; +extern char *SmimeGetSignerCertCommand; +extern char *SmimeImportCertCommand; +extern char *SmimeKeys; +extern char *SmimePk7outCommand; +extern char *SmimeSignCommand; +extern char *SmimeSignDigestAlg; +extern long SmimeTimeout; +extern char *SmimeVerifyCommand; +extern char *SmimeVerifyOpaqueCommand; + /* FIXME: They should be pointer to anonymous structures for better information hiding. */ diff --git a/ncrypt/pgp.c b/ncrypt/pgp.c index 60a119801..00b8f64bd 100644 --- a/ncrypt/pgp.c +++ b/ncrypt/pgp.c @@ -60,6 +60,14 @@ #include "protos.h" #include "state.h" +/* These Config Variables are only used in ncrypt/pgp.c */ +bool PgpCheckExit; +bool PgpCheckGpgDecryptStatusFd; +struct Regex *PgpDecryptionOkay; +struct Regex *PgpGoodSign; +long PgpTimeout; +bool PgpUseGpgAgent; + char PgpPass[LONG_STRING]; time_t PgpExptime = 0; /* when does the cached passphrase expire? */ diff --git a/ncrypt/pgpinvoke.c b/ncrypt/pgpinvoke.c index 4e022bb53..056c31ff7 100644 --- a/ncrypt/pgpinvoke.c +++ b/ncrypt/pgpinvoke.c @@ -48,6 +48,21 @@ #include "pgpkey.h" #include "protos.h" +/* These Config Variables are only used in ncrypt/pgpinvoke.c */ +char *PgpClearsignCommand; +char *PgpDecodeCommand; +char *PgpDecryptCommand; +char *PgpEncryptOnlyCommand; +char *PgpEncryptSignCommand; +char *PgpExportCommand; +char *PgpGetkeysCommand; +char *PgpImportCommand; +char *PgpListPubringCommand; +char *PgpListSecringCommand; +char *PgpSignCommand; +char *PgpVerifyCommand; +char *PgpVerifyKeyCommand; + /** * struct PgpCommandContext - Data for a PGP command * diff --git a/ncrypt/smime.c b/ncrypt/smime.c index 6ee641d33..9af789b29 100644 --- a/ncrypt/smime.c +++ b/ncrypt/smime.c @@ -58,6 +58,25 @@ #include "protos.h" #include "state.h" +/* These Config Variables are only used in ncrypt/smime.c */ +bool SmimeAskCertLabel; +char *SmimeCaLocation; +char *SmimeCertificates; +char *SmimeDecryptCommand; +bool SmimeDecryptUseDefaultKey; +char *SmimeEncryptCommand; +char *SmimeGetCertCommand; +char *SmimeGetCertEmailCommand; +char *SmimeGetSignerCertCommand; +char *SmimeImportCertCommand; +char *SmimeKeys; +char *SmimePk7outCommand; +char *SmimeSignCommand; +char *SmimeSignDigestAlg; +long SmimeTimeout; +char *SmimeVerifyCommand; +char *SmimeVerifyOpaqueCommand; + /** * struct SmimeCommandContext - Data for a SIME command */ diff --git a/nntp/newsrc.c b/nntp/newsrc.c index 26e082e5e..7c46404c2 100644 --- a/nntp/newsrc.c +++ b/nntp/newsrc.c @@ -60,6 +60,10 @@ #include "hcache/hcache.h" #endif +/* These Config Variables are only used in nntp/newsrc.c */ +char *NewsCacheDir; +char *Newsrc; + struct BodyCache; /** diff --git a/nntp/nntp.c b/nntp/nntp.c index b71a21190..b603293a3 100644 --- a/nntp/nntp.c +++ b/nntp/nntp.c @@ -64,6 +64,14 @@ #include #endif +/* These Config Variables are only used in nntp/nntp.c */ +char *NntpAuthenticators; +short NntpContext; +bool NntpListgroup; +bool NntpLoadDescription; +short NntpPoll; +bool ShowNewNews; + struct NntpServer *CurrentNewsSrv; /** diff --git a/nntp/nntp.h b/nntp/nntp.h index 5262ac955..b863206e0 100644 --- a/nntp/nntp.h +++ b/nntp/nntp.h @@ -41,6 +41,18 @@ struct Account; struct Header; struct Context; +/* These Config Variables are only used in nntp/nntp.c */ +extern char *NntpAuthenticators; +extern short NntpContext; +extern bool NntpListgroup; +extern bool NntpLoadDescription; +extern short NntpPoll; +extern bool ShowNewNews; + +/* These Config Variables are only used in nntp/newsrc.c */ +extern char *NewsCacheDir; +extern char *Newsrc; + /* article number type and format */ #define anum_t uint32_t #define ANUM "%u" diff --git a/notmuch/mutt_notmuch.c b/notmuch/mutt_notmuch.c index 66b29710c..77efaad8a 100644 --- a/notmuch/mutt_notmuch.c +++ b/notmuch/mutt_notmuch.c @@ -62,6 +62,17 @@ #include "protos.h" #include "url.h" +/* These Config Variables are only used in notmuch/mutt_notmuch.c */ +int NmDbLimit; +char *NmDefaultUri; +char *NmExcludeTags; +int NmOpenTimeout; +char *NmQueryType; +int NmQueryWindowCurrentPosition; +char *NmQueryWindowTimebase; +char *NmRecordTags; +char *NmUnreadTag; + #ifdef LIBNOTMUCH_CHECK_VERSION #undef LIBNOTMUCH_CHECK_VERSION #endif diff --git a/notmuch/mutt_notmuch.h b/notmuch/mutt_notmuch.h index 424fc35e6..92f92ff90 100644 --- a/notmuch/mutt_notmuch.h +++ b/notmuch/mutt_notmuch.h @@ -30,6 +30,17 @@ struct Context; struct Header; +/* These Config Variables are only used in notmuch/mutt_notmuch.c */ +extern int NmDbLimit; +extern char *NmDefaultUri; +extern char *NmExcludeTags; +extern int NmOpenTimeout; +extern char *NmQueryType; +extern int NmQueryWindowCurrentPosition; +extern char *NmQueryWindowTimebase; +extern char *NmRecordTags; +extern char *NmUnreadTag; + int nm_read_entire_thread(struct Context *ctx, struct Header *h); char *nm_header_get_folder(struct Header *h); diff --git a/options.h b/options.h index 580e1ed39..9c9ad1246 100644 --- a/options.h +++ b/options.h @@ -58,220 +58,4 @@ WHERE bool OptViewAttach; /**< (pseudo) signals that we are viewing att #define mutt_bit_toggle(v, n) v[n / 8] ^= (1 << (n % 8)) #define mutt_bit_isset(v, n) (v[n / 8] & (1 << (n % 8))) -/* All the variables below are backing for config items */ - -WHERE bool Allow8bit; -WHERE bool AllowAnsi; -WHERE bool ArrowCursor; -WHERE bool AsciiChars; -WHERE bool Askbcc; -WHERE bool Askcc; -WHERE bool AskFollowUp; -WHERE bool AskXCommentTo; -WHERE bool AttachSplit; -WHERE bool Autoedit; -WHERE bool AutoTag; -WHERE bool Beep; -WHERE bool BeepNew; -WHERE bool BounceDelivered; -WHERE bool BrailleFriendly; -WHERE bool BrowserAbbreviateMailboxes; -WHERE bool ChangeFolderNext; -WHERE bool CheckMboxSize; -WHERE bool CheckNew; -WHERE bool CollapseAll; -WHERE bool CollapseUnread; -WHERE bool CollapseFlagged; -WHERE bool Confirmappend; -WHERE bool Confirmcreate; -WHERE bool DeleteUntag; -WHERE bool DigestCollapse; -WHERE bool DuplicateThreads; -WHERE bool EditHeaders; -WHERE bool EncodeFrom; -WHERE bool UseEnvelopeFrom; -WHERE bool FastReply; -WHERE bool FccClear; -WHERE bool FlagSafe; -WHERE bool FollowupTo; -WHERE bool ForceName; -WHERE bool ForwardDecode; -WHERE bool ForwardQuote; -WHERE bool ForwardReferences; -#ifdef USE_HCACHE -WHERE bool MaildirHeaderCacheVerify; -#if defined(HAVE_QDBM) || defined(HAVE_TC) || defined(HAVE_KC) -WHERE bool HeaderCacheCompress; -#endif /* HAVE_QDBM */ -#endif -WHERE bool Hdrs; -WHERE bool Header; -WHERE bool HeaderColorPartial; -WHERE bool Help; -WHERE bool HiddenHost; -WHERE bool HideLimited; -WHERE bool HideMissing; -WHERE bool HideThreadSubject; -WHERE bool HideTopLimited; -WHERE bool HideTopMissing; -WHERE bool HonorDisposition; -WHERE bool IgnoreListReplyTo; -#ifdef USE_IMAP -WHERE bool ImapCheckSubscribed; -WHERE bool ImapIdle; -WHERE bool ImapListSubscribed; -WHERE bool ImapPassive; -WHERE bool ImapPeek; -WHERE bool ImapServernoise; -#endif -#ifdef USE_SSL -#ifndef USE_SSL_GNUTLS -WHERE bool SslUsesystemcerts; -WHERE bool SslUseSslv2; -#endif /* USE_SSL_GNUTLS */ -WHERE bool SslUseSslv3; -WHERE bool SslUseTlsv1; -WHERE bool SslUseTlsv11; -WHERE bool SslUseTlsv12; -WHERE bool SslForceTls; -WHERE bool SslVerifyDates; -WHERE bool SslVerifyHost; -#if defined(USE_SSL_OPENSSL) && defined(HAVE_SSL_PARTIAL_CHAIN) -WHERE bool SslVerifyPartialChains; -#endif /* USE_SSL_OPENSSL */ -#endif /* defined(USE_SSL) */ -WHERE bool ImplicitAutoview; -WHERE bool IncludeOnlyfirst; -WHERE bool KeepFlagged; -WHERE bool MailcapSanitize; -WHERE bool MailCheckRecent; -WHERE bool MailCheckStats; -WHERE bool MaildirTrash; -WHERE bool MaildirCheckCur; -WHERE bool Markers; -WHERE bool MarkOld; -WHERE bool MenuScroll; /**< scroll menu instead of implicit next-page */ -WHERE bool MenuMoveOff; /**< allow menu to scroll past last entry */ -#if defined(USE_IMAP) || defined(USE_POP) -WHERE bool MessageCacheClean; -#endif -WHERE bool MetaKey; /**< interpret ALT-x as ESC-x */ -WHERE bool Metoo; -WHERE bool MhPurge; -WHERE bool MimeForwardDecode; -WHERE bool MimeTypeQueryFirst; -#ifdef USE_NNTP -WHERE bool MimeSubject; /**< encode subject line with RFC2047 */ -#endif -WHERE bool NarrowTree; -WHERE bool PagerStop; -WHERE bool PipeDecode; -WHERE bool PipeSplit; -#ifdef USE_POP -WHERE bool PopAuthTryAll; -WHERE bool PopLast; -#endif -WHERE bool PostponeEncrypt; -WHERE bool PrintDecode; -WHERE bool PrintSplit; -WHERE bool PromptAfter; -WHERE bool ReadOnly; -WHERE bool ReflowSpaceQuotes; -WHERE bool ReflowText; -WHERE bool ReplySelf; -WHERE bool ReplyWithXorig; -WHERE bool Resolve; -WHERE bool ResumeDraftFiles; -WHERE bool ResumeEditedDraftFiles; -WHERE bool ReverseAlias; -WHERE bool ReverseName; -WHERE bool ReverseRealname; -WHERE bool Rfc2047Parameters; -WHERE bool SaveAddress; -WHERE bool SaveEmpty; -WHERE bool SaveName; -WHERE bool Score; -#ifdef USE_SIDEBAR -WHERE bool SidebarVisible; -WHERE bool SidebarFolderIndent; -WHERE bool SidebarNewMailOnly; -WHERE bool SidebarNextNewWrap; -WHERE bool SidebarShortPath; -WHERE bool SidebarOnRight; -#endif -WHERE bool SigDashes; -WHERE bool SigOnTop; -WHERE bool SortRe; -WHERE bool StatusOnTop; -WHERE bool StrictThreads; -WHERE bool Suspend; -WHERE bool TextFlowed; -WHERE bool ThoroughSearch; -WHERE bool ThreadReceived; -WHERE bool Tilde; -WHERE bool TsEnabled; -WHERE bool UncollapseJump; -WHERE bool UncollapseNew; -WHERE bool Use8bitmime; -WHERE bool UseDomain; -WHERE bool UseFrom; -WHERE bool PgpUseGpgAgent; -#ifdef HAVE_GETADDRINFO -WHERE bool UseIpv6; -#endif -WHERE bool WaitKey; -WHERE bool Weed; -WHERE bool SmartWrap; -WHERE bool WrapSearch; -WHERE bool WriteBcc; /**< write out a bcc header? */ -WHERE bool UserAgent; - -WHERE bool CryptUseGpgme; -WHERE bool CryptUsePka; - -/* PGP options */ - -WHERE bool CryptAutosign; -WHERE bool CryptAutoencrypt; -WHERE bool CryptAutopgp; -WHERE bool CryptAutosmime; -WHERE bool CryptConfirmhook; -WHERE bool CryptOpportunisticEncrypt; -WHERE bool CryptReplyencrypt; -WHERE bool CryptReplysign; -WHERE bool CryptReplysignencrypted; -WHERE bool CryptTimestamp; -WHERE bool SmimeIsDefault; -WHERE bool SmimeSelfEncrypt; -WHERE bool SmimeAskCertLabel; -WHERE bool SmimeDecryptUseDefaultKey; -WHERE bool PgpIgnoreSubkeys; -WHERE bool PgpCheckExit; -WHERE bool PgpCheckGpgDecryptStatusFd; -WHERE bool PgpLongIds; -WHERE bool PgpAutoDecode; -WHERE bool PgpRetainableSigs; -WHERE bool PgpSelfEncrypt; -WHERE bool PgpStrictEnc; -WHERE bool ForwardDecrypt; -WHERE bool PgpShowUnusable; -WHERE bool PgpAutoinline; -WHERE bool PgpReplyinline; - -/* news options */ - -#ifdef USE_NNTP -WHERE bool ShowNewNews; -WHERE bool ShowOnlyUnread; -WHERE bool SaveUnsubscribed; -WHERE bool NntpListgroup; -WHERE bool NntpLoadDescription; -WHERE bool XCommentTo; -#endif - -#ifdef USE_NOTMUCH -WHERE bool VirtualSpoolfile; -WHERE bool NmRecord; -#endif - #endif /* _MUTT_OPTIONS_H_ */ diff --git a/pager.c b/pager.c index 0483181b0..bdd61871b 100644 --- a/pager.c +++ b/pager.c @@ -67,6 +67,18 @@ #include #endif +/* These Config Variables are only used in pager.c */ +bool AllowAnsi; +bool HeaderColorPartial; +short PagerContext; +short PagerIndexLines; +bool PagerStop; +short SearchContext; +short SkipQuotedOffset; +bool SmartWrap; +struct Regex *Smileys; +bool Tilde; + #define ISHEADER(x) ((x) == MT_COLOR_HEADER || (x) == MT_COLOR_HDEFAULT) #define IsAttach(x) (x && (x)->bdy) diff --git a/pager.h b/pager.h index c78d5a7b5..aee0f589b 100644 --- a/pager.h +++ b/pager.h @@ -28,6 +28,18 @@ struct Context; struct Menu; +/* These Config Variables are only used in pager.c */ +extern bool AllowAnsi; +extern bool HeaderColorPartial; +extern short PagerContext; +extern short PagerIndexLines; +extern bool PagerStop; +extern short SearchContext; +extern short SkipQuotedOffset; +extern bool SmartWrap; +extern struct Regex *Smileys; +extern bool Tilde; + /* dynamic internal flags */ #define MUTT_SHOWFLAT (1 << 0) #define MUTT_SHOWCOLOR (1 << 1) diff --git a/parse.c b/parse.c index 3e371d326..e5b63d321 100644 --- a/parse.c +++ b/parse.c @@ -43,6 +43,9 @@ struct Context; +/* These Config Variables are only used in parse.c */ +char *SpamSeparator; + /** * mutt_rfc822_read_line - Read a header line from a file * diff --git a/parse.h b/parse.h index 1895bfeb7..5fd0f77ba 100644 --- a/parse.h +++ b/parse.h @@ -31,6 +31,9 @@ struct Context; struct Envelope; struct Header; +/* These Config Variables are only used in parse.c */ +extern char *SpamSeparator; + int mutt_check_encoding(const char *c); int mutt_check_mime_type(const char *s); int mutt_count_body_parts(struct Context *ctx, struct Header *hdr); diff --git a/pattern.c b/pattern.c index 494cc4189..8b6fba6ae 100644 --- a/pattern.c +++ b/pattern.c @@ -56,6 +56,9 @@ #include "imap/imap.h" #endif +/* These Config Variables are only used in pattern.c */ +bool ThoroughSearch; + // clang-format off /* The regexes in a modern format */ #define RANGE_NUM_RX "([[:digit:]]+|0x[[:xdigit:]]+)[MmKk]?" diff --git a/pattern.h b/pattern.h index bbc1ea78a..68b02c217 100644 --- a/pattern.h +++ b/pattern.h @@ -32,6 +32,9 @@ struct Buffer; struct Header; struct Context; +/* These Config Variables are only used in pattern.c */ +extern bool ThoroughSearch; + /** * struct Pattern - A simple (non-regex) pattern */ diff --git a/pop/pop.c b/pop/pop.c index ed7a2e3f3..ee6f05350 100644 --- a/pop/pop.c +++ b/pop/pop.c @@ -62,6 +62,12 @@ #include #endif +/* These Config Variables are only used in pop/pop.c */ +short PopCheckinterval; +unsigned char PopDelete; +char * PopHost; +bool PopLast; + #ifdef USE_HCACHE #define HC_FNAME "neomutt" /* filename for hcache as POP lacks paths */ #define HC_FEXT "hcache" /* extension for hcache as POP lacks paths */ diff --git a/pop/pop.h b/pop/pop.h index 09be41a8d..ea2743102 100644 --- a/pop/pop.h +++ b/pop/pop.h @@ -25,8 +25,21 @@ #include "mx.h" -void pop_fetch_mail(void); +/* These Config Variables are only used in pop/pop.c */ +extern short PopCheckinterval; +extern unsigned char PopDelete; +extern char * PopHost; +extern bool PopLast; + +/* These Config Variables are only used in pop/pop_auth.c */ +extern char *PopAuthenticators; +extern bool PopAuthTryAll; + +/* These Config Variables are only used in pop/pop_lib.c */ +extern unsigned char PopReconnect; extern struct MxOps mx_pop_ops; +void pop_fetch_mail(void); + #endif /* _POP_POP_H */ diff --git a/pop/pop_auth.c b/pop/pop_auth.c index 13e417589..4c503835a 100644 --- a/pop/pop_auth.c +++ b/pop/pop_auth.c @@ -45,6 +45,10 @@ #include #endif +/* These Config Variables are only used in pop/pop_auth.c */ +char *PopAuthenticators; +bool PopAuthTryAll; + #ifdef USE_SASL /** * pop_auth_sasl - POP SASL authenticator diff --git a/pop/pop_lib.c b/pop/pop_lib.c index 60cda4707..dd0dd767e 100644 --- a/pop/pop_lib.c +++ b/pop/pop_lib.c @@ -45,6 +45,9 @@ #include "protos.h" #include "url.h" +/* These Config Variables are only used in pop/pop_lib.c */ +unsigned char PopReconnect; + /** * pop_parse_path - Parse a POP mailbox name * @param path Path to parse diff --git a/progress.c b/progress.c index 44c59a519..357b8135f 100644 --- a/progress.c +++ b/progress.c @@ -41,6 +41,9 @@ #include "options.h" #include "protos.h" +/* These Config Variables are only used in progress.c */ +short TimeInc; + /** * message_bar - Draw a colourful progress bar * @param percent %age complete diff --git a/progress.h b/progress.h index 9865365ee..9021a3872 100644 --- a/progress.h +++ b/progress.h @@ -26,6 +26,9 @@ #include #include "mutt/mutt.h" +/* These Config Variables are only used in progress.c */ +extern short TimeInc; + #define MUTT_PROGRESS_SIZE (1 << 0) /**< traffic-based progress */ #define MUTT_PROGRESS_MSG (1 << 1) /**< message-based progress */ diff --git a/query.c b/query.c index 4c0775cf3..4239427fc 100644 --- a/query.c +++ b/query.c @@ -40,6 +40,10 @@ #include "opcodes.h" #include "protos.h" +/* These Config Variables are only used in query.c */ +char *QueryCommand; +char *QueryFormat; + /** * struct Query - An entry from an external address-book */ diff --git a/query.h b/query.h new file mode 100644 index 000000000..42381f3cc --- /dev/null +++ b/query.h @@ -0,0 +1,30 @@ +/** + * @file + * Routines for querying and external address book + * + * @authors + * Copyright (C) 2018 Richard Russon + * + * @copyright + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 2 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ + +#ifndef MUTT_QUERY_H +#define MUTT_QUERY_H + +/* These Config Variables are only used in query.c */ +extern char *QueryCommand; +extern char *QueryFormat; + +#endif /* MUTT_QUERY_H */ diff --git a/recvattach.c b/recvattach.c index f4f61c105..cb9e6476f 100644 --- a/recvattach.c +++ b/recvattach.c @@ -56,6 +56,12 @@ #include #endif +/* These Config Variables are only used in recvattach.c */ +char *AttachSep; +bool AttachSplit; +bool DigestCollapse; +char *MessageFormat; + static void mutt_update_recvattach_menu(struct AttachCtx *actx, struct Menu *menu, bool init); static const char *Mailbox_is_read_only = N_("Mailbox is read-only."); diff --git a/recvattach.h b/recvattach.h index 5093e658e..334d289a2 100644 --- a/recvattach.h +++ b/recvattach.h @@ -28,6 +28,12 @@ struct AttachCtx; +/* These Config Variables are only used in recvattach.c */ +extern char *AttachSep; +extern bool AttachSplit; +extern bool DigestCollapse; +extern char *MessageFormat; + void mutt_attach_init(struct AttachCtx *actx); void mutt_update_tree(struct AttachCtx *actx); diff --git a/recvcmd.c b/recvcmd.c index e53de5409..7a3204f6e 100644 --- a/recvcmd.c +++ b/recvcmd.c @@ -43,6 +43,9 @@ #include #endif +/* These Config Variables are only used in recvcmd.c */ +unsigned char MimeForwardRest; + /** * check_msg - Are we working with an RFC822 message * diff --git a/recvcmd.h b/recvcmd.h index bb846222c..f3d714f1c 100644 --- a/recvcmd.h +++ b/recvcmd.h @@ -29,6 +29,9 @@ struct AttachCtx; struct Body; struct Header; +/* These Config Variables are only used in recvcmd.c */ +extern unsigned char MimeForwardRest; + void mutt_attach_bounce(FILE *fp, struct AttachCtx *actx, struct Body *cur); void mutt_attach_resend(FILE *fp, struct AttachCtx *actx, struct Body *cur); void mutt_attach_forward(FILE *fp, struct Header *hdr, struct AttachCtx *actx, struct Body *cur, int flags); diff --git a/remailer.c b/remailer.c index a1d94ae75..981f56fa8 100644 --- a/remailer.c +++ b/remailer.c @@ -42,6 +42,10 @@ #include "protos.h" #include "recvattach.h" +/* These Config Variables are only used in remailer.c */ +char *MixEntryFormat; +char *Mixmaster; + /** * struct Coord - Screen coordinates */ diff --git a/remailer.h b/remailer.h index 3a69ccf09..fde04af3f 100644 --- a/remailer.h +++ b/remailer.h @@ -23,12 +23,16 @@ #ifndef _MUTT_REMAILER_H #define _MUTT_REMAILER_H +#ifdef MIXMASTER + #include struct ListHead; struct Header; -#ifdef MIXMASTER +/* These Config Variables are only used in remailer.c */ +extern char *MixEntryFormat; +extern char *Mixmaster; #define MIX_CAP_COMPRESS (1 << 0) #define MIX_CAP_MIDDLEMAN (1 << 1) diff --git a/rfc1524.c b/rfc1524.c index 9c526353d..7202682a0 100644 --- a/rfc1524.c +++ b/rfc1524.c @@ -46,6 +46,9 @@ #include "options.h" #include "protos.h" +/* These Config Variables are only used in rfc1524.c */ +bool MailcapSanitize; + /** * rfc1524_expand_command - Expand expandos in a command * @param a Email Body diff --git a/rfc1524.h b/rfc1524.h index 539464655..d6f842d90 100644 --- a/rfc1524.h +++ b/rfc1524.h @@ -28,6 +28,9 @@ struct Body; +/* These Config Variables are only used in rfc1524.c */ +extern bool MailcapSanitize; + /** * struct Rfc1524MailcapEntry - A mailcap entry */ diff --git a/rfc2231.c b/rfc2231.c index 4ed3f8889..17a550251 100644 --- a/rfc2231.c +++ b/rfc2231.c @@ -39,6 +39,9 @@ #include "globals.h" #include "options.h" +/* These Config Variables are only used in rfc2231.c */ +bool Rfc2047Parameters; + /** * struct Rfc2231Parameter - MIME section parameter */ diff --git a/rfc2231.h b/rfc2231.h index ad766a277..0a492722a 100644 --- a/rfc2231.h +++ b/rfc2231.h @@ -25,6 +25,9 @@ struct ParameterList; +/* These Config Variables are only used in rfc2231.c */ +extern bool Rfc2047Parameters; + void rfc2231_decode_parameters(struct ParameterList *p); int rfc2231_encode_string(char **pd); diff --git a/rfc3676.c b/rfc3676.c index 365ed4a54..e69d89ef3 100644 --- a/rfc3676.c +++ b/rfc3676.c @@ -37,6 +37,10 @@ #include "protos.h" #include "state.h" +/* These Config Variables are only used in rfc3676.c */ +bool ReflowSpaceQuotes; +short ReflowWrap; + #define FLOWED_MAX 72 /** diff --git a/rfc3676.h b/rfc3676.h index dde7986bd..4ef411bd2 100644 --- a/rfc3676.h +++ b/rfc3676.h @@ -29,6 +29,10 @@ struct Body; struct Header; struct State; +/* These Config Variables are only used in rfc3676.c */ +extern bool ReflowSpaceQuotes; +extern short ReflowWrap; + int rfc3676_handler(struct Body *a, struct State *s); void rfc3676_space_stuff(struct Header *hdr); diff --git a/score.c b/score.c index 088575754..d23bb7fd1 100644 --- a/score.c +++ b/score.c @@ -35,6 +35,11 @@ #include "protos.h" #include "sort.h" +/* These Config Variables are only used in score.c */ +short ScoreThresholdDelete; +short ScoreThresholdFlag; +short ScoreThresholdRead; + /** * struct Score - Scoring rule for email */ diff --git a/score.h b/score.h new file mode 100644 index 000000000..c60a1055f --- /dev/null +++ b/score.h @@ -0,0 +1,31 @@ +/** + * @file + * Routines for adding user scores to emails + * + * @authors + * Copyright (C) 2018 Richard Russon + * + * @copyright + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 2 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ + +#ifndef MUTT_SCORE_H +#define MUTT_SCORE_H + +/* These Config Variables are only used in score.c */ +extern short ScoreThresholdDelete; +extern short ScoreThresholdFlag; +extern short ScoreThresholdRead; + +#endif /* MUTT_SCORE_H */ diff --git a/send.c b/send.c index f18c0f614..64346b870 100644 --- a/send.c +++ b/send.c @@ -61,6 +61,52 @@ #include "notmuch/mutt_notmuch.h" #endif +/* These Config Variables are only used in send.c */ +unsigned char AbortNoattach; /* forgotten attachment detector */ +struct Regex *AbortNoattachRegex; +unsigned char AbortNosubject; +unsigned char AbortUnmodified; +bool AskFollowUp; +bool AskXCommentTo; +char * ContentType; +bool CryptAutoencrypt; +bool CryptAutopgp; +bool CryptAutosign; +bool CryptAutosmime; +bool CryptReplyencrypt; +bool CryptReplysign; +bool CryptReplysignencrypted; +char * EmptySubject; +bool FastReply; +unsigned char FccAttach; +bool FccClear; +bool FollowupTo; +char * ForwardAttributionIntro; +char * ForwardAttributionTrailer; +unsigned char ForwardEdit; +char * ForwardFormat; +bool ForwardReferences; +bool Hdrs; +unsigned char HonorFollowupTo; +bool IgnoreListReplyTo; +unsigned char Include; +bool Metoo; +bool NmRecord; +bool PgpReplyinline; +char * PostIndentString; +bool PostponeEncrypt; +char * PostponeEncryptAs; +unsigned char Recall; +bool ReplySelf; +unsigned char ReplyTo; +bool ReplyWithXorig; +bool ReverseName; +bool ReverseRealname; +bool SigDashes; +char * Signature; +bool SigOnTop; +bool UseFrom; + static void append_signature(FILE *f) { FILE *tmpfp = NULL; diff --git a/send.h b/send.h index 9c02661a0..31ba03320 100644 --- a/send.h +++ b/send.h @@ -31,6 +31,52 @@ struct Context; struct Envelope; struct Header; +/* These Config Variables are only used in send.c */ +extern unsigned char AbortNoattach; /* forgotten attachment detector */ +extern struct Regex *AbortNoattachRegex; +extern unsigned char AbortNosubject; +extern unsigned char AbortUnmodified; +extern bool AskFollowUp; +extern bool AskXCommentTo; +extern char * ContentType; +extern bool CryptAutoencrypt; +extern bool CryptAutopgp; +extern bool CryptAutosign; +extern bool CryptAutosmime; +extern bool CryptReplyencrypt; +extern bool CryptReplysign; +extern bool CryptReplysignencrypted; +extern char * EmptySubject; +extern bool FastReply; +extern unsigned char FccAttach; +extern bool FccClear; +extern bool FollowupTo; +extern char * ForwardAttributionIntro; +extern char * ForwardAttributionTrailer; +extern unsigned char ForwardEdit; +extern char * ForwardFormat; +extern bool ForwardReferences; +extern bool Hdrs; +extern unsigned char HonorFollowupTo; +extern bool IgnoreListReplyTo; +extern unsigned char Include; +extern bool Metoo; +extern bool NmRecord; +extern bool PgpReplyinline; +extern char * PostIndentString; +extern bool PostponeEncrypt; +extern char * PostponeEncryptAs; +extern unsigned char Recall; +extern bool ReplySelf; +extern unsigned char ReplyTo; +extern bool ReplyWithXorig; +extern bool ReverseName; +extern bool ReverseRealname; +extern bool SigDashes; +extern char * Signature; +extern bool SigOnTop; +extern bool UseFrom; + int ci_send_message(int flags, struct Header *msg, char *tempfile, struct Context *ctx, struct Header *cur); void mutt_add_to_reference_headers(struct Envelope *env, struct Envelope *curenv); int mutt_compose_to_sender(struct Header *hdr); diff --git a/sendlib.c b/sendlib.c index 6dfad3bc6..c7b4e27c1 100644 --- a/sendlib.c +++ b/sendlib.c @@ -66,6 +66,25 @@ #define EX_OK 0 #endif +/* These Config Variables are only used in sendlib.c */ +bool Allow8bit; +char *AttachCharset; +bool BounceDelivered; +bool EncodeFrom; +bool ForwardDecrypt; +bool HiddenHost; +char *Inews; +bool MimeForwardDecode; +bool MimeSubject; /**< encode subject line with RFC2047 */ +char *MimeTypeQueryCommand; +bool MimeTypeQueryFirst; +char *Sendmail; +short SendmailWait; +bool Use8bitmime; +bool UseEnvelopeFrom; +bool UserAgent; +short WrapHeaders; + /** * encode_quoted - Encode text as quoted printable * @param fc Cursor for converting a file's encoding diff --git a/sendlib.h b/sendlib.h index fe2243bfb..afd046eb8 100644 --- a/sendlib.h +++ b/sendlib.h @@ -34,6 +34,25 @@ struct Header; struct ListHead; struct ParameterList; +/* These Config Variables are only used in sendlib.c */ +extern bool Allow8bit; +extern char *AttachCharset; +extern bool BounceDelivered; +extern bool EncodeFrom; +extern bool ForwardDecrypt; +extern bool HiddenHost; +extern char *Inews; +extern bool MimeForwardDecode; +extern bool MimeSubject; /**< encode subject line with RFC2047 */ +extern char *MimeTypeQueryCommand; +extern bool MimeTypeQueryFirst; +extern char *Sendmail; +extern short SendmailWait; +extern bool Use8bitmime; +extern bool UseEnvelopeFrom; +extern bool UserAgent; +extern short WrapHeaders; + char * mutt_body_get_charset(struct Body *b, char *buf, size_t buflen); int mutt_bounce_message(FILE *fp, struct Header *h, struct Address *to); const char * mutt_fqdn(bool may_hide_host); diff --git a/sidebar.c b/sidebar.c index eb5f21f4f..389a39c5c 100644 --- a/sidebar.c +++ b/sidebar.c @@ -54,6 +54,18 @@ #include "notmuch/mutt_notmuch.h" #endif +/* These Config Variables are only used in sidebar.c */ +short SidebarComponentDepth; +char *SidebarDelimChars; +char *SidebarDividerChar; +bool SidebarFolderIndent; +char *SidebarFormat; +char *SidebarIndentString; +bool SidebarNewMailOnly; +bool SidebarNextNewWrap; +bool SidebarShortPath; +short SidebarSortMethod; + /* Previous values for some sidebar config */ static short PreviousSort = SORT_ORDER; /* sidebar_sort_method */ diff --git a/sidebar.h b/sidebar.h index 87bbfe829..ae1e4c2e5 100644 --- a/sidebar.h +++ b/sidebar.h @@ -28,6 +28,18 @@ struct Buffy; struct Context; +/* These Config Variables are only used in sidebar.c */ +extern short SidebarComponentDepth; +extern char *SidebarDelimChars; +extern char *SidebarDividerChar; +extern bool SidebarFolderIndent; +extern char *SidebarFormat; +extern char *SidebarIndentString; +extern bool SidebarNewMailOnly; +extern bool SidebarNextNewWrap; +extern bool SidebarShortPath; +extern short SidebarSortMethod; + void mutt_sb_change_mailbox(int op); void mutt_sb_draw(void); const char *mutt_sb_get_highlight(void); diff --git a/smtp.c b/smtp.c index fc72ecaed..436c29676 100644 --- a/smtp.c +++ b/smtp.c @@ -47,6 +47,9 @@ #include #endif +/* These Config Variables are only used in smtp.c */ +char *SmtpAuthenticators; + #define smtp_success(x) ((x) / 100 == 2) #define SMTP_READY 334 #define SMTP_CONTINUE 354 diff --git a/smtp.h b/smtp.h new file mode 100644 index 000000000..e6b818b3a --- /dev/null +++ b/smtp.h @@ -0,0 +1,29 @@ +/** + * @file + * Send email to an SMTP server + * + * @authors + * Copyright (C) 2018 Richard Russon + * + * @copyright + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 2 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ + +#ifndef MUTT_SMTP_H +#define MUTT_SMTP_H + +/* These Config Variables are only used in smtp.c */ +extern char *SmtpAuthenticators; + +#endif /* MUTT_SMTP_H */ diff --git a/sort.c b/sort.c index 011d3b241..a946ea956 100644 --- a/sort.c +++ b/sort.c @@ -39,6 +39,9 @@ #include "nntp/nntp.h" #endif +/* These Config Variables are only used in sort.c */ +bool ReverseAlias; + /* function to use as discriminator when normal sort method is equal */ static sort_t *AuxSort = NULL; diff --git a/sort.h b/sort.h index 47059498c..7c9facba0 100644 --- a/sort.h +++ b/sort.h @@ -29,6 +29,9 @@ struct Context; +/* These Config Variables are only used in sort.c */ +extern bool ReverseAlias; + #define SORT_DATE 1 /**< the date the mail was sent. */ #define SORT_SIZE 2 #define SORT_SUBJECT 3 @@ -81,11 +84,8 @@ extern const struct Mapping SortMethods[]; const char *mutt_get_name(struct Address *a); /* These variables are backing for config items */ -WHERE short SortBrowser; WHERE short Sort; WHERE short SortAux; /* auxiliary sorting method */ -WHERE short SortAlias; -WHERE short SidebarSortMethod; /* FIXME: This one does not belong to here */ WHERE short PgpSortKeys; diff --git a/status.c b/status.c index eb73f2f63..72a418515 100644 --- a/status.c +++ b/status.c @@ -44,6 +44,9 @@ #include "notmuch/mutt_notmuch.h" #endif +/* These Config Variables are only used in status.c */ +struct MbTable *StatusChars; + /** * get_sort_str - Get the sort method as a string * @param buf Buffer for the sort string diff --git a/status.h b/status.h new file mode 100644 index 000000000..4dbd13af9 --- /dev/null +++ b/status.h @@ -0,0 +1,29 @@ +/** + * @file + * GUI display a user-configurable status line + * + * @authors + * Copyright (C) 2018 Richard Russon + * + * @copyright + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 2 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ + +#ifndef MUTT_STATUS_H +#define MUTT_STATUS_H + +/* These Config Variables are only used in status.c */ +extern struct MbTable *StatusChars; + +#endif /* MUTT_STATUS_H */