]> granicus.if.org Git - neomutt/commitdiff
split up globals
authorRichard Russon <rich@flatcap.org>
Sun, 8 Jul 2018 09:50:30 +0000 (10:50 +0100)
committerRichard Russon <rich@flatcap.org>
Mon, 16 Jul 2018 22:23:11 +0000 (23:23 +0100)
116 files changed:
addrbook.c
addrbook.h [new file with mode: 0644]
bcache.c
bcache.h
browser.c
browser.h
buffy.c
buffy.h
commands.c
commands.h
compose.c
compose.h [new file with mode: 0644]
compress.c
conn/conn_globals.c
conn/conn_globals.h
conn/conn_raw.c
conn/ssl_gnutls.c
curs_lib.c
curs_lib.h
curs_main.c
curs_main.h [new file with mode: 0644]
edit.c
edit.h [new file with mode: 0644]
email/tags.c
email/tags.h
globals.h
handler.c
handler.h
hcache/hcache.c
hcache/hcache.h
hcache/kc.c
hcache/qdbm.c
hcache/tc.c
hdrline.c
hdrline.h [new file with mode: 0644]
history.c
history.h
hook.c
hook.h
imap/auth.c
imap/command.c
imap/imap.c
imap/imap.h
imap/message.c
imap/util.c
init.h
maildir/maildir.h
maildir/mh.c
main.c
main.h [new file with mode: 0644]
menu.c
menu.h [new file with mode: 0644]
mutt.h
mutt/idna.c
mutt/idna2.h
mutt_account.c
mutt_account.h
mutt_thread.c
mutt_thread.h
muttlib.c
muttlib.h
mx.c
mx.h
ncrypt/crypt.c
ncrypt/cryptglue.c
ncrypt/gnupgparse.c
ncrypt/ncrypt.h
ncrypt/pgp.c
ncrypt/pgpinvoke.c
ncrypt/smime.c
nntp/newsrc.c
nntp/nntp.c
nntp/nntp.h
notmuch/mutt_notmuch.c
notmuch/mutt_notmuch.h
options.h
pager.c
pager.h
parse.c
parse.h
pattern.c
pattern.h
pop/pop.c
pop/pop.h
pop/pop_auth.c
pop/pop_lib.c
progress.c
progress.h
query.c
query.h [new file with mode: 0644]
recvattach.c
recvattach.h
recvcmd.c
recvcmd.h
remailer.c
remailer.h
rfc1524.c
rfc1524.h
rfc2231.c
rfc2231.h
rfc3676.c
rfc3676.h
score.c
score.h [new file with mode: 0644]
send.c
send.h
sendlib.c
sendlib.h
sidebar.c
sidebar.h
smtp.c
smtp.h [new file with mode: 0644]
sort.c
sort.h
status.c
status.h [new file with mode: 0644]

index 13d2f1081e41abd959240826ff3383570c7a9e97..ea256b1eca6917b097c2aef06ca62cedab5b9d5d 100644 (file)
 #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 (file)
index 0000000..2ed67d0
--- /dev/null
@@ -0,0 +1,30 @@
+/**
+ * @file
+ * Address book handling aliases
+ *
+ * @authors
+ * Copyright (C) 2018 Richard Russon <rich@flatcap.org>
+ *
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+
+#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 */
index 63d3b7a4c93e4ad063def17c20769c06ab676fa8..a95485f233988af349db105c49bc81bdef9af558 100644 (file)
--- 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
  */
index 842e4c1b7f8f2fd0372ae24c3f078c99ad52aa2a..056615e86b669b082d59f0207155bc375cab2ca4 100644 (file)
--- 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
  */
index 76bcd81882928815ae7bcbf68a239407fd66f5f7..7c336fc6d08a052da868654c9b4ae2338b89577b 100644 (file)
--- a/browser.c
+++ b/browser.c
 #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 },
index 8f8c9eb3373a004eb123a674664539061642e4ab..be1b871563352c45719399ddf34489ee001e7805 100644 (file)
--- a/browser.h
+++ b/browser.h
 #include <sys/types.h>
 #include <time.h>
 
+/* 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 b8c2851eb3b5b451ce0bbadff87f1a01ef92f2ff..4e062bba1f3189ee7ff3cac543a43542f30f46f8 100644 (file)
--- a/buffy.c
+++ b/buffy.c
 #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 5e421881f48971925d5b4ae5699b84cf72fbb01e..a47b61a092eb2e5d3e195b1f01e3ce38af7fac23 100644 (file)
--- a/buffy.h
+++ b/buffy.h
 
 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 */
index 360026b7e648243b3a06dbdeebf57c05d88c7ca8..2e1dc52e0ce49812b4a5aca68739df7f7b2f8a0f 100644 (file)
 #include <libintl.h>
 #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() */
index 33d3f9dcf6a312ec1acf830fe9f44d5f1e9705e5..4dfdecd219cf5cc3fdd7498cb4a5f40065ed6918 100644 (file)
@@ -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);
index 66d53cabf50323af69d787fe95f2320505799e31..f81e18cb9ecf400b2d010a55de6416562d26481a 100644 (file)
--- a/compose.c
+++ b/compose.c
 #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 (file)
index 0000000..7642b8e
--- /dev/null
+++ b/compose.h
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * GUI editor for an email's headers
+ *
+ * @authors
+ * Copyright (C) 2018 Richard Russon <rich@flatcap.org>
+ *
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+
+#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 */
index 55462f3cda56398eccc345e77cc1ac6396fc687d..a94ae753d2354046aa8b9a174552fe27d8c6244d 100644 (file)
@@ -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"
index ecbeda4befe9bbfa2f4a2496de46f78cb78c77c2..892e0a12fad44a9c51036cc07946af53d79b22ff 100644 (file)
@@ -27,6 +27,7 @@
  */
 
 #include "config.h"
+#include <stdbool.h>
 #include <stdio.h>
 
 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;
+
index 3e4b91caab93fbe40701a6c7c82e0028de4b52a5..6d4a417951fb254069374c51027109dd1573ac56 100644 (file)
@@ -23,6 +23,8 @@
 #ifndef _CONN_GLOBALS_H
 #define _CONN_GLOBALS_H
 
+#include <stdbool.h>
+
 /* These variables are backing for config items */
 extern short ConnectTimeout;
 
index ca5b00a5ffcd1e54152577ffe22e3c89e03cb257..74d4dc3dbdd51239784b2568f39c7ac82cf0b8e8 100644 (file)
@@ -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
index bccf41a8b251f7ff4dd05da138df29b95fe52114..e50fc727b291bfcc963e7b04ab567f78dfc72993 100644 (file)
 #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
index 614ed9aeeeef2cecd58c6163ee4eb2a392db85fe..13f29229084b69e060e192b743e91e17020b1782 100644 (file)
@@ -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.
index 8e674a2dc848e1ee9d07f931c1f2795cddc5722f..2e9e187fd39a85820515d6c08a6b0dffd05034ae 100644 (file)
@@ -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);
index 7773ae85f25619effb6403a2c5390c8a2d121642..3531b16e8668080e9cd85860bec4e443d49385a9 100644 (file)
 #include <libintl.h>
 #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 (file)
index 0000000..dcafa39
--- /dev/null
@@ -0,0 +1,36 @@
+/**
+ * @file
+ * GUI manage the main index (list of emails)
+ *
+ * @authors
+ * Copyright (C) 2018 Richard Russon <rich@flatcap.org>
+ *
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+
+#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 ea89df9c705e1cf371e505bda2b250f2dab6ca42..9f03adb00f18be586d227f55398cfbe57012efee 100644 (file)
--- 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 (file)
index 0000000..dc61ca7
--- /dev/null
+++ b/edit.h
@@ -0,0 +1,29 @@
+/**
+ * @file
+ * GUI basic built-in text editor
+ *
+ * @authors
+ * Copyright (C) 2018 Richard Russon <rich@flatcap.org>
+ *
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef MUTT_EDIT_H
+#define MUTT_EDIT_H
+
+/* These Config Variables are only used in edit.c */
+extern char *Escape;
+
+#endif /* MUTT_EDIT_H */
index 5e258827b5912f8ed3de4d242205b567b3016424..e8c8d3e49377c0cda62c43e194c68b99a1061533 100644 (file)
@@ -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 */
 
 /**
index df20db920657e217208d7c1d2961c516ac8c23f6..a177c4caae04a7255ff5cfe183281347d1b7acc0 100644 (file)
@@ -26,7 +26,9 @@
 #include <stdbool.h>
 #include "mutt/mutt.h"
 
+/* These Config Variables are only used in email/tags.c */
 extern char *HiddenTags;
+
 extern struct Hash *TagTransforms;
 
 /**
index 9021c3ed2f5198691fe7f9ed092133d0ab17e8b0..ab12ff142525f854f535da70430ed521c7ea60b1 100644 (file)
--- 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 */
index 9aac9d22a9d54457defab7f9fd0b03d99d598e3a..e945f44746cdb74239b27aa8b0d26b6b869560ac 100644 (file)
--- a/handler.c
+++ b/handler.c
 #include <libintl.h>
 #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
 
index e452c1521f5cabcaace692b4c755d6f1c8f9059a..be2cd84155568f2ec3950112e6fbab5d88a87904 100644 (file)
--- a/handler.h
+++ b/handler.h
 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);
index 831458eea9b03a8df4b63d8ddc46b2ff68845f86..46799a4aea15ba573cd9c48680daa45c69ae58c7 100644 (file)
@@ -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;
 
 /**
index 3ddf3956288c86beae613d52282a8a3d7c5bddd6..2fa6e7db8e4e97fdce29ba1dcbf442f0f23c2cbb 100644 (file)
@@ -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)
index a78724803df2e0b65452046a3959254903daf714..1678d9efac3ba2d88a08dcc56fa0221ab66556f6 100644 (file)
@@ -35,6 +35,7 @@
 #include <stdio.h>
 #include "mutt/mutt.h"
 #include "backend.h"
+#include "globals.h"
 #include "options.h"
 
 /**
index 462c51a1e041280bb3cfc718db885d7fe158c1ba..6c052f19ebadfa95fd106ada362ee75efdc6981d 100644 (file)
@@ -36,6 +36,7 @@
 #include <villa.h>
 #include "mutt/mutt.h"
 #include "backend.h"
+#include "globals.h"
 #include "options.h"
 
 /**
index d52baa24ab28c98a200bb165874acf66a8a76223..1c788300e0329eb6cd06c3314c2ce33d1331b9af 100644 (file)
@@ -35,6 +35,7 @@
 #include <tcutil.h>
 #include "mutt/mutt.h"
 #include "backend.h"
+#include "globals.h"
 #include "options.h"
 
 /**
index d93a8483ca09696f3753a67d071402efae723c4e..c70af2a438b5a402e32b1375f5b819018d9463cc 100644 (file)
--- a/hdrline.c
+++ b/hdrline.c
 #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 (file)
index 0000000..f8cb07b
--- /dev/null
+++ b/hdrline.h
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * String processing routines to generate the mail index
+ *
+ * @authors
+ * Copyright (C) 2018 Richard Russon <rich@flatcap.org>
+ *
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+
+#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 */
index 06e6f02ac4bcf4e08a5ef6b46b96c6dde2f0caaf..61be6daed392775b20b800aa1950f7da63125aaa 100644 (file)
--- a/history.c
+++ b/history.c
 #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
 
 /**
index 1ee00440007e876ae30fc57d776cb8398c991622..6928d42fc2813749abefd1b24bee196c68a73408 100644 (file)
--- a/history.h
+++ b/history.h
@@ -26,6 +26,7 @@
 #include <stdbool.h>
 #include <stdio.h>
 
+/* 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 a6cb0035ffdaa86d246635eff9fe1eb55b1acd84..e79017054b33f5ed4cf2ba8e5af799d596a465be 100644 (file)
--- a/hook.c
+++ b/hook.c
 
 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 163d48ff525498a9b021eda1f3fe04ca44de475f..cd4f870faa956f81ea9a7200e942b4bc6f42af6d 100644 (file)
--- 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);
index e690322973a58e67be0b204f4e9dc156c1c719dc..7e5baab0e33045f81087239ee43afe9566c55ee7 100644 (file)
@@ -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
  */
index ec0abd329045f85f808b464b27dae36091d5bf37..fd8ab1a769e407df03777ec3001956b926a62b19 100644 (file)
@@ -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
 
 /**
index 206a06819862b4cdb3c20334294f9511cf2bb5c2..791968fa16eeb82535002f0feb9ed72a49c260f8 100644 (file)
@@ -66,6 +66,9 @@
 #include <libintl.h>
 #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
index fe58aa8b2b6a321e395fa86c7d5a35aedd2af4d0..7744de12ae73a0249e79c920ba6ff054e4a1d8dc 100644 (file)
@@ -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
  */
index d68856dbd64f54e2420784a59ce948a4a037c40b..a6748bf87b668e475eba59ae654b5c4caa0f58fa 100644 (file)
@@ -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
index 0bd6d7bba342816aed3b0fbdf47f6811c66df7c5..0546e63643e5885aaf3f89456f17b53dc661727a 100644 (file)
 #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 105af56f3986f2549b0955c3e541de3d680ec466..b8b1687a8f646522801f66c003d492356c1eecca 100644 (file)
--- a/init.h
+++ b/init.h
 #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 },
   /*
index 3447933426b5087365b39dbefb7fc83b1dd0c46b..dbeb2c2437d8deb70d739fbd9df8029dd1a138a1 100644 (file)
@@ -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;
 
index 7409f4a469a9c01a8037e1d008e9e744dcb9b3eb..c36629f9715b05031a2a97a0a7eb9bb24d55591f 100644 (file)
 #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 bc588be90d6bfa32bcb6a5a9b68005f43388e4e8..489414db463a821004e38529555ac02a79faf2d4 100644 (file)
--- 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 (file)
index 0000000..bef7ce3
--- /dev/null
+++ b/main.h
@@ -0,0 +1,29 @@
+/**
+ * @file
+ * Command line processing
+ *
+ * @authors
+ * Copyright (C) 2018 Richard Russon <rich@flatcap.org>
+ *
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+
+#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 448a611cd64dc6170f3cc7509c0946539730642d..8a19ef7670918f59f02af1f136ed49956b603227 100644 (file)
--- a/menu.c
+++ b/menu.c
 #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 (file)
index 0000000..622b5e5
--- /dev/null
+++ b/menu.h
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * GUI present the user with a selectable list
+ *
+ * @authors
+ * Copyright (C) 2018 Richard Russon <rich@flatcap.org>
+ *
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+
+#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 469288b4d0d945f6f6efad35f13be28851b5ed97..95bb33636a44d66a35cbfa93106f6116b893c6b9 100644 (file)
--- 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 */
index c1fb360adc61cac1b3fe2082c605aa125e9ac6b2..f39822ec3ece1811673cdcfdc0679a2c5b2b86c0 100644 (file)
@@ -50,6 +50,7 @@
 #include <idn/idna.h>
 #endif
 
+/* These Config Variables are only used in mutt/idna.c */
 #ifdef HAVE_LIBIDN
 bool IdnDecode;
 bool IdnEncode;
index c22b629a388cd29c287545aeaf60b3e476382aca..972a6bc8e16b8307f5df80f546ba87eb5e4501f3 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <stdbool.h>
 
+/* These Config Variables are only used in mutt/idna.c */
 extern bool IdnDecode;
 extern bool IdnEncode;
 
index 9c0ab82deb477255883ff51bc4d59030791c0391..a9858be68122bee6d8bcf396c54956cba9491809 100644 (file)
 #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
index 786d2f9c421178bf38d14f9ddf26022426d0f74e..7a597eabff84d2d91c9c77ff776fbf30c5b2239a 100644 (file)
 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
  */
index 756dc729338777797b9ed87f6fbbbdf9efebaca9..6106dd1a2ffd2c42c7a911d1b5dcc97efcb28b2b 100644 (file)
 #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)));
index a032a9ae77a91ccf01155b696238d995386422ae..e3b52fa10c80d457d9f5740de99f314cc12867d1 100644 (file)
@@ -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)
index d9f2b4e1d94370f74d675b779c532c92711ecb8f..7533f4899fe86cb15cbceab85acb6dd52d191f7e 100644 (file)
--- 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",
index 98fbfd68dc8090b9db8cea97bd30b8d3ecf1831e..1f459f029ecf3f1a6d95d5066d9cec02ab711584 100644 (file)
--- 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 594c9ad6cd14756759f9ded85c48ec56a8f9c17d..92e55177b3c4be7829627c350ae8e002ee92e394 100644 (file)
--- a/mx.c
+++ b/mx.c
 #include <libintl.h>
 #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 1d0ff7559b54852da7170f73209a5ce827462553..7640004634f66440f7d1a1ed16d5ad69bd98a2ba 100644 (file)
--- 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
  *
index 701cb00f8b23899df4abc59686077ba4b9bc59f5..3c4b49407472df59c1a864289bcf89ed3faf619a 100644 (file)
 #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
  *
index 195b1fa6addf7b2850cedf3abcaf32563d65c445..d75927d456cacd2dd45835c5efb1f3658024e9ba 100644 (file)
@@ -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
index d00d3c687385ed36d1a478a3fb1c92c59dc1033d..f15104b9389abecc512137c46f7b92daa9fdfafb 100644 (file)
@@ -43,6 +43,7 @@
 #include <unistd.h>
 #include "mutt/mutt.h"
 #include "filter.h"
+#include "globals.h"
 #include "ncrypt.h"
 #include "options.h"
 #include "pgpinvoke.h"
index b77d93c807560c7f719b3faedd4910e167d595c2..d5c4c527b2dae9e7cde14efedf0d87d7724d0198 100644 (file)
@@ -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. */
 
index 60a1198017d8763fa21b749defb22991073bd9d8..00b8f64bde1250b96b26c3b31cbca3418fc82990 100644 (file)
 #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? */
 
index 4e022bb533853b4c3c4b4674ecd07205d2ec9fd4..056c31ff7a6bb4b7cd8f998de0b2280b5e5cc058 100644 (file)
 #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
  *
index 6ee641d33091e7bca3c86de25ae493febbd3f78a..9af789b29772e76b27d781d7e3f3914f31665a4c 100644 (file)
 #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
  */
index 26e082e5eb6249b3bef7d28a9090cb08d3a997bb..7c46404c2158b4d21cebc41d4d77879695f931f3 100644 (file)
 #include "hcache/hcache.h"
 #endif
 
+/* These Config Variables are only used in nntp/newsrc.c */
+char *NewsCacheDir;
+char *Newsrc;
+
 struct BodyCache;
 
 /**
index b71a21190c6aae831f057b1776c38957f8b46fd9..b603293a3f5710cfc16a49dba5f0c746dbc66547 100644 (file)
 #include <sasl/saslutil.h>
 #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;
 
 /**
index 5262ac955db8c2fb577478039e653136d62216a1..b863206e059c4d11183aca874fb43dd58f111adf 100644 (file)
@@ -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"
index 66b29710ca72954700cec4615bf58522c120401c..77efaad8a2f1e0ce7c51c34028da9d359ba682e4 100644 (file)
 #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
index 424fc35e61ac19ac979eb103ecc4bebf75a7559b..92f92ff90c2e02887c1263335ffa179625147c26 100644 (file)
 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);
index 580e1ed39207d2c0060ce4657c96d47bd7d1c1d2..9c9ad124667f2e44ceb8d34e12ecdc5ac9e481dd 100644 (file)
--- 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 0483181b03601833c8eee2a542a47027073f9be6..bdd61871b89557587863df43a221fb5a66dd4dd6 100644 (file)
--- a/pager.c
+++ b/pager.c
 #include <libintl.h>
 #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 c78d5a7b559d29cca12c54cadc411f90a38778f5..aee0f589bce829836bb227259eb4594d3a3ef686 100644 (file)
--- a/pager.h
+++ b/pager.h
 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 3e371d326256c849c24f7a8789f47bf6b00f2138..e5b63d321526a2e730e24fb40c06468e5eed2d97 100644 (file)
--- 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 1895bfeb7f5d2b3b715446866b971bfa30597fb6..5fd0f77badb98b6d1f44af7159d491c7943cf336 100644 (file)
--- 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);
index 494cc4189a52f35e5e677cbff3d9fb1cfbd65109..8b6fba6ae7c4779ef10de71fc9523125175c22b5 100644 (file)
--- 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]?"
index bbc1ea78afee9889571466dbda00a8ac4904b090..68b02c2172c7b99e4b608a2813f2f00c648d15c4 100644 (file)
--- 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
  */
index ed7a2e3f3f9bc210ad7f52b6f74062c0df60c54c..ee6f053505f7e2cd7259d6f10b8301e746d203e4 100644 (file)
--- a/pop/pop.c
+++ b/pop/pop.c
 #include <libintl.h>
 #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 */
index 09be41a8dfaa1f35d37f1c8f8fcd9132f9e8fef1..ea2743102d9431903e38434bbf3e1a0d5eaaace4 100644 (file)
--- a/pop/pop.h
+++ b/pop/pop.h
 
 #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 */
index 13e4175891f779ff4df0cb6e20e8ba27204bc135..4c503835a33e0fe670ee02eee2fccc121e103d08 100644 (file)
 #include <sasl/saslutil.h>
 #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
index 60cda4707588ae8fe6984f84401767692d905dd5..dd0dd767efb3c8073676400db32265e5f0d414ed 100644 (file)
@@ -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
index 44c59a51972a843cec6c5e3a9514e54590e1f11f..357b8135fe1ec1ae8df816f585a533bc313fff75 100644 (file)
@@ -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
index 9865365ee1ec53feb6d309b8c994d2c4c5275eda..9021a38721e817cdae11d5ed693b54a4693a08e0 100644 (file)
@@ -26,6 +26,9 @@
 #include <stdio.h>
 #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 4c0775cf3402a7acbbc2e190f0c6aa87453709b6..4239427fc55d39549c644d4fcdf08f2c9b936c9e 100644 (file)
--- a/query.c
+++ b/query.c
 #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 (file)
index 0000000..42381f3
--- /dev/null
+++ b/query.h
@@ -0,0 +1,30 @@
+/**
+ * @file
+ * Routines for querying and external address book
+ *
+ * @authors
+ * Copyright (C) 2018 Richard Russon <rich@flatcap.org>
+ *
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+
+#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 */
index f4f61c105e886c36a9f0b03fa975fb14962f6f92..cb9e6476fbaadcf4202dd9e9d38fcd29a2e25e80 100644 (file)
 #include <libintl.h>
 #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.");
index 5093e658e6ee3c95c00d4ad13d546162f5b6dbe2..334d289a2b89cefabc83397a8fa7cb3838a2992b 100644 (file)
 
 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);
 
index e53de54092e487f42480d4829f92f5e3be22cf1a..7a3204f6e642c39f0d7634b9b3df2e1073564143 100644 (file)
--- a/recvcmd.c
+++ b/recvcmd.c
@@ -43,6 +43,9 @@
 #include <libintl.h>
 #endif
 
+/* These Config Variables are only used in recvcmd.c */
+unsigned char MimeForwardRest;
+
 /**
  * check_msg - Are we working with an RFC822 message
  *
index bb846222cc1e93f55d9eccea38131c6f963963a2..f3d714f1c37a9935ae31d88c9949eb27ae921e51 100644 (file)
--- 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);
index a1d94ae758e9b317f30223df4bfa311812dba7ca..981f56fa8c5f3cbaa397602d8bee58c4a6eb585c 100644 (file)
 #include "protos.h"
 #include "recvattach.h"
 
+/* These Config Variables are only used in remailer.c */
+char *MixEntryFormat;
+char *Mixmaster;
+
 /**
  * struct Coord - Screen coordinates
  */
index 3a69ccf096f4ca64163636423a8dae000ba21459..fde04af3ffc138da876069382d83e45b6a32f393 100644 (file)
 #ifndef _MUTT_REMAILER_H
 #define _MUTT_REMAILER_H
 
+#ifdef MIXMASTER
+
 #include <stddef.h>
 
 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)
index 9c526353dc33f352b45ea4b022049b895f3b73f7..7202682a0fc95d3a8a86c37247f90c3b4e70bf93 100644 (file)
--- 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
index 5394646550ce9102e94839cbe731d7c411bb09ac..d6f842d90052aca3909a0db06f19dfb174427943 100644 (file)
--- 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
  */
index 4ed3f8889e0e84fe5222065c162ec9448f8924c5..17a55025120e088ae16626d3478501a77987963f 100644 (file)
--- 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
  */
index ad766a2779fdbb7da41cd181657849e44534cabf..0a492722afa3a35f0965396a9c17c3e618b4ea80 100644 (file)
--- 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);
 
index 365ed4a54022312b540e5a00f46e30580099aaa8..e69d89ef3deb82e7760baf9872e6a4a3805897af 100644 (file)
--- a/rfc3676.c
+++ b/rfc3676.c
 #include "protos.h"
 #include "state.h"
 
+/* These Config Variables are only used in rfc3676.c */
+bool  ReflowSpaceQuotes;
+short ReflowWrap;
+
 #define FLOWED_MAX 72
 
 /**
index dde7986bdfd51e21f9f324df971efddd1b53f584..4ef411bd2d3801818e332d5d5a79cd51d2883fd8 100644 (file)
--- 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 08857575472ebea0e056851a800d286aafdec5e7..d23bb7fd13723d15d36598e6e979372e27c2e91a 100644 (file)
--- a/score.c
+++ b/score.c
 #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 (file)
index 0000000..c60a105
--- /dev/null
+++ b/score.h
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Routines for adding user scores to emails
+ *
+ * @authors
+ * Copyright (C) 2018 Richard Russon <rich@flatcap.org>
+ *
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+
+#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 f18c0f614a1a8330626e5c3e3df3c56ee1efa406..64346b870eadab37a6406bef6dc2ecb2587f7208 100644 (file)
--- a/send.c
+++ b/send.c
 #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 9c02661a01131e9c3e9b5e20eede4bf2c3737b53..31ba03320da4fdc1e92b46f8d87f27e8b5cf12fc 100644 (file)
--- 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);
index 6dfad3bc6785b47532d24a8065d3db07d3316331..c7b4e27c19a0d2e8aeceee4808c57c15f396f4f3 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
 #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
index fe2243bfb9649daf09773109e36da5b923fb141d..afd046eb87bc22d89c0b90c5feb127b354a04abe 100644 (file)
--- 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);
index eb5f21f4f702013eec29d0d9069637e5c0828e20..389a39c5c65a30af51c11d56a4ddf6acbf7b4d11 100644 (file)
--- a/sidebar.c
+++ b/sidebar.c
 #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 */
 
index 87bbfe8292c37cb915f9f5a459b422dace34ebf1..ae1e4c2e5f93d7432704080c839aa6f0db32561a 100644 (file)
--- a/sidebar.h
+++ b/sidebar.h
 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 fc72ecaedc291fa539d0c495059df0867e92ec97..436c2967613778f47a55549ae312cf5685d54b8e 100644 (file)
--- a/smtp.c
+++ b/smtp.c
@@ -47,6 +47,9 @@
 #include <sasl/saslutil.h>
 #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 (file)
index 0000000..e6b818b
--- /dev/null
+++ b/smtp.h
@@ -0,0 +1,29 @@
+/**
+ * @file
+ * Send email to an SMTP server
+ *
+ * @authors
+ * Copyright (C) 2018 Richard Russon <rich@flatcap.org>
+ *
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+
+#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 011d3b241603edbd257ceaeb747174563fc01e85..a946ea956755d7c5d36451743166d82f545e0262 100644 (file)
--- 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 47059498cfea3c910a1493bafd3419fcac46560e..7c9facba0266173ec69ffb75c4ebca22499615df 100644 (file)
--- 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;
index eb73f2f63fd0c5c36eae0e794d7ce102bba1aff6..72a41851594933d8e387f996fb2c665fa712bc23 100644 (file)
--- 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 (file)
index 0000000..4dbd13a
--- /dev/null
+++ b/status.h
@@ -0,0 +1,29 @@
+/**
+ * @file
+ * GUI display a user-configurable status line
+ *
+ * @authors
+ * Copyright (C) 2018 Richard Russon <rich@flatcap.org>
+ *
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+
+#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 */