]> granicus.if.org Git - vim/commitdiff
patch 8.1.1891: functions used in one file are global v8.1.1891
authorBram Moolenaar <Bram@vim.org>
Tue, 20 Aug 2019 18:13:45 +0000 (20:13 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 20 Aug 2019 18:13:45 +0000 (20:13 +0200)
Problem:    Functions used in one file are global.
Solution:   Add "static". (Yegappan Lakshmanan, closes #4840)

67 files changed:
src/autocmd.c
src/buffer.c
src/change.c
src/channel.c
src/charset.c
src/dict.c
src/digraph.c
src/eval.c
src/ex_cmds.c
src/ex_eval.c
src/fileio.c
src/findfile.c
src/getchar.c
src/gui.c
src/indent.c
src/json.c
src/list.c
src/mark.c
src/menu.c
src/message.c
src/misc1.c
src/misc2.c
src/ops.c
src/option.c
src/popupwin.c
src/profiler.c
src/proto/autocmd.pro
src/proto/buffer.pro
src/proto/change.pro
src/proto/channel.pro
src/proto/charset.pro
src/proto/dict.pro
src/proto/eval.pro
src/proto/ex_cmds.pro
src/proto/ex_eval.pro
src/proto/fileio.pro
src/proto/findfile.pro
src/proto/getchar.pro
src/proto/gui.pro
src/proto/indent.pro
src/proto/json.pro
src/proto/list.pro
src/proto/mark.pro
src/proto/menu.pro
src/proto/message.pro
src/proto/misc1.pro
src/proto/misc2.pro
src/proto/ops.pro
src/proto/option.pro
src/proto/popupwin.pro
src/proto/profiler.pro
src/proto/quickfix.pro
src/proto/spell.pro
src/proto/term.pro
src/proto/textprop.pro
src/proto/ui.pro
src/proto/undo.pro
src/proto/window.pro
src/quickfix.c
src/regexp.c
src/spell.c
src/term.c
src/textprop.c
src/ui.c
src/undo.c
src/version.c
src/window.c

index 17b1748df31026caa5a2f6980af80c93a702cb87..640032b608b4e365b4b6bcafbfb65967421d822c 100644 (file)
@@ -1659,7 +1659,7 @@ apply_autocmds_retval(
 /*
  * Return TRUE when there is a CursorHold autocommand defined.
  */
-    int
+    static int
 has_cursorhold(void)
 {
     return (first_autopat[(int)(get_real_state() == NORMAL_BUSY
index c279c263c1f8364c9723d2e9b63957b1c7e28f83..78801a8121d4dfedb0deb5792d1da20ca666fee5 100644 (file)
@@ -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 int   append_arg_number(win_T *wp, char_u *buf, int buflen, int add_file);
 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 @@ set_curbuf(buf_T *buf, int action)
  * 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 @@ buflist_getfile(
 /*
  * go to the last know line number for the current buffer
  */
-    void
+    static void
 buflist_getfpos(void)
 {
     pos_T      *fpos;
@@ -5465,7 +5471,7 @@ restore_win_for_buf(
  * 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,
index f83587d8337bdfdc5230afac9f24d9c735cf29fe..23c95871eec488a7e99df6bc6a0806fc634eaad9 100644 (file)
@@ -666,7 +666,7 @@ changed_bytes(linenr_T lnum, colnr_T col)
  * Like changed_bytes() but also adjust text properties for "added" bytes.
  * When "added" is negative text was deleted.
  */
-    void
+    static void
 inserted_bytes(linenr_T lnum, colnr_T col, int added UNUSED)
 {
 #ifdef FEAT_TEXT_PROP
index 8b0abdc3020f7c1d5ab0cd91b0bb862778df3e26..a023c9fd7706cdb3bb0e7cc1938aa5bb1c5fce7c 100644 (file)
 #endif
 
 static void channel_read(channel_T *channel, ch_part_T part, char *func);
+# if defined(MSWIN) || defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK)
+static channel_T *channel_fd2channel(sock_T fd, ch_part_T *partp);
+# endif
+static ch_mode_T channel_get_mode(channel_T *channel, ch_part_T part);
+static int channel_get_timeout(channel_T *channel, ch_part_T part);
+static ch_part_T channel_part_send(channel_T *channel);
+static ch_part_T channel_part_read(channel_T *channel);
+static void free_job_options(jobopt_T *opt);
 
 /* Whether a redraw is needed for appending a line to a buffer. */
 static int channel_need_redraw = FALSE;
@@ -1175,7 +1183,7 @@ channel_set_options(channel_T *channel, jobopt_T *opt)
 /*
  * Implements ch_open().
  */
-    channel_T *
+    static channel_T *
 channel_open_func(typval_T *argvars)
 {
     char_u     *address;
@@ -1348,7 +1356,7 @@ channel_set_job(channel_T *channel, job_T *job, jobopt_T *options)
 /*
  * Set the callback for "channel"/"part" for the response with "id".
  */
-    void
+    static void
 channel_set_req_callback(
        channel_T   *channel,
        ch_part_T   part,
@@ -2848,7 +2856,7 @@ channel_is_open(channel_T *channel)
 /*
  * Return TRUE if "channel" has JSON or other typeahead.
  */
-    int
+    static int
 channel_has_readahead(channel_T *channel, ch_part_T part)
 {
     ch_mode_T  ch_mode = channel->ch_part[part].ch_mode;
@@ -2959,7 +2967,7 @@ channel_part_info(channel_T *channel, dict_T *dict, char *name, ch_part_T part)
     dict_add_number(dict, namebuf, chanpart->ch_timeout);
 }
 
-    void
+    static void
 channel_info(channel_T *channel, dict_T *dict)
 {
     dict_add_number(dict, "id", channel->ch_id);
@@ -3067,7 +3075,7 @@ channel_close(channel_T *channel, int invoke_close_cb)
 /*
  * Close the "in" part channel "channel".
  */
-    void
+    static void
 channel_close_in(channel_T *channel)
 {
     ch_close_part(channel, PART_IN);
@@ -3676,7 +3684,7 @@ get_channel_arg(typval_T *tv, int check_open, int reading, ch_part_T part)
 /*
  * Common for ch_read() and ch_readraw().
  */
-    void
+    static void
 common_channel_read(typval_T *argvars, typval_T *rettv, int raw, int blob)
 {
     channel_T  *channel;
@@ -3762,7 +3770,7 @@ theend:
  * Lookup the channel from the socket.  Set "partp" to the fd index.
  * Returns NULL when the socket isn't found.
  */
-    channel_T *
+    static channel_T *
 channel_fd2channel(sock_T fd, ch_part_T *partp)
 {
     channel_T  *channel;
@@ -4092,7 +4100,7 @@ send_common(
 /*
  * common for "ch_evalexpr()" and "ch_sendexpr()"
  */
-    void
+    static void
 ch_expr_common(typval_T *argvars, typval_T *rettv, int eval)
 {
     char_u     *text;
@@ -4154,7 +4162,7 @@ ch_expr_common(typval_T *argvars, typval_T *rettv, int eval)
 /*
  * common for "ch_evalraw()" and "ch_sendraw()"
  */
-    void
+    static void
 ch_raw_common(typval_T *argvars, typval_T *rettv, int eval)
 {
     char_u     buf[NUMBUFLEN];
@@ -4540,7 +4548,7 @@ set_ref_in_channel(int copyID)
 /*
  * Return the "part" to write to for "channel".
  */
-    ch_part_T
+    static ch_part_T
 channel_part_send(channel_T *channel)
 {
     if (channel->CH_SOCK_FD == INVALID_FD)
@@ -4551,7 +4559,7 @@ channel_part_send(channel_T *channel)
 /*
  * Return the default "part" to read from for "channel".
  */
-    ch_part_T
+    static ch_part_T
 channel_part_read(channel_T *channel)
 {
     if (channel->CH_SOCK_FD == INVALID_FD)
@@ -4563,7 +4571,7 @@ channel_part_read(channel_T *channel)
  * Return the mode of "channel"/"part"
  * If "channel" is invalid returns MODE_JSON.
  */
-    ch_mode_T
+    static ch_mode_T
 channel_get_mode(channel_T *channel, ch_part_T part)
 {
     if (channel == NULL)
@@ -4574,7 +4582,7 @@ channel_get_mode(channel_T *channel, ch_part_T part)
 /*
  * Return the timeout of "channel"/"part"
  */
-    int
+    static int
 channel_get_timeout(channel_T *channel, ch_part_T part)
 {
     return channel->ch_part[part].ch_timeout;
@@ -4638,7 +4646,7 @@ clear_job_options(jobopt_T *opt)
 /*
  * Free any members of a jobopt_T.
  */
-    void
+    static void
 free_job_options(jobopt_T *opt)
 {
     if (opt->jo_callback.cb_partial != NULL)
@@ -5309,7 +5317,7 @@ job_free(job_T *job)
     }
 }
 
-job_T *jobs_to_free = NULL;
+static job_T *jobs_to_free = NULL;
 
 /*
  * Put "job" in a list to be freed later, when it's no longer referenced.
index 12e10e198998d1a01336160841c02d39410d228b..50ca617dc28cbe48598863e1cc35bf5ba7414aa2 100644 (file)
@@ -35,6 +35,8 @@ static char_u g_chartab[256];
 #define CT_ID_CHAR     0x20    /* flag: set for ID chars */
 #define CT_FNAME_CHAR  0x40    /* flag: set for file name chars */
 
+static int in_win_border(win_T *wp, colnr_T vcol);
+
 /*
  * Fill g_chartab[].  Also fills curbuf->b_chartab[] with flags for keyword
  * characters for current buffer.
@@ -1174,7 +1176,7 @@ win_nolbr_chartabsize(
  * Return TRUE if virtual column "vcol" is in the rightmost column of window
  * "wp".
  */
-    int
+    static int
 in_win_border(win_T *wp, colnr_T vcol)
 {
     int                width1;         /* width of first line (after line number) */
index 1097e58cdc32eff67d87cdc715d2785886106958..b2c3fbcdee48b04bc3e62572df4a4a20276a4007 100644 (file)
@@ -957,7 +957,7 @@ dict_equal(
  * "what" == 1: list of values
  * "what" == 2: list of items
  */
-    void
+    static void
 dict_list(typval_T *argvars, typval_T *rettv, int what)
 {
     list_T     *l2;
index 5b56095378c0be81e77c2150dff103a0b9c44b95..8a3bf12b3b5e1c1989b9d24fd1ba687b2978af4c 100644 (file)
@@ -2180,7 +2180,7 @@ listdigraphs(int use_headers)
                               wrong, in which case we messed up ScreenLines */
 }
 
-struct dg_header_entry {
+static struct dg_header_entry {
     int            dg_start;
     char    *dg_header;
 } header_table[] = {
index bff5664ef270b5e52a2c34e3e1f936513f23b198..3f2a33a98a2c74d83637b695467b7d5818a5fc2b 100644 (file)
@@ -248,7 +248,9 @@ static int get_lit_string_tv(char_u **arg, typval_T *rettv, int evaluate);
 static int free_unref_items(int copyID);
 static int get_env_tv(char_u **arg, typval_T *rettv, int evaluate);
 static int get_env_len(char_u **arg);
-static char_u * make_expanded_name(char_u *in_start, char_u *expr_start, char_u *expr_end, char_u *in_end);
+static int get_name_len(char_u **arg, char_u **alias, int evaluate, int verbose);
+static char_u *make_expanded_name(char_u *in_start, char_u *expr_start, char_u *expr_end, char_u *in_end);
+static int get_var_tv(char_u *name, int len, typval_T *rettv, dictitem_T **dip, int verbose, int no_autoload);
 static void check_vars(char_u *name, int len);
 static typval_T *alloc_string_tv(char_u *string);
 static void delete_var(hashtab_T *ht, hashitem_T *hi);
@@ -6924,7 +6926,7 @@ get_id_len(char_u **arg)
  * If the name contains 'magic' {}'s, expand them and return the
  * expanded name in an allocated string via 'alias' - caller must free.
  */
-    int
+    static int
 get_name_len(
     char_u     **arg,
     char_u     **alias,
@@ -7453,7 +7455,7 @@ set_cmdarg(exarg_T *eap, char_u *oldarg)
  * Get the value of internal variable "name".
  * Return OK or FAIL.  If OK is returned "rettv" must be cleared.
  */
-    int
+    static int
 get_var_tv(
     char_u     *name,
     int                len,            /* length of "name" */
@@ -8014,7 +8016,7 @@ tv_get_string_buf_chk(typval_T *varp, char_u *buf)
  * Turn a typeval into a string.  Similar to tv_get_string_buf() but uses
  * string() on Dict, List, etc.
  */
-    char_u *
+    static char_u *
 tv_stringify(typval_T *varp, char_u *buf)
 {
     if (varp->v_type == VAR_LIST
index 77e925d4b57819902261428ce5b52b80891c8e59..77d39434f56bc64d22efd8d15dbf6a976a6c68a7 100644 (file)
@@ -20,7 +20,7 @@
 
 static int linelen(int *has_tab);
 static void do_filter(linenr_T line1, linenr_T line2, exarg_T *eap, char_u *cmd, int do_in, int do_out);
-
+static int not_writing(void);
 static int check_readonly(int *forceit, buf_T *buf);
 static void delbuf_msg(char_u *name);
 static int help_compare(const void *s1, const void *s2);
@@ -2456,7 +2456,7 @@ do_wqall(exarg_T *eap)
  * Check the 'write' option.
  * Return TRUE and give a message when it's not set.
  */
-    int
+    static int
 not_writing(void)
 {
     if (p_write)
index 25a86845910dba5a9b823a85aab7969829202cfe..f1a8b97fcc021e7f6f036fba5266c3b76d7c3876 100644 (file)
@@ -839,7 +839,7 @@ report_make_pending(int pending, void *value)
  * If something pending in a finally clause is resumed at the ":endtry", report
  * it if required by the 'verbose' option or when debugging.
  */
-    void
+    static void
 report_resume_pending(int pending, void *value)
 {
     if (p_verbose >= 14 || debug_break_level > 0)
@@ -856,7 +856,7 @@ report_resume_pending(int pending, void *value)
  * If something pending in a finally clause is discarded, report it if required
  * by the 'verbose' option or when debugging.
  */
-    void
+    static void
 report_discard_pending(int pending, void *value)
 {
     if (p_verbose >= 14 || debug_break_level > 0)
index e07b908671de5cc2b85485a7371e51df043c0e6a..606359ade96452212ba196e87546608af3acd6dc 100644 (file)
@@ -111,7 +111,7 @@ static int get_mac_fio_flags(char_u *ptr);
 #endif
 static char *e_auchangedbuf = N_("E812: Autocommands changed buffer or buffer name");
 
-    void
+    static void
 filemess(
     buf_T      *buf,
     char_u     *name,
index 39e215255db16b44bb421c11efca4112bbdecd3a..75d4a541d0fccc050a761734994f372d956fe4ac 100644 (file)
@@ -188,6 +188,7 @@ static int ff_check_visited(ff_visited_T **, char_u *, char_u *);
 #else
 static int ff_check_visited(ff_visited_T **, char_u *);
 #endif
+static void vim_findfile_free_visited(void *search_ctx_arg);
 static void vim_findfile_free_visited_list(ff_visited_list_hdr_T **list_headp);
 static void ff_free_visited_list(ff_visited_T *vl);
 static ff_visited_list_hdr_T* ff_get_visited_list(char_u *, ff_visited_list_hdr_T **list_headp);
@@ -1186,7 +1187,7 @@ fail:
  * Free the list of lists of visited files and directories
  * Can handle it if the passed search_context is NULL;
  */
-    void
+    static void
 vim_findfile_free_visited(void *search_ctx_arg)
 {
     ff_search_ctx_T *search_ctx;
index b0e72f58f28490cc65e43b7a638d3e31d22eb80b..2fb8438e85378281d86177cb27492689812a451d 100644 (file)
@@ -91,7 +91,9 @@ static int    last_recorded_len = 0;  /* number of last recorded chars */
 static int     read_readbuf(buffheader_T *buf, int advance);
 static void    init_typebuf(void);
 static void    may_sync_undo(void);
+static void    free_typebuf(void);
 static void    closescript(void);
+static void    updatescript(int c);
 static int     vgetorpeek(int);
 static int     inchar(char_u *buf, int maxlen, long wait_time);
 
@@ -1263,7 +1265,7 @@ may_sync_undo(void)
  * Make "typebuf" empty and allocate new buffers.
  * Returns FAIL when out of memory.
  */
-    int
+    static int
 alloc_typebuf(void)
 {
     typebuf.tb_buf = alloc(TYPELEN_INIT);
@@ -1287,7 +1289,7 @@ alloc_typebuf(void)
 /*
  * Free the buffers of "typebuf".
  */
-    void
+    static void
 free_typebuf(void)
 {
     if (typebuf.tb_buf == typebuf_init)
@@ -1511,7 +1513,7 @@ before_blocking(void)
  * All the changed memfiles are synced if c == 0 or when the number of typed
  * characters reaches 'updatecount' and 'updatecount' is non-zero.
  */
-    void
+    static void
 updatescript(int c)
 {
     static int     count = 0;
index 1c56745a608d7ee52dad90602bfec267887e1ca8..bb35f51020e4b8d51a04319801ddeec3ce5ec27f 100644 (file)
--- a/src/gui.c
+++ b/src/gui.c
@@ -17,10 +17,13 @@ gui_T gui;
 static void set_guifontwide(char_u *font_name);
 #endif
 static void gui_check_pos(void);
+static void gui_reset_scroll_region(void);
 static void gui_outstr(char_u *, int);
 static int gui_screenchar(int off, int flags, guicolor_T fg, guicolor_T bg, int back);
+static int gui_outstr_nowrap(char_u *s, int len, int flags, guicolor_T fg, guicolor_T bg, int back);
 static void gui_delete_lines(int row, int count);
 static void gui_insert_lines(int row, int count);
+static int gui_xy2colrow(int x, int y, int *colp);
 #if defined(FEAT_GUI_TABLINE) || defined(PROTO)
 static int gui_has_tabline(void);
 #endif
@@ -1050,7 +1053,7 @@ gui_get_wide_font(void)
     return OK;
 }
 
-    void
+    static void
 gui_set_cursor(int row, int col)
 {
     gui.row = row;
@@ -1713,7 +1716,7 @@ gui_new_shellsize(void)
 /*
  * Make scroll region cover whole screen.
  */
-    void
+    static void
 gui_reset_scroll_region(void)
 {
     gui.scroll_region_top = 0;
@@ -1722,7 +1725,7 @@ gui_reset_scroll_region(void)
     gui.scroll_region_right = gui.num_cols - 1;
 }
 
-    void
+    static void
 gui_start_highlight(int mask)
 {
     if (mask > HL_ALL)             /* highlight code */
@@ -2227,7 +2230,7 @@ gui_screenstr(
  * Returns OK, unless "back" is non-zero and using the bold trick, then return
  * FAIL (the caller should start drawing "back" chars back).
  */
-    int
+    static int
 gui_outstr_nowrap(
     char_u     *s,
     int                len,
@@ -3380,7 +3383,7 @@ button_set:
  * Corrects for multi-byte character.
  * returns column in "*colp" and row as return value;
  */
-    int
+    static int
 gui_xy2colrow(int x, int y, int *colp)
 {
     int                col = check_col(X_2_COL(x));
index 8499b8134753f8fcc0957d88fa0b75843edb453e..2ae580a97e8daa95115bb5f896e1669e4596f162 100644 (file)
@@ -15,6 +15,9 @@
 
 #if defined(FEAT_CINDENT) || defined(FEAT_SMARTINDENT)
 
+static int cin_iscase(char_u *s, int strict);
+static int cin_isscopedecl(char_u *s);
+
 /*
  * Return TRUE if the string "line" starts with a word from 'cinwords'.
  */
@@ -408,7 +411,7 @@ cin_islabel_skip(char_u **s)
  * Recognize a label: "label:".
  * Note: curwin->w_cursor must be where we are looking for the label.
  */
-    int
+    static int
 cin_islabel(void)              // XXX
 {
     char_u     *s;
@@ -507,7 +510,7 @@ cin_isinit(void)
 /*
  * Recognize a switch label: "case .*:" or "default:".
  */
-     int
+     static int
 cin_iscase(
     char_u *s,
     int strict) // Allow relaxed check of case statement for JS
@@ -560,7 +563,7 @@ cin_isdefault(char_u *s)
 /*
  * Recognize a "public/private/protected" scope declaration label.
  */
-    int
+    static int
 cin_isscopedecl(char_u *s)
 {
     int                i;
index 2a5b5e4828d70ef01008ade36d4fcb83344f0218..cca6f7044fac5ba1b362721f8282904ba189f7ff 100644 (file)
@@ -1056,7 +1056,7 @@ theend:
  * "options" can be JSON_JS or zero;
  * Return FAIL if not the whole message was consumed.
  */
-    int
+    static int
 json_decode_all(js_read_T *reader, typval_T *res, int options)
 {
     int ret;
index fc348672b4458848a7b87ed9f58ebd9446a93cda..a0c710df66d959d4e92910cec3894f0aa10c2543 100644 (file)
@@ -53,7 +53,7 @@ list_rem_watch(list_T *l, listwatch_T *lwrem)
  * Just before removing an item from a list: advance watchers to the next
  * item.
  */
-    void
+    static void
 list_fix_watch(list_T *l, listitem_T *item)
 {
     listwatch_T        *lw;
index f55365f1fb4ec42059810d82a6cce0dca529ce85..8a18040c7595ad78ad33b4b266881cd5234f33ab 100644 (file)
@@ -26,6 +26,7 @@
  */
 static xfmark_T namedfm[NMARKS + EXTRA_MARKS];         /* marks with file nr */
 
+static void fname2fnum(xfmark_T *fm);
 static void fmarks_check_one(xfmark_T *fm, char_u *name, buf_T *buf);
 static char_u *mark_line(pos_T *mp, int lead_len);
 static void show_one_mark(int, char_u *, pos_T *, char_u *, int current);
@@ -509,7 +510,7 @@ getnextmark(
  * This is used for marks obtained from the .viminfo file.  It's postponed
  * until the mark is used to avoid a long startup delay.
  */
-    void
+    static void
 fname2fnum(xfmark_T *fm)
 {
     char_u     *p;
index 29f58c7c98551c35ad0ff38bc1a33f82708c8e80..4096a0571cfa1ae63084d27ae311e3746cea2371 100644 (file)
@@ -29,6 +29,7 @@ static void free_menu(vimmenu_T **menup);
 static void free_menu_string(vimmenu_T *, int);
 static int show_menus(char_u *, int);
 static void show_menus_recursive(vimmenu_T *, int, int);
+static char_u *menu_name_skip(char_u *name);
 static int menu_name_equal(char_u *name, vimmenu_T *menu);
 static int menu_namecmp(char_u *name, char_u *mname);
 static int get_menu_cmd_modes(char_u *, int, int *, int *);
@@ -1557,7 +1558,7 @@ get_menu_names(expand_T *xp UNUSED, int idx)
  * element.  Any \ and ^Vs are removed from the current element.
  * "name" may be modified.
  */
-    char_u *
+    static char_u *
 menu_name_skip(char_u *name)
 {
     char_u  *p;
index c5e73ba4823087dedbc2311dfe4ee7767927108e..da81fa01577ec4db68c00326b738da77e0c8303c 100644 (file)
@@ -28,6 +28,7 @@ static void t_puts(int *t_col, char_u *t_s, char_u *s, int attr);
 static void msg_puts_printf(char_u *str, int maxlen);
 static int do_more_prompt(int typed_char);
 static void msg_screen_putchar(int c, int attr);
+static void msg_moremsg(int full);
 static int  msg_check_screen(void);
 static void redir_write(char_u *s, int maxlen);
 #ifdef FEAT_CON_DIALOG
@@ -35,6 +36,7 @@ static char_u *msg_show_console_dialog(char_u *message, char_u *buttons, int dfl
 static int     confirm_msg_used = FALSE;       /* displaying confirm_msg */
 static char_u  *confirm_msg = NULL;            /* ":confirm" message */
 static char_u  *confirm_msg_tail;              /* tail of confirm_msg */
+static void display_confirm_msg(void);
 #endif
 #ifdef FEAT_JOB_CHANNEL
 static int emsg_to_channel_log = FALSE;
@@ -513,7 +515,7 @@ msg_source(int attr)
  * If "msg" is in 'debug': do error message but without side effects.
  * If "emsg_skip" is set: never do error messages.
  */
-    int
+    static int
 emsg_not_now(void)
 {
     if ((emsg_off > 0 && vim_strchr(p_debug, 'm') == NULL
@@ -1930,13 +1932,7 @@ msg_puts_title(char *s)
  * part in the middle and replace it with "..." when necessary.
  * Does not handle multi-byte characters!
  */
-    void
-msg_outtrans_long_attr(char_u *longstr, int attr)
-{
-    msg_outtrans_long_len_attr(longstr, (int)STRLEN(longstr), attr);
-}
-
-    void
+    static void
 msg_outtrans_long_len_attr(char_u *longstr, int len, int attr)
 {
     int                slen = len;
@@ -1952,6 +1948,12 @@ msg_outtrans_long_len_attr(char_u *longstr, int len, int attr)
     msg_outtrans_len_attr(longstr + len - slen, slen, attr);
 }
 
+    void
+msg_outtrans_long_attr(char_u *longstr, int attr)
+{
+    msg_outtrans_long_len_attr(longstr, (int)STRLEN(longstr), attr);
+}
+
 /*
  * Basic function for writing a message with highlight attributes.
  */
@@ -3141,7 +3143,7 @@ msg_screen_putchar(int c, int attr)
     }
 }
 
-    void
+    static void
 msg_moremsg(int full)
 {
     int                attr;
@@ -3882,7 +3884,7 @@ msg_show_console_dialog(
 /*
  * Display the ":confirm" message.  Also called when screen resized.
  */
-    void
+    static void
 display_confirm_msg(void)
 {
     /* avoid that 'q' at the more prompt truncates the message here */
index 0277c9e8c8a8a2ae2cf4ce12e9e1b5b73cd117f8..4884f6cb53fae843ab478061366effa1257fcc87 100644 (file)
@@ -3082,7 +3082,7 @@ FullName_save(
     return new_fname;
 }
 
-    void
+    static void
 prepare_to_exit(void)
 {
 #if defined(SIGHUP) && defined(SIG_IGN)
index 9fd8dfd75bbda3a1087f83d39f3d52b69e658967..db8392ccc685a1cf0efc10b0c05b30b684520208 100644 (file)
@@ -2530,7 +2530,7 @@ static struct mousetable
  * Return the modifier mask bit (MOD_MASK_*) which corresponds to the given
  * modifier name ('S' for Shift, 'C' for Ctrl etc).
  */
-    int
+    static int
 name_to_mod_mask(int c)
 {
     int            i;
index 8f6130cfefa6f9658465fc33e43bf2c22a136218..7ede1f73a2adc0ce7ab4b7a621e7179cae274267 100644 (file)
--- a/src/ops.c
+++ b/src/ops.c
@@ -65,6 +65,9 @@ static int    yank_copy_line(struct block_def *bd, long y_idx);
 static void    copy_yank_reg(yankreg_T *reg);
 static void    may_set_selection(void);
 #endif
+#if defined(FEAT_SMARTINDENT) || defined(FEAT_CINDENT)
+static int     preprocs_left(void);
+#endif
 static void    dis_msg(char_u *p, int skip_esc);
 static void    block_prep(oparg_T *oap, struct block_def *, linenr_T, int);
 static int     do_addsub(int op_type, pos_T *pos, int length, linenr_T Prenum1);
@@ -830,7 +833,7 @@ get_expr_line(void)
 /*
  * Get the '=' register expression itself, without evaluating it.
  */
-    char_u *
+    static char_u *
 get_expr_line_src(void)
 {
     if (expr_line == NULL)
@@ -4088,7 +4091,7 @@ adjust_cursor_eol(void)
 /*
  * Return TRUE if lines starting with '#' should be left aligned.
  */
-    int
+    static int
 preprocs_left(void)
 {
     return
index 2d4803e76f4edc37fe23b6327961930111040072..69d272768676d7c53b9f29106ae58f0dd3bc3882 100644 (file)
@@ -3277,6 +3277,9 @@ static long_u *insecure_flag(int opt_idx, int opt_flags);
 static void set_string_option_global(int opt_idx, char_u **varp);
 static char *did_set_string_option(int opt_idx, char_u **varp, int new_value_alloced, char_u *oldval, char *errbuf, int opt_flags, int *value_checked);
 static char *set_chars_option(char_u **varp);
+#ifdef FEAT_STL_OPT
+static char *check_stl_option(char_u *s);
+#endif
 #ifdef FEAT_CLIPBOARD
 static char *check_clipboard_option(void);
 #endif
@@ -3301,6 +3304,7 @@ static int put_setbool(FILE *fd, char *cmd, char *name, int value);
 static int  istermoption(struct vimoption *);
 static char_u *get_varp_scope(struct vimoption *p, int opt_flags);
 static char_u *get_varp(struct vimoption *);
+static void check_win_options(win_T *win);
 static void option_value2string(struct vimoption *, int opt_flags);
 static void check_winopt(winopt_T *wop);
 static int wc_use_keyname(char_u *varp, long *wcp);
@@ -8246,7 +8250,7 @@ set_chars_option(char_u **varp)
  * Check validity of options with the 'statusline' format.
  * Return error message or NULL.
  */
-    char *
+    static char *
 check_stl_option(char_u *s)
 {
     int                itemcnt = 0;
@@ -11430,7 +11434,7 @@ copy_winopt(winopt_T *from, winopt_T *to)
 /*
  * Check string options in a window for a NULL value.
  */
-    void
+    static void
 check_win_options(win_T *win)
 {
     check_winopt(&win->w_onebuf_opt);
@@ -13340,22 +13344,10 @@ get_sw_value(buf_T *buf)
     return get_sw_value_col(buf, 0);
 }
 
-/*
- * Idem, using the first non-black in the current line.
- */
-    long
-get_sw_value_indent(buf_T *buf)
-{
-    pos_T pos = curwin->w_cursor;
-
-    pos.col = getwhitecols_curline();
-    return get_sw_value_pos(buf, &pos);
-}
-
 /*
  * Idem, using "pos".
  */
-    long
+    static long
 get_sw_value_pos(buf_T *buf, pos_T *pos)
 {
     pos_T save_cursor = curwin->w_cursor;
@@ -13367,6 +13359,18 @@ get_sw_value_pos(buf_T *buf, pos_T *pos)
     return sw_value;
 }
 
+/*
+ * Idem, using the first non-black in the current line.
+ */
+    long
+get_sw_value_indent(buf_T *buf)
+{
+    pos_T pos = curwin->w_cursor;
+
+    pos.col = getwhitecols_curline();
+    return get_sw_value_pos(buf, &pos);
+}
+
 /*
  * Idem, using virtual column "col".
  */
index ff7aa01aa9c10580bd0167dfbc98587622bbcaed..a892bb6471f655652a70a7207389430aecc02841 100644 (file)
@@ -28,6 +28,8 @@ static poppos_entry_T poppos_entries[] = {
     {"center", POPPOS_CENTER}
 };
 
+static void popup_adjust_position(win_T *wp);
+
 /*
  * Get option value for "key", which is "line" or "col".
  * Handles "cursor+N" and "cursor-N".
@@ -982,7 +984,7 @@ popup_extra_width(win_T *wp)
 /*
  * Adjust the position and size of the popup to fit on the screen.
  */
-    void
+    static void
 popup_adjust_position(win_T *wp)
 {
     linenr_T   lnum;
index a96c1b7d5d82683e6e9dc1570c4adcc5959a1f3f..64ee0edec3802ca9acf96b1ba6015660ffb2b5c8 100644 (file)
@@ -249,7 +249,7 @@ profile_self(proftime_T *self, proftime_T *total, proftime_T *children)
 /*
  * Get the current waittime.
  */
-    void
+    static void
 profile_get_wait(proftime_T *tm)
 {
     *tm = prof_wait_time;
@@ -270,7 +270,7 @@ profile_sub_wait(proftime_T *tm, proftime_T *tma)
 /*
  * Return TRUE if "tm1" and "tm2" are equal.
  */
-    int
+    static int
 profile_equal(proftime_T *tm1, proftime_T *tm2)
 {
 # ifdef MSWIN
index 009c0c4fdddc36083fbea45185b1f8fc99907787..7aa1de6564a435333fd526cbe339ac25665c65ff 100644 (file)
@@ -15,7 +15,6 @@ void aucmd_restbuf(aco_save_T *aco);
 int apply_autocmds(event_T event, char_u *fname, char_u *fname_io, int force, buf_T *buf);
 int apply_autocmds_exarg(event_T event, char_u *fname, char_u *fname_io, int force, buf_T *buf, exarg_T *eap);
 int apply_autocmds_retval(event_T event, char_u *fname, char_u *fname_io, int force, buf_T *buf, int *retval);
-int has_cursorhold(void);
 int trigger_cursorhold(void);
 int has_cursormoved(void);
 int has_cursormovedI(void);
index ac455679fe5036b6596c8d33c7ebff22d18e3846..0378b15022a0c14318a133d5edf83403154ee5d7 100644 (file)
@@ -12,7 +12,6 @@ void handle_swap_exists(bufref_T *old_curbuf);
 char *do_bufdel(int command, char_u *arg, int addr_count, int start_bnr, int end_bnr, int forceit);
 int do_buffer(int action, int start, int dir, int count, int forceit);
 void set_curbuf(buf_T *buf, int action);
-void enter_buffer(buf_T *buf);
 void do_autochdir(void);
 void no_write_message(void);
 void no_write_message_nobang(buf_T *buf);
@@ -20,7 +19,6 @@ int curbuf_reusable(void);
 buf_T *buflist_new(char_u *ffname_arg, char_u *sfname_arg, linenr_T lnum, int flags);
 void free_buf_options(buf_T *buf, int free_p_ff);
 int buflist_getfile(int n, linenr_T lnum, int options, int forceit);
-void buflist_getfpos(void);
 buf_T *buflist_findname_exp(char_u *fname);
 buf_T *buflist_findname(char_u *ffname);
 int buflist_findpat(char_u *pattern, char_u *pattern_end, int unlisted, int diffmode, int curtab_only);
@@ -68,7 +66,6 @@ int buf_hide(buf_T *buf);
 char_u *buf_spname(buf_T *buf);
 void switch_to_win_for_buf(buf_T *buf, win_T **save_curwinp, tabpage_T **save_curtabp, bufref_T *save_curbuf);
 void restore_win_for_buf(win_T *save_curwin, tabpage_T *save_curtab, bufref_T *save_curbuf);
-int find_win_for_buf(buf_T *buf, win_T **wp, tabpage_T **tp);
 void set_buflisted(int on);
 int buf_contents_changed(buf_T *buf);
 void wipe_buffer(buf_T *buf, int aucmd);
index de3a94a9d8baa681abfb75791192efb26636a6e2..f6b3599eba91ed3738667bbc4a1d89c37d8def50 100644 (file)
@@ -8,7 +8,6 @@ void f_listener_remove(typval_T *argvars, typval_T *rettv);
 void may_invoke_listeners(buf_T *buf, linenr_T lnum, linenr_T lnume, int added);
 void invoke_listeners(buf_T *buf);
 void changed_bytes(linenr_T lnum, colnr_T col);
-void inserted_bytes(linenr_T lnum, colnr_T col, int added);
 void appended_lines(linenr_T lnum, long count);
 void appended_lines_mark(linenr_T lnum, long count);
 void deleted_lines(linenr_T lnum, long count);
index 768049c552bcfba8846b7de6e2bdcfa3ce9d3497..6bf214706449194a468d000d3dae6ded9f7011b8 100644 (file)
@@ -8,10 +8,8 @@ int free_unused_channels_contents(int copyID, int mask);
 void free_unused_channels(int copyID, int mask);
 void channel_gui_register_all(void);
 channel_T *channel_open(char *hostname, int port_in, int waittime, void (*nb_close_cb)(void));
-channel_T *channel_open_func(typval_T *argvars);
 void channel_set_pipes(channel_T *channel, sock_T in, sock_T out, sock_T err);
 void channel_set_job(channel_T *channel, job_T *job, jobopt_T *options);
-void channel_set_req_callback(channel_T *channel, ch_part_T part, callback_T *callback, int id);
 void channel_buffer_free(buf_T *buf);
 void channel_write_any_lines(void);
 void channel_write_new_lines(buf_T *buf);
@@ -22,21 +20,14 @@ void channel_consume(channel_T *channel, ch_part_T part, int len);
 int channel_collapse(channel_T *channel, ch_part_T part, int want_nl);
 int channel_can_write_to(channel_T *channel);
 int channel_is_open(channel_T *channel);
-int channel_has_readahead(channel_T *channel, ch_part_T part);
 char *channel_status(channel_T *channel, int req_part);
-void channel_info(channel_T *channel, dict_T *dict);
 void channel_close(channel_T *channel, int invoke_close_cb);
-void channel_close_in(channel_T *channel);
 void channel_clear(channel_T *channel);
 void channel_free_all(void);
-void common_channel_read(typval_T *argvars, typval_T *rettv, int raw, int blob);
-channel_T *channel_fd2channel(sock_T fd, ch_part_T *partp);
 void channel_handle_events(int only_keep_open);
 int channel_any_keep_open(void);
 void channel_set_nonblock(channel_T *channel, ch_part_T part);
 int channel_send(channel_T *channel, ch_part_T part, char_u *buf_arg, int len_arg, char *fun);
-void ch_expr_common(typval_T *argvars, typval_T *rettv, int eval);
-void ch_raw_common(typval_T *argvars, typval_T *rettv, int eval);
 int channel_poll_setup(int nfd_in, void *fds_in, int *towait);
 int channel_poll_check(int ret_in, void *fds_in);
 int channel_select_setup(int maxfd_in, void *rfds_in, void *wfds_in, struct timeval *tv, struct timeval **tvp);
@@ -44,12 +35,7 @@ int channel_select_check(int ret_in, void *rfds_in, void *wfds_in);
 int channel_parse_messages(void);
 int channel_any_readahead(void);
 int set_ref_in_channel(int copyID);
-ch_part_T channel_part_send(channel_T *channel);
-ch_part_T channel_part_read(channel_T *channel);
-ch_mode_T channel_get_mode(channel_T *channel, ch_part_T part);
-int channel_get_timeout(channel_T *channel, ch_part_T part);
 void clear_job_options(jobopt_T *opt);
-void free_job_options(jobopt_T *opt);
 int get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2);
 void job_free_all(void);
 int job_any_running(void);
index f60822ef006d6f5d5b71f3dece7cebf1dafc38e1..c582a8cf22adb62cc16928f7651d1c55e034de6d 100644 (file)
@@ -29,7 +29,6 @@ int vim_isprintc_strict(int c);
 int lbr_chartabsize(char_u *line, unsigned char *s, colnr_T col);
 int lbr_chartabsize_adv(char_u *line, char_u **s, colnr_T col);
 int win_lbr_chartabsize(win_T *wp, char_u *line, char_u *s, colnr_T col, int *headp);
-int in_win_border(win_T *wp, colnr_T vcol);
 void getvcol(win_T *wp, pos_T *pos, colnr_T *start, colnr_T *cursor, colnr_T *end);
 colnr_T getvcol_nolist(pos_T *posp);
 void getvvcol(win_T *wp, pos_T *pos, colnr_T *start, colnr_T *cursor, colnr_T *end);
index 93d61e7f404761ae594ccf11b25933ef4f3c1a50..388ddac9e6b842968fa00c2e0f6cf421af06b83d 100644 (file)
@@ -32,7 +32,6 @@ int dict_get_tv(char_u **arg, typval_T *rettv, int evaluate, int literal);
 void dict_extend(dict_T *d1, dict_T *d2, char_u *action);
 dictitem_T *dict_lookup(hashitem_T *hi);
 int dict_equal(dict_T *d1, dict_T *d2, int ic, int recursive);
-void dict_list(typval_T *argvars, typval_T *rettv, int what);
 void f_items(typval_T *argvars, typval_T *rettv);
 void f_keys(typval_T *argvars, typval_T *rettv);
 void f_values(typval_T *argvars, typval_T *rettv);
index 680b131841087a381889f02ec41deecca49fd41a..55bb718c0a05b24813a04bdee04c404cd4fee8b2 100644 (file)
@@ -63,7 +63,6 @@ int string2float(char_u *text, float_T *value);
 pos_T *var2fpos(typval_T *varp, int dollar_lnum, int *fnum);
 int list2fpos(typval_T *arg, pos_T *posp, int *fnump, colnr_T *curswantp);
 int get_id_len(char_u **arg);
-int get_name_len(char_u **arg, char_u **alias, int evaluate, int verbose);
 char_u *find_name_end(char_u *arg, char_u **expr_start, char_u **expr_end, int flags);
 int eval_isnamec(int c);
 int eval_isnamec1(int c);
@@ -84,7 +83,6 @@ void set_reg_var(int c);
 char_u *v_exception(char_u *oldval);
 char_u *v_throwpoint(char_u *oldval);
 char_u *set_cmdarg(exarg_T *eap, char_u *oldarg);
-int get_var_tv(char_u *name, int len, typval_T *rettv, dictitem_T **dip, int verbose, int no_autoload);
 int handle_subscript(char_u **arg, typval_T *rettv, int evaluate, int verbose, char_u *start_leader, char_u **end_leaderp);
 typval_T *alloc_tv(void);
 void free_tv(typval_T *varp);
@@ -97,7 +95,6 @@ char_u *tv_get_string(typval_T *varp);
 char_u *tv_get_string_buf(typval_T *varp, char_u *buf);
 char_u *tv_get_string_chk(typval_T *varp);
 char_u *tv_get_string_buf_chk(typval_T *varp, char_u *buf);
-char_u *tv_stringify(typval_T *varp, char_u *buf);
 dictitem_T *find_var(char_u *name, hashtab_T **htp, int no_autoload);
 dictitem_T *find_var_in_ht(hashtab_T *ht, int htname, char_u *varname, int no_autoload);
 hashtab_T *find_var_ht(char_u *name, char_u **varname);
index a0203e7d688c8a68c11d01bb3ec2fbf488013a99..298de8fb9710dbd8e433d3411f33a7a1339d4496 100644 (file)
@@ -22,7 +22,6 @@ int do_write(exarg_T *eap);
 int check_overwrite(exarg_T *eap, buf_T *buf, char_u *fname, char_u *ffname, int other);
 void ex_wnext(exarg_T *eap);
 void do_wqall(exarg_T *eap);
-int not_writing(void);
 int getfile(int fnum, char_u *ffname_arg, char_u *sfname_arg, int setpm, linenr_T lnum, int forceit);
 int do_ecmd(int fnum, char_u *ffname, char_u *sfname, exarg_T *eap, linenr_T newlnum, int flags, win_T *oldwin);
 void ex_append(exarg_T *eap);
index cb7002a469f78f98011ae8614879e1ab16130cca..2b6bdc6b4faaecd8514eba5cd30f9307f943177d 100644 (file)
@@ -10,8 +10,6 @@ int do_intthrow(struct condstack *cstack);
 char *get_exception_string(void *value, except_type_T type, char_u *cmdname, int *should_free);
 void discard_current_exception(void);
 void report_make_pending(int pending, void *value);
-void report_resume_pending(int pending, void *value);
-void report_discard_pending(int pending, void *value);
 void ex_eval(exarg_T *eap);
 void ex_if(exarg_T *eap);
 void ex_endif(exarg_T *eap);
index bff6640730805bdde3394f316c5e4861d0b24326..bf5bdad1c7a1a13dee380cc9ea26611a7ac58a34 100644 (file)
@@ -1,5 +1,4 @@
 /* fileio.c */
-void filemess(buf_T *buf, char_u *name, char_u *s, int attr);
 int readfile(char_u *fname, char_u *sfname, linenr_T from, linenr_T lines_to_skip, linenr_T lines_to_read, exarg_T *eap, int flags);
 int is_dev_fd_file(char_u *fname);
 int prep_exarg(exarg_T *eap, buf_T *buf);
index ebab7927336b63768a55e813d54228934baa619b..3c2419a43ad9b03f29051c2d38980d78aa6cb37c 100644 (file)
@@ -3,7 +3,6 @@ void *vim_findfile_init(char_u *path, char_u *filename, char_u *stopdirs, int le
 char_u *vim_findfile_stopdir(char_u *buf);
 void vim_findfile_cleanup(void *ctx);
 char_u *vim_findfile(void *search_ctx_arg);
-void vim_findfile_free_visited(void *search_ctx_arg);
 char_u *find_file_in_path(char_u *ptr, int len, int options, int first, char_u *rel_fname);
 void free_findfile(void);
 char_u *find_directory_in_path(char_u *ptr, int len, int options, char_u *rel_fname);
index cde7ddfa4952cdfe74780daf7eb1249420b18e36..9a4f2d58543dc062807991b4837004e948982e9c 100644 (file)
@@ -30,8 +30,6 @@ int typebuf_changed(int tb_change_cnt);
 int typebuf_typed(void);
 int typebuf_maplen(void);
 void del_typebuf(int len, int offset);
-int alloc_typebuf(void);
-void free_typebuf(void);
 int save_typebuf(void);
 void save_typeahead(tasave_T *tp);
 void restore_typeahead(tasave_T *tp);
@@ -39,7 +37,6 @@ void openscript(char_u *name, int directly);
 void close_all_scripts(void);
 int using_script(void);
 void before_blocking(void);
-void updatescript(int c);
 int vgetc(void);
 int safe_vgetc(void);
 int plain_vgetc(void);
index f8f80b5f9f3625186fe4ff1c3ff5f302c8751365..2dc09a1764e60802f7e2fe168577ec96a408d903 100644 (file)
@@ -7,7 +7,6 @@ void gui_exit(int rc);
 void gui_shell_closed(void);
 int gui_init_font(char_u *font_list, int fontset);
 int gui_get_wide_font(void);
-void gui_set_cursor(int row, int col);
 void gui_update_cursor(int force, int clear_selection);
 void gui_position_menu(void);
 int gui_get_base_width(void);
@@ -17,8 +16,6 @@ void gui_may_resize_shell(void);
 int gui_get_shellsize(void);
 void gui_set_shellsize(int mustset, int fit_to_display, int direction);
 void gui_new_shellsize(void);
-void gui_reset_scroll_region(void);
-void gui_start_highlight(int mask);
 void gui_stop_highlight(int mask);
 void gui_clear_block(int row1, int col1, int row2, int col2);
 void gui_update_cursor_later(void);
@@ -28,14 +25,12 @@ void gui_can_update_cursor(void);
 void gui_disable_flush(void);
 void gui_enable_flush(void);
 void gui_may_flush(void);
-int gui_outstr_nowrap(char_u *s, int len, int flags, guicolor_T fg, guicolor_T bg, int back);
 void gui_undraw_cursor(void);
 void gui_redraw(int x, int y, int w, int h);
 int gui_redraw_block(int row1, int col1, int row2, int col2, int flags);
 int gui_wait_for_chars(long wtime, int tb_change_cnt);
 int gui_inchar(char_u *buf, int maxlen, long wtime, int tb_change_cnt);
 void gui_send_mouse_event(int button, int x, int y, int repeated_click, int_u modifiers);
-int gui_xy2colrow(int x, int y, int *colp);
 void gui_menu_cb(vimmenu_T *menu);
 void gui_init_which_components(char_u *oldval);
 int gui_use_tabline(void);
index 277953eb17138ced8117f3c8dd64a38d4d5b2d74..71028ac336970ccb4c758d2352f7839b27440b98 100644 (file)
@@ -2,9 +2,6 @@
 int cin_is_cinword(char_u *line);
 pos_T *find_start_comment(int ind_maxcomment);
 int cindent_on(void);
-int cin_islabel(void);
-int cin_iscase(char_u *s, int strict);
-int cin_isscopedecl(char_u *s);
 void parse_cino(buf_T *buf);
 int get_c_indent(void);
 int get_expr_indent(void);
index d8afe1fb6c5a94a281226bb432aeda5723222079..926c2bec40034cf01730b99092413f702c2affb7 100644 (file)
@@ -1,7 +1,6 @@
 /* json.c */
 char_u *json_encode(typval_T *val, int options);
 char_u *json_encode_nr_expr(int nr, typval_T *val, int options);
-int json_decode_all(js_read_T *reader, typval_T *res, int options);
 int json_decode(js_read_T *reader, typval_T *res, int options);
 int json_find_end(js_read_T *reader, int options);
 void f_js_decode(typval_T *argvars, typval_T *rettv);
index 2f5be0df0e9348a40ce7920a7bc4a730944a96d6..3102bb288d06379289c94c9175527590d5fe8233 100644 (file)
@@ -1,7 +1,6 @@
 /* list.c */
 void list_add_watch(list_T *l, listwatch_T *lw);
 void list_rem_watch(list_T *l, listwatch_T *lwrem);
-void list_fix_watch(list_T *l, listitem_T *item);
 list_T *list_alloc(void);
 list_T *list_alloc_id(alloc_id_T id);
 int rettv_list_alloc(typval_T *rettv);
index 663415773c828b1e4ea30ac7ae004ff6c2df05a5..602bfa28aa87f1f20b99952b675688e047ee01ff 100644 (file)
@@ -9,7 +9,6 @@ pos_T *getmark_buf(buf_T *buf, int c, int changefile);
 pos_T *getmark(int c, int changefile);
 pos_T *getmark_buf_fnum(buf_T *buf, int c, int changefile, int *fnum);
 pos_T *getnextmark(pos_T *startpos, int dir, int begin_line);
-void fname2fnum(xfmark_T *fm);
 void fmarks_check_names(buf_T *buf);
 int check_mark(pos_T *pos);
 void clrallmarks(buf_T *buf);
index 411c040b482e46532db291ecc948b50d47be8746..95ee48b541542ddc3704a916c0b8531e64193478 100644 (file)
@@ -5,7 +5,6 @@ void remove_winbar(win_T *wp);
 char_u *set_context_in_menu_cmd(expand_T *xp, char_u *cmd, char_u *arg, int forceit);
 char_u *get_menu_name(expand_T *xp, int idx);
 char_u *get_menu_names(expand_T *xp, int idx);
-char_u *menu_name_skip(char_u *name);
 int get_menu_index(vimmenu_T *menu, int state);
 int menu_is_menubar(char_u *name);
 int menu_is_popup(char_u *name);
index 04b674486503f6e5bd817f045029f1eda21423a7..8d2223506b0fad0c2e8b37cdf12445bea618879b 100644 (file)
@@ -7,7 +7,6 @@ char_u *msg_strtrunc(char_u *s, int force);
 void trunc_string(char_u *s, char_u *buf, int room_in, int buflen);
 void reset_last_sourcing(void);
 void msg_source(int attr);
-int emsg_not_now(void);
 void ignore_error_for_testing(char_u *error);
 void do_perror(char *msg);
 int emsg(char *s);
@@ -43,7 +42,6 @@ void msg_prt_line(char_u *s, int list);
 void msg_puts(char *s);
 void msg_puts_title(char *s);
 void msg_outtrans_long_attr(char_u *longstr, int attr);
-void msg_outtrans_long_len_attr(char_u *longstr, int len, int attr);
 void msg_puts_attr(char *s, int attr);
 int message_filtered(char_u *msg);
 void may_clear_sb_text(void);
@@ -55,7 +53,6 @@ void msg_sb_eol(void);
 int msg_use_printf(void);
 void mch_errmsg(char *str);
 void mch_msg(char *str);
-void msg_moremsg(int full);
 void repeat_message(void);
 void msg_clr_eos(void);
 void msg_clr_eos_force(void);
@@ -73,7 +70,6 @@ void give_warning(char_u *message, int hl);
 void give_warning2(char_u *message, char_u *a1, int hl);
 void msg_advance(int col);
 int do_dialog(int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd);
-void display_confirm_msg(void);
 int vim_dialog_yesno(int type, char_u *title, char_u *message, int dflt);
 int vim_dialog_yesnocancel(int type, char_u *title, char_u *message, int dflt);
 int vim_dialog_yesnoallcancel(int type, char_u *title, char_u *message, int dflt);
index 3f58d30468466fdb308e3d14c042fdbf1fd2862a..cdeaa2869f4f761c55ea998c8b56e2842c5faa5c 100644 (file)
@@ -60,7 +60,6 @@ char_u *concat_fnames(char_u *fname1, char_u *fname2, int sep);
 char_u *concat_str(char_u *str1, char_u *str2);
 void add_pathsep(char_u *p);
 char_u *FullName_save(char_u *fname, int force);
-void prepare_to_exit(void);
 void preserve_exit(void);
 int vim_fexists(char_u *fname);
 void line_breakcheck(void);
index 5d7ca4a922f59d276db5db3b491779fba35250ed..69875179259c4b2f60316261f00247d31fb37f73 100644 (file)
@@ -64,7 +64,6 @@ void ga_add_string(garray_T *gap, char_u *p);
 void ga_concat(garray_T *gap, char_u *s);
 void ga_append(garray_T *gap, int c);
 void append_ga_line(garray_T *gap);
-int name_to_mod_mask(int c);
 int simplify_key(int key, int *modifiers);
 int handle_x_keys(int key);
 char_u *get_special_key_name(int c, int modifiers);
index ed5877dfb24cd62f459b20d32b3068cfe4012534..8bd82aa0667328577203d936495bf25c3e1b1dd8 100644 (file)
@@ -14,7 +14,6 @@ void op_reindent(oparg_T *oap, int (*how)(void));
 int get_expr_register(void);
 void set_expr_line(char_u *new_line);
 char_u *get_expr_line(void);
-char_u *get_expr_line_src(void);
 int valid_yank_reg(int regname, int writing);
 int get_yank_register(int regname, int writing);
 int may_get_selection(int regname);
@@ -42,7 +41,6 @@ void clear_registers(void);
 int op_yank(oparg_T *oap, int deleting, int mess);
 void do_put(int regname, int dir, long count, int flags);
 void adjust_cursor_eol(void);
-int preprocs_left(void);
 int get_register_name(int num);
 void ex_display(exarg_T *eap);
 char_u *skip_comment(char_u *line, int process, int include_space, int *is_comment);
index 86c751658c3931905a28408ade4bf2f7868fcbea..9712f8644f64ea0b50c265831aec1a953c5c1ab2 100644 (file)
@@ -24,7 +24,6 @@ void set_string_option_direct_in_win(win_T *wp, char_u *name, int opt_idx, char_
 void set_string_option_direct_in_buf(buf_T *buf, char_u *name, int opt_idx, char_u *val, int opt_flags, int set_sid);
 int valid_spellang(char_u *val);
 char *check_colorcolumn(win_T *wp);
-char *check_stl_option(char_u *s);
 void set_term_option_sctx_idx(char *name, int opt_idx);
 int get_option_value(char_u *name, long *numval, char_u **stringval, int opt_flags);
 int get_option_value_strict(char_u *name, long *numval, char_u **stringval, int opt_type, void *from);
@@ -44,7 +43,6 @@ void unset_global_local_option(char_u *name, void *from);
 char_u *get_equalprg(void);
 void win_copy_options(win_T *wp_from, win_T *wp_to);
 void copy_winopt(winopt_T *from, winopt_T *to);
-void check_win_options(win_T *win);
 void clear_winopt(winopt_T *wop);
 void buf_copy_options(buf_T *buf, int flags);
 void reset_modifiable(void);
@@ -75,7 +73,6 @@ int tabstop_count(int *ts);
 int tabstop_first(int *ts);
 long get_sw_value(buf_T *buf);
 long get_sw_value_indent(buf_T *buf);
-long get_sw_value_pos(buf_T *buf, pos_T *pos);
 long get_sw_value_col(buf_T *buf, colnr_T col);
 long get_sts_value(void);
 long get_scrolloff_value(void);
index 0fad5ae8319de10e2c93e3340f546ee88624b2fc..f3204439ddbfc97177235fd88331734fbd462b0c 100644 (file)
@@ -9,7 +9,6 @@ void popup_handle_scrollbar_click(win_T *wp, int row, int col);
 int popup_height(win_T *wp);
 int popup_width(win_T *wp);
 int popup_extra_width(win_T *wp);
-void popup_adjust_position(win_T *wp);
 int parse_previewpopup(win_T *wp);
 int parse_completepopup(win_T *wp);
 void popup_set_wantpos_cursor(win_T *wp, int width);
index 64398f52ce3649bbc554af55306f3f06fc5ba2e2..5e0b6a2144fc953336b7c5a6a1b1d6a03a2dcca9 100644 (file)
@@ -10,9 +10,7 @@ void profile_zero(proftime_T *tm);
 void profile_divide(proftime_T *tm, int count, proftime_T *tm2);
 void profile_add(proftime_T *tm, proftime_T *tm2);
 void profile_self(proftime_T *self, proftime_T *total, proftime_T *children);
-void profile_get_wait(proftime_T *tm);
 void profile_sub_wait(proftime_T *tm, proftime_T *tma);
-int profile_equal(proftime_T *tm1, proftime_T *tm2);
 int profile_cmp(const proftime_T *tm1, const proftime_T *tm2);
 void ex_profile(exarg_T *eap);
 char_u *get_profile_name(expand_T *xp, int idx);
index 3bca1448ab6859b309b8333f740794ed8ca5c233..6607808ad3e79a0e46c37797049f5d686080bff3 100644 (file)
@@ -5,7 +5,6 @@ void qf_free_all(win_T *wp);
 void check_quickfix_busy(void);
 void copy_loclist_stack(win_T *from, win_T *to);
 void qf_jump(qf_info_T *qi, int dir, int errornr, int forceit);
-void qf_jump_newwin(qf_info_T *qi, int dir, int errornr, int forceit, int newwin);
 void qf_list(exarg_T *eap);
 void qf_age(exarg_T *eap);
 void qf_history(exarg_T *eap);
index 485d7d1a63a28f4d6b64059959b32f4f91c48524..c2b14bf2ce63a29a1f89726e88170e57113acffa 100644 (file)
@@ -19,7 +19,6 @@ buf_T *open_spellbuf(void);
 void close_spellbuf(buf_T *buf);
 void clear_spell_chartab(spelltab_T *sp);
 void init_spell_chartab(void);
-int spell_iswordp_nmw(char_u *p, win_T *wp);
 int spell_casefold(char_u *str, int len, char_u *buf, int buflen);
 int spell_check_sps(void);
 void spell_suggest(int count);
index 136a9695ef4a66a430280c7cc7bccc886da30aeb..ec73d505ebde39808005ba324ad46d5b214cfede 100644 (file)
@@ -1,5 +1,4 @@
 /* term.c */
-guicolor_T termgui_mch_get_color(char_u *name);
 guicolor_T termgui_get_color(char_u *name);
 guicolor_T termgui_mch_get_rgb(guicolor_T color);
 int set_termname(char_u *term);
@@ -65,13 +64,11 @@ void clear_termcodes(void);
 void add_termcode(char_u *name, char_u *string, int flags);
 char_u *find_termcode(char_u *name);
 char_u *get_termcode(int i);
-void del_termcode(char_u *name);
 void set_mouse_topline(win_T *wp);
 int check_termcode(int max_offset, char_u *buf, int bufsize, int *buflen);
 void term_get_fg_color(char_u *r, char_u *g, char_u *b);
 void term_get_bg_color(char_u *r, char_u *g, char_u *b);
 char_u *replace_termcodes(char_u *from, char_u **bufp, int from_part, int do_lt, int special);
-int find_term_bykeys(char_u *src);
 void show_termcodes(void);
 int show_one_termcode(char_u *name, char_u *code, int printit);
 char_u *translate_mapping(char_u *str);
index a6775dbfda62ccd9372e02c76cda7788e3d65ce8..f33c7a4befc446bddade1bfebc46f1a336532f07 100644 (file)
@@ -6,7 +6,6 @@ proptype_T *text_prop_type_by_id(buf_T *buf, int id);
 void f_prop_clear(typval_T *argvars, typval_T *rettv);
 void f_prop_list(typval_T *argvars, typval_T *rettv);
 void f_prop_remove(typval_T *argvars, typval_T *rettv);
-void prop_type_set(typval_T *argvars, int add);
 void f_prop_type_add(typval_T *argvars, typval_T *rettv);
 void f_prop_type_change(typval_T *argvars, typval_T *rettv);
 void f_prop_type_delete(typval_T *argvars, typval_T *rettv);
index 472da3601bb1005f9b19f9e09af8d87a3fe8f008..50d3d5ea177b15dd2bf1100beae91c5af854ee54 100644 (file)
@@ -32,8 +32,6 @@ void clip_clear_selection(Clipboard_T *cbd);
 void clip_may_clear_selection(int row1, int row2);
 void clip_scroll_selection(int rows);
 void clip_copy_modeless_selection(int both);
-int clip_gen_own_selection(Clipboard_T *cbd);
-void clip_gen_lose_selection(Clipboard_T *cbd);
 void clip_gen_set_selection(Clipboard_T *cbd);
 void clip_gen_request_selection(Clipboard_T *cbd);
 int clip_gen_owner_exists(Clipboard_T *cbd);
@@ -61,7 +59,6 @@ void clip_x11_request_selection(Widget myShell, Display *dpy, Clipboard_T *cbd);
 void clip_x11_lose_selection(Widget myShell, Clipboard_T *cbd);
 int clip_x11_own_selection(Widget myShell, Clipboard_T *cbd);
 void clip_x11_set_selection(Clipboard_T *cbd);
-int clip_x11_owner_exists(Clipboard_T *cbd);
 void yank_cut_buffer0(Display *dpy, Clipboard_T *cbd);
 int jump_to_mouse(int flags, int *inclusive, int which_button);
 int mouse_comp_pos(win_T *win, int *rowp, int *colp, linenr_T *lnump, int *plines_cache);
index f2190bfea9eda72dd57d82f0ebecb73d8ac6dd22..de918fca515829571de31f02c53e3b6dc12c6b38 100644 (file)
@@ -20,7 +20,6 @@ void u_unchanged(buf_T *buf);
 void u_find_first_changed(void);
 void u_update_save_nr(buf_T *buf);
 void u_clearall(buf_T *buf);
-void u_saveline(linenr_T lnum);
 void u_clearline(void);
 void u_undoline(void);
 void u_blockfree(buf_T *buf);
index ccb7a2c03bd74cf9cb325c07f0a461adcb7ad548..7b33836f87b72e8d2b9691b15421316354f9516b 100644 (file)
@@ -18,14 +18,12 @@ void win_free_all(void);
 win_T *winframe_remove(win_T *win, int *dirp, tabpage_T *tp);
 void close_others(int message, int forceit);
 void curwin_init(void);
-void win_init_empty(win_T *wp);
 int win_alloc_first(void);
 win_T *win_alloc_popup_win(void);
 void win_init_popup_win(win_T *wp, buf_T *buf);
 void win_init_size(void);
 void free_tabpage(tabpage_T *tp);
 int win_new_tabpage(int after);
-int may_open_tabpage(void);
 int make_tabpages(int maxcount);
 int valid_tabpage(tabpage_T *tpc);
 int valid_tabpage_win(tabpage_T *tpc);
@@ -44,9 +42,7 @@ win_T *win_horz_neighbor(tabpage_T *tp, win_T *wp, int left, long count);
 void win_enter(win_T *wp, int undo_sync);
 win_T *buf_jump_open_win(buf_T *buf);
 win_T *buf_jump_open_tab(buf_T *buf);
-int win_unlisted(win_T *wp);
 void win_free_popup(win_T *win);
-void win_append(win_T *after, win_T *wp);
 void win_remove(win_T *wp, tabpage_T *tp);
 int win_alloc_lines(win_T *wp);
 void win_free_lsize(win_T *wp);
index 8c25915326abcfd097063dd4ca202ec27a7448be..d4ac847d538c183f415fa05bb2b8eec47a27ffc5 100644 (file)
@@ -167,6 +167,7 @@ static int  qf_get_fnum(qf_list_T *qfl, char_u *, char_u *);
 static char_u  *qf_push_dir(char_u *, struct dir_stack_T **, int is_file_stack);
 static char_u  *qf_pop_dir(struct dir_stack_T **);
 static char_u  *qf_guess_filepath(qf_list_T *qfl, char_u *);
+static void    qf_jump_newwin(qf_info_T *qi, int dir, int errornr, int forceit, int newwin);
 static void    qf_fmt_text(char_u *text, char_u *buf, int bufsize);
 static int     qf_win_pos_update(qf_info_T *qi, int old_qf_index);
 static win_T   *qf_find_win(qf_info_T *qi);
@@ -3363,7 +3364,7 @@ qf_jump(qf_info_T *qi,
  * If 'forceit' is TRUE, then can discard changes to the current buffer.
  * If 'newwin' is TRUE, then open the file in a new window.
  */
-    void
+    static void
 qf_jump_newwin(qf_info_T       *qi,
        int             dir,
        int             errornr,
index dd99607f49a8e970e295cf04db50acc6e40edbb5..4a47f1dfa77e513d29bd71910396ca0440b55b1d 100644 (file)
@@ -751,7 +751,7 @@ get_equi_class(char_u **pp)
 /*
  * Table for equivalence class "c". (IBM-1047)
  */
-char *EQUIVAL_CLASS_C[16] = {
+static char *EQUIVAL_CLASS_C[16] = {
     "A\x62\x63\x64\x65\x66\x67",
     "C\x68",
     "E\x71\x72\x73\x74",
@@ -3436,7 +3436,7 @@ static int        regmatch(char_u *prog, proftime_T *tm, int *timed_out);
 static int     regrepeat(char_u *p, long maxcount);
 
 #ifdef DEBUG
-int            regnarrate = 0;
+static int             regnarrate = 0;
 #endif
 
 /*
index 83c232c524b03f766d8f94190cd66c4b01e495f9..cf2efe87a441be170fa56043a0d08e3dfc6a7211 100644 (file)
@@ -338,6 +338,7 @@ static int count_syllables(slang_T *slang, char_u *word);
 static void clear_midword(win_T *buf);
 static void use_midword(slang_T *lp, win_T *buf);
 static int find_region(char_u *rp, char_u *region);
+static int spell_iswordp_nmw(char_u *p, win_T *wp);
 static int check_need_cap(linenr_T lnum, colnr_T col);
 static void spell_find_suggest(char_u *badptr, int badlen, suginfo_T *su, int maxcount, int banbadword, int need_cap, int interactive);
 #ifdef FEAT_EVAL
@@ -3052,7 +3053,7 @@ spell_iswordp(
  * Return TRUE if "p" points to a word character.
  * Unlike spell_iswordp() this doesn't check for "midword" characters.
  */
-    int
+    static int
 spell_iswordp_nmw(char_u *p, win_T *wp)
 {
     int                c;
index 7c2111b0e8e78f469a47f49e38b3f2c1d150c951..028e6c2bf7a22b5063c45a85f7f9ea313238d1b7 100644 (file)
@@ -87,7 +87,9 @@ static void check_for_codes_from_term(void);
                || defined(FEAT_MOUSE_GPM) || defined(FEAT_SYSMOUSE)))
 static int get_bytes_from_buf(char_u *, char_u *, int);
 #endif
+static void del_termcode(char_u *name);
 static void del_termcode_idx(int idx);
+static int find_term_bykeys(char_u *src);
 static int term_is_builtin(char_u *name);
 static int term_7to8bit(char_u *p);
 
@@ -1367,7 +1369,7 @@ static struct builtin_term builtin_termcaps[] =
 };     /* end of builtin_termcaps */
 
 #if defined(FEAT_TERMGUICOLORS) || defined(PROTO)
-    guicolor_T
+    static guicolor_T
 termgui_mch_get_color(char_u *name)
 {
     return gui_get_color_cmn(name);
@@ -4307,7 +4309,7 @@ get_termcode(int i)
     return &termcodes[i].name[0];
 }
 
-    void
+    static void
 del_termcode(char_u *name)
 {
     int            i;
@@ -6364,7 +6366,7 @@ replace_termcodes(
  * Find a termcode with keys 'src' (must be NUL terminated).
  * Return the index in termcodes[], or -1 if not found.
  */
-    int
+    static int
 find_term_bykeys(char_u *src)
 {
     int                i;
index 309f3cb795d4c49a041a01ce59ec8e425108c958..93787f3c46259bd104b444b5306ecb2b0df67426 100644 (file)
@@ -668,7 +668,7 @@ f_prop_remove(typval_T *argvars, typval_T *rettv)
 /*
  * Common for f_prop_type_add() and f_prop_type_change().
  */
-    void
+    static void
 prop_type_set(typval_T *argvars, int add)
 {
     char_u     *name;
index 446cefcded8f0f753473acf87c8c026cc3e61c8d..61f19bc4bc855d37393770058a894cbd0833df1c 100644 (file)
--- a/src/ui.c
+++ b/src/ui.c
@@ -720,6 +720,12 @@ ui_breakcheck_force(int force)
 
 #if defined(FEAT_CLIPBOARD) || defined(PROTO)
 
+static void clip_gen_lose_selection(Clipboard_T *cbd);
+static int clip_gen_own_selection(Clipboard_T *cbd);
+#if defined(FEAT_X11) && defined(FEAT_XCLIPBOARD) && defined(USE_SYSTEM)
+static int clip_x11_owner_exists(Clipboard_T *cbd);
+#endif
+
 /*
  * Selection stuff using Visual mode, for cutting and pasting text to other
  * windows.
@@ -1840,7 +1846,7 @@ clip_update_modeless_selection(
     }
 }
 
-    int
+    static int
 clip_gen_own_selection(Clipboard_T *cbd)
 {
 #ifdef FEAT_XCLIPBOARD
@@ -1855,7 +1861,7 @@ clip_gen_own_selection(Clipboard_T *cbd)
 #endif
 }
 
-    void
+    static void
 clip_gen_lose_selection(Clipboard_T *cbd)
 {
 #ifdef FEAT_XCLIPBOARD
@@ -2846,7 +2852,7 @@ clip_x11_set_selection(Clipboard_T *cbd UNUSED)
 
 #if (defined(FEAT_X11) && defined(FEAT_XCLIPBOARD) && defined(USE_SYSTEM)) \
        || defined(PROTO)
-    int
+    static int
 clip_x11_owner_exists(Clipboard_T *cbd)
 {
     return XGetSelectionOwner(X_DISPLAY, cbd->sel_atom) != None;
index a23c2638f45663d69919de282cbcb816070945cf..b9c203ce29c271b241df658b7623903fd13527b6 100644 (file)
@@ -123,6 +123,7 @@ static void unserialize_pos(bufinfo_T *bi, pos_T *pos);
 static void serialize_visualinfo(bufinfo_T *bi, visualinfo_T *info);
 static void unserialize_visualinfo(bufinfo_T *bi, visualinfo_T *info);
 #endif
+static void u_saveline(linenr_T lnum);
 
 #define U_ALLOC_LINE(size) lalloc(size, FALSE)
 
@@ -3435,7 +3436,7 @@ u_clearall(buf_T *buf)
 /*
  * Save the line "lnum" for the "U" command.
  */
-    void
+    static void
 u_saveline(linenr_T lnum)
 {
     if (lnum == curbuf->b_u_line_lnum)     /* line is already saved */
index c6944cf4fff213e7814926be7b2df3811e452327..895b4ff5e652262cdc695c5d4f79dba7c8beb896 100644 (file)
@@ -765,6 +765,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1891,
 /**/
     1890,
 /**/
index f4154e7e12dfe1aa03b57a358cf0d25ad5b35761..fabd196efb17f5147cf70bcbfa8f106f45d97ba6 100644 (file)
@@ -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);
@@ -3573,6 +3566,16 @@ win_init_empty(win_T *wp)
 #endif
 }
 
+/*
+ * 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().
@@ -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;