patch 8.1.1891: functions used in one file are global
Problem: Functions used in one file are global.
Solution: Add "static". (Yegappan Lakshmanan, closes #4840)
diff --git a/src/buffer.c b/src/buffer.c
index c279c26..78801a8 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -27,6 +27,8 @@
#include "vim.h"
+static void enter_buffer(buf_T *buf);
+static void buflist_getfpos(void);
static char_u *buflist_match(regmatch_T *rmp, buf_T *buf, int ignore_case);
static char_u *fname_match(regmatch_T *rmp, char_u *name, int ignore_case);
#ifdef UNIX
@@ -43,6 +45,10 @@
static void free_buffer(buf_T *);
static void free_buffer_stuff(buf_T *buf, int free_options);
static void clear_wininfo(buf_T *buf);
+#if defined(FEAT_JOB_CHANNEL) \
+ || defined(FEAT_PYTHON) || defined(FEAT_PYTHON3)
+static int find_win_for_buf(buf_T *buf, win_T **wp, tabpage_T **tp);
+#endif
#ifdef UNIX
# define dev_T dev_t
@@ -1705,7 +1711,7 @@
* Old curbuf must have been abandoned already! This also means "curbuf" may
* be pointing to freed memory.
*/
- void
+ static void
enter_buffer(buf_T *buf)
{
/* Copy buffer and window local option values. Not for a help buffer. */
@@ -2355,7 +2361,7 @@
/*
* go to the last know line number for the current buffer
*/
- void
+ static void
buflist_getfpos(void)
{
pos_T *fpos;
@@ -5465,7 +5471,7 @@
* If found OK is returned and "wp" and "tp" are set to the window and tabpage.
* If not found FAIL is returned.
*/
- int
+ static int
find_win_for_buf(
buf_T *buf,
win_T **wp,