From: Richard Russon Date: Tue, 23 Jan 2018 17:57:31 +0000 (+0000) Subject: reduce scope of variables X-Git-Tag: neomutt-20180223~29^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c7e65e9d5b819680523c9e94a24f22bc4d87f831;p=neomutt reduce scope of variables --- diff --git a/globals.h b/globals.h index e33582716..f69ebc426 100644 --- 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; diff --git a/history.c b/history.c index 5d3634e36..ee6261900 100644 --- a/history.c +++ b/history.c @@ -32,6 +32,13 @@ #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 diff --git a/history.h b/history.h index 3c0a66105..4d33925a0 100644 --- a/history.h +++ b/history.h @@ -25,6 +25,11 @@ #include +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 b72245323..b693f8023 100644 --- 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" diff --git a/options.h b/options.h index e3c21de52..77e371fcb 100644 --- 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