Skip to content

Commit

Permalink
reduce scope of variables
Browse files Browse the repository at this point in the history
  • Loading branch information
flatcap committed Jan 24, 2018
1 parent b2c973f commit c7e65e9
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
3 changes: 0 additions & 3 deletions globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
7 changes: 7 additions & 0 deletions history.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions history.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@

#include <stdbool.h>

extern short History;
extern char *HistoryFile;
extern bool HistoryRemoveDups;
extern short SaveHistory;

/**
* enum HistoryClass - Type to differentiate different histories
*/
Expand All @@ -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);
Expand Down
1 change: 1 addition & 0 deletions init.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion options.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c7e65e9

Please sign in to comment.