]> granicus.if.org Git - neomutt/commitdiff
reduce scope of variables
authorRichard Russon <rich@flatcap.org>
Tue, 23 Jan 2018 17:57:31 +0000 (17:57 +0000)
committerRichard Russon <rich@flatcap.org>
Wed, 24 Jan 2018 23:02:07 +0000 (23:02 +0000)
globals.h
history.c
history.h
init.h
options.h

index e33582716c817ca16d1300fff5a93cec43e83497..f69ebc426016afaae5027564236f24de7cf7f923 100644 (file)
--- a/globals.h
+++ b/globals.h
@@ -127,7 +127,6 @@ WHERE char *ForwardFormat;
 WHERE char *Hostname;
 WHERE struct MbTable *FromChars;
 WHERE char *IndexFormat;
-WHERE char *HistoryFile;
 
 #ifdef USE_IMAP
 WHERE char *ImapAuthenticators;
@@ -238,13 +237,11 @@ WHERE short NntpContext;
 WHERE short DebugLevel;
 WHERE char *DebugFile;
 
-WHERE short History;
 WHERE short MenuContext;
 WHERE short PagerContext;
 WHERE short PagerIndexLines;
 WHERE short ReadInc;
 WHERE short ReflowWrap;
-WHERE short SaveHistory;
 WHERE short SendmailWait;
 WHERE short SleepTime;
 WHERE short SkipQuotedOffset;
index 5d3634e36b80adde8c68ffcf98eaa0b2f3a11474..ee62619003285b8a6bdd026d8a095795da0ce05d 100644 (file)
--- a/history.c
+++ b/history.c
 #include "options.h"
 #include "protos.h"
 
+short History;
+char *HistoryFile;
+bool  HistoryRemoveDups;
+short SaveHistory;
+
+#define HC_FIRST HC_CMD
+
 /* This history ring grows from 0..History, with last marking the
  * where new entries go:
  *         0        the oldest entry in the ring
index 3c0a661059639875dae34a51238ff2697da5d646..4d33925a0643f946a923e5e15688dbc252df4d1c 100644 (file)
--- a/history.h
+++ b/history.h
 
 #include <stdbool.h>
 
+extern short History;
+extern char *HistoryFile;
+extern bool  HistoryRemoveDups;
+extern short SaveHistory;
+
 /**
  * enum HistoryClass - Type to differentiate different histories
  */
@@ -41,8 +46,6 @@ enum HistoryClass
   HC_LAST
 };
 
-#define HC_FIRST HC_CMD
-
 void mutt_init_history(void);
 void mutt_read_histfile(void);
 void mutt_history_add(enum HistoryClass hclass, const char *s, bool save);
diff --git a/init.h b/init.h
index b722453234fc768056710dcbe429439999695ebc..b693f802327e5b4c071e36061ec332db9fbefebb 100644 (file)
--- a/init.h
+++ b/init.h
@@ -33,6 +33,7 @@
 #include "buffy.h"
 #include "globals.h"
 #include "group.h"
+#include "history.h"
 #include "mutt_commands.h"
 #include "mutt_options.h"
 #include "mutt/mutt.h"
index e3c21de525dcb005b98403b211844ac01cb12fbe..77e371fcb5cf6c01c38c719f57b33d55c1e2dc29 100644 (file)
--- a/options.h
+++ b/options.h
@@ -115,7 +115,6 @@ WHERE bool HideMissing;
 WHERE bool HideThreadSubject;
 WHERE bool HideTopLimited;
 WHERE bool HideTopMissing;
-WHERE bool HistoryRemoveDups;
 WHERE bool HonorDisposition;
 WHERE bool IgnoreListReplyTo;
 #ifdef USE_IMAP