From de47b58dc1b3d346ce7285d2f64bc8a98bed0183 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Wed, 27 Feb 2019 19:49:02 +0100 Subject: [PATCH] tweaks: move declaration of variable that does not need to be global More importantly: searching in src/history.c will now not only find the uses of 'position_history' but also its declaration. --- src/global.c | 3 --- src/history.c | 2 ++ src/proto.h | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/global.c b/src/global.c index 2827cf53..5d057401 100644 --- a/src/global.c +++ b/src/global.c @@ -216,9 +216,6 @@ filestruct *replacebot = NULL; filestruct *executetop = NULL; filestruct *executebot = NULL; - -poshiststruct *position_history = NULL; - /* The list of filenames with their last cursor positions. */ #endif regex_t search_regexp; diff --git a/src/history.c b/src/history.c index 783d4364..915f0df7 100644 --- a/src/history.c +++ b/src/history.c @@ -40,6 +40,8 @@ static struct stat stat_of_positions_file; /* The last-obtained stat information of the positions file. */ static char *poshistname = NULL; /* The name of the positions-history file. */ +static poshiststruct *position_history = NULL; + /* The list of filenames with their last cursor positions. */ /* Initialize the lists of historical search and replace strings * and the list of historical executed commands. */ diff --git a/src/proto.h b/src/proto.h index 9f16bed7..b3a79c5d 100644 --- a/src/proto.h +++ b/src/proto.h @@ -154,7 +154,6 @@ extern filestruct *replacetop; extern filestruct *replacebot; extern filestruct *executetop; extern filestruct *executebot; -extern poshiststruct *position_history; #endif extern regex_t search_regexp;