summaryrefslogtreecommitdiff
path: root/src/window.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-08-20 20:13:45 +0200
committerBram Moolenaar <Bram@vim.org>2019-08-20 20:13:45 +0200
commit5843f5f37b0632e2d706abc9014bfd7d98f7b02e (patch)
tree2f1af5fd16214dfdf8edc8717e06a8b0aab81c1a /src/window.c
parent9a4a8c4d5993c6371486c895a515c2ad351e9aaa (diff)
downloadvim-git-5843f5f37b0632e2d706abc9014bfd7d98f7b02e.tar.gz
patch 8.1.1891: functions used in one file are globalv8.1.1891
Problem: Functions used in one file are global. Solution: Add "static". (Yegappan Lakshmanan, closes #4840)
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/src/window.c b/src/window.c
index f4154e7e1..fabd196ef 100644
--- a/src/window.c
+++ b/src/window.c
@@ -39,8 +39,11 @@ static int leave_tabpage(buf_T *new_curbuf, int trigger_leave_autocmds);
static void enter_tabpage(tabpage_T *tp, buf_T *old_curbuf, int trigger_enter_autocmds, int trigger_leave_autocmds);
static void frame_fix_height(win_T *wp);
static int frame_minheight(frame_T *topfrp, win_T *next_curwin);
+static int may_open_tabpage(void);
static void win_enter_ext(win_T *wp, int undo_sync, int no_curwin, int trigger_new_autocmds, int trigger_enter_autocmds, int trigger_leave_autocmds);
static void win_free(win_T *wp, tabpage_T *tp);
+static int win_unlisted(win_T *wp);
+static void win_append(win_T *after, win_T *wp);
static void frame_append(frame_T *after, frame_T *frp);
static void frame_insert(frame_T *before, frame_T *frp);
static void frame_remove(frame_T *frp);
@@ -3541,17 +3544,7 @@ close_others(
emsg(_("E445: Other window contains changes"));
}
-/*
- * Init the current window "curwin".
- * Called when a new file is being edited.
- */
- void
-curwin_init(void)
-{
- win_init_empty(curwin);
-}
-
- void
+ static void
win_init_empty(win_T *wp)
{
redraw_win_later(wp, NOT_VALID);
@@ -3574,6 +3567,16 @@ win_init_empty(win_T *wp)
}
/*
+ * Init the current window "curwin".
+ * Called when a new file is being edited.
+ */
+ void
+curwin_init(void)
+{
+ win_init_empty(curwin);
+}
+
+/*
* Allocate the first window and put an empty buffer in it.
* Called from main().
* Return FAIL when something goes wrong (out of memory).
@@ -3861,7 +3864,7 @@ win_new_tabpage(int after)
* like with ":split".
* Returns OK if a new tab page was created, FAIL otherwise.
*/
- int
+ static int
may_open_tabpage(void)
{
int n = (cmdmod.tab == 0) ? postponed_split_tab : cmdmod.tab;
@@ -4952,7 +4955,7 @@ win_free(
* Return TRUE if "wp" is not in the list of windows: the autocmd window or a
* popup window.
*/
- int
+ static int
win_unlisted(win_T *wp)
{
return wp == aucmd_win || WIN_IS_POPUP(wp);
@@ -4982,7 +4985,7 @@ win_free_popup(win_T *win)
/*
* Append window "wp" in the window list after window "after".
*/
- void
+ static void
win_append(win_T *after, win_T *wp)
{
win_T *before;