summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/arabic.c14
-rw-r--r--src/blowfish.c7
-rw-r--r--src/buffer.c6
-rw-r--r--src/charset.c4
-rw-r--r--src/crypt_zip.c2
-rw-r--r--src/digraph.c1
-rw-r--r--src/edit.c15
-rw-r--r--src/eval.c9
-rw-r--r--src/evalfunc.c26
-rw-r--r--src/ex_cmds.c2
-rw-r--r--src/ex_cmds2.c13
-rw-r--r--src/ex_docmd.c16
-rw-r--r--src/ex_eval.c6
-rw-r--r--src/ex_getln.c12
-rw-r--r--src/fileio.c16
-rw-r--r--src/getchar.c9
-rw-r--r--src/gui.c11
-rw-r--r--src/gui_at_fs.c71
-rw-r--r--src/gui_athena.c10
-rw-r--r--src/gui_gtk_x11.c1
-rw-r--r--src/gui_mac.c1
-rw-r--r--src/gui_motif.c33
-rw-r--r--src/gui_photon.c4
-rw-r--r--src/gui_w32.c8
-rw-r--r--src/gui_x11.c3
-rw-r--r--src/hangulin.c2
-rw-r--r--src/hardcopy.c53
-rw-r--r--src/if_cscope.c11
-rw-r--r--src/if_mzsch.c39
-rw-r--r--src/if_python3.c4
-rw-r--r--src/if_xcmdsrv.c2
-rw-r--r--src/integration.c25
-rw-r--r--src/json.c1
-rw-r--r--src/main.c4
-rw-r--r--src/mbyte.c9
-rw-r--r--src/memline.c4
-rw-r--r--src/message.c15
-rw-r--r--src/misc1.c51
-rw-r--r--src/misc2.c10
-rw-r--r--src/move.c7
-rw-r--r--src/netbeans.c2
-rw-r--r--src/normal.c13
-rw-r--r--src/ops.c7
-rw-r--r--src/option.c14
-rw-r--r--src/os_unix.c39
-rw-r--r--src/os_win32.c22
-rw-r--r--src/pty.c2
-rw-r--r--src/regexp.c18
-rw-r--r--src/screen.c14
-rw-r--r--src/search.c14
-rw-r--r--src/sha256.c4
-rw-r--r--src/spell.c8
-rw-r--r--src/spellfile.c12
-rw-r--r--src/syntax.c43
-rw-r--r--src/tag.c6
-rw-r--r--src/term.c8
-rw-r--r--src/ui.c3
-rw-r--r--src/undo.c15
-rw-r--r--src/version.c4
-rw-r--r--src/window.c4
-rw-r--r--src/workshop.c2
61 files changed, 21 insertions, 770 deletions
diff --git a/src/arabic.c b/src/arabic.c
index 9bc166919..6c15221f6 100644
--- a/src/arabic.c
+++ b/src/arabic.c
@@ -17,20 +17,6 @@
#if defined(FEAT_ARABIC) || defined(PROTO)
-static int A_is_a(int cur_c);
-static int A_is_s(int cur_c);
-static int A_is_f(int cur_c);
-static int chg_c_a2s(int cur_c);
-static int chg_c_a2i(int cur_c);
-static int chg_c_a2m(int cur_c);
-static int chg_c_a2f(int cur_c);
-#if 0
-static int chg_c_i2m(int cur_c);
-#endif
-static int chg_c_f2m(int cur_c);
-static int chg_c_laa2i(int hid_c);
-static int chg_c_laa2f(int hid_c);
-static int half_shape(int c);
static int A_firstc_laa(int c1, int c);
static int A_is_harakat(int c);
static int A_is_iso(int c);
diff --git a/src/blowfish.c b/src/blowfish.c
index eaf0b9ed5..e361d98cd 100644
--- a/src/blowfish.c
+++ b/src/blowfish.c
@@ -56,13 +56,6 @@ typedef struct {
} bf_state_T;
-static void bf_e_block(bf_state_T *state, UINT32_T *p_xl, UINT32_T *p_xr);
-static void bf_e_cblock(bf_state_T *state, char_u *block);
-static int bf_check_tables(UINT32_T pax[18], UINT32_T sbx[4][256], UINT32_T val);
-static int bf_self_test(void);
-static void bf_key_init(bf_state_T *state, char_u *password, char_u *salt, int salt_len);
-static void bf_cfb_init(bf_state_T *state, char_u *seed, int seed_len);
-
/* Blowfish code */
static UINT32_T pax_init[18] = {
0x243f6a88u, 0x85a308d3u, 0x13198a2eu,
diff --git a/src/buffer.c b/src/buffer.c
index a4afe132e..35dd65fc9 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -51,10 +51,6 @@ static void clear_wininfo(buf_T *buf);
# define dev_T unsigned
#endif
-#if defined(FEAT_SIGNS)
-static void insert_sign(buf_T *buf, signlist_T *prev, signlist_T *next, int id, linenr_T lnum, int typenr);
-#endif
-
#if defined(FEAT_QUICKFIX)
static char *msg_loclist = N_("[Location List]");
static char *msg_qflist = N_("[Quickfix List]");
@@ -2839,8 +2835,6 @@ buflist_setfpos(
}
#ifdef FEAT_DIFF
-static int wininfo_other_tab_diff(wininfo_T *wip);
-
/*
* Return TRUE when "wip" has 'diff' set and the diff is only for another tab
* page. That's because a diff is local to a tab page.
diff --git a/src/charset.c b/src/charset.c
index a4816887e..028095453 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -9,10 +9,6 @@
#include "vim.h"
-#ifdef FEAT_LINEBREAK
-static int win_chartabsize(win_T *wp, char_u *p, colnr_T col);
-#endif
-
#ifdef FEAT_MBYTE
# if defined(HAVE_WCHAR_H)
# include <wchar.h> /* for towupper() and towlower() */
diff --git a/src/crypt_zip.c b/src/crypt_zip.c
index 08cf6082c..e50fa6b1c 100644
--- a/src/crypt_zip.c
+++ b/src/crypt_zip.c
@@ -36,8 +36,6 @@ typedef struct {
} zip_state_T;
-static void make_crc_tab(void);
-
static u32_T crc_32_table[256];
/*
diff --git a/src/digraph.c b/src/digraph.c
index 6909c5b9c..e707b058d 100644
--- a/src/digraph.c
+++ b/src/digraph.c
@@ -28,7 +28,6 @@ typedef struct digraph
result_T result;
} digr_T;
-static int getexactdigraph(int, int, int);
static void printdigraph(digr_T *);
/* digraphs added by the user */
diff --git a/src/edit.c b/src/edit.c
index 72dc58622..4b9bdffb4 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -155,15 +155,9 @@ static void ins_ctrl_x(void);
static int has_compl_option(int dict_opt);
static int ins_compl_accept_char(int c);
static int ins_compl_add(char_u *str, int len, int icase, char_u *fname, char_u **cptext, int cdir, int flags, int adup);
-static int ins_compl_equal(compl_T *match, char_u *str, int len);
static void ins_compl_longest_match(compl_T *match);
-static void ins_compl_add_matches(int num_matches, char_u **matches, int icase);
-static int ins_compl_make_cyclic(void);
-static void ins_compl_upd_pum(void);
static void ins_compl_del_pum(void);
static int pum_wanted(void);
-static int pum_enough_matches(void);
-static void ins_compl_dictionaries(char_u *dict, char_u *pat, int flags, int thesaurus);
static void ins_compl_files(int count, char_u **files, int thesaurus, int flags, regmatch_T *regmatch, char_u *buf, int *dir);
static char_u *find_line_end(char_u *ptr);
static void ins_compl_free(void);
@@ -178,19 +172,15 @@ static void ins_compl_set_original_text(char_u *str);
static void ins_compl_addfrommatch(void);
static int ins_compl_prep(int c);
static void ins_compl_fixRedoBufForLeader(char_u *ptr_arg);
-static buf_T *ins_compl_next_buf(buf_T *buf, int flag);
# if defined(FEAT_COMPL_FUNC) || defined(FEAT_EVAL)
static void ins_compl_add_list(list_T *list);
static void ins_compl_add_dict(dict_T *dict);
# endif
-static int ins_compl_get_exp(pos_T *ini);
static void ins_compl_delete(void);
static void ins_compl_insert(int in_compl_func);
-static int ins_compl_next(int allow_get_expansion, int count, int insert_match, int in_compl_func);
static int ins_compl_key2dir(int c);
static int ins_compl_pum_key(int c);
static int ins_compl_key2count(int c);
-static int ins_compl_use_match(int c);
static int ins_complete(int c, int enable_pum);
static void show_pum(int prev_w_wrow, int prev_w_leftcol);
static unsigned quote_meta(char_u *dest, char_u *str, int len);
@@ -212,7 +202,6 @@ static void internal_format(int textwidth, int second_indent, int flags, int for
static void check_auto_format(int);
static void redo_literal(int c);
static void start_arrow(pos_T *end_insert_pos);
-static void start_arrow_with_change(pos_T *end_insert_pos, int change);
static void start_arrow_common(pos_T *end_insert_pos, int change);
#ifdef FEAT_SPELL
static void check_spell_redraw(void);
@@ -221,9 +210,7 @@ static int spell_bad_len = 0; /* length of located bad word */
#endif
static void stop_insert(pos_T *end_insert_pos, int esc, int nomove);
static int echeck_abbr(int);
-static int replace_pop(void);
static void replace_join(int off);
-static void replace_pop_ins(void);
#ifdef FEAT_MBYTE
static void mb_replace_pop_ins(int cc);
#endif
@@ -9052,8 +9039,6 @@ ins_del(void)
AppendCharToRedobuff(K_DEL);
}
-static void ins_bs_one(colnr_T *vcolp);
-
/*
* Delete one character for ins_bs().
*/
diff --git a/src/eval.c b/src/eval.c
index 358217a82..4f457a457 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -232,7 +232,6 @@ static int eval5(char_u **arg, typval_T *rettv, int evaluate);
static int eval6(char_u **arg, typval_T *rettv, int evaluate, int want_string);
static int eval7(char_u **arg, typval_T *rettv, int evaluate, int want_string);
-static int eval_index(char_u **arg, typval_T *rettv, int evaluate, int verbose);
static int get_string_tv(char_u **arg, typval_T *rettv, int evaluate);
static int get_lit_string_tv(char_u **arg, typval_T *rettv, int evaluate);
static int free_unref_items(int copyID);
@@ -3050,8 +3049,6 @@ del_menutrans_vars(void)
* get_user_var_name().
*/
-static char_u *cat_prefix_varname(int prefix, char_u *name);
-
static char_u *varnamebuf = NULL;
static int varnamebuflen = 0;
@@ -7957,6 +7954,7 @@ get_user_input(
if (defstr != NULL)
{
int save_ex_normal_busy = ex_normal_busy;
+
ex_normal_busy = 0;
rettv->vval.v_string =
getcmdline_prompt(secret ? NUL : '@', p, echo_attr,
@@ -8507,8 +8505,6 @@ typedef enum
VAR_FLAVOUR_VIMINFO /* all uppercase */
} var_flavour_T;
-static var_flavour_T var_flavour(char_u *varname);
-
static var_flavour_T
var_flavour(char_u *varname)
{
@@ -9431,9 +9427,6 @@ var_exists(char_u *var)
/*
* Functions for ":8" filename modifier: get 8.3 version of a filename.
*/
-static int get_short_pathname(char_u **fnamep, char_u **bufp, int *fnamelen);
-static int shortpath_for_invalid_fname(char_u **fname, char_u **bufp, int *fnamelen);
-static int shortpath_for_partial(char_u **fnamep, char_u **bufp, int *fnamelen);
/*
* Get the short path (8.3) for the filename in "fnamep".
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 9faa89ff4..dd9bc1811 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -1121,8 +1121,6 @@ get_tv_lnum(typval_T *argvars)
}
#ifdef FEAT_FLOAT
-static int get_float_arg(typval_T *argvars, float_T *f);
-
/*
* Get the float value of "argvars[0]" into "f".
* Returns FAIL when the argument is not a Number or Float.
@@ -1722,8 +1720,6 @@ f_browsedir(typval_T *argvars UNUSED, typval_T *rettv)
rettv->v_type = VAR_STRING;
}
-static buf_T *find_buffer(typval_T *avar);
-
/*
* Find a buffer by number or exact name.
*/
@@ -3826,8 +3822,6 @@ f_fnamemodify(typval_T *argvars, typval_T *rettv)
vim_free(fbuf);
}
-static void foldclosed_both(typval_T *argvars, typval_T *rettv, int end);
-
/*
* "foldclosed()" function
*/
@@ -4485,8 +4479,6 @@ f_getbufinfo(typval_T *argvars, typval_T *rettv)
}
}
-static void get_buffer_lines(buf_T *buf, linenr_T start, linenr_T end, int retlist, typval_T *rettv);
-
/*
* Get line or list of lines from buffer "buf" into "rettv".
* Return a range (from start to end) of lines in rettv from the specified
@@ -7566,8 +7558,6 @@ f_localtime(typval_T *argvars UNUSED, typval_T *rettv)
rettv->vval.v_number = (varnumber_T)time(NULL);
}
-static void get_maparg(typval_T *argvars, typval_T *rettv, int exact);
-
static void
get_maparg(typval_T *argvars, typval_T *rettv, int exact)
{
@@ -8177,8 +8167,6 @@ f_matchstrpos(typval_T *argvars, typval_T *rettv)
find_some_match(argvars, rettv, MATCH_POS);
}
-static void max_min(typval_T *argvars, typval_T *rettv, int domax);
-
static void
max_min(typval_T *argvars, typval_T *rettv, int domax)
{
@@ -8261,8 +8249,6 @@ f_min(typval_T *argvars, typval_T *rettv)
max_min(argvars, rettv, FALSE);
}
-static int mkdir_recurse(char_u *dir, int prot);
-
/*
* Create the directory in which "dir" is located, and higher levels when
* needed.
@@ -9057,8 +9043,6 @@ f_reg_recording(typval_T *argvars UNUSED, typval_T *rettv)
}
#if defined(FEAT_RELTIME)
-static int list2proftime(typval_T *arg, proftime_T *tm);
-
/*
* Convert a List to proftime_T.
* Return FAIL when there is something wrong.
@@ -9171,9 +9155,6 @@ f_reltimestr(typval_T *argvars UNUSED, typval_T *rettv)
}
#if defined(FEAT_CLIENTSERVER) && defined(FEAT_X11)
-static void make_connection(void);
-static int check_connection(void);
-
static void
make_connection(void)
{
@@ -9843,8 +9824,6 @@ f_reverse(typval_T *argvars, typval_T *rettv)
#define SP_END 0x40 /* leave cursor at end of match */
#define SP_COLUMN 0x80 /* start at cursor column */
-static int get_search_arg(typval_T *varp, int *flagsp);
-
/*
* Get flags for a search function.
* Possibly sets "p_ws".
@@ -10674,8 +10653,6 @@ f_setline(typval_T *argvars, typval_T *rettv)
set_buffer_lines(curbuf, lnum, FALSE, &argvars[1], rettv);
}
-static void set_qf_ll_list(win_T *wp, typval_T *list_arg, typval_T *action_arg, typval_T *what_arg, typval_T *rettv);
-
/*
* Used by "setqflist()" and "setloclist()" functions
*/
@@ -11215,7 +11192,6 @@ typedef struct
int item_compare_keep_zero;
} sortinfo_T;
static sortinfo_T *sortinfo = NULL;
-static void do_sort_uniq(typval_T *argvars, typval_T *rettv, int sort);
#define ITEM_COMPARE_FAIL 999
/*
@@ -12860,8 +12836,6 @@ f_tabpagenr(typval_T *argvars UNUSED, typval_T *rettv)
}
-static int get_winnr(tabpage_T *tp, typval_T *argvar);
-
/*
* Common code for tabpagewinnr() and winnr().
*/
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 0c9644cc6..99c19f913 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -1813,7 +1813,6 @@ append_redir(
#if defined(FEAT_VIMINFO) || defined(PROTO)
-static int no_viminfo(void);
static int read_viminfo_barline(vir_T *virp, int got_encoding, int force, int writing);
static void write_viminfo_version(FILE *fp_out);
static void write_viminfo_barlines(vir_T *virp, FILE *fp_out);
@@ -7568,7 +7567,6 @@ struct sign
static sign_T *first_sign = NULL;
static int next_sign_typenr = 1;
-static int sign_cmd_idx(char_u *begin_cmd, char_u *end_cmd);
static void sign_list_defined(sign_T *sp);
static void sign_undefine(sign_T *sp, sign_T *sp_prev);
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index c0cb87f70..032ebe93b 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -68,7 +68,6 @@ typedef struct sn_prl_S
#if defined(FEAT_EVAL) || defined(PROTO)
static int debug_greedy = FALSE; /* batch mode debugging: don't save
and restore typeahead. */
-static int get_maxbacktrace_level(void);
static void do_setdebugtracelevel(char_u *arg);
static void do_checkbacktracelevel(void);
static void do_showbacktrace(char_u *cmd);
@@ -573,7 +572,6 @@ static garray_T prof_ga = {0, 0, sizeof(struct debuggy), 4, NULL};
#define DBG_FILE 2
#define DBG_EXPR 3
-static int dbg_parsearg(char_u *arg, garray_T *gap);
static linenr_T debuggy_find(int file,char_u *fname, linenr_T after, garray_T *gap, int *fp);
/*
@@ -1611,7 +1609,6 @@ profile_divide(proftime_T *tm, int count, proftime_T *tm2)
/*
* Functions for profiling.
*/
-static void script_do_profile(scriptitem_T *si);
static void script_dump_profile(FILE *fd);
static proftime_T prof_wait_time;
@@ -2242,8 +2239,6 @@ can_abandon(buf_T *buf, int forceit)
|| forceit);
}
-static void add_bufnum(int *bufnrs, int *bufnump, int nr);
-
/*
* Add a buffer number to "bufnrs", unless it's already there.
*/
@@ -2444,10 +2439,8 @@ buf_write_all(buf_T *buf, int forceit)
* Code to handle the argument list.
*/
-static char_u *do_one_arg(char_u *str);
static int do_arglist(char_u *str, int what, int after, int will_edit);
static void alist_check_arg_idx(void);
-static int editing_arg_idx(win_T *win);
static void alist_add_list(int count, char_u **files, int after, int will_edit);
#define AL_SET 1
#define AL_ADD 2
@@ -4299,8 +4292,6 @@ static char_u *get_one_sourceline(struct source_cookie *sp);
#if (defined(WIN32) && defined(FEAT_CSCOPE)) || defined(HAVE_FD_CLOEXEC)
# define USE_FOPEN_NOINH
-static FILE *fopen_noinh_readbin(char *filename);
-
/*
* Special function to open a file without handle inheritance.
* When possible the handle is closed on exec().
@@ -5291,8 +5282,6 @@ ex_checktime(exarg_T *eap)
#if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \
&& (defined(FEAT_EVAL) || defined(FEAT_MULTI_LANG))
# define HAVE_GET_LOCALE_VAL
-static char_u *get_locale_val(int what);
-
static char_u *
get_locale_val(int what)
{
@@ -5410,8 +5399,6 @@ get_mess_lang(void)
|| ((defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \
&& (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE)) \
&& !defined(LC_MESSAGES))
-static char_u *get_mess_env(void);
-
/*
* Get the language used for messages from the environment.
*/
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 25d70c4f8..2d233ace8 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -61,7 +61,6 @@ static char_u *get_user_command_name(int idx);
# define IS_USER_CMDIDX(idx) (FALSE)
#endif
-static int compute_buffer_local_count(int addr_type, int lnum, int local);
#ifdef FEAT_EVAL
static char_u *do_one_cmd(char_u **, int, struct condstack *, char_u *(*fgetline)(int, void *, int), void *cookie);
#else
@@ -116,7 +115,6 @@ static int getargopt(exarg_T *eap);
# define ex_cexpr ex_ni
#endif
-static int check_more(int, int);
static linenr_T get_address(exarg_T *, char_u **, int addr_type, int skip, int silent, int to_other_file, int address_count);
static void get_flags(exarg_T *eap);
#if !defined(FEAT_PERL) \
@@ -498,9 +496,6 @@ struct dbg_stuff
except_T *current_exception;
};
-static void save_dbg_stuff(struct dbg_stuff *dsp);
-static void restore_dbg_stuff(struct dbg_stuff *dsp);
-
static void
save_dbg_stuff(struct dbg_stuff *dsp)
{
@@ -1633,9 +1628,6 @@ compute_buffer_local_count(int addr_type, int lnum, int offset)
return buf->b_fnum;
}
-static int current_win_nr(win_T *win);
-static int current_tab_nr(tabpage_T *tab);
-
static int
current_win_nr(win_T *win)
{
@@ -4910,8 +4902,6 @@ correct_range(exarg_T *eap)
}
#ifdef FEAT_QUICKFIX
-static char_u *skip_grep_pat(exarg_T *eap);
-
/*
* For a ":vimgrep" or ":vimgrepadd" command return a pointer past the
* pattern. Otherwise return eap->arg.
@@ -5818,12 +5808,6 @@ get_command_name(expand_T *xp UNUSED, int idx)
#endif
#if defined(FEAT_USR_CMDS) || defined(PROTO)
-static int uc_add_command(char_u *name, size_t name_len, char_u *rep, long argt, long def, int flags, int compl, char_u *compl_arg, int addr_type, int force);
-static void uc_list(char_u *name, size_t name_len);
-static int uc_scan_attr(char_u *attr, size_t len, long *argt, long *def, int *flags, int *compl, char_u **compl_arg, int* attr_type_arg);
-static char_u *uc_split_args(char_u *arg, size_t *lenp);
-static size_t uc_check_code(char_u *code, size_t len, char_u *buf, ucmd_T *cmd, exarg_T *eap, char_u **split_buf, size_t *split_len);
-
static int
uc_add_command(
char_u *name,
diff --git a/src/ex_eval.c b/src/ex_eval.c
index f209c5f95..055e26797 100644
--- a/src/ex_eval.c
+++ b/src/ex_eval.c
@@ -15,7 +15,6 @@
#if defined(FEAT_EVAL) || defined(PROTO)
-static void free_msglist(struct msglist *l);
static int throw_exception(void *, except_type_T, char_u *);
static char_u *get_end_emsg(struct condstack *cstack);
@@ -65,11 +64,6 @@ static char_u *get_end_emsg(struct condstack *cstack);
# define THROW_ON_INTERRUPT_TRUE
#endif
-static void catch_exception(except_T *excp);
-static void finish_exception(except_T *excp);
-static void discard_exception(except_T *excp, int was_finished);
-static void report_pending(int action, int pending, void *value);
-
/*
* When several errors appear in a row, setting "force_abort" is delayed until
* the failing command returned. "cause_abort" is set to TRUE meanwhile, in
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 644259863..e37ebe2c9 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -75,11 +75,6 @@ static int hisnum[HIST_COUNT] = {0, 0, 0, 0, 0};
static int hislen = 0; /* actual length of history tables */
static int hist_char2type(int c);
-
-static int in_history(int, char_u *, int, int, int);
-# ifdef FEAT_EVAL
-static int calc_hist_idx(int histype, int num);
-# endif
#endif
#ifdef FEAT_RIGHTLEFT
@@ -103,9 +98,6 @@ static void draw_cmdline(int start, int len);
static void save_cmdline(struct cmdline_info *ccp);
static void restore_cmdline(struct cmdline_info *ccp);
static int cmdline_paste(int regname, int literally, int remcr);
-#if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
-static void redrawcmd_preedit(void);
-#endif
#ifdef FEAT_WILDMENU
static void cmdline_del(int from);
#endif
@@ -5049,8 +5041,6 @@ expand_cmdline(
* Remove "@ab" if the top of 'helplang' is "ab" and the language of the first
* tag matches it. Otherwise remove "@en" if "en" is the only language.
*/
-static void cleanup_help_tags(int num_file, char_u **file);
-
static void
cleanup_help_tags(int num_file, char_u **file)
{
@@ -6707,8 +6697,6 @@ static int viminfo_hisidx[HIST_COUNT] = {0, 0, 0, 0, 0};
static int viminfo_hislen[HIST_COUNT] = {0, 0, 0, 0, 0};
static int viminfo_add_at_front = FALSE;
-static int hist_type2char(int type, int use_question);
-
/*
* Translate a history type number to the associated character.
*/
diff --git a/src/fileio.c b/src/fileio.c
index 93dbf0c69..90f8517db 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -39,9 +39,6 @@ static void check_marks_read(void);
#ifdef FEAT_CRYPT
static char_u *check_for_cryptkey(char_u *cryptkey, char_u *ptr, long *sizep, off_T *filesizep, int newfile, char_u *fname, int *did_ask);
#endif
-#ifdef UNIX
-static void set_file_time(char_u *fname, time_t atime, time_t mtime);
-#endif
static int set_rw_fname(char_u *fname, char_u *sfname);
static int msg_add_fileformat(int eol_type);
static void msg_add_eol(void);
@@ -129,10 +126,6 @@ static int get_win_fio_flags(char_u *ptr);
static int get_mac_fio_flags(char_u *ptr);
# endif
#endif
-static int move_lines(buf_T *frombuf, buf_T *tobuf);
-#ifdef TEMPDIRNAMES
-static void vim_settempdir(char_u *tempdir);
-#endif
static char *e_auchangedbuf = N_("E812: Autocommands changed buffer or buffer name");
/*
@@ -7884,16 +7877,7 @@ static int current_augroup = AUGROUP_DEFAULT;
static int au_need_clean = FALSE; /* need to delete marked patterns */
-static void show_autocmd(AutoPat *ap, event_T event);
-static void au_remove_pat(AutoPat *ap);
-static void au_remove_cmds(AutoPat *ap);
-static void au_cleanup(void);
-static int au_new_group(char_u *name);
-static void au_del_group(char_u *name);
-static event_T event_name2nr(char_u *start, char_u **end);
static char_u *event_nr2name(event_T event);
-static char_u *find_end_event(char_u *arg, int have_group);
-static int event_ignored(event_T event);
static int au_get_grouparg(char_u **argp);
static int do_autocmd_event(event_T event, char_u *pat, int nested, char_u *cmd, int forceit, int group);
static int apply_autocmds_group(event_T event, char_u *fname, char_u *fname_io, int force, int group, buf_T *buf, exarg_T *eap);
diff --git a/src/getchar.c b/src/getchar.c
index 6331cd76e..679eae160 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -108,17 +108,8 @@ static char_u noremapbuf_init[TYPELEN_INIT]; /* initial typebuf.tb_noremap */
static int last_recorded_len = 0; /* number of last recorded chars */
-static char_u *get_buffcont(buffheader_T *, int);
-static void add_buff(buffheader_T *, char_u *, long n);
-static void add_num_buff(buffheader_T *, long);
-static void add_char_buff(buffheader_T *, int);
-static int read_readbuffers(int advance);
static int read_readbuf(buffheader_T *buf, int advance);
-static void start_stuff(void);
-static int read_redo(int, int);
-static void copy_redo(int);
static void init_typebuf(void);
-static void gotchars(char_u *, int);
static void may_sync_undo(void);
static void closescript(void);
static int vgetorpeek(int);
diff --git a/src/gui.c b/src/gui.c
index 82ca09dd2..1341d505d 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -17,21 +17,14 @@ gui_T gui;
static void set_guifontwide(char_u *font_name);
#endif
static void gui_check_pos(void);
-static void gui_position_components(int);
static void gui_outstr(char_u *, int);
static int gui_screenchar(int off, int flags, guicolor_T fg, guicolor_T bg, int back);
-#ifdef FEAT_GUI_GTK
-static int gui_screenstr(int off, int len, int flags, guicolor_T fg, guicolor_T bg, int back);
-#endif
static void gui_delete_lines(int row, int count);
static void gui_insert_lines(int row, int count);
-static void fill_mouse_coord(char_u *p, int col, int row);
#if defined(FEAT_GUI_TABLINE) || defined(PROTO)
static int gui_has_tabline(void);
#endif
static void gui_do_scrollbar(win_T *wp, int which, int enable);
-static colnr_T scroll_line_len(linenr_T lnum);
-static linenr_T gui_find_longest_lnum(void);
static void gui_update_horiz_scrollbar(int);
static void gui_set_fg_color(char_u *name);
static void gui_set_bg_color(char_u *name);
@@ -5023,7 +5016,6 @@ ex_gui(exarg_T *eap)
/*
* This is shared between Athena, Motif and GTK.
*/
-static void gfp_setname(char_u *fname, void *cookie);
/*
* Callback function for do_in_runtimepath().
@@ -5384,9 +5376,6 @@ gui_do_findrepl(
#endif
#if defined(HAVE_DROP_FILE) || defined(PROTO)
-
-static void gui_wingoto_xy(int x, int y);
-
/*
* Jump to the window at specified point (x, y).
*/
diff --git a/src/gui_at_fs.c b/src/gui_at_fs.c
index 26b96e07c..77c8ea6a5 100644
--- a/src/gui_at_fs.c
+++ b/src/gui_at_fs.c
@@ -170,38 +170,19 @@ static int (*SFfunc)();
static int SFstatus = SEL_FILE_NULL;
-/***************** static functions */
+/***************** forward declare static functions */
static void SFsetText(char *path);
static void SFtextChanged(void);
-static char *SFgetText(void);
-static void SFupdatePath(void);
static int SFgetDir(SFDir *dir);
static void SFdrawLists(int doScroll);
static void SFdrawList(int n, int doScroll);
static void SFclearList(int n, int doScroll);
-static void SFbuttonPressList(Widget w, int n, XButtonPressedEvent *event);
-static void SFbuttonReleaseList(Widget w, int n, XButtonReleasedEvent *event);
-static void SFdirModTimer(XtPointer cl, XtIntervalId *id);
static char SFstatChar(stat_T *statBuf);
-static void SFdrawStrings(Window w, SFDir *dir, int from, int to);
-static int SFnewInvertEntry(int n, XMotionEvent *event);
-static void SFinvertEntry(int n);
-static void SFenterList(Widget w, int n, XEnterWindowEvent *event);
-static void SFleaveList(Widget w, int n, XEvent *event);
static void SFmotionList(Widget w, int n, XMotionEvent *event);
-static void SFvFloatSliderMovedCallback(Widget w, XtPointer n, XtPointer fnew);
static void SFvSliderMovedCallback(Widget w, int n, int nw);
-static void SFvAreaSelectedCallback(Widget w, XtPointer n, XtPointer pnew);
-static void SFhSliderMovedCallback(Widget w, XtPointer n, XtPointer nw);
-static void SFhAreaSelectedCallback(Widget w, XtPointer n, XtPointer pnew);
-static void SFpathSliderMovedCallback(Widget w, XtPointer client_data, XtPointer nw);
-static void SFpathAreaSelectedCallback(Widget w, XtPointer client_data, XtPointer pnew);
static Boolean SFworkProc(void);
static int SFcompareEntries(const void *p, const void *q);
-static void SFprepareToReturn(void);
-static void SFcreateWidgets(Widget toplevel, char *prompt, char *ok, char *cancel);
-static void SFsetColors(guicolor_T bg, guicolor_T fg, guicolor_T scroll_bg, guicolor_T scrollfg);
/***************** xstat.h */
@@ -237,8 +218,6 @@ static SFLogin *SFlogins;
static int SFtwiddle = 0;
-static int SFchdir(char *path);
-
static int
SFchdir(char *path)
{
@@ -256,8 +235,6 @@ SFchdir(char *path)
return result;
}
-static void SFfree(int i);
-
static void
SFfree(int i)
{
@@ -279,16 +256,12 @@ SFfree(int i)
dir->dir = NULL;
}
-static void SFstrdup(char **s1, char *s2);
-
static void
SFstrdup(char **s1, char *s2)
{
*s1 = strcpy(XtMalloc((unsigned)(strlen(s2) + 1)), s2);
}
-static void SFunreadableDir(SFDir *dir);
-
static void
SFunreadableDir(SFDir *dir)
{
@@ -302,8 +275,6 @@ SFunreadableDir(SFDir *dir)
dir->nChars = strlen(cannotOpen);
}
-static void SFreplaceText(SFDir *dir, char *str);
-
static void
SFreplaceText(SFDir *dir, char *str)
{
@@ -323,8 +294,6 @@ SFreplaceText(SFDir *dir, char *str)
SFtextChanged();
}
-static void SFexpand(char *str);
-
static void
SFexpand(char *str)
{
@@ -379,8 +348,6 @@ SFexpand(char *str)
XtFree(growing);
}
-static int SFfindFile(SFDir *dir, char *str);
-
static int
SFfindFile(SFDir *dir, char *str)
{
@@ -478,8 +445,6 @@ SFfindFile(SFDir *dir, char *str)
return 0;
}
-static void SFunselect(void);
-
static void
SFunselect(void)
{
@@ -492,16 +457,12 @@ SFunselect(void)
dir->endSelection = -1;
}
-static int SFcompareLogins(const void *p, const void *q);
-
static int
SFcompareLogins(const void *p, const void *q)
{
return strcmp(((SFLogin *)p)->name, ((SFLogin *)q)->name);
}
-static void SFgetHomeDirs(void);
-
static void
SFgetHomeDirs(void)
{
@@ -568,8 +529,6 @@ SFgetHomeDirs(void)
(void)strcat(entries[i].real, "/");
}
-static int SFfindHomeDir(char *begin, char *end);
-
static int
SFfindHomeDir(char *begin, char *end)
{
@@ -868,8 +827,6 @@ SFbuttonReleaseList(
}
}
-static int SFcheckDir(int n, SFDir *dir);
-
static int
SFcheckDir(int n, SFDir *dir)
{
@@ -932,8 +889,6 @@ SFcheckDir(int n, SFDir *dir)
return 0;
}
-static int SFcheckFiles(SFDir *dir);
-
static int
SFcheckFiles(SFDir *dir)
{
@@ -1077,8 +1032,6 @@ static int SFcurrentListY;
static XtIntervalId SFscrollTimerId;
-static void SFinitFont(void);
-
static void
SFinitFont(void)
{
@@ -1128,8 +1081,6 @@ SFinitFont(void)
#endif
}
-static void SFcreateGC(void);
-
static void
SFcreateGC(void)
{
@@ -1261,8 +1212,6 @@ SFclearList(int n, int doScroll)
}
}
-static void SFdeleteEntry(SFDir *dir, SFEntry *entry);
-
static void
SFdeleteEntry(SFDir *dir, SFEntry *entry)
{
@@ -1313,8 +1262,6 @@ SFdeleteEntry(SFDir *dir, SFEntry *entry)
#endif
}
-static void SFwriteStatChar(char *name, int last, stat_T *statBuf);
-
static void
SFwriteStatChar(
char *name,
@@ -1324,8 +1271,6 @@ SFwriteStatChar(
name[last] = SFstatChar(statBuf);
}
-static int SFstatAndCheck(SFDir *dir, SFEntry *entry);
-
static int
SFstatAndCheck(SFDir *dir, SFEntry *entry)
{
@@ -1532,8 +1477,6 @@ SFinvertEntry(int n)
SFentryHeight);
}
-static unsigned long SFscrollTimerInterval(void);
-
static unsigned long
SFscrollTimerInterval(void)
{
@@ -1561,8 +1504,6 @@ SFscrollTimerInterval(void)
return (unsigned long)t;
}
-static void SFscrollTimer(XtPointer p, XtIntervalId *id);
-
static void
SFscrollTimer(XtPointer p, XtIntervalId *id UNUSED)
{
@@ -2131,8 +2072,6 @@ static char *oneLineTextEditTranslations = "\
Ctrl<Key>M: redraw-display()\n\
";
-static void SFexposeList(Widget w, XtPointer n, XEvent *event, Boolean *cont);
-
static void
SFexposeList(
Widget w UNUSED,
@@ -2146,8 +2085,6 @@ SFexposeList(
SFdrawList((int)(long)n, SF_DO_NOT_SCROLL);
}
-static void SFmodVerifyCallback(Widget w, XtPointer client_data, XEvent *event, Boolean *cont);
-
static void
SFmodVerifyCallback(
Widget w UNUSED,
@@ -2164,8 +2101,6 @@ SFmodVerifyCallback(
SFstatus = SEL_FILE_TEXT;
}
-static void SFokCallback(Widget w, XtPointer cl, XtPointer cd);
-
static void
SFokCallback(Widget w UNUSED, XtPointer cl UNUSED, XtPointer cd UNUSED)
{
@@ -2178,8 +2113,6 @@ static XtCallbackRec SFokSelect[] =
{ NULL, (XtPointer) NULL },
};
-static void SFcancelCallback(Widget w, XtPointer cl, XtPointer cd);
-
static void
SFcancelCallback(Widget w UNUSED, XtPointer cl UNUSED, XtPointer cd UNUSED)
{
@@ -2192,8 +2125,6 @@ static XtCallbackRec SFcancelSelect[] =
{ NULL, (XtPointer) NULL },
};
-static void SFdismissAction(Widget w, XEvent *event, String *params, Cardinal *num_params);
-
static void
SFdismissAction(
Widget w UNUSED,
diff --git a/src/gui_athena.c b/src/gui_athena.c
index b6ad2ce7e..155509d1f 100644
--- a/src/gui_athena.c
+++ b/src/gui_athena.c
@@ -52,8 +52,6 @@ static XtIntervalId timer = 0; /* 0 = expired, otherwise active */
static vimmenu_T *a_cur_menu = NULL;
static Cardinal athena_calculate_ins_pos(Widget);
-static Pixmap gui_athena_create_pullright_pixmap(Widget);
-static void gui_athena_menu_timeout(XtPointer, XtIntervalId *);
static void gui_athena_popup_callback(Widget, XtPointer, XtPointer);
static void gui_athena_delayed_arm_action(Widget, XEvent *, String *,
Cardinal *);
@@ -70,8 +68,6 @@ static void gui_mch_reset_focus(void);
static Widget toolBar = (Widget)0;
#endif
-static void gui_athena_scroll_cb_jump(Widget, XtPointer, XtPointer);
-static void gui_athena_scroll_cb_scroll(Widget, XtPointer, XtPointer);
#if defined(FEAT_GUI_DIALOG) || defined(FEAT_MENU)
static void gui_athena_menu_colors(Widget id);
#endif
@@ -445,7 +441,6 @@ gui_x11_destroy_widgets(void)
# endif
static void createXpmImages(char_u *path, char **xpm, Pixmap *sen);
-static void get_toolbar_pixmap(vimmenu_T *menu, Pixmap *sen);
/*
* Allocated a pixmap for toolbar menu "menu".
@@ -646,7 +641,6 @@ static Widget submenu_widget(Widget);
static Boolean has_submenu(Widget);
static void gui_mch_submenu_change(vimmenu_T *mp, int colors);
static void gui_athena_menu_font(Widget id);
-static Boolean gui_athena_menu_has_submenus(Widget, Widget);
void
gui_mch_enable_menu(int flag)
@@ -2041,10 +2035,6 @@ gui_mch_browse(
static int dialogStatus;
static Atom dialogatom;
-static void keyhit_callback(Widget w, XtPointer client_data, XEvent *event, Boolean *cont);
-static void butproc(Widget w, XtPointer client_data, XtPointer call_data);
-static void dialog_wm_handler(Widget w, XtPointer client_data, XEvent *event, Boolean *dum);
-
/*
* Callback function for the textfield. When CR is hit this works like
* hitting the "OK" button, ESC like "Cancel".
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index 3a5c2c68d..291d93c53 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -618,7 +618,6 @@ static gboolean is_key_pressed = FALSE;
static gboolean blink_mode = TRUE;
static gboolean gui_gtk_is_blink_on(void);
-static void gui_gtk_window_clear(GdkWindow *win);
static void
gui_gtk3_redraw(int x, int y, int width, int height)
diff --git a/src/gui_mac.c b/src/gui_mac.c
index a6305936e..aa093a334 100644
--- a/src/gui_mac.c
+++ b/src/gui_mac.c
@@ -300,7 +300,6 @@ static WindowRef drawer = NULL; // TODO: put into gui.h
#ifdef USE_ATSUI_DRAWING
static void gui_mac_set_font_attributes(GuiFont font);
-static void gui_mac_dispose_atsui_style(void);
#endif
/*
diff --git a/src/gui_motif.c b/src/gui_motif.c
index dc167c9fb..da97f1f49 100644
--- a/src/gui_motif.c
+++ b/src/gui_motif.c
@@ -83,13 +83,6 @@ static int tearoff_val = (int)XmTEAR_OFF_ENABLED;
static Widget menuBar;
#endif
-static void scroll_cb(Widget w, XtPointer client_data, XtPointer call_data);
-#ifdef FEAT_GUI_TABLINE
-static void tabline_cb(Widget w, XtPointer client_data, XtPointer call_data);
-static void tabline_button_cb(Widget w, XtPointer client_data, XtPointer call_data);
-static void tabline_menu_cb(Widget w, XtPointer closure, XEvent *e, Boolean *continue_dispatch);
-static void tabline_balloon_cb(BalloonEval *beval, int state);
-#endif
#ifdef FEAT_TOOLBAR
# ifdef FEAT_FOOTER
static void toolbarbutton_enter_cb(Widget, XtPointer, XEvent *, Boolean *);
@@ -97,12 +90,6 @@ static void toolbarbutton_leave_cb(Widget, XtPointer, XEvent *, Boolean *);
# endif
static void reset_focus(void);
#endif
-#ifdef FEAT_FOOTER
-static int gui_mch_compute_footer_height(void);
-#endif
-#ifdef WSDEBUG
-static void attachDump(Widget, char *);
-#endif
static void gui_motif_menu_colors(Widget id);
static void gui_motif_scroll_colors(Widget id);
@@ -306,8 +293,6 @@ tabline_balloon_cb(BalloonEval *beval, int state UNUSED)
static XtExposeProc old_label_expose = NULL;
-static void label_expose(Widget _w, XEvent *_event, Region _region);
-
static void
label_expose(Widget _w, XEvent *_event, Region _region)
{
@@ -1173,9 +1158,7 @@ gui_mch_compute_menu_height(
*/
#include "gui_x11_pm.h"
-static int check_xpm(char_u *path);
static char **get_toolbar_pixmap(vimmenu_T *menu, char **fname);
-static int add_pixmap_args(vimmenu_T *menu, Arg *args, int n);
/*
* Read an Xpm file. Return OK or FAIL.
@@ -2088,8 +2071,6 @@ suppress_dialog_mnemonics(Widget dialog)
}
#if defined(FEAT_BROWSE) || defined(FEAT_GUI_DIALOG)
-static void set_fontlist(Widget wg);
-
/*
* Use the 'guifont' or 'guifontset' as a fontlist for a dialog widget.
*/
@@ -2172,8 +2153,6 @@ static void DialogAcceptCB(Widget, XtPointer, XtPointer);
* - equalize the messages between different GUI implementations as far as
* possible.
*/
-static void set_predefined_label(Widget parent, String name, char *new_label);
-
static void
set_predefined_label(Widget parent, String name, char *new_label)
{
@@ -2404,9 +2383,6 @@ DialogAcceptCB(
static int dialogStatus;
-static void keyhit_callback(Widget w, XtPointer client_data, XEvent *event, Boolean *cont);
-static void butproc(Widget w, XtPointer client_data, XtPointer call_data);
-
/*
* Callback function for the textfield. When CR is hit this works like
* hitting the "OK" button, ESC like "Cancel".
@@ -2444,8 +2420,6 @@ butproc(
#ifdef HAVE_XPM
-static Widget create_pixmap_label(Widget parent, String name, char **data, ArgList args, Cardinal arg);
-
static Widget
create_pixmap_label(
Widget parent,
@@ -3492,13 +3466,6 @@ typedef struct _SharedFindReplace
static SharedFindReplace find_widgets = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
static SharedFindReplace repl_widgets = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
-static void find_replace_destroy_callback(Widget w, XtPointer client_data, XtPointer call_data);
-static void find_replace_dismiss_callback(Widget w, XtPointer client_data, XtPointer call_data);
-static void entry_activate_callback(Widget w, XtPointer client_data, XtPointer call_data);
-static void find_replace_callback(Widget w, XtPointer client_data, XtPointer call_data);
-static void find_replace_keypress(Widget w, SharedFindReplace * frdp, XKeyEvent * event);
-static void find_replace_dialog_create(char_u *entry_text, int do_replace);
-
static void
find_replace_destroy_callback(
Widget w UNUSED,
diff --git a/src/gui_photon.c b/src/gui_photon.c
index 327b35651..ad8e9f4b7 100644
--- a/src/gui_photon.c
+++ b/src/gui_photon.c
@@ -212,10 +212,6 @@ static PtCallbackF_t gui_ph_handle_menu_unrealized;
static void gui_ph_get_panelgroup_margins(short*, short*, short*, short*);
#endif
-#ifdef FEAT_TOOLBAR
-static PhImage_t *gui_ph_toolbar_find_icon(vimmenu_T *menu);
-#endif
-
static void gui_ph_draw_start(void);
static void gui_ph_draw_end(void);
diff --git a/src/gui_w32.c b/src/gui_w32.c
index 35c1790b4..95fe0cbd6 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -4336,10 +4336,6 @@ done:
# define UINT_PTR UINT
#endif
-static void make_tooltip(BalloonEval *beval, char *text, POINT pt);
-static void delete_tooltip(BalloonEval *beval);
-static VOID CALLBACK BevalTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime);
-
static BalloonEval *cur_beval = NULL;
static UINT_PTR BevalTimerId = 0;
static DWORD LastActivity = 0;
@@ -4463,10 +4459,6 @@ static UINT s_menu_id = 100;
/*
* stuff for dialogs, menus, tearoffs etc.
*/
-static LRESULT APIENTRY dialog_callback(HWND, UINT, WPARAM, LPARAM);
-#ifdef FEAT_TEAROFF
-static LRESULT APIENTRY tearoff_callback(HWND, UINT, WPARAM, LPARAM);
-#endif
static PWORD
add_dialog_element(
PWORD p,
diff --git a/src/gui_x11.c b/src/gui_x11.c
index 7a5cae03e..d9928f0a6 100644
--- a/src/gui_x11.c
+++ b/src/gui_x11.c
@@ -138,7 +138,6 @@ static void gui_x11_send_event_handler(Widget, XtPointer, XEvent *, Boolean *);
#endif
static void gui_x11_wm_protocol_handler(Widget, XtPointer, XEvent *, Boolean *);
static Cursor gui_x11_create_blank_mouse(void);
-static void draw_curl(int row, int col, int cells);
/*
@@ -1309,8 +1308,6 @@ gui_mch_init_check(void)
*/
static XtInputId _xsmp_xtinputid;
-static void local_xsmp_handle_requests(XtPointer c, int *s, XtInputId *i);
-
static void
local_xsmp_handle_requests(
XtPointer c UNUSED,
diff --git a/src/hangulin.c b/src/hangulin.c
index 60b3577ff..7512d9533 100644
--- a/src/hangulin.c
+++ b/src/hangulin.c
@@ -37,8 +37,6 @@ static int hangul_keyboard_type = HANGUL_DEFAULT_KEYBOARD;
static void convert_ks_to_3(const char_u *src, int *fp, int *mp, int *lp);
static int convert_3_to_ks(int fv, int mv, int lv, char_u *des);
-static int hangul_automata2(char_u *buf, unsigned int *c);
-static int hangul_automata3(char_u *buf, unsigned int *c);
#define push(x) {stack[ sp++ ] = *(x); stack[sp++] = *((x)+1);}
#define pop(x) {*((x) + 1) = stack[--sp]; *(x) = stack[--sp];}
diff --git a/src/hardcopy.c b/src/hardcopy.c
index 44e9d4fe8..486ae7d3d 100644
--- a/src/hardcopy.c
+++ b/src/hardcopy.c
@@ -137,20 +137,7 @@ typedef struct
static char_u *parse_list_options(char_u *option_str, option_table_T *table, int table_size);
-#ifdef FEAT_SYN_HL
-static long_u darken_rgb(long_u rgb);
-static long_u prt_get_term_color(int colorindex);
-#endif
-static void prt_set_fg(long_u fg);
-static void prt_set_bg(long_u bg);
-static void prt_set_font(int bold, int italic, int underline);
-static void prt_line_number(prt_settings_T *psettings, int page_line, linenr_T lnum);
-static void prt_header(prt_settings_T *psettings, int pagenum, linenr_T lnum);
-static void prt_message(char_u *s);
static colnr_T hardcopy_line(prt_settings_T *psettings, int page_line, prt_pos_T *ppos);
-#ifdef FEAT_SYN_HL
-static void prt_get_attr(int hl_id, prt_text_attr_T* pattr, int modec);
-#endif
/*
* Parse 'printoptions' and set the flags in "printer_opts".
@@ -1357,48 +1344,8 @@ static struct prt_dsc_comment_S prt_dsc_table[] =
PRT_DSC_ENDCOMMENTS_TYPE}
};
-static void prt_write_file_raw_len(char_u *buffer, int bytes);
-static void prt_write_file(char_u *buffer);
static void prt_write_file_len(char_u *buffer, int bytes);
-static void prt_write_string(char *s);
-static void prt_write_int(int i);
-static void prt_write_boolean(int b);
-static void prt_def_font(char *new_name, char *encoding, int height, char *font);
-static void prt_real_bits(double real, int precision, int *pinteger, int *pfraction);
-static void prt_write_real(double val, int prec);
-static void prt_def_var(char *name, double value, int prec);
-static void prt_flush_buffer(void);
-static void prt_resource_name(char_u *filename, void *cookie);
-static int prt_find_resource(char *name, struct prt_ps_resource_S *resource);
-static int prt_open_resource(struct prt_ps_resource_S *resource);
-static int prt_check_resource(struct prt_ps_resource_S *resource, char_u *version);
-static void prt_dsc_start(void);
-static void prt_dsc_noarg(char *comment);
-static void prt_dsc_textline(char *comment, char *text);
-static void prt_dsc_text(char *comment, char *text);
-static void prt_dsc_ints(char *comment, int count, int *ints);
-static void prt_dsc_requirements(int duplex, int tumble, int collate, int color, int num_copies);
-static void prt_dsc_docmedia(char *paper_name, double width, double height, double weight, char *colour, char *type);
-static void prt_dsc_resources(char *comment, char *type, char *strings);
-static void prt_dsc_font_resource(char *resource, struct prt_ps_font_S *ps_font);
-static float to_device_units(int idx, double physsize, int def_number);
-static void prt_page_margins(double width, double height, double *left, double *right, double *top, double *bottom);
-static void prt_font_metrics(int font_scale);
-static int prt_get_cpl(void);
-static int prt_get_lpp(void);
-static int prt_add_resource(struct prt_ps_resource_S *resource);
-static int prt_resfile_next_line(void);
-static int prt_resfile_strncmp(int offset, char *string, int len);
-static int prt_resfile_skip_nonws(int offset);
-static int prt_resfile_skip_ws(int offset);
static int prt_next_dsc(struct prt_dsc_line_S *p_dsc_line);
-#ifdef FEAT_MBYTE
-static int prt_build_cid_fontname(int font, char_u *name, int name_len);
-static void prt_def_cidfont(char *new_name, int height, char *cidfont);
-static void prt_dup_cidfont(char *original_name, char *new_name);
-static int prt_match_encoding(char *p_encoding, struct prt_ps_mbfont_S *p_cmap, struct prt_ps_encoding_S **pp_mbenc);
-static int prt_match_charset(char *p_charset, struct prt_ps_mbfont_S *p_cmap, struct prt_ps_charset_S **pp_mbchar);
-#endif
/*
* Variables for the output PostScript file.
diff --git a/src/if_cscope.c b/src/if_cscope.c
index 186179ca0..b06ad8c52 100644
--- a/src/if_cscope.c
+++ b/src/if_cscope.c
@@ -20,18 +20,12 @@
#endif
#include "if_cscope.h"
-static void cs_usage_msg(csid_e x);
static int cs_add(exarg_T *eap);
-static void cs_stat_emsg(char *fname);
static int cs_add_common(char *, char *, char *);
static int cs_check_for_connections(void);
static int cs_check_for_tags(void);
static int cs_cnt_connections(void);
-static void cs_reading_emsg(int idx);
-static int cs_cnt_matches(int idx);
-static char * cs_create_cmd(char *csoption, char *pattern);
static int cs_create_connection(int i);
-static void do_cscope_general(exarg_T *eap, int make_split);
#ifdef FEAT_QUICKFIX
static void cs_file_results(FILE *, int *);
#endif
@@ -40,7 +34,6 @@ static void cs_fill_results(char *, int , int *, char ***,
static int cs_find(exarg_T *eap);
static int cs_find_common(char *opt, char *pat, int, int, int, char_u *cmdline);
static int cs_help(exarg_T *eap);
-static void clear_csinfo(int i);
static int cs_insert_filelist(char *, char *, char *,
stat_T *);
static int cs_kill(exarg_T *eap);
@@ -49,8 +42,6 @@ static cscmd_T * cs_lookup_cmd(exarg_T *eap);
static char * cs_make_vim_style_matches(char *, char *,
char *, char *);
static char * cs_manage_matches(char **, char **, int, mcmd_e);
-static char * cs_parse_results(int cnumber, char *buf, int bufsize, char **context, char **linenumber, char **search);
-static char * cs_pathcomponents(char *path);
static void cs_print_tags_priv(char **, char **, int);
static int cs_read_prompt(int);
static void cs_release_csp(int, int freefnpp);
@@ -1345,8 +1336,6 @@ clear_csinfo(int i)
}
#ifndef UNIX
-static char *GetWin32Error(void);
-
static char *
GetWin32Error(void)
{
diff --git a/src/if_mzsch.c b/src/if_mzsch.c
index 23b67a99b..41cecb122 100644
--- a/src/if_mzsch.c
+++ b/src/if_mzsch.c
@@ -117,52 +117,13 @@ static void sandbox_check(void);
#endif
/* Buffer-related commands */
static Scheme_Object *buffer_new(buf_T *buf);
-static Scheme_Object *get_buffer_by_name(void *, int, Scheme_Object **);
static Scheme_Object *get_buffer_by_num(void *, int, Scheme_Object **);
-static Scheme_Object *get_buffer_count(void *, int, Scheme_Object **);
-static Scheme_Object *get_buffer_line(void *, int, Scheme_Object **);
-static Scheme_Object *get_buffer_line_list(void *, int, Scheme_Object **);
-static Scheme_Object *get_buffer_name(void *, int, Scheme_Object **);
-static Scheme_Object *get_buffer_num(void *, int, Scheme_Object **);
-static Scheme_Object *get_buffer_size(void *, int, Scheme_Object **);
-static Scheme_Object *get_curr_buffer(void *, int, Scheme_Object **);
-static Scheme_Object *get_next_buffer(void *, int, Scheme_Object **);
-static Scheme_Object *get_prev_buffer(void *, int, Scheme_Object **);
-static Scheme_Object *mzscheme_open_buffer(void *, int, Scheme_Object **);
-static Scheme_Object *set_buffer_line(void *, int, Scheme_Object **);
-static Scheme_Object *set_buffer_line_list(void *, int, Scheme_Object **);
-static Scheme_Object *insert_buffer_line_list(void *, int, Scheme_Object **);
-static Scheme_Object *get_range_start(void *, int, Scheme_Object **);
-static Scheme_Object *get_range_end(void *, int, Scheme_Object **);
static vim_mz_buffer *get_vim_curr_buffer(void);
/* Window-related commands */
static Scheme_Object *window_new(win_T *win);
-static Scheme_Object *get_curr_win(void *, int, Scheme_Object **);
-static Scheme_Object *get_window_count(void *, int, Scheme_Object **);
-static Scheme_Object *get_window_by_num(void *, int, Scheme_Object **);
-static Scheme_Object *get_window_num(void *, int, Scheme_Object **);
-static Scheme_Object *get_window_buffer(void *, int, Scheme_Object **);
-static Scheme_Object *get_window_height(void *, int, Scheme_Object **);
-static Scheme_Object *set_window_height(void *, int, Scheme_Object **);
-static Scheme_Object *get_window_width(void *, int, Scheme_Object **);
-static Scheme_Object *set_window_width(void *, int, Scheme_Object **);
-static Scheme_Object *get_cursor(void *, int, Scheme_Object **);
-static Scheme_Object *set_cursor(void *, int, Scheme_Object **);
-static Scheme_Object *get_window_list(void *, int, Scheme_Object **);
static vim_mz_window *get_vim_curr_window(void);
-/* Vim-related commands */
-static Scheme_Object *mzscheme_beep(void *, int, Scheme_Object **);
-static Scheme_Object *get_option(void *, int, Scheme_Object **);
-static Scheme_Object *set_option(void *, int, Scheme_Object **);
-static Scheme_Object *vim_command(void *, int, Scheme_Object **);
-static Scheme_Object *vim_eval(void *, int, Scheme_Object **);
-static Scheme_Object *vim_bufferp(void *data, int, Scheme_Object **);
-static Scheme_Object *vim_windowp(void *data, int, Scheme_Object **);
-static Scheme_Object *vim_buffer_validp(void *data, int, Scheme_Object **);
-static Scheme_Object *vim_window_validp(void *data, int, Scheme_Object **);
-
/*
*========================================================================
* Internal Function Prototypes
diff --git a/src/if_python3.c b/src/if_python3.c
index b87e13766..75d212274 100644
--- a/src/if_python3.c
+++ b/src/if_python3.c
@@ -709,8 +709,6 @@ python3_enabled(int verbose)
/* Load the standard Python exceptions - don't import the symbols from the
* DLL, as this can cause errors (importing data symbols is not reliable).
*/
-static void get_py3_exceptions(void);
-
static void
get_py3_exceptions(void)
{
@@ -788,8 +786,6 @@ static PyObject *ListGetattro(PyObject *, PyObject *);
static int ListSetattro(PyObject *, PyObject *, PyObject *);
static PyObject *FunctionGetattro(PyObject *, PyObject *);
-static PyObject *VimPathHook(PyObject *, PyObject *);
-
static struct PyModuleDef vimmodule;
#define PY_CAN_RECURSE
diff --git a/src/if_xcmdsrv.c b/src/if_xcmdsrv.c
index e911fe508..b8902a73e 100644
--- a/src/if_xcmdsrv.c
+++ b/src/if_xcmdsrv.c
@@ -192,10 +192,8 @@ static int DoRegisterName(Display *dpy, char_u *name);
static void DeleteAnyLingerer(Display *dpy, Window w);
static int GetRegProp(Display *dpy, char_u **regPropp, long_u *numItemsp, int domsg);
static int WaitForPend(void *p);
-static int WaitForReply(void *p);
static int WindowValid(Display *dpy, Window w);
static void ServerWait(Display *dpy, Window w, EndCond endCond, void *endData, int localLoop, int seconds);
-static struct ServerReply *ServerReplyFind(Window w, enum ServerReplyOp op);
static int AppendPropCarefully(Display *display, Window window, Atom property, char_u *value, int length);
static int x_error_check(Display *dpy, XErrorEvent *error_event);
static int IsSerialName(char_u *name);
diff --git a/src/integration.c b/src/integration.c
index 064ff05fd..a94581586 100644
--- a/src/integration.c
+++ b/src/integration.c
@@ -76,8 +76,6 @@
#endif
/* Functions private to this file */
-static void workshop_connection_closed(void);
-static void messageFromEserve(XtPointer clientData, int *dum1, XtInputId *dum2);
static void workshop_disconnect(void);
static void workshop_sensitivity(int num, char *table);
static void adjust_sign_name(char *filename);
@@ -111,7 +109,7 @@ static XtInputId inputHandler; /* Cookie for input */
Boolean save_files = True; /* When true, save all files before build actions */
-void
+ static void
workshop_connection_closed(void)
{
/*
@@ -157,7 +155,7 @@ getCommand(void)
}
-void
+ static void
messageFromEserve(XtPointer clientData UNUSED,
int *dum1 UNUSED,
XtInputId *dum2 UNUSED)
@@ -518,7 +516,7 @@ messageFromEserve(XtPointer clientData UNUSED,
}
}
-static void
+ static void
process_menuItem(
char *cmd)
{
@@ -540,7 +538,7 @@ process_menuItem(
}
-static void
+ static void
process_toolbarButton(
char *cmd) /* button definition */
{
@@ -571,7 +569,7 @@ process_toolbarButton(
#ifdef DEBUG
-void
+ static void
unrecognised_message(
char *cmd)
{
@@ -587,7 +585,7 @@ unrecognised_message(
* x.xpm : largest icon
* x1.xpm : smaller icon
* x2.xpm : smallest icon */
- void
+ static void
adjust_sign_name(char *filename)
{
char *s;
@@ -735,7 +733,8 @@ void workshop_connect(XtAppContext context)
dummy = write(sd, buf, strlen(buf));
}
-void workshop_disconnect(void)
+ static void
+workshop_disconnect(void)
{
/* Probably need to send some message here */
@@ -891,7 +890,8 @@ Boolean workshop_get_width_height(int *width, int *height)
* Toolbar code
*/
-void workshop_sensitivity(int num, char *table)
+ static void
+workshop_sensitivity(int num, char *table)
{
/* build up a verb table */
VerbSense *vs;
@@ -947,7 +947,8 @@ void workshop_sensitivity(int num, char *table)
/* Set an editor option.
* IGNORE an option if you do not recognize it.
*/
-void workshop_set_option_first(char *name, char *value)
+ static void
+workshop_set_option_first(char *name, char *value)
{
/* Currently value can only be on/off. This may change later (for
* example to set an option like "balloon evaluate delay", but
@@ -1092,7 +1093,7 @@ void workshop_send_message(char *buf)
#ifdef DEBUG
-void
+ static void
pldebug(
char *fmt, /* a printf style format line */
...)
diff --git a/src/json.c b/src/json.c
index cc756488d..8e6288e63 100644
--- a/src/json.c
+++ b/src/json.c
@@ -19,7 +19,6 @@
#if defined(FEAT_EVAL) || defined(PROTO)
static int json_encode_item(garray_T *gap, typval_T *val, int copyID, int options);
-static int json_decode_item(js_read_T *reader, typval_T *res, int options);
/*
* Encode "val" into a JSON format string.
diff --git a/src/main.c b/src/main.c
index d9cd6f9d0..5cfec3499 100644
--- a/src/main.c
+++ b/src/main.c
@@ -39,9 +39,7 @@ static void init_locale(void);
# endif
static void early_arg_scan(mparm_T *parmp);
#ifndef NO_VIM_MAIN
-static void main_msg(char *s);
static void usage(void);
-static int get_number_arg(char_u *p, int *idx, int def);
static void parse_command_name(mparm_T *parmp);
static void command_line_scan(mparm_T *parmp);
static void check_tty(mparm_T *parmp);
@@ -3476,8 +3474,6 @@ check_swap_exists_action(void)
#endif /* NO_VIM_MAIN */
#if defined(STARTUPTIME) || defined(PROTO)
-static void time_diff(struct timeval *then, struct timeval *now);
-
static struct timeval prev_timeval;
# ifdef WIN3264
diff --git a/src/mbyte.c b/src/mbyte.c
index 895f3b799..26233e423 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -138,7 +138,6 @@
#if defined(FEAT_MBYTE) || defined(PROTO)
-static int enc_canon_search(char_u *name);
static int dbcs_char2len(int c);
static int dbcs_char2bytes(int c, char_u *buf);
static int dbcs_ptr2len(char_u *p);
@@ -147,7 +146,6 @@ static int utf_ptr2cells_len(char_u *p, int size);
static int dbcs_char2cells(int c);
static int dbcs_ptr2cells_len(char_u *p, int size);
static int dbcs_ptr2char(char_u *p);
-static int utf_safe_read_char_adv(char_u **s, size_t *n);
/*
* Lookup table to quickly get the length in bytes of a UTF-8 character from
@@ -3133,9 +3131,6 @@ static convertStruct foldCase[] =
{0x1e900,0x1e921,1,34}
};
-static int utf_convert(int a, convertStruct table[], int tableSize);
-static int utf_strnicmp(char_u *s1, char_u *s2, size_t n1, size_t n2);
-
/*
* Generic conversion function for case operations.
* Return the converted equivalent of "a", which is a UCS-4 character. Use
@@ -4542,8 +4537,6 @@ encname2codepage(char_u *name)
# if defined(USE_ICONV) || defined(PROTO)
-static char_u *iconv_string(vimconv_T *vcp, char_u *str, int slen, int *unconvlenp, int *resultlenp);
-
/*
* Call iconv_open() with a check if iconv() works properly (there are broken
* versions).
@@ -6053,8 +6046,6 @@ static int xim_real_init(Window x11_window, Display *x11_display);
# ifdef USE_X11R6_XIM
-static void xim_destroy_cb(XIM im, XPointer client_data, XPointer call_data);
-
static void
xim_instantiate_cb(
Display *display,
diff --git a/src/memline.c b/src/memline.c
index b4e02d771..c06f9571c 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -235,10 +235,8 @@ typedef enum {
} upd_block0_T;
#ifdef FEAT_CRYPT
-static void ml_set_mfp_crypt(buf_T *buf);
static void ml_set_b0_crypt(buf_T *buf, ZERO_BL *b0p);
#endif
-static int ml_check_b0_id(ZERO_BL *b0p);
static void ml_upd_block0(buf_T *buf, upd_block0_T what);
static void set_b0_fname(ZERO_BL *, buf_T *buf);
static void set_b0_dir_flag(ZERO_BL *b0p, buf_T *buf);
@@ -4070,8 +4068,6 @@ get_file_in_dir(
return retval;
}
-static void attention_message(buf_T *buf, char_u *fname);
-
/*
* Print the ATTENTION message: info about an existing swap file.
*/
diff --git a/src/message.c b/src/message.c
index d5727b135..c7ecb6196 100644
--- a/src/message.c
+++ b/src/message.c
@@ -16,15 +16,9 @@
#include "vim.h"
-static int other_sourcing_name(void);
-static char_u *get_emsg_source(void);
-static char_u *get_emsg_lnum(void);
static void add_msg_hist(char_u *s, int len, int attr);
static void hit_return_msg(void);
static void msg_home_replace_attr(char_u *fname, int attr);
-#ifdef FEAT_MBYTE
-static char_u *screen_puts_mbyte(char_u *s, int l, int attr);
-#endif
static void msg_puts_attr_len(char_u *str, int maxlen, int attr);
static void msg_puts_display(char_u *str, int maxlen, int attr, int recurse);
static void msg_scroll_up(void);
@@ -2407,7 +2401,6 @@ struct msgchunk_S
static msgchunk_T *last_msgchunk = NULL; /* last displayed text */
static msgchunk_T *msg_sb_start(msgchunk_T *mps);
-static msgchunk_T *disp_sb_line(int row, msgchunk_T *smp);
typedef enum {
SB_CLEAR_NONE = 0,
@@ -3686,8 +3679,6 @@ do_dialog(
return retval;
}
-static int copy_char(char_u *from, char_u *to, int lowercase);
-
/*
* Copy one character from "*from" to "*to", taking care of multi-byte
* characters. Return the length of the character in bytes.
@@ -4131,12 +4122,6 @@ do_browse(
#if defined(FEAT_EVAL)
static char *e_printf = N_("E766: Insufficient arguments for printf()");
-static varnumber_T tv_nr(typval_T *tvs, int *idxp);
-static char *tv_str(typval_T *tvs, int *idxp, char_u **tofree);
-# ifdef FEAT_FLOAT
-static double tv_float(typval_T *tvs, int *idxp);
-# endif
-
/*
* Get number argument from "idxp" entry in "tvs". First entry is 1.
*/
diff --git a/src/misc1.c b/src/misc1.c
index 28e44da1c..34b4134a0 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -20,10 +20,6 @@
static char_u *vim_version_dir(char_u *vimdir);
static char_u *remove_tail(char_u *p, char_u *pend, char_u *name);
-#if defined(FEAT_CMDL_COMPL)
-static void init_users(void);
-#endif
-static int copy_indent(int size, char_u *src);
/* All user names (for ~user completion as done by shell). */
#if defined(FEAT_CMDL_COMPL) || defined(PROTO)
@@ -705,8 +701,6 @@ get_breakindent_win(
#if defined(FEAT_CINDENT) || defined(FEAT_SMARTINDENT)
-static int cin_is_cinword(char_u *line);
-
/*
* Return TRUE if the string "line" starts with a word from 'cinwords'.
*/
@@ -5103,8 +5097,6 @@ gettail(char_u *fname)
}
#if defined(FEAT_SEARCHPATH)
-static char_u *gettail_dir(char_u *fname);
-
/*
* Return the end of the directory name, on the first path
* separator:
@@ -5455,8 +5447,6 @@ FullName_save(
#if defined(FEAT_CINDENT) || defined(FEAT_SYN_HL)
static char_u *skip_string(char_u *p);
-static pos_T *ind_find_start_comment(void);
-static pos_T *ind_find_start_CORS(linenr_T *is_raw);
static pos_T *find_start_rawstring(int ind_maxcomment);
/*
@@ -5680,42 +5670,18 @@ typedef struct {
* Below "XXX" means that this function may unlock the current line.
*/
-static char_u *cin_skipcomment(char_u *);
-static int cin_nocode(char_u *);
-static pos_T *find_line_comment(void);
-static int cin_has_js_key(char_u *text);
-static int cin_islabel_skip(char_u **);
static int cin_isdefault(char_u *);
-static char_u *after_label(char_u *l);
-static int get_indent_nolabel(linenr_T lnum);
-static int skip_label(linenr_T, char_u **pp);
-static int cin_first_id_amount(void);
-static int cin_get_equal_amount(linenr_T lnum);
static int cin_ispreproc(char_u *);
static int cin_iscomment(char_u *);
static int cin_islinecomment(char_u *);
static int cin_isterminated(char_u *, int, int);
-static int cin_isinit(void);
-static int cin_isfuncdecl(char_u **, linenr_T, linenr_T);
-static int cin_isif(char_u *);
static int cin_iselse(char_u *);
-static int cin_isdo(char_u *);
-static int cin_iswhileofdo(char_u *, linenr_T);
-static int cin_is_if_for_while_before_offset(char_u *line, int *poffset);
-static int cin_iswhileofdo_end(int terminated);
-static int cin_isbreak(char_u *);
-static int cin_is_cpp_baseclass(cpp_baseclass_cache_T *cached);
-static int get_baseclass_amount(int col);
static int cin_ends_in(char_u *, char_u *, char_u *);
static int cin_starts_with(char_u *s, char *word);
-static int cin_skip2pos(pos_T *trypos);
-static pos_T *find_start_brace(void);
static pos_T *find_match_paren(int);
static pos_T *find_match_char(int c, int ind_maxparen);
-static int corr_ind_maxparen(pos_T *startpos);
static int find_last_paren(char_u *l, int start, int end);
static int find_match(int lookfor, linenr_T ourscope);
-static int cin_is_cpp_namespace(char_u *);
/*
* Skip over white space and C comments within the line.
@@ -7028,7 +6994,7 @@ find_match_paren(int ind_maxparen) /* XXX */
}
static pos_T *
-find_match_char (int c, int ind_maxparen) /* XXX */
+find_match_char(int c, int ind_maxparen) /* XXX */
{
pos_T cursor_save;
pos_T *trypos;
@@ -9570,8 +9536,6 @@ get_expr_indent(void)
#if defined(FEAT_LISP) || defined(PROTO)
-static int lisp_match(char_u *p);
-
static int
lisp_match(char_u *p)
{
@@ -10391,8 +10355,6 @@ mch_expandpath(
* Unix style wildcard expansion code.
* It's here because it's used both for Unix and Mac.
*/
-static int pstrcmp(const void *, const void *);
-
static int
pstrcmp(const void *a, const void *b)
{
@@ -10624,13 +10586,6 @@ unix_expandpath(
#endif
#if defined(FEAT_SEARCHPATH)
-static int find_previous_pathsep(char_u *path, char_u **psep);
-static int is_unique(char_u *maybe_unique, garray_T *gap, int i);
-static void expand_path_option(char_u *curdir, garray_T *gap);
-static char_u *get_path_cutoff(char_u *fname, garray_T *gap);
-static void uniquefy_paths(garray_T *gap, char_u *pattern);
-static int expand_in_path(garray_T *gap, char_u *pattern, int flags);
-
/*
* Moves "*psep" back to the previous path separator in "path".
* Returns FAIL is "*psep" ends up at the beginning of "path".
@@ -11055,8 +11010,6 @@ remove_duplicates(garray_T *gap)
}
#endif
-static int has_env_var(char_u *p);
-
/*
* Return TRUE if "p" contains what looks like an environment variable.
* Allowing for escaping.
@@ -11081,8 +11034,6 @@ has_env_var(char_u *p)
}
#ifdef SPECIAL_WILDCHAR
-static int has_special_wildchar(char_u *p);
-
/*
* Return TRUE if "p" contains a special wildcard character, one that Vim
* cannot expand, requires using a shell.
diff --git a/src/misc2.c b/src/misc2.c
index 7c5a45883..754fcdc5d 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -744,11 +744,6 @@ static long_u mem_peak;
static long_u num_alloc;
static long_u num_freed;
-static void mem_pre_alloc_s(size_t *sizep);
-static void mem_pre_alloc_l(long_u *sizep);
-static void mem_post_alloc(void **pp, size_t size);
-static void mem_pre_free(void **pp);
-
static void
mem_pre_alloc_s(size_t *sizep)
{
@@ -840,8 +835,6 @@ vim_mem_profile_dump(void)
#endif /* MEM_PROFILE */
#ifdef FEAT_EVAL
-static int alloc_does_fail(long_u size);
-
static int
alloc_does_fail(long_u size)
{
@@ -4035,9 +4028,6 @@ static int ff_check_visited(ff_visited_T **, char_u *);
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);
-#ifdef FEAT_PATH_EXTRA
-static int ff_wc_equal(char_u *s1, char_u *s2);
-#endif
static void ff_push(ff_search_ctx_T *search_ctx, ff_stack_T *stack_ptr);
static ff_stack_T *ff_pop(ff_search_ctx_T *search_ctx);
diff --git a/src/move.c b/src/move.c
index c07275897..cc399ec9e 100644
--- a/src/move.c
+++ b/src/move.c
@@ -19,12 +19,10 @@
#include "vim.h"
-static void comp_botline(win_T *wp);
static void redraw_for_cursorline(win_T *wp);
static int scrolljump_value(void);
static int check_top_offset(void);
static void curs_rows(win_T *wp);
-static void validate_cheight(void);
typedef struct
{
@@ -37,11 +35,6 @@ typedef struct
static void topline_back(lineoff_T *lp);
static void botline_forw(lineoff_T *lp);
-#ifdef FEAT_DIFF
-static void botline_topline(lineoff_T *lp);
-static void topline_botline(lineoff_T *lp);
-static void max_topfill(void);
-#endif
/*
* Compute wp->w_botline for the current wp->w_topline. Can be called after
diff --git a/src/netbeans.c b/src/netbeans.c
index 1c916b5bf..2458a41cd 100644
--- a/src/netbeans.c
+++ b/src/netbeans.c
@@ -49,10 +49,8 @@ static pos_T *off2pos(buf_T *, long);
static pos_T *get_off_or_lnum(buf_T *buf, char_u **argp);
static long get_buf_size(buf_T *);
static int netbeans_keystring(char_u *keystr);
-static void postpone_keycommand(char_u *keystr);
static void special_keys(char_u *args);
-static int netbeans_connect(char *, int);
static int getConnInfo(char *file, char **host, char **port, char **password);
static void nb_init_graphics(void);
diff --git a/src/normal.c b/src/normal.c
index 41c762332..4c157004a 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -32,7 +32,6 @@ static int
_RTLENTRYF
#endif
nv_compare(const void *s1, const void *s2);
-static int find_command(int cmdchar);
static void op_colon(oparg_T *oap);
static void op_function(oparg_T *oap);
#if defined(FEAT_MOUSE)
@@ -40,10 +39,7 @@ static void find_start_of_word(pos_T *);
static void find_end_of_word(pos_T *);
static int get_mouse_class(char_u *p);
#endif
-static void prep_redo_cmd(cmdarg_T *cap);
static void prep_redo(int regname, long, int, int, int, int, int);
-static int checkclearop(oparg_T *oap);
-static int checkclearopq(oparg_T *oap);
static void clearop(oparg_T *oap);
static void clearopbeep(oparg_T *oap);
static void unshift_special(cmdarg_T *cap);
@@ -63,8 +59,6 @@ static void nv_error(cmdarg_T *cap);
static void nv_help(cmdarg_T *cap);
static void nv_addsub(cmdarg_T *cap);
static void nv_page(cmdarg_T *cap);
-static void nv_gd(oparg_T *oap, int nchar, int thisblock);
-static int nv_screengo(oparg_T *oap, int dir, long dist);
#ifdef FEAT_MOUSE
static void nv_mousescroll(cmdarg_T *cap);
static void nv_mouse(cmdarg_T *cap);
@@ -94,9 +88,6 @@ static void nv_right(cmdarg_T *cap);
static void nv_left(cmdarg_T *cap);
static void nv_up(cmdarg_T *cap);
static void nv_down(cmdarg_T *cap);
-#ifdef FEAT_SEARCHPATH
-static void nv_gotofile(cmdarg_T *cap);
-#endif
static void nv_end(cmdarg_T *cap);
static void nv_dollar(cmdarg_T *cap);
static void nv_search(cmdarg_T *cap);
@@ -111,10 +102,7 @@ static void nv_findpar(cmdarg_T *cap);
static void nv_undo(cmdarg_T *cap);
static void nv_kundo(cmdarg_T *cap);
static void nv_Replace(cmdarg_T *cap);
-static void nv_vreplace(cmdarg_T *cap);
-static void v_swap_corners(int cmdchar);
static void nv_replace(cmdarg_T *cap);
-static void n_swapchar(cmdarg_T *cap);
static void nv_cursormark(cmdarg_T *cap, int flag, pos_T *pos);
static void v_visop(cmdarg_T *cap);
static void nv_subst(cmdarg_T *cap);
@@ -128,7 +116,6 @@ static void n_start_visual_mode(int c);
static void nv_window(cmdarg_T *cap);
static void nv_suspend(cmdarg_T *cap);
static void nv_g_cmd(cmdarg_T *cap);
-static void n_opencmd(cmdarg_T *cap);
static void nv_dot(cmdarg_T *cap);
static void nv_redo(cmdarg_T *cap);
static void nv_Undo(cmdarg_T *cap);
diff --git a/src/ops.c b/src/ops.c
index 3384556f9..d6559a2b1 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -95,7 +95,6 @@ struct block_def
#ifdef FEAT_VISUALEXTRA
static void shift_block(oparg_T *oap, int amount);
-static void block_insert(oparg_T *oap, char_u *s, int b_insert, struct block_def*bdp);
#endif
static int stuff_yank(int, char_u *);
static void put_reedit_in_typebuf(int silent);
@@ -105,7 +104,6 @@ static void stuffescaped(char_u *arg, int literally);
#ifdef FEAT_MBYTE
static void mb_adjust_opend(oparg_T *oap);
#endif
-static void free_yank(long);
static void free_yank_all(void);
static int yank_copy_line(struct block_def *bd, long y_idx);
#ifdef FEAT_CLIPBOARD
@@ -120,7 +118,6 @@ static void str_to_reg(yankreg_T *y_ptr, int yank_type, char_u *str, long len, l
#endif
static int ends_in_white(linenr_T lnum);
#ifdef FEAT_COMMENTS
-static int same_leader(linenr_T lnum, int, char_u *, int, char_u *);
static int fmt_check_par(linenr_T, int *, char_u **, int do_comments);
#else
static int fmt_check_par(linenr_T);
@@ -6829,8 +6826,6 @@ get_reg_type(int regname, long *reglen)
return MAUTO;
}
-static char_u *getreg_wrap_one_line(char_u *s, int flags);
-
/*
* When "flags" has GREG_LIST return a list with text "s".
* Otherwise just return "s".
@@ -7302,8 +7297,6 @@ clear_oparg(oparg_T *oap)
vim_memset(oap, 0, sizeof(oparg_T));
}
-static varnumber_T line_count_info(char_u *line, varnumber_T *wc, varnumber_T *cc, varnumber_T limit, int eol_size);
-
/*
* Count the number of bytes, characters and "words" in a line.
*
diff --git a/src/option.c b/src/option.c
index 19e2b4c54..69e026db2 100644
--- a/src/option.c
+++ b/src/option.c
@@ -3281,15 +3281,10 @@ static char *(p_cot_values[]) = {"menu", "menuone", "longest", "preview", "noins
static char *(p_scl_values[]) = {"yes", "no", "auto", NULL};
#endif
-static void set_option_default(int, int opt_flags, int compatible);
static void set_options_default(int opt_flags);
static void set_string_default_esc(char *name, char_u *val, int escape);
static char_u *term_bg_default(void);
static void did_set_option(int opt_idx, int opt_flags, int new_value);
-static char_u *illegal_char(char_u *, int);
-#ifdef FEAT_CMDWIN
-static char_u *check_cedit(void);
-#endif
static char_u *option_expand(int opt_idx, char_u *val);
static void didset_options(void);
static void didset_options2(void);
@@ -3300,12 +3295,8 @@ static long_u *insecure_flag(int opt_idx, int opt_flags);
# define insecure_flag(opt_idx, opt_flags) (&options[opt_idx].flags)
#endif
static void set_string_option_global(int opt_idx, char_u **varp);
-static char_u *set_string_option(int opt_idx, char_u *value, int opt_flags);
static char_u *did_set_string_option(int opt_idx, char_u **varp, int new_value_alloced, char_u *oldval, char_u *errbuf, int opt_flags);
static char_u *set_chars_option(char_u **varp);
-#ifdef FEAT_SYN_HL
-static int int_cmp(const void *a, const void *b);
-#endif
#ifdef FEAT_CLIPBOARD
static char_u *check_clipboard_option(void);
#endif
@@ -4279,8 +4270,6 @@ set_helplang_default(char_u *lang)
#endif
#ifdef FEAT_GUI
-static char_u *gui_bg_default(void);
-
static char_u *
gui_bg_default(void)
{
@@ -5875,8 +5864,6 @@ insecure_flag(int opt_idx, int opt_flags)
#endif
#ifdef FEAT_TITLE
-static void redraw_titles(void);
-
/*
* Redraw the window title and/or tab page text later.
*/
@@ -12027,7 +12014,6 @@ typedef struct
} langmap_entry_T;
static garray_T langmap_mapga;
-static void langmap_set_entry(int from, int to);
/*
* Search for an entry in "langmap_mapga" for "from". If found set the "to"
diff --git a/src/os_unix.c b/src/os_unix.c
index 0e2760988..94e1a5357 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -128,17 +128,10 @@ static void xterm_update(void);
Window x11_window = 0;
# endif
Display *x11_display = NULL;
-
-# ifdef FEAT_TITLE
-static int get_x11_windis(void);
-static void set_x11_title(char_u *);
-static void set_x11_icon(char_u *);
-# endif
#endif
#ifdef FEAT_TITLE
static int get_x11_title(int);
-static int get_x11_icon(int);
static char_u *oldtitle = NULL;
static volatile sig_atomic_t oldtitle_outdated = FALSE;
@@ -154,8 +147,6 @@ typedef union wait waitstatus;
#else
typedef int waitstatus;
#endif
-static pid_t wait4pid(pid_t, waitstatus *);
-
static int WaitForChar(long msec, int *interrupted, int ignore_input);
static int WaitForCharOrMouse(long msec, int *interrupted, int ignore_input);
#if defined(__BEOS__) || defined(VMS)
@@ -789,7 +780,6 @@ mch_delay(long msec, int ignoreinput)
* Return a pointer to an item on the stack. Used to find out if the stack
* grows up or down.
*/
-static void check_stack_growth(char *p);
static int stack_grows_downwards;
/*
@@ -907,7 +897,6 @@ static stack_t sigstk; /* for sigaltstack() */
static struct sigstack sigstk; /* for sigstack() */
# endif
-static void init_signal_stack(void);
static char *signal_stack;
static void
@@ -1273,12 +1262,8 @@ sigcont_handler SIGDEFARG(sigarg)
}
#endif
-# if defined(FEAT_CLIPBOARD) && defined(FEAT_X11)
-static void loose_clipboard(void);
+#if defined(FEAT_CLIPBOARD) && defined(FEAT_X11)
# ifdef USE_SYSTEM
-static void save_clipboard(void);
-static void restore_clipboard(void);
-
static void *clip_star_save = NULL;
static void *clip_plus_save = NULL;
# endif
@@ -1644,10 +1629,6 @@ xopen_message(long elapsed_msec)
/*
* A few functions shared by X11 title and clipboard code.
*/
-static int x_error_handler(Display *dpy, XErrorEvent *error_event);
-static int x_error_check(Display *dpy, XErrorEvent *error_event);
-static int x_connect_to_server(void);
-static int test_x11_window(Display *dpy);
static int got_x_error = FALSE;
@@ -1683,8 +1664,6 @@ x_error_check(Display *dpy UNUSED, XErrorEvent *error_event UNUSED)
/*
* An X IO Error handler, used to catch error while opening the display.
*/
-static int x_IOerror_check(Display *dpy);
-
static int
x_IOerror_check(Display *dpy UNUSED)
{
@@ -1699,8 +1678,6 @@ x_IOerror_check(Display *dpy UNUSED)
/*
* An X IO Error handler, used to catch terminal errors.
*/
-static int x_IOerror_handler(Display *dpy);
-static void may_restore_clipboard(void);
static int xterm_dpy_was_reset = FALSE;
static int
@@ -2510,8 +2487,6 @@ mch_get_pid(void)
}
#if !defined(HAVE_STRERROR) && defined(USE_GETCWD)
-static char *strerror(int);
-
static char *
strerror(int err)
{
@@ -3136,8 +3111,6 @@ mch_isrealdir(char_u *name)
return (S_ISDIR(statb.st_mode) ? TRUE : FALSE);
}
-static int executable_file(char_u *name);
-
/*
* Return 1 if "name" is an executable file, 0 if not or it doesn't exist.
*/
@@ -3340,8 +3313,6 @@ mch_free_mem(void)
}
#endif
-static void exit_scroll(void);
-
/*
* Output a newline when exiting.
* Make sure the newline goes to the same stream as the text.
@@ -7818,16 +7789,8 @@ clip_xterm_set_selection(VimClipboard *cbd)
/*
* Code for X Session Management Protocol.
*/
-static void xsmp_handle_save_yourself(SmcConn smc_conn, SmPointer client_data, int save_type, Bool shutdown, int interact_style, Bool fast);
-static void xsmp_die(SmcConn smc_conn, SmPointer client_data);
-static void xsmp_save_complete(SmcConn smc_conn, SmPointer client_data);
-static void xsmp_shutdown_cancelled(SmcConn smc_conn, SmPointer client_data);
-static void xsmp_ice_connection(IceConn iceConn, IcePointer clientData, Bool opening, IcePointer *watchData);
-
# if defined(FEAT_GUI) && defined(USE_XSMP_INTERACT)
-static void xsmp_handle_interaction(SmcConn smc_conn, SmPointer client_data);
-
/*
* This is our chance to ask the user if they want to save,
* or abort the logout
diff --git a/src/os_win32.c b/src/os_win32.c
index b665815f8..43b811b13 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -168,28 +168,12 @@ static int g_fCBrkPressed = FALSE; /* set by ctrl-break interrupt */
static int g_fCtrlCPressed = FALSE; /* set when ctrl-C or ctrl-break detected */
static int g_fForceExit = FALSE; /* set when forcefully exiting */
-static void termcap_mode_start(void);
-static void termcap_mode_end(void);
-static void clear_chars(COORD coord, DWORD n);
-static void clear_screen(void);
-static void clear_to_end_of_display(void);
-static void clear_to_end_of_line(void);
static void scroll(unsigned cLines);
static void set_scroll_region(unsigned left, unsigned top,
unsigned right, unsigned bottom);
-static void insert_lines(unsigned cLines);
static void delete_lines(unsigned cLines);
static void gotoxy(unsigned x, unsigned y);
-static void normvideo(void);
-static void textattr(WORD wAttr);
-static void textcolor(WORD wAttr);
-static void textbackground(WORD wAttr);
static void standout(void);
-static void standend(void);
-static void visual_bell(void);
-static void cursor_visible(BOOL fVisible);
-static DWORD write_chars(char_u *pchBuf, DWORD cbToWrite);
-static void create_conin(void);
static int s_cursor_visible = TRUE;
static int did_create_conin = FALSE;
#else
@@ -3487,8 +3471,7 @@ win32_getattrs(char_u *name)
*
* return -1 for failure, 0 otherwise
*/
- static
- int
+ static int
win32_setattrs(char_u *name, int attrs)
{
int res;
@@ -3513,8 +3496,7 @@ win32_setattrs(char_u *name, int attrs)
/*
* Set archive flag for "name".
*/
- static
- int
+ static int
win32_set_archive(char_u *name)
{
int attrs = win32_getattrs(name);
diff --git a/src/pty.c b/src/pty.c
index 940f63e02..717173475 100644
--- a/src/pty.c
+++ b/src/pty.c
@@ -126,8 +126,6 @@
# undef HAVE_SVR4_PTYS
#endif
-static void initmaster(int);
-
/*
* Open all ptys with O_NOCTTY, just to be on the safe side.
*/
diff --git a/src/regexp.c b/src/regexp.c
index 9d7350b6e..04116675f 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -3466,7 +3466,6 @@ typedef struct regbehind_S
save_se_T save_end[NSUBEXP];
} regbehind_T;
-static char_u *reg_getline(linenr_T lnum);
static long bt_regexec_both(char_u *line, colnr_T col, proftime_T *tm, int *timed_out);
static long regtry(bt_regprog_T *prog, colnr_T col, proftime_T *tm, int *timed_out);
static void cleanup_subexpr(void);
@@ -4009,8 +4008,6 @@ theend:
}
#ifdef FEAT_SYN_HL
-static reg_extmatch_T *make_extmatch(void);
-
/*
* Create a new extmatch and mark it as referenced once.
*/
@@ -4137,8 +4134,6 @@ regtry(
}
#ifdef FEAT_MBYTE
-static int reg_prev_class(void);
-
/*
* Get class of previous character.
*/
@@ -4152,8 +4147,6 @@ reg_prev_class(void)
}
#endif
-static int reg_match_visual(void);
-
/*
* Return TRUE if the current rex.input position matches the Visual area.
*/
@@ -7010,8 +7003,6 @@ re_mult_next(char *what)
}
#ifdef FEAT_MBYTE
-static void mb_decompose(int c, int *c1, int *c2, int *c3);
-
typedef struct
{
int a, b, c;
@@ -7215,11 +7206,6 @@ cstrchr(char_u *s, int c)
*/
typedef void (*(*fptr_T)(int *, int))();
-static fptr_T do_upper(int *, int);
-static fptr_T do_Upper(int *, int);
-static fptr_T do_lower(int *, int);
-static fptr_T do_Lower(int *, int);
-
static int vim_regsub_both(char_u *source, typval_T *expr, char_u *dest, int copy, int magic, int backslash);
static fptr_T
@@ -7883,8 +7869,6 @@ exit:
}
#ifdef FEAT_EVAL
-static char_u *reg_getline_submatch(linenr_T lnum);
-
/*
* Call reg_getline() with the line numbers from the submatch. If a
* substitute() was used the reg_maxline and other values have been
@@ -8212,8 +8196,6 @@ vim_regfree(regprog_T *prog)
}
#ifdef FEAT_EVAL
-static void report_re_switch(char_u *pat);
-
static void
report_re_switch(char_u *pat)
{
diff --git a/src/screen.c b/src/screen.c
index 51f53c311..4effa5286 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -107,9 +107,6 @@ static int screen_cur_row, screen_cur_col; /* last known cursor position */
static match_T search_hl; /* used for 'hlsearch' highlight matching */
#endif
-#if defined(FEAT_MENU) || defined(FEAT_FOLDING)
-static int text_to_screenline(win_T *wp, char_u *text, int col);
-#endif
#ifdef FEAT_FOLDING
static foldinfo_T win_foldinfo; /* info for 'foldcolumn' */
static int compute_foldcolumn(win_T *wp, int col);
@@ -133,7 +130,6 @@ static void fill_foldcolumn(char_u *p, win_T *wp, int closed, linenr_T lnum);
static void copy_text_attr(int off, char_u *buf, int len, int attr);
#endif
static int win_line(win_T *, linenr_T, int, int, int nochange, int number_only);
-static int char_needs_redraw(int off_from, int off_to, int cols);
static void draw_vsep_win(win_T *wp, int row);
#ifdef FEAT_STL_OPT
static void redraw_custom_statusline(win_T *wp);
@@ -147,7 +143,6 @@ static void prepare_search_hl(win_T *wp, linenr_T lnum);
static void next_search_hl(win_T *win, match_T *shl, linenr_T lnum, colnr_T mincol, matchitem_T *cur);
static int next_search_hl_pos(match_T *shl, linenr_T lnum, posmatch_T *pos, colnr_T mincol);
#endif
-static void screen_start_highlight(int attr);
static void screen_char(unsigned off, int row, int col);
#ifdef FEAT_MBYTE
static void screen_char_2(unsigned off, int row, int col);
@@ -155,8 +150,6 @@ static void screen_char_2(unsigned off, int row, int col);
static void screenclear2(void);
static void lineclear(unsigned off, int width, int attr);
static void lineinvalid(unsigned off, int width);
-static void linecopy(int to, int from, win_T *wp);
-static void redraw_block(int row, int end, win_T *wp);
static int win_do_lines(win_T *wp, int row, int line_count, int mayclear, int del, int clear_attr);
static void win_rest_invalid(win_T *wp);
static void msg_pos_mode(void);
@@ -2495,8 +2488,6 @@ win_draw_end(
}
#ifdef FEAT_SYN_HL
-static int advance_color_col(int vcol, int **color_cols);
-
/*
* Advance **color_cols and return TRUE when there are columns to draw.
*/
@@ -6034,8 +6025,6 @@ win_line(
}
#ifdef FEAT_MBYTE
-static int comp_char_differs(int, int);
-
/*
* Return if the composing characters at "off_from" and "off_to" differ.
* Only to be used when ScreenLinesUC[off_from] != 0.
@@ -6617,7 +6606,6 @@ draw_vsep_win(win_T *wp, int row)
}
#ifdef FEAT_WILDMENU
-static int status_match_len(expand_T *xp, char_u *s);
static int skip_status_match_char(expand_T *xp, char_u *s);
/*
@@ -7414,8 +7402,6 @@ screen_getbytes(int row, int col, char_u *bytes, int *attrp)
}
#ifdef FEAT_MBYTE
-static int screen_comp_differs(int, int*);
-
/*
* Return TRUE if composing characters for screen posn "off" differs from
* composing characters in "u8cc".
diff --git a/src/search.c b/src/search.c
index a12a1d33c..dff532d8f 100644
--- a/src/search.c
+++ b/src/search.c
@@ -16,16 +16,9 @@
static void set_vv_searchforward(void);
static int first_submatch(regmmatch_T *rp);
#endif
-static int check_prevcol(char_u *linep, int col, int ch, int *prevcol);
-static int inmacro(char_u *, char_u *);
static int check_linecomment(char_u *line);
static int cls(void);
static int skip_chars(int, int);
-#ifdef FEAT_TEXTOBJ
-static void back_in_line(void);
-static void find_first_blank(pos_T *);
-static void findsent_forward(long count, int at_start_sent);
-#endif
#ifdef FEAT_FIND_ID
static void show_pat_in_path(char_u *, int,
int, int, FILE *, linenr_T *, long);
@@ -1835,8 +1828,6 @@ check_prevcol(
return (col >= 0 && linep[col] == ch) ? TRUE : FALSE;
}
-static int find_rawstring_end(char_u *linep, pos_T *startpos, pos_T *endpos);
-
/*
* Raw string start is found at linep[startpos.col - 1].
* Return TRUE if the matching end can be found between startpos and endpos.
@@ -3866,8 +3857,6 @@ current_block(
return OK;
}
-static int in_html_tag(int);
-
/*
* Return TRUE if the cursor is on a "<aaa>" tag. Ignore "<aaa/>".
* When "end_tag" is TRUE return TRUE if the cursor is on "</aaa>".
@@ -4326,9 +4315,6 @@ extend:
return OK;
}
-static int find_next_quote(char_u *top_ptr, int col, int quotechar, char_u *escape);
-static int find_prev_quote(char_u *line, int col_start, int quotechar, char_u *escape);
-
/*
* Search quote char from string line[col].
* Quote character escaped by one of the characters in "escape" is not counted
diff --git a/src/sha256.c b/src/sha256.c
index 3bb77915c..98ccffe68 100644
--- a/src/sha256.c
+++ b/src/sha256.c
@@ -24,8 +24,6 @@
#if defined(FEAT_CRYPT) || defined(FEAT_PERSISTENT_UNDO)
-static void sha256_process(context_sha256_T *ctx, char_u data[64]);
-
#define GET_UINT32(n, b, i) \
{ \
(n) = ( (UINT32_T)(b)[(i) ] << 24) \
@@ -265,8 +263,6 @@ sha256_finish(context_sha256_T *ctx, char_u digest[32])
#endif /* FEAT_CRYPT || FEAT_PERSISTENT_UNDO */
#if defined(FEAT_CRYPT) || defined(PROTO)
-static unsigned int get_some_time(void);
-
/*
* Returns hex digest of "buf[buf_len]" in a static array.
* if "salt" is not NULL also do "salt[salt_len]".
diff --git a/src/spell.c b/src/spell.c
index 05a9d2cd8..6fc0601b7 100644
--- a/src/spell.c
+++ b/src/spell.c
@@ -251,7 +251,6 @@ typedef struct matchinf_S
static int spell_iswordp(char_u *p, win_T *wp);
#ifdef FEAT_MBYTE
static int spell_mb_isword_class(int cl, win_T *wp);
-static int spell_iswordp_w(int *p, win_T *wp);
#endif
/*
@@ -337,22 +336,16 @@ typedef struct trystate_S
static void find_word(matchinf_T *mip, int mode);
static int match_checkcompoundpattern(char_u *ptr, int wlen, garray_T *gap);
static int can_compound(slang_T *slang, char_u *word, char_u *flags);
-static int can_be_compound(trystate_T *sp, slang_T *slang, char_u *compflags, int flag);
static int match_compoundrule(slang_T *slang, char_u *compflags);
static int valid_word_prefix(int totprefcnt, int arridx, int flags, char_u *word, slang_T *slang, int cond_req);
static void find_prefix(matchinf_T *mip, int mode);
static int fold_more(matchinf_T *mip);
static int spell_valid_case(int wordflags, int treeflags);
-static int no_spell_checking(win_T *wp);
-static void spell_load_lang(char_u *lang);
-static void int_wordlist_spl(char_u *fname);
static void spell_load_cb(char_u *fname, void *cookie);
-static int score_wordcount_adj(slang_T *slang, int score, char_u *word, int split);
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 badword_captype(char_u *word, char_u *end);
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
@@ -361,7 +354,6 @@ static void spell_suggest_expr(suginfo_T *su, char_u *expr);
static void spell_suggest_file(suginfo_T *su, char_u *fname);
static void spell_suggest_intern(suginfo_T *su, int interactive);
static void spell_find_cleanup(suginfo_T *su);
-static void allcap_copy(char_u *word, char_u *wcopy);
static void suggest_try_special(suginfo_T *su);
static void suggest_try_change(suginfo_T *su);
static void suggest_trie_walk(suginfo_T *su, langp_T *lp, char_u *fword, int soundfold);
diff --git a/src/spellfile.c b/src/spellfile.c
index 67f36b94a..71447087f 100644
--- a/src/spellfile.c
+++ b/src/spellfile.c
@@ -296,7 +296,6 @@
static int set_spell_finish(spelltab_T *new_st);
static int write_spell_prefcond(FILE *fd, garray_T *gap);
-static char_u *read_cnt_string(FILE *fd, int cnt_bytes, int *lenp);
static int read_region_section(FILE *fd, slang_T *slang, int len);
static int read_charflags_section(FILE *fd);
static int read_prefcond_section(FILE *fd, slang_T *lp);
@@ -312,7 +311,6 @@ static int *mb_str2wide(char_u *s);
#endif
static int spell_read_tree(FILE *fd, char_u **bytsp, idx_T **idxsp, int prefixtree, int prefixcnt);
static idx_T read_tree_node(FILE *fd, char_u *byts, idx_T *idxs, int maxidx, idx_T startidx, int prefixtree, int maxprefcondnr);
-static void spell_reload_one(char_u *fname, int added_word);
static void set_spell_charflags(char_u *flags, int cnt, char_u *upp);
static int set_spell_chartab(char_u *fol, char_u *low, char_u *upp);
static void set_map_str(slang_T *lp, char_u *map);
@@ -1985,7 +1983,6 @@ typedef struct spellinfo_S
int si_newcompID; /* current value for compound ID */
} spellinfo_T;
-static afffile_T *spell_read_aff(spellinfo_T *spin, char_u *fname);
static int is_aff_rule(char_u **items, int itemcnt, char *rulename, int mincount);
static void aff_process_flags(afffile_T *affile, affentry_T *entry);
static int spell_info_item(char_u *s);
@@ -1993,35 +1990,26 @@ static unsigned affitem2flag(int flagtype, char_u *item, char_u *fname, int lnum
static unsigned get_affitem(int flagtype, char_u **pp);
static void process_compflags(spellinfo_T *spin, afffile_T *aff, char_u *compflags);
static void check_renumber(spellinfo_T *spin);
-static int flag_in_afflist(int flagtype, char_u *afflist, unsigned flag);
static void aff_check_number(int spinval, int affval, char *name);
static void aff_check_string(char_u *spinval, char_u *affval, char *name);
static int str_equal(char_u *s1, char_u *s2);
static void add_fromto(spellinfo_T *spin, garray_T *gap, char_u *from, char_u *to);
static int sal_to_bool(char_u *s);
-static void spell_free_aff(afffile_T *aff);
-static int spell_read_dic(spellinfo_T *spin, char_u *fname, afffile_T *affile);
static int get_affix_flags(afffile_T *affile, char_u *afflist);
static int get_pfxlist(afffile_T *affile, char_u *afflist, char_u *store_afflist);
static void get_compflags(afffile_T *affile, char_u *afflist, char_u *store_afflist);
static int store_aff_word(spellinfo_T *spin, char_u *word, char_u *afflist, afffile_T *affile, hashtab_T *ht, hashtab_T *xht, int condit, int flags, char_u *pfxlist, int pfxlen);
-static int spell_read_wordfile(spellinfo_T *spin, char_u *fname);
static void *getroom(spellinfo_T *spin, size_t len, int align);
static char_u *getroom_save(spellinfo_T *spin, char_u *s);
-static void free_blocks(sblock_T *bl);
-static wordnode_T *wordtree_alloc(spellinfo_T *spin);
static int store_word(spellinfo_T *spin, char_u *word, int flags, int region, char_u *pfxlist, int need_affix);
static int tree_add_word(spellinfo_T *spin, char_u *word, wordnode_T *tree, int flags, int region, int affixID);
static wordnode_T *get_wordnode(spellinfo_T *spin);
-static int deref_wordnode(spellinfo_T *spin, wordnode_T *node);
static void free_wordnode(spellinfo_T *spin, wordnode_T *n);
static void wordtree_compress(spellinfo_T *spin, wordnode_T *root);
static int node_compress(spellinfo_T *spin, wordnode_T *node, hashtab_T *ht, int *tot);
static int node_equal(wordnode_T *n1, wordnode_T *n2);
-static int write_vim_spell(spellinfo_T *spin, char_u *fname);
static void clear_node(wordnode_T *node);
static int put_node(FILE *fd, wordnode_T *node, int idx, int regionmask, int prefixtree);
-static void spell_make_sugfile(spellinfo_T *spin, char_u *wfname);
static int sug_filltree(spellinfo_T *spin, slang_T *slang);
static int sug_maketable(spellinfo_T *spin);
static int sug_filltable(spellinfo_T *spin, wordnode_T *node, int startwordnr, garray_T *gap);
diff --git a/src/syntax.c b/src/syntax.c
index e54ec9a82..e00746ec0 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -91,7 +91,6 @@ static int hl_attr_table[] =
{HL_BOLD, HL_STANDOUT, HL_UNDERLINE, HL_UNDERCURL, HL_ITALIC, HL_INVERSE, HL_INVERSE, HL_NOCOMBINE, HL_STRIKETHROUGH, 0};
#define ATTR_COMBINE(attr_a, attr_b) ((((attr_b) & HL_NOCOMBINE) ? attr_b : (attr_a)) | (attr_b))
-static int get_attr_entry(garray_T *table, attrentry_T *aep);
static void syn_unadd_group(void);
static void set_hl_attr(int idx);
static void highlight_list_one(int id);
@@ -106,10 +105,6 @@ static void gui_do_one_color(int idx, int do_menu, int do_tooltip);
#endif
#ifdef FEAT_GUI
static int set_group_colors(char_u *name, guicolor_T *fgp, guicolor_T *bgp, int do_menu, int use_norm, int do_tooltip);
-static GuiFont font_name2handle(char_u *name);
-# ifdef FEAT_XFONTSET
-static GuiFontset fontset_name2handle(char_u *name, int fixed_width);
-# endif
static void hl_do_font(int idx, char_u *arg, int do_normal, int do_menu, int do_tooltip, int free_font);
#endif
@@ -386,8 +381,6 @@ static int current_line_id = 0; /* unique number for current line */
#define CUR_STATE(idx) ((stateitem_T *)(current_state.ga_data))[idx]
static void syn_sync(win_T *wp, linenr_T lnum, synstate_T *last_valid);
-static void save_chartab(char_u *chartab);
-static void restore_chartab(char_u *chartab);
static int syn_match_linecont(linenr_T lnum);
static void syn_start_line(void);
static void syn_update_ends(int startofline);
@@ -415,11 +408,6 @@ static void pop_current_state(void);
#ifdef FEAT_PROFILE
static void syn_clear_time(syn_time_T *tt);
static void syntime_clear(void);
-#ifdef __BORLANDC__
-static int _RTLENTRYF syn_compare_syntime(const void *v1, const void *v2);
-#else
-static int syn_compare_syntime(const void *v1, const void *v2);
-#endif
static void syntime_report(void);
static int syn_time_on = FALSE;
# define IF_SYN_TIME(p) (p)
@@ -430,8 +418,6 @@ typedef int syn_time_T;
static void syn_stack_apply_changes_block(synblock_T *block, buf_T *buf);
static void find_endpos(int idx, lpos_T *startpos, lpos_T *m_endpos, lpos_T *hl_endpos, long *flagsp, lpos_T *end_endpos, int *end_idx, reg_extmatch_T *start_ext);
-static void clear_syn_state(synstate_T *p);
-static void clear_current_state(void);
static void limit_pos(lpos_T *pos, lpos_T *limit);
static void limit_pos_zero(lpos_T *pos, lpos_T *limit);
@@ -440,25 +426,13 @@ static void syn_add_start_off(lpos_T *result, regmmatch_T *regmatch, synpat_T *s
static char_u *syn_getcurline(void);
static int syn_regexec(regmmatch_T *rmp, linenr_T lnum, colnr_T col, syn_time_T *st);
static int check_keyword_id(char_u *line, int startcol, int *endcol, long *flags, short **next_list, stateitem_T *cur_si, int *ccharp);
-static void syn_cmd_case(exarg_T *eap, int syncing);
-static void syn_cmd_spell(exarg_T *eap, int syncing);
-static void syntax_sync_clear(void);
static void syn_remove_pattern(synblock_T *block, int idx);
static void syn_clear_pattern(synblock_T *block, int i);
static void syn_clear_cluster(synblock_T *block, int i);
-static void syn_cmd_clear(exarg_T *eap, int syncing);
-static void syn_cmd_conceal(exarg_T *eap, int syncing);
static void syn_clear_one(int id, int syncing);
-static void syn_cmd_on(exarg_T *eap, int syncing);
-static void syn_cmd_enable(exarg_T *eap, int syncing);
-static void syn_cmd_reset(exarg_T *eap, int syncing);
-static void syn_cmd_manual(exarg_T *eap, int syncing);
-static void syn_cmd_off(exarg_T *eap, int syncing);
static void syn_cmd_onoff(exarg_T *eap, char *name);
-static void syn_cmd_list(exarg_T *eap, int syncing);
static void syn_lines_msg(void);
static void syn_match_msg(void);
-static void syn_stack_free_block(synblock_T *block);
static void syn_list_one(int id, int syncing, int link_only);
static void syn_list_cluster(int id);
static void put_id_list(char_u *name, short *list, int attr);
@@ -466,30 +440,13 @@ static void put_pattern(char *s, int c, synpat_T *spp, int attr);
static int syn_list_keywords(int id, hashtab_T *ht, int did_header, int attr);
static void syn_clear_keyword(int id, hashtab_T *ht);
static void clear_keywtab(hashtab_T *ht);
-static void add_keyword(char_u *name, int id, int flags, short *cont_in_list, short *next_list, int conceal_char);
-static char_u *get_group_name(char_u *arg, char_u **name_end);
-static char_u *get_syn_options(char_u *arg, syn_opt_arg_T *opt, int *conceal_char, int skip);
-static void syn_cmd_include(exarg_T *eap, int syncing);
-static void syn_cmd_iskeyword(exarg_T *eap, int syncing);
-static void syn_cmd_keyword(exarg_T *eap, int syncing);
-static void syn_cmd_match(exarg_T *eap, int syncing);
-static void syn_cmd_region(exarg_T *eap, int syncing);
-#ifdef __BORLANDC__
-static int _RTLENTRYF syn_compare_stub(const void *v1, const void *v2);
-#else
-static int syn_compare_stub(const void *v1, const void *v2);
-#endif
-static void syn_cmd_cluster(exarg_T *eap, int syncing);
-static int syn_scl_name2id(char_u *name);
static int syn_scl_namen2id(char_u *linep, int len);
static int syn_check_cluster(char_u *pp, int len);
static int syn_add_cluster(char_u *name);
static void init_syn_patterns(void);
static char_u *get_syn_pattern(char_u *arg, synpat_T *ci);
-static void syn_cmd_sync(exarg_T *eap, int syncing);
static int get_id_list(char_u **arg, int keylen, short **list, int skip);
static void syn_combine_list(short **clstr1, short **clstr2, int list_op);
-static void syn_incl_toplevel(int id, int *flagsp);
#if defined(FEAT_RELTIME) || defined(PROTO)
/*
diff --git a/src/tag.c b/src/tag.c
index f0c92f5b2..3765fe565 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -1155,8 +1155,6 @@ do_tags(exarg_T *eap UNUSED)
#endif
#ifdef FEAT_TAG_BINS
-static int tag_strnicmp(char_u *s1, char_u *s2, size_t len);
-
/*
* Compare two strings, for length "len", ignoring case the ASCII way.
* return 0 for match, < 0 for smaller, > 0 for bigger
@@ -1194,8 +1192,6 @@ typedef struct
regmatch_T regmatch; /* regexp program, may be NULL */
} pat_T;
-static void prepare_pats(pat_T *pats, int has_re);
-
/*
* Extract info from the tag search pattern "pats->pat".
*/
@@ -3878,8 +3874,6 @@ expand_tags(
#endif
#if defined(FEAT_EVAL) || defined(PROTO)
-static int add_tag_field(dict_T *dict, char *field_name, char_u *start, char_u *end);
-
/*
* Add a tag field to the dictionary "dict".
* Return OK or FAIL.
diff --git a/src/term.c b/src/term.c
index 82bb42636..f0958762a 100644
--- a/src/term.c
+++ b/src/term.c
@@ -74,7 +74,6 @@ struct builtin_term
/* start of keys that are not directly used by Vim but can be mapped */
#define BT_EXTRA_KEYS 0x101
-static struct builtin_term *find_builtin_term(char_u *name);
static void parse_builtin_tcap(char_u *s);
static void gather_termleader(void);
#ifdef FEAT_TERMRESPONSE
@@ -91,9 +90,6 @@ static int get_bytes_from_buf(char_u *, char_u *, int);
static void del_termcode_idx(int idx);
static int term_is_builtin(char_u *name);
static int term_7to8bit(char_u *p);
-#ifdef FEAT_TERMRESPONSE
-static void switch_to_8bit(void);
-#endif
#ifdef HAVE_TGETENT
static char_u *tgetent_error(char_u *, char_u *);
@@ -2429,8 +2425,6 @@ tltoa(unsigned long i)
* minimal tgoto() implementation.
* no padding and we only parse for %i %d and %+char
*/
-static char *tgoto(char *, int, int);
-
static char *
tgoto(char *cm, int x, int y)
{
@@ -3147,8 +3141,6 @@ add_long_to_buf(long_u val, char_u *dst)
}
}
-static int get_long_from_buf(char_u *buf, long_u *val);
-
/*
* Interpret the next string of bytes in buf as a long integer, with the most
* significant byte first. Note that it is assumed that buf has been through
diff --git a/src/ui.c b/src/ui.c
index 176562055..a1f584e3f 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -715,7 +715,6 @@ clip_isautosel_plus(void)
* Stuff for general mouse selection, without using Visual mode.
*/
-static int clip_compare_pos(int row1, int col1, int row2, int col2);
static void clip_invert_area(int, int, int, int, int how);
static void clip_invert_rectangle(int row, int col, int height, int width, int invert);
static void clip_get_word_boundaries(VimClipboard *, int, int);
@@ -2069,8 +2068,6 @@ x11_setup_atoms(Display *dpy)
static Boolean clip_x11_convert_selection_cb(Widget w, Atom *sel_atom, Atom *target, Atom *type, XtPointer *value, long_u *length, int *format);
static void clip_x11_lose_ownership_cb(Widget w, Atom *sel_atom);
static void clip_x11_notify_cb(Widget w, Atom *sel_atom, Atom *target);
-static void clip_x11_timestamp_cb(Widget w, XtPointer n, XEvent *event, Boolean *cont);
-static void clip_x11_request_selection_cb(Widget w, XtPointer success, Atom *sel_atom, Atom *type, XtPointer value, long_u *length, int *format);
/*
* Property callback to get a timestamp for XtOwnSelection.
diff --git a/src/undo.c b/src/undo.c
index ebf18da49..346fbf3e6 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -100,7 +100,6 @@ typedef struct {
} bufinfo_T;
-static long get_undolevel(void);
static void u_unch_branch(u_header_T *uhp);
static u_entry_T *u_get_headentry(void);
static void u_getbot(void);
@@ -113,24 +112,10 @@ static void u_freebranch(buf_T *buf, u_header_T *uhp, u_header_T **uhpp);
static void u_freeentries(buf_T *buf, u_header_T *uhp, u_header_T **uhpp);
static void u_freeentry(u_entry_T *, long);
#ifdef FEAT_PERSISTENT_UNDO
-static void corruption_error(char *mesg, char_u *file_name);
-static void u_free_uhp(u_header_T *uhp);
-static int undo_write(bufinfo_T *bi, char_u *ptr, size_t len);
# ifdef FEAT_CRYPT
static int undo_flush(bufinfo_T *bi);
# endif
-static int fwrite_crypt(bufinfo_T *bi, char_u *ptr, size_t len);
-static int undo_write_bytes(bufinfo_T *bi, long_u nr, int len);
-static void put_header_ptr(bufinfo_T *bi, u_header_T *uhp);
-static int undo_read_4c(bufinfo_T *bi);
-static int undo_read_2c(bufinfo_T *bi);
-static int undo_read_byte(bufinfo_T *bi);
-static time_t undo_read_time(bufinfo_T *bi);
static int undo_read(bufinfo_T *bi, char_u *buffer, size_t size);
-static char_u *read_string_decrypt(bufinfo_T *bi, int len);
-static int serialize_header(bufinfo_T *bi, char_u *hash);
-static int serialize_uhp(bufinfo_T *bi, u_header_T *uhp);
-static u_header_T *unserialize_uhp(bufinfo_T *bi, char_u *file_name);
static int serialize_uep(bufinfo_T *bi, u_entry_T *uep);
static u_entry_T *unserialize_uep(bufinfo_T *bi, int *error, char_u *file_name);
static void serialize_pos(bufinfo_T *bi, pos_T pos);
diff --git a/src/version.c b/src/version.c
index f3a72ec77..8f75fef3a 100644
--- a/src/version.c
+++ b/src/version.c
@@ -79,8 +79,6 @@ init_longVersion(void)
}
#endif
-static void list_features(void);
-
static char *(features[]) =
{
#ifdef HAVE_ACL
@@ -795,6 +793,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 443,
+/**/
442,
/**/
441,
diff --git a/src/window.c b/src/window.c
index b50d835e4..e16570f4e 100644
--- a/src/window.c
+++ b/src/window.c
@@ -20,8 +20,6 @@ static void win_exchange(long);
static void win_rotate(int, int);
static void win_totop(int size, int flags);
static void win_equal_rec(win_T *next_curwin, int current, frame_T *topfr, int dir, int col, int row, int width, int height);
-static int last_window(void);
-static int close_last_window_tabpage(win_T *win, int free_buf, tabpage_T *prev_curtab);
static win_T *win_free_mem(win_T *win, int *dirp, tabpage_T *tp);
static frame_T *win_altframe(win_T *win, tabpage_T *tp);
static tabpage_T *alt_tabpage(void);
@@ -6246,8 +6244,6 @@ file_name_in_line(
}
# if defined(FEAT_FIND_ID) && defined(FEAT_EVAL)
-static char_u *eval_includeexpr(char_u *ptr, int len);
-
static char_u *
eval_includeexpr(char_u *ptr, int len)
{
diff --git a/src/workshop.c b/src/workshop.c
index 425174350..7b09e33ae 100644
--- a/src/workshop.c
+++ b/src/workshop.c
@@ -45,7 +45,6 @@ static char *addUniqueMnemonic(char *, char *);
static char *fixup(char *);
static char *get_selection(buf_T *);
static char *append_selection(int, char *, int *, int *);
-static void load_buffer_by_name(char *, int);
static void load_window(char *, int lnum);
static void warp_to_pc(int);
#ifdef FEAT_BEVAL_GUI
@@ -1228,7 +1227,6 @@ append_selection(
}
-
static void
load_buffer_by_name(
char *filename, /* the file to load */