mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.0514: several global functions are used in only one file
Problem: Several global functions are used in only one file. Solution: Make the functions static. (Yegappan Lakshmanan, closes #5884)
This commit is contained in:
parent
5d905c2b96
commit
bdff012f44
@ -73,6 +73,8 @@ static void redraw_custom_statusline(win_T *wp);
|
|||||||
static int did_update_one_window;
|
static int did_update_one_window;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static void win_redr_status(win_T *wp, int ignore_pum);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Based on the current value of curwin->w_topline, transfer a screenfull
|
* Based on the current value of curwin->w_topline, transfer a screenfull
|
||||||
* of stuff from Filemem to ScreenLines[], and update curwin->w_botline.
|
* of stuff from Filemem to ScreenLines[], and update curwin->w_botline.
|
||||||
@ -382,7 +384,7 @@ update_screen(int type_arg)
|
|||||||
* If "ignore_pum" is TRUE, also redraw statusline when the popup menu is
|
* If "ignore_pum" is TRUE, also redraw statusline when the popup menu is
|
||||||
* displayed.
|
* displayed.
|
||||||
*/
|
*/
|
||||||
void
|
static void
|
||||||
win_redr_status(win_T *wp, int ignore_pum UNUSED)
|
win_redr_status(win_T *wp, int ignore_pum UNUSED)
|
||||||
{
|
{
|
||||||
int row;
|
int row;
|
||||||
|
@ -2435,7 +2435,7 @@ find_var_in_ht(
|
|||||||
/*
|
/*
|
||||||
* Get the script-local hashtab. NULL if not in a script context.
|
* Get the script-local hashtab. NULL if not in a script context.
|
||||||
*/
|
*/
|
||||||
hashtab_T *
|
static hashtab_T *
|
||||||
get_script_local_ht(void)
|
get_script_local_ht(void)
|
||||||
{
|
{
|
||||||
scid_T sid = current_sctx.sc_sid;
|
scid_T sid = current_sctx.sc_sid;
|
||||||
|
@ -99,7 +99,7 @@ static int inchar(char_u *buf, int maxlen, long wait_time);
|
|||||||
/*
|
/*
|
||||||
* Free and clear a buffer.
|
* Free and clear a buffer.
|
||||||
*/
|
*/
|
||||||
void
|
static void
|
||||||
free_buff(buffheader_T *buf)
|
free_buff(buffheader_T *buf)
|
||||||
{
|
{
|
||||||
buffblock_T *p, *np;
|
buffblock_T *p, *np;
|
||||||
|
@ -20,6 +20,8 @@ static char *e_listblobarg = N_("E899: Argument of %s must be a List or Blob");
|
|||||||
// List heads for garbage collection.
|
// List heads for garbage collection.
|
||||||
static list_T *first_list = NULL; // list of all lists
|
static list_T *first_list = NULL; // list of all lists
|
||||||
|
|
||||||
|
static void list_free_item(list_T *l, listitem_T *item);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add a watcher to a list.
|
* Add a watcher to a list.
|
||||||
*/
|
*/
|
||||||
@ -311,7 +313,7 @@ listitem_alloc(void)
|
|||||||
* Free a list item, unless it was allocated together with the list itself.
|
* Free a list item, unless it was allocated together with the list itself.
|
||||||
* Does not clear the value. Does not notify watchers.
|
* Does not clear the value. Does not notify watchers.
|
||||||
*/
|
*/
|
||||||
void
|
static void
|
||||||
list_free_item(list_T *l, listitem_T *item)
|
list_free_item(list_T *l, listitem_T *item)
|
||||||
{
|
{
|
||||||
if (l->lv_with_items == 0 || item < (listitem_T *)l
|
if (l->lv_with_items == 0 || item < (listitem_T *)l
|
||||||
@ -1225,7 +1227,7 @@ f_list2str(typval_T *argvars, typval_T *rettv)
|
|||||||
rettv->vval.v_string = ga.ga_data;
|
rettv->vval.v_string = ga.ga_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
list_remove(typval_T *argvars, typval_T *rettv, char_u *arg_errmsg)
|
list_remove(typval_T *argvars, typval_T *rettv, char_u *arg_errmsg)
|
||||||
{
|
{
|
||||||
list_T *l;
|
list_T *l;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
/* drawscreen.c */
|
/* drawscreen.c */
|
||||||
int update_screen(int type_arg);
|
int update_screen(int type_arg);
|
||||||
void win_redr_status(win_T *wp, int ignore_pum);
|
|
||||||
void showruler(int always);
|
void showruler(int always);
|
||||||
void win_redr_ruler(win_T *wp, int always, int ignore_pum);
|
void win_redr_ruler(win_T *wp, int always, int ignore_pum);
|
||||||
void after_updating_screen(int may_resize_shell);
|
void after_updating_screen(int may_resize_shell);
|
||||||
|
@ -54,7 +54,6 @@ int get_var_tv(char_u *name, int len, typval_T *rettv, dictitem_T **dip, int ver
|
|||||||
void check_vars(char_u *name, int len);
|
void check_vars(char_u *name, int len);
|
||||||
dictitem_T *find_var(char_u *name, hashtab_T **htp, int no_autoload);
|
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);
|
dictitem_T *find_var_in_ht(hashtab_T *ht, int htname, char_u *varname, int no_autoload);
|
||||||
hashtab_T *get_script_local_ht(void);
|
|
||||||
int lookup_scriptvar(char_u *name, size_t len, cctx_T *dummy);
|
int lookup_scriptvar(char_u *name, size_t len, cctx_T *dummy);
|
||||||
hashtab_T *find_var_ht(char_u *name, char_u **varname);
|
hashtab_T *find_var_ht(char_u *name, char_u **varname);
|
||||||
char_u *get_var_value(char_u *name);
|
char_u *get_var_value(char_u *name);
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
/* getchar.c */
|
/* getchar.c */
|
||||||
void free_buff(buffheader_T *buf);
|
|
||||||
char_u *get_recorded(void);
|
char_u *get_recorded(void);
|
||||||
char_u *get_inserted(void);
|
char_u *get_inserted(void);
|
||||||
int stuff_empty(void);
|
int stuff_empty(void);
|
||||||
|
@ -13,7 +13,6 @@ int list_free_nonref(int copyID);
|
|||||||
void list_free_items(int copyID);
|
void list_free_items(int copyID);
|
||||||
void list_free(list_T *l);
|
void list_free(list_T *l);
|
||||||
listitem_T *listitem_alloc(void);
|
listitem_T *listitem_alloc(void);
|
||||||
void list_free_item(list_T *l, listitem_T *item);
|
|
||||||
void listitem_free(list_T *l, listitem_T *item);
|
void listitem_free(list_T *l, listitem_T *item);
|
||||||
void listitem_remove(list_T *l, listitem_T *item);
|
void listitem_remove(list_T *l, listitem_T *item);
|
||||||
long list_len(list_T *l);
|
long list_len(list_T *l);
|
||||||
@ -42,7 +41,6 @@ int get_list_tv(char_u **arg, typval_T *rettv, int evaluate, int do_error);
|
|||||||
int write_list(FILE *fd, list_T *list, int binary);
|
int write_list(FILE *fd, list_T *list, int binary);
|
||||||
void init_static_list(staticList10_T *sl);
|
void init_static_list(staticList10_T *sl);
|
||||||
void f_list2str(typval_T *argvars, typval_T *rettv);
|
void f_list2str(typval_T *argvars, typval_T *rettv);
|
||||||
void list_remove(typval_T *argvars, typval_T *rettv, char_u *arg_errmsg);
|
|
||||||
void f_sort(typval_T *argvars, typval_T *rettv);
|
void f_sort(typval_T *argvars, typval_T *rettv);
|
||||||
void f_uniq(typval_T *argvars, typval_T *rettv);
|
void f_uniq(typval_T *argvars, typval_T *rettv);
|
||||||
void f_filter(typval_T *argvars, typval_T *rettv);
|
void f_filter(typval_T *argvars, typval_T *rettv);
|
||||||
|
@ -6,6 +6,5 @@ void ex_version(exarg_T *eap);
|
|||||||
void list_in_columns(char_u **items, int size, int current);
|
void list_in_columns(char_u **items, int size, int current);
|
||||||
void list_version(void);
|
void list_version(void);
|
||||||
void maybe_intro_message(void);
|
void maybe_intro_message(void);
|
||||||
void intro_message(int colon);
|
|
||||||
void ex_intro(exarg_T *eap);
|
void ex_intro(exarg_T *eap);
|
||||||
/* vim: set ft=c : */
|
/* vim: set ft=c : */
|
||||||
|
@ -738,6 +738,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
514,
|
||||||
/**/
|
/**/
|
||||||
513,
|
513,
|
||||||
/**/
|
/**/
|
||||||
@ -2234,6 +2236,7 @@ list_version(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void do_intro_line(int row, char_u *mesg, int add_version, int attr);
|
static void do_intro_line(int row, char_u *mesg, int add_version, int attr);
|
||||||
|
static void intro_message(int colon);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Show the intro message when not editing a file.
|
* Show the intro message when not editing a file.
|
||||||
@ -2253,7 +2256,7 @@ maybe_intro_message(void)
|
|||||||
* Only used when starting Vim on an empty file, without a file name.
|
* Only used when starting Vim on an empty file, without a file name.
|
||||||
* Or with the ":intro" command (for Sven :-).
|
* Or with the ":intro" command (for Sven :-).
|
||||||
*/
|
*/
|
||||||
void
|
static void
|
||||||
intro_message(
|
intro_message(
|
||||||
int colon) // TRUE for ":intro"
|
int colon) // TRUE for ":intro"
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user