0
0
mirror of https://github.com/vim/vim.git synced 2025-08-31 20:53:42 -04:00

patch 8.1.1891: functions used in one file are global

Problem:    Functions used in one file are global.
Solution:   Add "static". (Yegappan Lakshmanan, closes #4840)
This commit is contained in:
Bram Moolenaar 2019-08-20 20:13:45 +02:00
parent 9a4a8c4d59
commit 5843f5f37b
67 changed files with 162 additions and 178 deletions

View File

@ -1659,7 +1659,7 @@ apply_autocmds_retval(
/*
* Return TRUE when there is a CursorHold autocommand defined.
*/
int
static int
has_cursorhold(void)
{
return (first_autopat[(int)(get_real_state() == NORMAL_BUSY

View File

@ -27,6 +27,8 @@
#include "vim.h"
static void enter_buffer(buf_T *buf);
static void buflist_getfpos(void);
static char_u *buflist_match(regmatch_T *rmp, buf_T *buf, int ignore_case);
static char_u *fname_match(regmatch_T *rmp, char_u *name, int ignore_case);
#ifdef UNIX
@ -43,6 +45,10 @@ static int append_arg_number(win_T *wp, char_u *buf, int buflen, int add_file);
static void free_buffer(buf_T *);
static void free_buffer_stuff(buf_T *buf, int free_options);
static void clear_wininfo(buf_T *buf);
#if defined(FEAT_JOB_CHANNEL) \
|| defined(FEAT_PYTHON) || defined(FEAT_PYTHON3)
static int find_win_for_buf(buf_T *buf, win_T **wp, tabpage_T **tp);
#endif
#ifdef UNIX
# define dev_T dev_t
@ -1705,7 +1711,7 @@ set_curbuf(buf_T *buf, int action)
* Old curbuf must have been abandoned already! This also means "curbuf" may
* be pointing to freed memory.
*/
void
static void
enter_buffer(buf_T *buf)
{
/* Copy buffer and window local option values. Not for a help buffer. */
@ -2355,7 +2361,7 @@ buflist_getfile(
/*
* go to the last know line number for the current buffer
*/
void
static void
buflist_getfpos(void)
{
pos_T *fpos;
@ -5465,7 +5471,7 @@ restore_win_for_buf(
* If found OK is returned and "wp" and "tp" are set to the window and tabpage.
* If not found FAIL is returned.
*/
int
static int
find_win_for_buf(
buf_T *buf,
win_T **wp,

View File

@ -666,7 +666,7 @@ changed_bytes(linenr_T lnum, colnr_T col)
* Like changed_bytes() but also adjust text properties for "added" bytes.
* When "added" is negative text was deleted.
*/
void
static void
inserted_bytes(linenr_T lnum, colnr_T col, int added UNUSED)
{
#ifdef FEAT_TEXT_PROP

View File

@ -55,6 +55,14 @@
#endif
static void channel_read(channel_T *channel, ch_part_T part, char *func);
# if defined(MSWIN) || defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK)
static channel_T *channel_fd2channel(sock_T fd, ch_part_T *partp);
# endif
static ch_mode_T channel_get_mode(channel_T *channel, ch_part_T part);
static int channel_get_timeout(channel_T *channel, ch_part_T part);
static ch_part_T channel_part_send(channel_T *channel);
static ch_part_T channel_part_read(channel_T *channel);
static void free_job_options(jobopt_T *opt);
/* Whether a redraw is needed for appending a line to a buffer. */
static int channel_need_redraw = FALSE;
@ -1175,7 +1183,7 @@ channel_set_options(channel_T *channel, jobopt_T *opt)
/*
* Implements ch_open().
*/
channel_T *
static channel_T *
channel_open_func(typval_T *argvars)
{
char_u *address;
@ -1348,7 +1356,7 @@ channel_set_job(channel_T *channel, job_T *job, jobopt_T *options)
/*
* Set the callback for "channel"/"part" for the response with "id".
*/
void
static void
channel_set_req_callback(
channel_T *channel,
ch_part_T part,
@ -2848,7 +2856,7 @@ channel_is_open(channel_T *channel)
/*
* Return TRUE if "channel" has JSON or other typeahead.
*/
int
static int
channel_has_readahead(channel_T *channel, ch_part_T part)
{
ch_mode_T ch_mode = channel->ch_part[part].ch_mode;
@ -2959,7 +2967,7 @@ channel_part_info(channel_T *channel, dict_T *dict, char *name, ch_part_T part)
dict_add_number(dict, namebuf, chanpart->ch_timeout);
}
void
static void
channel_info(channel_T *channel, dict_T *dict)
{
dict_add_number(dict, "id", channel->ch_id);
@ -3067,7 +3075,7 @@ channel_close(channel_T *channel, int invoke_close_cb)
/*
* Close the "in" part channel "channel".
*/
void
static void
channel_close_in(channel_T *channel)
{
ch_close_part(channel, PART_IN);
@ -3676,7 +3684,7 @@ get_channel_arg(typval_T *tv, int check_open, int reading, ch_part_T part)
/*
* Common for ch_read() and ch_readraw().
*/
void
static void
common_channel_read(typval_T *argvars, typval_T *rettv, int raw, int blob)
{
channel_T *channel;
@ -3762,7 +3770,7 @@ theend:
* Lookup the channel from the socket. Set "partp" to the fd index.
* Returns NULL when the socket isn't found.
*/
channel_T *
static channel_T *
channel_fd2channel(sock_T fd, ch_part_T *partp)
{
channel_T *channel;
@ -4092,7 +4100,7 @@ send_common(
/*
* common for "ch_evalexpr()" and "ch_sendexpr()"
*/
void
static void
ch_expr_common(typval_T *argvars, typval_T *rettv, int eval)
{
char_u *text;
@ -4154,7 +4162,7 @@ ch_expr_common(typval_T *argvars, typval_T *rettv, int eval)
/*
* common for "ch_evalraw()" and "ch_sendraw()"
*/
void
static void
ch_raw_common(typval_T *argvars, typval_T *rettv, int eval)
{
char_u buf[NUMBUFLEN];
@ -4540,7 +4548,7 @@ set_ref_in_channel(int copyID)
/*
* Return the "part" to write to for "channel".
*/
ch_part_T
static ch_part_T
channel_part_send(channel_T *channel)
{
if (channel->CH_SOCK_FD == INVALID_FD)
@ -4551,7 +4559,7 @@ channel_part_send(channel_T *channel)
/*
* Return the default "part" to read from for "channel".
*/
ch_part_T
static ch_part_T
channel_part_read(channel_T *channel)
{
if (channel->CH_SOCK_FD == INVALID_FD)
@ -4563,7 +4571,7 @@ channel_part_read(channel_T *channel)
* Return the mode of "channel"/"part"
* If "channel" is invalid returns MODE_JSON.
*/
ch_mode_T
static ch_mode_T
channel_get_mode(channel_T *channel, ch_part_T part)
{
if (channel == NULL)
@ -4574,7 +4582,7 @@ channel_get_mode(channel_T *channel, ch_part_T part)
/*
* Return the timeout of "channel"/"part"
*/
int
static int
channel_get_timeout(channel_T *channel, ch_part_T part)
{
return channel->ch_part[part].ch_timeout;
@ -4638,7 +4646,7 @@ clear_job_options(jobopt_T *opt)
/*
* Free any members of a jobopt_T.
*/
void
static void
free_job_options(jobopt_T *opt)
{
if (opt->jo_callback.cb_partial != NULL)
@ -5309,7 +5317,7 @@ job_free(job_T *job)
}
}
job_T *jobs_to_free = NULL;
static job_T *jobs_to_free = NULL;
/*
* Put "job" in a list to be freed later, when it's no longer referenced.

View File

@ -35,6 +35,8 @@ static char_u g_chartab[256];
#define CT_ID_CHAR 0x20 /* flag: set for ID chars */
#define CT_FNAME_CHAR 0x40 /* flag: set for file name chars */
static int in_win_border(win_T *wp, colnr_T vcol);
/*
* Fill g_chartab[]. Also fills curbuf->b_chartab[] with flags for keyword
* characters for current buffer.
@ -1174,7 +1176,7 @@ win_nolbr_chartabsize(
* Return TRUE if virtual column "vcol" is in the rightmost column of window
* "wp".
*/
int
static int
in_win_border(win_T *wp, colnr_T vcol)
{
int width1; /* width of first line (after line number) */

View File

@ -957,7 +957,7 @@ dict_equal(
* "what" == 1: list of values
* "what" == 2: list of items
*/
void
static void
dict_list(typval_T *argvars, typval_T *rettv, int what)
{
list_T *l2;

View File

@ -2180,7 +2180,7 @@ listdigraphs(int use_headers)
wrong, in which case we messed up ScreenLines */
}
struct dg_header_entry {
static struct dg_header_entry {
int dg_start;
char *dg_header;
} header_table[] = {

View File

@ -248,7 +248,9 @@ static int get_lit_string_tv(char_u **arg, typval_T *rettv, int evaluate);
static int free_unref_items(int copyID);
static int get_env_tv(char_u **arg, typval_T *rettv, int evaluate);
static int get_env_len(char_u **arg);
static char_u * make_expanded_name(char_u *in_start, char_u *expr_start, char_u *expr_end, char_u *in_end);
static int get_name_len(char_u **arg, char_u **alias, int evaluate, int verbose);
static char_u *make_expanded_name(char_u *in_start, char_u *expr_start, char_u *expr_end, char_u *in_end);
static int get_var_tv(char_u *name, int len, typval_T *rettv, dictitem_T **dip, int verbose, int no_autoload);
static void check_vars(char_u *name, int len);
static typval_T *alloc_string_tv(char_u *string);
static void delete_var(hashtab_T *ht, hashitem_T *hi);
@ -6924,7 +6926,7 @@ get_id_len(char_u **arg)
* If the name contains 'magic' {}'s, expand them and return the
* expanded name in an allocated string via 'alias' - caller must free.
*/
int
static int
get_name_len(
char_u **arg,
char_u **alias,
@ -7453,7 +7455,7 @@ set_cmdarg(exarg_T *eap, char_u *oldarg)
* Get the value of internal variable "name".
* Return OK or FAIL. If OK is returned "rettv" must be cleared.
*/
int
static int
get_var_tv(
char_u *name,
int len, /* length of "name" */
@ -8014,7 +8016,7 @@ tv_get_string_buf_chk(typval_T *varp, char_u *buf)
* Turn a typeval into a string. Similar to tv_get_string_buf() but uses
* string() on Dict, List, etc.
*/
char_u *
static char_u *
tv_stringify(typval_T *varp, char_u *buf)
{
if (varp->v_type == VAR_LIST

View File

@ -20,7 +20,7 @@
static int linelen(int *has_tab);
static void do_filter(linenr_T line1, linenr_T line2, exarg_T *eap, char_u *cmd, int do_in, int do_out);
static int not_writing(void);
static int check_readonly(int *forceit, buf_T *buf);
static void delbuf_msg(char_u *name);
static int help_compare(const void *s1, const void *s2);
@ -2456,7 +2456,7 @@ do_wqall(exarg_T *eap)
* Check the 'write' option.
* Return TRUE and give a message when it's not set.
*/
int
static int
not_writing(void)
{
if (p_write)

View File

@ -839,7 +839,7 @@ report_make_pending(int pending, void *value)
* If something pending in a finally clause is resumed at the ":endtry", report
* it if required by the 'verbose' option or when debugging.
*/
void
static void
report_resume_pending(int pending, void *value)
{
if (p_verbose >= 14 || debug_break_level > 0)
@ -856,7 +856,7 @@ report_resume_pending(int pending, void *value)
* If something pending in a finally clause is discarded, report it if required
* by the 'verbose' option or when debugging.
*/
void
static void
report_discard_pending(int pending, void *value)
{
if (p_verbose >= 14 || debug_break_level > 0)

View File

@ -111,7 +111,7 @@ static int get_mac_fio_flags(char_u *ptr);
#endif
static char *e_auchangedbuf = N_("E812: Autocommands changed buffer or buffer name");
void
static void
filemess(
buf_T *buf,
char_u *name,

View File

@ -188,6 +188,7 @@ static int ff_check_visited(ff_visited_T **, char_u *, char_u *);
#else
static int ff_check_visited(ff_visited_T **, char_u *);
#endif
static void vim_findfile_free_visited(void *search_ctx_arg);
static void vim_findfile_free_visited_list(ff_visited_list_hdr_T **list_headp);
static void ff_free_visited_list(ff_visited_T *vl);
static ff_visited_list_hdr_T* ff_get_visited_list(char_u *, ff_visited_list_hdr_T **list_headp);
@ -1186,7 +1187,7 @@ fail:
* Free the list of lists of visited files and directories
* Can handle it if the passed search_context is NULL;
*/
void
static void
vim_findfile_free_visited(void *search_ctx_arg)
{
ff_search_ctx_T *search_ctx;

View File

@ -91,7 +91,9 @@ static int last_recorded_len = 0; /* number of last recorded chars */
static int read_readbuf(buffheader_T *buf, int advance);
static void init_typebuf(void);
static void may_sync_undo(void);
static void free_typebuf(void);
static void closescript(void);
static void updatescript(int c);
static int vgetorpeek(int);
static int inchar(char_u *buf, int maxlen, long wait_time);
@ -1263,7 +1265,7 @@ may_sync_undo(void)
* Make "typebuf" empty and allocate new buffers.
* Returns FAIL when out of memory.
*/
int
static int
alloc_typebuf(void)
{
typebuf.tb_buf = alloc(TYPELEN_INIT);
@ -1287,7 +1289,7 @@ alloc_typebuf(void)
/*
* Free the buffers of "typebuf".
*/
void
static void
free_typebuf(void)
{
if (typebuf.tb_buf == typebuf_init)
@ -1511,7 +1513,7 @@ before_blocking(void)
* All the changed memfiles are synced if c == 0 or when the number of typed
* characters reaches 'updatecount' and 'updatecount' is non-zero.
*/
void
static void
updatescript(int c)
{
static int count = 0;

View File

@ -17,10 +17,13 @@ gui_T gui;
static void set_guifontwide(char_u *font_name);
#endif
static void gui_check_pos(void);
static void gui_reset_scroll_region(void);
static void gui_outstr(char_u *, int);
static int gui_screenchar(int off, int flags, guicolor_T fg, guicolor_T bg, int back);
static int gui_outstr_nowrap(char_u *s, int len, int flags, guicolor_T fg, guicolor_T bg, int back);
static void gui_delete_lines(int row, int count);
static void gui_insert_lines(int row, int count);
static int gui_xy2colrow(int x, int y, int *colp);
#if defined(FEAT_GUI_TABLINE) || defined(PROTO)
static int gui_has_tabline(void);
#endif
@ -1050,7 +1053,7 @@ gui_get_wide_font(void)
return OK;
}
void
static void
gui_set_cursor(int row, int col)
{
gui.row = row;
@ -1713,7 +1716,7 @@ gui_new_shellsize(void)
/*
* Make scroll region cover whole screen.
*/
void
static void
gui_reset_scroll_region(void)
{
gui.scroll_region_top = 0;
@ -1722,7 +1725,7 @@ gui_reset_scroll_region(void)
gui.scroll_region_right = gui.num_cols - 1;
}
void
static void
gui_start_highlight(int mask)
{
if (mask > HL_ALL) /* highlight code */
@ -2227,7 +2230,7 @@ gui_screenstr(
* Returns OK, unless "back" is non-zero and using the bold trick, then return
* FAIL (the caller should start drawing "back" chars back).
*/
int
static int
gui_outstr_nowrap(
char_u *s,
int len,
@ -3380,7 +3383,7 @@ button_set:
* Corrects for multi-byte character.
* returns column in "*colp" and row as return value;
*/
int
static int
gui_xy2colrow(int x, int y, int *colp)
{
int col = check_col(X_2_COL(x));

View File

@ -15,6 +15,9 @@
#if defined(FEAT_CINDENT) || defined(FEAT_SMARTINDENT)
static int cin_iscase(char_u *s, int strict);
static int cin_isscopedecl(char_u *s);
/*
* Return TRUE if the string "line" starts with a word from 'cinwords'.
*/
@ -408,7 +411,7 @@ cin_islabel_skip(char_u **s)
* Recognize a label: "label:".
* Note: curwin->w_cursor must be where we are looking for the label.
*/
int
static int
cin_islabel(void) // XXX
{
char_u *s;
@ -507,7 +510,7 @@ cin_isinit(void)
/*
* Recognize a switch label: "case .*:" or "default:".
*/
int
static int
cin_iscase(
char_u *s,
int strict) // Allow relaxed check of case statement for JS
@ -560,7 +563,7 @@ cin_isdefault(char_u *s)
/*
* Recognize a "public/private/protected" scope declaration label.
*/
int
static int
cin_isscopedecl(char_u *s)
{
int i;

View File

@ -1056,7 +1056,7 @@ theend:
* "options" can be JSON_JS or zero;
* Return FAIL if not the whole message was consumed.
*/
int
static int
json_decode_all(js_read_T *reader, typval_T *res, int options)
{
int ret;

View File

@ -53,7 +53,7 @@ list_rem_watch(list_T *l, listwatch_T *lwrem)
* Just before removing an item from a list: advance watchers to the next
* item.
*/
void
static void
list_fix_watch(list_T *l, listitem_T *item)
{
listwatch_T *lw;

View File

@ -26,6 +26,7 @@
*/
static xfmark_T namedfm[NMARKS + EXTRA_MARKS]; /* marks with file nr */
static void fname2fnum(xfmark_T *fm);
static void fmarks_check_one(xfmark_T *fm, char_u *name, buf_T *buf);
static char_u *mark_line(pos_T *mp, int lead_len);
static void show_one_mark(int, char_u *, pos_T *, char_u *, int current);
@ -509,7 +510,7 @@ getnextmark(
* This is used for marks obtained from the .viminfo file. It's postponed
* until the mark is used to avoid a long startup delay.
*/
void
static void
fname2fnum(xfmark_T *fm)
{
char_u *p;

View File

@ -29,6 +29,7 @@ static void free_menu(vimmenu_T **menup);
static void free_menu_string(vimmenu_T *, int);
static int show_menus(char_u *, int);
static void show_menus_recursive(vimmenu_T *, int, int);
static char_u *menu_name_skip(char_u *name);
static int menu_name_equal(char_u *name, vimmenu_T *menu);
static int menu_namecmp(char_u *name, char_u *mname);
static int get_menu_cmd_modes(char_u *, int, int *, int *);
@ -1557,7 +1558,7 @@ get_menu_names(expand_T *xp UNUSED, int idx)
* element. Any \ and ^Vs are removed from the current element.
* "name" may be modified.
*/
char_u *
static char_u *
menu_name_skip(char_u *name)
{
char_u *p;

View File

@ -28,6 +28,7 @@ static void t_puts(int *t_col, char_u *t_s, char_u *s, int attr);
static void msg_puts_printf(char_u *str, int maxlen);
static int do_more_prompt(int typed_char);
static void msg_screen_putchar(int c, int attr);
static void msg_moremsg(int full);
static int msg_check_screen(void);
static void redir_write(char_u *s, int maxlen);
#ifdef FEAT_CON_DIALOG
@ -35,6 +36,7 @@ static char_u *msg_show_console_dialog(char_u *message, char_u *buttons, int dfl
static int confirm_msg_used = FALSE; /* displaying confirm_msg */
static char_u *confirm_msg = NULL; /* ":confirm" message */
static char_u *confirm_msg_tail; /* tail of confirm_msg */
static void display_confirm_msg(void);
#endif
#ifdef FEAT_JOB_CHANNEL
static int emsg_to_channel_log = FALSE;
@ -513,7 +515,7 @@ msg_source(int attr)
* If "msg" is in 'debug': do error message but without side effects.
* If "emsg_skip" is set: never do error messages.
*/
int
static int
emsg_not_now(void)
{
if ((emsg_off > 0 && vim_strchr(p_debug, 'm') == NULL
@ -1930,13 +1932,7 @@ msg_puts_title(char *s)
* part in the middle and replace it with "..." when necessary.
* Does not handle multi-byte characters!
*/
void
msg_outtrans_long_attr(char_u *longstr, int attr)
{
msg_outtrans_long_len_attr(longstr, (int)STRLEN(longstr), attr);
}
void
static void
msg_outtrans_long_len_attr(char_u *longstr, int len, int attr)
{
int slen = len;
@ -1952,6 +1948,12 @@ msg_outtrans_long_len_attr(char_u *longstr, int len, int attr)
msg_outtrans_len_attr(longstr + len - slen, slen, attr);
}
void
msg_outtrans_long_attr(char_u *longstr, int attr)
{
msg_outtrans_long_len_attr(longstr, (int)STRLEN(longstr), attr);
}
/*
* Basic function for writing a message with highlight attributes.
*/
@ -3141,7 +3143,7 @@ msg_screen_putchar(int c, int attr)
}
}
void
static void
msg_moremsg(int full)
{
int attr;
@ -3882,7 +3884,7 @@ msg_show_console_dialog(
/*
* Display the ":confirm" message. Also called when screen resized.
*/
void
static void
display_confirm_msg(void)
{
/* avoid that 'q' at the more prompt truncates the message here */

View File

@ -3082,7 +3082,7 @@ FullName_save(
return new_fname;
}
void
static void
prepare_to_exit(void)
{
#if defined(SIGHUP) && defined(SIG_IGN)

View File

@ -2530,7 +2530,7 @@ static struct mousetable
* Return the modifier mask bit (MOD_MASK_*) which corresponds to the given
* modifier name ('S' for Shift, 'C' for Ctrl etc).
*/
int
static int
name_to_mod_mask(int c)
{
int i;

View File

@ -65,6 +65,9 @@ static int yank_copy_line(struct block_def *bd, long y_idx);
static void copy_yank_reg(yankreg_T *reg);
static void may_set_selection(void);
#endif
#if defined(FEAT_SMARTINDENT) || defined(FEAT_CINDENT)
static int preprocs_left(void);
#endif
static void dis_msg(char_u *p, int skip_esc);
static void block_prep(oparg_T *oap, struct block_def *, linenr_T, int);
static int do_addsub(int op_type, pos_T *pos, int length, linenr_T Prenum1);
@ -830,7 +833,7 @@ get_expr_line(void)
/*
* Get the '=' register expression itself, without evaluating it.
*/
char_u *
static char_u *
get_expr_line_src(void)
{
if (expr_line == NULL)
@ -4088,7 +4091,7 @@ adjust_cursor_eol(void)
/*
* Return TRUE if lines starting with '#' should be left aligned.
*/
int
static int
preprocs_left(void)
{
return

View File

@ -3277,6 +3277,9 @@ static long_u *insecure_flag(int opt_idx, int opt_flags);
static void set_string_option_global(int opt_idx, char_u **varp);
static char *did_set_string_option(int opt_idx, char_u **varp, int new_value_alloced, char_u *oldval, char *errbuf, int opt_flags, int *value_checked);
static char *set_chars_option(char_u **varp);
#ifdef FEAT_STL_OPT
static char *check_stl_option(char_u *s);
#endif
#ifdef FEAT_CLIPBOARD
static char *check_clipboard_option(void);
#endif
@ -3301,6 +3304,7 @@ static int put_setbool(FILE *fd, char *cmd, char *name, int value);
static int istermoption(struct vimoption *);
static char_u *get_varp_scope(struct vimoption *p, int opt_flags);
static char_u *get_varp(struct vimoption *);
static void check_win_options(win_T *win);
static void option_value2string(struct vimoption *, int opt_flags);
static void check_winopt(winopt_T *wop);
static int wc_use_keyname(char_u *varp, long *wcp);
@ -8246,7 +8250,7 @@ set_chars_option(char_u **varp)
* Check validity of options with the 'statusline' format.
* Return error message or NULL.
*/
char *
static char *
check_stl_option(char_u *s)
{
int itemcnt = 0;
@ -11430,7 +11434,7 @@ copy_winopt(winopt_T *from, winopt_T *to)
/*
* Check string options in a window for a NULL value.
*/
void
static void
check_win_options(win_T *win)
{
check_winopt(&win->w_onebuf_opt);
@ -13340,22 +13344,10 @@ get_sw_value(buf_T *buf)
return get_sw_value_col(buf, 0);
}
/*
* Idem, using the first non-black in the current line.
*/
long
get_sw_value_indent(buf_T *buf)
{
pos_T pos = curwin->w_cursor;
pos.col = getwhitecols_curline();
return get_sw_value_pos(buf, &pos);
}
/*
* Idem, using "pos".
*/
long
static long
get_sw_value_pos(buf_T *buf, pos_T *pos)
{
pos_T save_cursor = curwin->w_cursor;
@ -13367,6 +13359,18 @@ get_sw_value_pos(buf_T *buf, pos_T *pos)
return sw_value;
}
/*
* Idem, using the first non-black in the current line.
*/
long
get_sw_value_indent(buf_T *buf)
{
pos_T pos = curwin->w_cursor;
pos.col = getwhitecols_curline();
return get_sw_value_pos(buf, &pos);
}
/*
* Idem, using virtual column "col".
*/

View File

@ -28,6 +28,8 @@ static poppos_entry_T poppos_entries[] = {
{"center", POPPOS_CENTER}
};
static void popup_adjust_position(win_T *wp);
/*
* Get option value for "key", which is "line" or "col".
* Handles "cursor+N" and "cursor-N".
@ -982,7 +984,7 @@ popup_extra_width(win_T *wp)
/*
* Adjust the position and size of the popup to fit on the screen.
*/
void
static void
popup_adjust_position(win_T *wp)
{
linenr_T lnum;

View File

@ -249,7 +249,7 @@ profile_self(proftime_T *self, proftime_T *total, proftime_T *children)
/*
* Get the current waittime.
*/
void
static void
profile_get_wait(proftime_T *tm)
{
*tm = prof_wait_time;
@ -270,7 +270,7 @@ profile_sub_wait(proftime_T *tm, proftime_T *tma)
/*
* Return TRUE if "tm1" and "tm2" are equal.
*/
int
static int
profile_equal(proftime_T *tm1, proftime_T *tm2)
{
# ifdef MSWIN

View File

@ -15,7 +15,6 @@ void aucmd_restbuf(aco_save_T *aco);
int apply_autocmds(event_T event, char_u *fname, char_u *fname_io, int force, buf_T *buf);
int apply_autocmds_exarg(event_T event, char_u *fname, char_u *fname_io, int force, buf_T *buf, exarg_T *eap);
int apply_autocmds_retval(event_T event, char_u *fname, char_u *fname_io, int force, buf_T *buf, int *retval);
int has_cursorhold(void);
int trigger_cursorhold(void);
int has_cursormoved(void);
int has_cursormovedI(void);

View File

@ -12,7 +12,6 @@ void handle_swap_exists(bufref_T *old_curbuf);
char *do_bufdel(int command, char_u *arg, int addr_count, int start_bnr, int end_bnr, int forceit);
int do_buffer(int action, int start, int dir, int count, int forceit);
void set_curbuf(buf_T *buf, int action);
void enter_buffer(buf_T *buf);
void do_autochdir(void);
void no_write_message(void);
void no_write_message_nobang(buf_T *buf);
@ -20,7 +19,6 @@ int curbuf_reusable(void);
buf_T *buflist_new(char_u *ffname_arg, char_u *sfname_arg, linenr_T lnum, int flags);
void free_buf_options(buf_T *buf, int free_p_ff);
int buflist_getfile(int n, linenr_T lnum, int options, int forceit);
void buflist_getfpos(void);
buf_T *buflist_findname_exp(char_u *fname);
buf_T *buflist_findname(char_u *ffname);
int buflist_findpat(char_u *pattern, char_u *pattern_end, int unlisted, int diffmode, int curtab_only);
@ -68,7 +66,6 @@ int buf_hide(buf_T *buf);
char_u *buf_spname(buf_T *buf);
void switch_to_win_for_buf(buf_T *buf, win_T **save_curwinp, tabpage_T **save_curtabp, bufref_T *save_curbuf);
void restore_win_for_buf(win_T *save_curwin, tabpage_T *save_curtab, bufref_T *save_curbuf);
int find_win_for_buf(buf_T *buf, win_T **wp, tabpage_T **tp);
void set_buflisted(int on);
int buf_contents_changed(buf_T *buf);
void wipe_buffer(buf_T *buf, int aucmd);

View File

@ -8,7 +8,6 @@ void f_listener_remove(typval_T *argvars, typval_T *rettv);
void may_invoke_listeners(buf_T *buf, linenr_T lnum, linenr_T lnume, int added);
void invoke_listeners(buf_T *buf);
void changed_bytes(linenr_T lnum, colnr_T col);
void inserted_bytes(linenr_T lnum, colnr_T col, int added);
void appended_lines(linenr_T lnum, long count);
void appended_lines_mark(linenr_T lnum, long count);
void deleted_lines(linenr_T lnum, long count);

View File

@ -8,10 +8,8 @@ int free_unused_channels_contents(int copyID, int mask);
void free_unused_channels(int copyID, int mask);
void channel_gui_register_all(void);
channel_T *channel_open(char *hostname, int port_in, int waittime, void (*nb_close_cb)(void));
channel_T *channel_open_func(typval_T *argvars);
void channel_set_pipes(channel_T *channel, sock_T in, sock_T out, sock_T err);
void channel_set_job(channel_T *channel, job_T *job, jobopt_T *options);
void channel_set_req_callback(channel_T *channel, ch_part_T part, callback_T *callback, int id);
void channel_buffer_free(buf_T *buf);
void channel_write_any_lines(void);
void channel_write_new_lines(buf_T *buf);
@ -22,21 +20,14 @@ void channel_consume(channel_T *channel, ch_part_T part, int len);
int channel_collapse(channel_T *channel, ch_part_T part, int want_nl);
int channel_can_write_to(channel_T *channel);
int channel_is_open(channel_T *channel);
int channel_has_readahead(channel_T *channel, ch_part_T part);
char *channel_status(channel_T *channel, int req_part);
void channel_info(channel_T *channel, dict_T *dict);
void channel_close(channel_T *channel, int invoke_close_cb);
void channel_close_in(channel_T *channel);
void channel_clear(channel_T *channel);
void channel_free_all(void);
void common_channel_read(typval_T *argvars, typval_T *rettv, int raw, int blob);
channel_T *channel_fd2channel(sock_T fd, ch_part_T *partp);
void channel_handle_events(int only_keep_open);
int channel_any_keep_open(void);
void channel_set_nonblock(channel_T *channel, ch_part_T part);
int channel_send(channel_T *channel, ch_part_T part, char_u *buf_arg, int len_arg, char *fun);
void ch_expr_common(typval_T *argvars, typval_T *rettv, int eval);
void ch_raw_common(typval_T *argvars, typval_T *rettv, int eval);
int channel_poll_setup(int nfd_in, void *fds_in, int *towait);
int channel_poll_check(int ret_in, void *fds_in);
int channel_select_setup(int maxfd_in, void *rfds_in, void *wfds_in, struct timeval *tv, struct timeval **tvp);
@ -44,12 +35,7 @@ int channel_select_check(int ret_in, void *rfds_in, void *wfds_in);
int channel_parse_messages(void);
int channel_any_readahead(void);
int set_ref_in_channel(int copyID);
ch_part_T channel_part_send(channel_T *channel);
ch_part_T channel_part_read(channel_T *channel);
ch_mode_T channel_get_mode(channel_T *channel, ch_part_T part);
int channel_get_timeout(channel_T *channel, ch_part_T part);
void clear_job_options(jobopt_T *opt);
void free_job_options(jobopt_T *opt);
int get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2);
void job_free_all(void);
int job_any_running(void);

View File

@ -29,7 +29,6 @@ int vim_isprintc_strict(int c);
int lbr_chartabsize(char_u *line, unsigned char *s, colnr_T col);
int lbr_chartabsize_adv(char_u *line, char_u **s, colnr_T col);
int win_lbr_chartabsize(win_T *wp, char_u *line, char_u *s, colnr_T col, int *headp);
int in_win_border(win_T *wp, colnr_T vcol);
void getvcol(win_T *wp, pos_T *pos, colnr_T *start, colnr_T *cursor, colnr_T *end);
colnr_T getvcol_nolist(pos_T *posp);
void getvvcol(win_T *wp, pos_T *pos, colnr_T *start, colnr_T *cursor, colnr_T *end);

View File

@ -32,7 +32,6 @@ int dict_get_tv(char_u **arg, typval_T *rettv, int evaluate, int literal);
void dict_extend(dict_T *d1, dict_T *d2, char_u *action);
dictitem_T *dict_lookup(hashitem_T *hi);
int dict_equal(dict_T *d1, dict_T *d2, int ic, int recursive);
void dict_list(typval_T *argvars, typval_T *rettv, int what);
void f_items(typval_T *argvars, typval_T *rettv);
void f_keys(typval_T *argvars, typval_T *rettv);
void f_values(typval_T *argvars, typval_T *rettv);

View File

@ -63,7 +63,6 @@ int string2float(char_u *text, float_T *value);
pos_T *var2fpos(typval_T *varp, int dollar_lnum, int *fnum);
int list2fpos(typval_T *arg, pos_T *posp, int *fnump, colnr_T *curswantp);
int get_id_len(char_u **arg);
int get_name_len(char_u **arg, char_u **alias, int evaluate, int verbose);
char_u *find_name_end(char_u *arg, char_u **expr_start, char_u **expr_end, int flags);
int eval_isnamec(int c);
int eval_isnamec1(int c);
@ -84,7 +83,6 @@ void set_reg_var(int c);
char_u *v_exception(char_u *oldval);
char_u *v_throwpoint(char_u *oldval);
char_u *set_cmdarg(exarg_T *eap, char_u *oldarg);
int get_var_tv(char_u *name, int len, typval_T *rettv, dictitem_T **dip, int verbose, int no_autoload);
int handle_subscript(char_u **arg, typval_T *rettv, int evaluate, int verbose, char_u *start_leader, char_u **end_leaderp);
typval_T *alloc_tv(void);
void free_tv(typval_T *varp);
@ -97,7 +95,6 @@ char_u *tv_get_string(typval_T *varp);
char_u *tv_get_string_buf(typval_T *varp, char_u *buf);
char_u *tv_get_string_chk(typval_T *varp);
char_u *tv_get_string_buf_chk(typval_T *varp, char_u *buf);
char_u *tv_stringify(typval_T *varp, char_u *buf);
dictitem_T *find_var(char_u *name, hashtab_T **htp, int no_autoload);
dictitem_T *find_var_in_ht(hashtab_T *ht, int htname, char_u *varname, int no_autoload);
hashtab_T *find_var_ht(char_u *name, char_u **varname);

View File

@ -22,7 +22,6 @@ int do_write(exarg_T *eap);
int check_overwrite(exarg_T *eap, buf_T *buf, char_u *fname, char_u *ffname, int other);
void ex_wnext(exarg_T *eap);
void do_wqall(exarg_T *eap);
int not_writing(void);
int getfile(int fnum, char_u *ffname_arg, char_u *sfname_arg, int setpm, linenr_T lnum, int forceit);
int do_ecmd(int fnum, char_u *ffname, char_u *sfname, exarg_T *eap, linenr_T newlnum, int flags, win_T *oldwin);
void ex_append(exarg_T *eap);

View File

@ -10,8 +10,6 @@ int do_intthrow(struct condstack *cstack);
char *get_exception_string(void *value, except_type_T type, char_u *cmdname, int *should_free);
void discard_current_exception(void);
void report_make_pending(int pending, void *value);
void report_resume_pending(int pending, void *value);
void report_discard_pending(int pending, void *value);
void ex_eval(exarg_T *eap);
void ex_if(exarg_T *eap);
void ex_endif(exarg_T *eap);

View File

@ -1,5 +1,4 @@
/* fileio.c */
void filemess(buf_T *buf, char_u *name, char_u *s, int attr);
int readfile(char_u *fname, char_u *sfname, linenr_T from, linenr_T lines_to_skip, linenr_T lines_to_read, exarg_T *eap, int flags);
int is_dev_fd_file(char_u *fname);
int prep_exarg(exarg_T *eap, buf_T *buf);

View File

@ -3,7 +3,6 @@ void *vim_findfile_init(char_u *path, char_u *filename, char_u *stopdirs, int le
char_u *vim_findfile_stopdir(char_u *buf);
void vim_findfile_cleanup(void *ctx);
char_u *vim_findfile(void *search_ctx_arg);
void vim_findfile_free_visited(void *search_ctx_arg);
char_u *find_file_in_path(char_u *ptr, int len, int options, int first, char_u *rel_fname);
void free_findfile(void);
char_u *find_directory_in_path(char_u *ptr, int len, int options, char_u *rel_fname);

View File

@ -30,8 +30,6 @@ int typebuf_changed(int tb_change_cnt);
int typebuf_typed(void);
int typebuf_maplen(void);
void del_typebuf(int len, int offset);
int alloc_typebuf(void);
void free_typebuf(void);
int save_typebuf(void);
void save_typeahead(tasave_T *tp);
void restore_typeahead(tasave_T *tp);
@ -39,7 +37,6 @@ void openscript(char_u *name, int directly);
void close_all_scripts(void);
int using_script(void);
void before_blocking(void);
void updatescript(int c);
int vgetc(void);
int safe_vgetc(void);
int plain_vgetc(void);

View File

@ -7,7 +7,6 @@ void gui_exit(int rc);
void gui_shell_closed(void);
int gui_init_font(char_u *font_list, int fontset);
int gui_get_wide_font(void);
void gui_set_cursor(int row, int col);
void gui_update_cursor(int force, int clear_selection);
void gui_position_menu(void);
int gui_get_base_width(void);
@ -17,8 +16,6 @@ void gui_may_resize_shell(void);
int gui_get_shellsize(void);
void gui_set_shellsize(int mustset, int fit_to_display, int direction);
void gui_new_shellsize(void);
void gui_reset_scroll_region(void);
void gui_start_highlight(int mask);
void gui_stop_highlight(int mask);
void gui_clear_block(int row1, int col1, int row2, int col2);
void gui_update_cursor_later(void);
@ -28,14 +25,12 @@ void gui_can_update_cursor(void);
void gui_disable_flush(void);
void gui_enable_flush(void);
void gui_may_flush(void);
int gui_outstr_nowrap(char_u *s, int len, int flags, guicolor_T fg, guicolor_T bg, int back);
void gui_undraw_cursor(void);
void gui_redraw(int x, int y, int w, int h);
int gui_redraw_block(int row1, int col1, int row2, int col2, int flags);
int gui_wait_for_chars(long wtime, int tb_change_cnt);
int gui_inchar(char_u *buf, int maxlen, long wtime, int tb_change_cnt);
void gui_send_mouse_event(int button, int x, int y, int repeated_click, int_u modifiers);
int gui_xy2colrow(int x, int y, int *colp);
void gui_menu_cb(vimmenu_T *menu);
void gui_init_which_components(char_u *oldval);
int gui_use_tabline(void);

View File

@ -2,9 +2,6 @@
int cin_is_cinword(char_u *line);
pos_T *find_start_comment(int ind_maxcomment);
int cindent_on(void);
int cin_islabel(void);
int cin_iscase(char_u *s, int strict);
int cin_isscopedecl(char_u *s);
void parse_cino(buf_T *buf);
int get_c_indent(void);
int get_expr_indent(void);

View File

@ -1,7 +1,6 @@
/* json.c */
char_u *json_encode(typval_T *val, int options);
char_u *json_encode_nr_expr(int nr, typval_T *val, int options);
int json_decode_all(js_read_T *reader, typval_T *res, int options);
int json_decode(js_read_T *reader, typval_T *res, int options);
int json_find_end(js_read_T *reader, int options);
void f_js_decode(typval_T *argvars, typval_T *rettv);

View File

@ -1,7 +1,6 @@
/* list.c */
void list_add_watch(list_T *l, listwatch_T *lw);
void list_rem_watch(list_T *l, listwatch_T *lwrem);
void list_fix_watch(list_T *l, listitem_T *item);
list_T *list_alloc(void);
list_T *list_alloc_id(alloc_id_T id);
int rettv_list_alloc(typval_T *rettv);

View File

@ -9,7 +9,6 @@ pos_T *getmark_buf(buf_T *buf, int c, int changefile);
pos_T *getmark(int c, int changefile);
pos_T *getmark_buf_fnum(buf_T *buf, int c, int changefile, int *fnum);
pos_T *getnextmark(pos_T *startpos, int dir, int begin_line);
void fname2fnum(xfmark_T *fm);
void fmarks_check_names(buf_T *buf);
int check_mark(pos_T *pos);
void clrallmarks(buf_T *buf);

View File

@ -5,7 +5,6 @@ void remove_winbar(win_T *wp);
char_u *set_context_in_menu_cmd(expand_T *xp, char_u *cmd, char_u *arg, int forceit);
char_u *get_menu_name(expand_T *xp, int idx);
char_u *get_menu_names(expand_T *xp, int idx);
char_u *menu_name_skip(char_u *name);
int get_menu_index(vimmenu_T *menu, int state);
int menu_is_menubar(char_u *name);
int menu_is_popup(char_u *name);

View File

@ -7,7 +7,6 @@ char_u *msg_strtrunc(char_u *s, int force);
void trunc_string(char_u *s, char_u *buf, int room_in, int buflen);
void reset_last_sourcing(void);
void msg_source(int attr);
int emsg_not_now(void);
void ignore_error_for_testing(char_u *error);
void do_perror(char *msg);
int emsg(char *s);
@ -43,7 +42,6 @@ void msg_prt_line(char_u *s, int list);
void msg_puts(char *s);
void msg_puts_title(char *s);
void msg_outtrans_long_attr(char_u *longstr, int attr);
void msg_outtrans_long_len_attr(char_u *longstr, int len, int attr);
void msg_puts_attr(char *s, int attr);
int message_filtered(char_u *msg);
void may_clear_sb_text(void);
@ -55,7 +53,6 @@ void msg_sb_eol(void);
int msg_use_printf(void);
void mch_errmsg(char *str);
void mch_msg(char *str);
void msg_moremsg(int full);
void repeat_message(void);
void msg_clr_eos(void);
void msg_clr_eos_force(void);
@ -73,7 +70,6 @@ void give_warning(char_u *message, int hl);
void give_warning2(char_u *message, char_u *a1, int hl);
void msg_advance(int col);
int do_dialog(int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd);
void display_confirm_msg(void);
int vim_dialog_yesno(int type, char_u *title, char_u *message, int dflt);
int vim_dialog_yesnocancel(int type, char_u *title, char_u *message, int dflt);
int vim_dialog_yesnoallcancel(int type, char_u *title, char_u *message, int dflt);

View File

@ -60,7 +60,6 @@ char_u *concat_fnames(char_u *fname1, char_u *fname2, int sep);
char_u *concat_str(char_u *str1, char_u *str2);
void add_pathsep(char_u *p);
char_u *FullName_save(char_u *fname, int force);
void prepare_to_exit(void);
void preserve_exit(void);
int vim_fexists(char_u *fname);
void line_breakcheck(void);

View File

@ -64,7 +64,6 @@ void ga_add_string(garray_T *gap, char_u *p);
void ga_concat(garray_T *gap, char_u *s);
void ga_append(garray_T *gap, int c);
void append_ga_line(garray_T *gap);
int name_to_mod_mask(int c);
int simplify_key(int key, int *modifiers);
int handle_x_keys(int key);
char_u *get_special_key_name(int c, int modifiers);

View File

@ -14,7 +14,6 @@ void op_reindent(oparg_T *oap, int (*how)(void));
int get_expr_register(void);
void set_expr_line(char_u *new_line);
char_u *get_expr_line(void);
char_u *get_expr_line_src(void);
int valid_yank_reg(int regname, int writing);
int get_yank_register(int regname, int writing);
int may_get_selection(int regname);
@ -42,7 +41,6 @@ void clear_registers(void);
int op_yank(oparg_T *oap, int deleting, int mess);
void do_put(int regname, int dir, long count, int flags);
void adjust_cursor_eol(void);
int preprocs_left(void);
int get_register_name(int num);
void ex_display(exarg_T *eap);
char_u *skip_comment(char_u *line, int process, int include_space, int *is_comment);

View File

@ -24,7 +24,6 @@ void set_string_option_direct_in_win(win_T *wp, char_u *name, int opt_idx, char_
void set_string_option_direct_in_buf(buf_T *buf, char_u *name, int opt_idx, char_u *val, int opt_flags, int set_sid);
int valid_spellang(char_u *val);
char *check_colorcolumn(win_T *wp);
char *check_stl_option(char_u *s);
void set_term_option_sctx_idx(char *name, int opt_idx);
int get_option_value(char_u *name, long *numval, char_u **stringval, int opt_flags);
int get_option_value_strict(char_u *name, long *numval, char_u **stringval, int opt_type, void *from);
@ -44,7 +43,6 @@ void unset_global_local_option(char_u *name, void *from);
char_u *get_equalprg(void);
void win_copy_options(win_T *wp_from, win_T *wp_to);
void copy_winopt(winopt_T *from, winopt_T *to);
void check_win_options(win_T *win);
void clear_winopt(winopt_T *wop);
void buf_copy_options(buf_T *buf, int flags);
void reset_modifiable(void);
@ -75,7 +73,6 @@ int tabstop_count(int *ts);
int tabstop_first(int *ts);
long get_sw_value(buf_T *buf);
long get_sw_value_indent(buf_T *buf);
long get_sw_value_pos(buf_T *buf, pos_T *pos);
long get_sw_value_col(buf_T *buf, colnr_T col);
long get_sts_value(void);
long get_scrolloff_value(void);

View File

@ -9,7 +9,6 @@ void popup_handle_scrollbar_click(win_T *wp, int row, int col);
int popup_height(win_T *wp);
int popup_width(win_T *wp);
int popup_extra_width(win_T *wp);
void popup_adjust_position(win_T *wp);
int parse_previewpopup(win_T *wp);
int parse_completepopup(win_T *wp);
void popup_set_wantpos_cursor(win_T *wp, int width);

View File

@ -10,9 +10,7 @@ void profile_zero(proftime_T *tm);
void profile_divide(proftime_T *tm, int count, proftime_T *tm2);
void profile_add(proftime_T *tm, proftime_T *tm2);
void profile_self(proftime_T *self, proftime_T *total, proftime_T *children);
void profile_get_wait(proftime_T *tm);
void profile_sub_wait(proftime_T *tm, proftime_T *tma);
int profile_equal(proftime_T *tm1, proftime_T *tm2);
int profile_cmp(const proftime_T *tm1, const proftime_T *tm2);
void ex_profile(exarg_T *eap);
char_u *get_profile_name(expand_T *xp, int idx);

View File

@ -5,7 +5,6 @@ void qf_free_all(win_T *wp);
void check_quickfix_busy(void);
void copy_loclist_stack(win_T *from, win_T *to);
void qf_jump(qf_info_T *qi, int dir, int errornr, int forceit);
void qf_jump_newwin(qf_info_T *qi, int dir, int errornr, int forceit, int newwin);
void qf_list(exarg_T *eap);
void qf_age(exarg_T *eap);
void qf_history(exarg_T *eap);

View File

@ -19,7 +19,6 @@ buf_T *open_spellbuf(void);
void close_spellbuf(buf_T *buf);
void clear_spell_chartab(spelltab_T *sp);
void init_spell_chartab(void);
int spell_iswordp_nmw(char_u *p, win_T *wp);
int spell_casefold(char_u *str, int len, char_u *buf, int buflen);
int spell_check_sps(void);
void spell_suggest(int count);

View File

@ -1,5 +1,4 @@
/* term.c */
guicolor_T termgui_mch_get_color(char_u *name);
guicolor_T termgui_get_color(char_u *name);
guicolor_T termgui_mch_get_rgb(guicolor_T color);
int set_termname(char_u *term);
@ -65,13 +64,11 @@ void clear_termcodes(void);
void add_termcode(char_u *name, char_u *string, int flags);
char_u *find_termcode(char_u *name);
char_u *get_termcode(int i);
void del_termcode(char_u *name);
void set_mouse_topline(win_T *wp);
int check_termcode(int max_offset, char_u *buf, int bufsize, int *buflen);
void term_get_fg_color(char_u *r, char_u *g, char_u *b);
void term_get_bg_color(char_u *r, char_u *g, char_u *b);
char_u *replace_termcodes(char_u *from, char_u **bufp, int from_part, int do_lt, int special);
int find_term_bykeys(char_u *src);
void show_termcodes(void);
int show_one_termcode(char_u *name, char_u *code, int printit);
char_u *translate_mapping(char_u *str);

View File

@ -6,7 +6,6 @@ proptype_T *text_prop_type_by_id(buf_T *buf, int id);
void f_prop_clear(typval_T *argvars, typval_T *rettv);
void f_prop_list(typval_T *argvars, typval_T *rettv);
void f_prop_remove(typval_T *argvars, typval_T *rettv);
void prop_type_set(typval_T *argvars, int add);
void f_prop_type_add(typval_T *argvars, typval_T *rettv);
void f_prop_type_change(typval_T *argvars, typval_T *rettv);
void f_prop_type_delete(typval_T *argvars, typval_T *rettv);

View File

@ -32,8 +32,6 @@ void clip_clear_selection(Clipboard_T *cbd);
void clip_may_clear_selection(int row1, int row2);
void clip_scroll_selection(int rows);
void clip_copy_modeless_selection(int both);
int clip_gen_own_selection(Clipboard_T *cbd);
void clip_gen_lose_selection(Clipboard_T *cbd);
void clip_gen_set_selection(Clipboard_T *cbd);
void clip_gen_request_selection(Clipboard_T *cbd);
int clip_gen_owner_exists(Clipboard_T *cbd);
@ -61,7 +59,6 @@ void clip_x11_request_selection(Widget myShell, Display *dpy, Clipboard_T *cbd);
void clip_x11_lose_selection(Widget myShell, Clipboard_T *cbd);
int clip_x11_own_selection(Widget myShell, Clipboard_T *cbd);
void clip_x11_set_selection(Clipboard_T *cbd);
int clip_x11_owner_exists(Clipboard_T *cbd);
void yank_cut_buffer0(Display *dpy, Clipboard_T *cbd);
int jump_to_mouse(int flags, int *inclusive, int which_button);
int mouse_comp_pos(win_T *win, int *rowp, int *colp, linenr_T *lnump, int *plines_cache);

View File

@ -20,7 +20,6 @@ void u_unchanged(buf_T *buf);
void u_find_first_changed(void);
void u_update_save_nr(buf_T *buf);
void u_clearall(buf_T *buf);
void u_saveline(linenr_T lnum);
void u_clearline(void);
void u_undoline(void);
void u_blockfree(buf_T *buf);

View File

@ -18,14 +18,12 @@ void win_free_all(void);
win_T *winframe_remove(win_T *win, int *dirp, tabpage_T *tp);
void close_others(int message, int forceit);
void curwin_init(void);
void win_init_empty(win_T *wp);
int win_alloc_first(void);
win_T *win_alloc_popup_win(void);
void win_init_popup_win(win_T *wp, buf_T *buf);
void win_init_size(void);
void free_tabpage(tabpage_T *tp);
int win_new_tabpage(int after);
int may_open_tabpage(void);
int make_tabpages(int maxcount);
int valid_tabpage(tabpage_T *tpc);
int valid_tabpage_win(tabpage_T *tpc);
@ -44,9 +42,7 @@ win_T *win_horz_neighbor(tabpage_T *tp, win_T *wp, int left, long count);
void win_enter(win_T *wp, int undo_sync);
win_T *buf_jump_open_win(buf_T *buf);
win_T *buf_jump_open_tab(buf_T *buf);
int win_unlisted(win_T *wp);
void win_free_popup(win_T *win);
void win_append(win_T *after, win_T *wp);
void win_remove(win_T *wp, tabpage_T *tp);
int win_alloc_lines(win_T *wp);
void win_free_lsize(win_T *wp);

View File

@ -167,6 +167,7 @@ static int qf_get_fnum(qf_list_T *qfl, char_u *, char_u *);
static char_u *qf_push_dir(char_u *, struct dir_stack_T **, int is_file_stack);
static char_u *qf_pop_dir(struct dir_stack_T **);
static char_u *qf_guess_filepath(qf_list_T *qfl, char_u *);
static void qf_jump_newwin(qf_info_T *qi, int dir, int errornr, int forceit, int newwin);
static void qf_fmt_text(char_u *text, char_u *buf, int bufsize);
static int qf_win_pos_update(qf_info_T *qi, int old_qf_index);
static win_T *qf_find_win(qf_info_T *qi);
@ -3363,7 +3364,7 @@ qf_jump(qf_info_T *qi,
* If 'forceit' is TRUE, then can discard changes to the current buffer.
* If 'newwin' is TRUE, then open the file in a new window.
*/
void
static void
qf_jump_newwin(qf_info_T *qi,
int dir,
int errornr,

View File

@ -751,7 +751,7 @@ get_equi_class(char_u **pp)
/*
* Table for equivalence class "c". (IBM-1047)
*/
char *EQUIVAL_CLASS_C[16] = {
static char *EQUIVAL_CLASS_C[16] = {
"A\x62\x63\x64\x65\x66\x67",
"C\x68",
"E\x71\x72\x73\x74",
@ -3436,7 +3436,7 @@ static int regmatch(char_u *prog, proftime_T *tm, int *timed_out);
static int regrepeat(char_u *p, long maxcount);
#ifdef DEBUG
int regnarrate = 0;
static int regnarrate = 0;
#endif
/*

View File

@ -338,6 +338,7 @@ static int count_syllables(slang_T *slang, char_u *word);
static void clear_midword(win_T *buf);
static void use_midword(slang_T *lp, win_T *buf);
static int find_region(char_u *rp, char_u *region);
static int spell_iswordp_nmw(char_u *p, win_T *wp);
static int check_need_cap(linenr_T lnum, colnr_T col);
static void spell_find_suggest(char_u *badptr, int badlen, suginfo_T *su, int maxcount, int banbadword, int need_cap, int interactive);
#ifdef FEAT_EVAL
@ -3052,7 +3053,7 @@ spell_iswordp(
* Return TRUE if "p" points to a word character.
* Unlike spell_iswordp() this doesn't check for "midword" characters.
*/
int
static int
spell_iswordp_nmw(char_u *p, win_T *wp)
{
int c;

View File

@ -87,7 +87,9 @@ static void check_for_codes_from_term(void);
|| defined(FEAT_MOUSE_GPM) || defined(FEAT_SYSMOUSE)))
static int get_bytes_from_buf(char_u *, char_u *, int);
#endif
static void del_termcode(char_u *name);
static void del_termcode_idx(int idx);
static int find_term_bykeys(char_u *src);
static int term_is_builtin(char_u *name);
static int term_7to8bit(char_u *p);
@ -1367,7 +1369,7 @@ static struct builtin_term builtin_termcaps[] =
}; /* end of builtin_termcaps */
#if defined(FEAT_TERMGUICOLORS) || defined(PROTO)
guicolor_T
static guicolor_T
termgui_mch_get_color(char_u *name)
{
return gui_get_color_cmn(name);
@ -4307,7 +4309,7 @@ get_termcode(int i)
return &termcodes[i].name[0];
}
void
static void
del_termcode(char_u *name)
{
int i;
@ -6364,7 +6366,7 @@ replace_termcodes(
* Find a termcode with keys 'src' (must be NUL terminated).
* Return the index in termcodes[], or -1 if not found.
*/
int
static int
find_term_bykeys(char_u *src)
{
int i;

View File

@ -668,7 +668,7 @@ f_prop_remove(typval_T *argvars, typval_T *rettv)
/*
* Common for f_prop_type_add() and f_prop_type_change().
*/
void
static void
prop_type_set(typval_T *argvars, int add)
{
char_u *name;

View File

@ -720,6 +720,12 @@ ui_breakcheck_force(int force)
#if defined(FEAT_CLIPBOARD) || defined(PROTO)
static void clip_gen_lose_selection(Clipboard_T *cbd);
static int clip_gen_own_selection(Clipboard_T *cbd);
#if defined(FEAT_X11) && defined(FEAT_XCLIPBOARD) && defined(USE_SYSTEM)
static int clip_x11_owner_exists(Clipboard_T *cbd);
#endif
/*
* Selection stuff using Visual mode, for cutting and pasting text to other
* windows.
@ -1840,7 +1846,7 @@ clip_update_modeless_selection(
}
}
int
static int
clip_gen_own_selection(Clipboard_T *cbd)
{
#ifdef FEAT_XCLIPBOARD
@ -1855,7 +1861,7 @@ clip_gen_own_selection(Clipboard_T *cbd)
#endif
}
void
static void
clip_gen_lose_selection(Clipboard_T *cbd)
{
#ifdef FEAT_XCLIPBOARD
@ -2846,7 +2852,7 @@ clip_x11_set_selection(Clipboard_T *cbd UNUSED)
#if (defined(FEAT_X11) && defined(FEAT_XCLIPBOARD) && defined(USE_SYSTEM)) \
|| defined(PROTO)
int
static int
clip_x11_owner_exists(Clipboard_T *cbd)
{
return XGetSelectionOwner(X_DISPLAY, cbd->sel_atom) != None;

View File

@ -123,6 +123,7 @@ static void unserialize_pos(bufinfo_T *bi, pos_T *pos);
static void serialize_visualinfo(bufinfo_T *bi, visualinfo_T *info);
static void unserialize_visualinfo(bufinfo_T *bi, visualinfo_T *info);
#endif
static void u_saveline(linenr_T lnum);
#define U_ALLOC_LINE(size) lalloc(size, FALSE)
@ -3435,7 +3436,7 @@ u_clearall(buf_T *buf)
/*
* Save the line "lnum" for the "U" command.
*/
void
static void
u_saveline(linenr_T lnum)
{
if (lnum == curbuf->b_u_line_lnum) /* line is already saved */

View File

@ -765,6 +765,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1891,
/**/
1890,
/**/

View File

@ -39,8 +39,11 @@ static int leave_tabpage(buf_T *new_curbuf, int trigger_leave_autocmds);
static void enter_tabpage(tabpage_T *tp, buf_T *old_curbuf, int trigger_enter_autocmds, int trigger_leave_autocmds);
static void frame_fix_height(win_T *wp);
static int frame_minheight(frame_T *topfrp, win_T *next_curwin);
static int may_open_tabpage(void);
static void win_enter_ext(win_T *wp, int undo_sync, int no_curwin, int trigger_new_autocmds, int trigger_enter_autocmds, int trigger_leave_autocmds);
static void win_free(win_T *wp, tabpage_T *tp);
static int win_unlisted(win_T *wp);
static void win_append(win_T *after, win_T *wp);
static void frame_append(frame_T *after, frame_T *frp);
static void frame_insert(frame_T *before, frame_T *frp);
static void frame_remove(frame_T *frp);
@ -3541,17 +3544,7 @@ close_others(
emsg(_("E445: Other window contains changes"));
}
/*
* Init the current window "curwin".
* Called when a new file is being edited.
*/
void
curwin_init(void)
{
win_init_empty(curwin);
}
void
static void
win_init_empty(win_T *wp)
{
redraw_win_later(wp, NOT_VALID);
@ -3573,6 +3566,16 @@ win_init_empty(win_T *wp)
#endif
}
/*
* Init the current window "curwin".
* Called when a new file is being edited.
*/
void
curwin_init(void)
{
win_init_empty(curwin);
}
/*
* Allocate the first window and put an empty buffer in it.
* Called from main().
@ -3861,7 +3864,7 @@ win_new_tabpage(int after)
* like with ":split".
* Returns OK if a new tab page was created, FAIL otherwise.
*/
int
static int
may_open_tabpage(void)
{
int n = (cmdmod.tab == 0) ? postponed_split_tab : cmdmod.tab;
@ -4952,7 +4955,7 @@ win_free(
* Return TRUE if "wp" is not in the list of windows: the autocmd window or a
* popup window.
*/
int
static int
win_unlisted(win_T *wp)
{
return wp == aucmd_win || WIN_IS_POPUP(wp);
@ -4982,7 +4985,7 @@ win_free_popup(win_T *win)
/*
* Append window "wp" in the window list after window "after".
*/
void
static void
win_append(win_T *after, win_T *wp)
{
win_T *before;