patch 9.1.1781: some functions could be defined static

Problem:  some functions could be defined static
Solution: Change function definitions and make them static
          (Yegappan Lakshmanan)

closes: #18354

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Yegappan Lakshmanan
2025-09-21 17:52:42 +00:00
committed by Christian Brabandt
parent 7b973492ae
commit 3a6cf6d53b
9 changed files with 15 additions and 15 deletions

View File

@ -22,6 +22,7 @@
#define NAMESPACE_CHAR (char_u *)"abglstvw"
static int eval0_simple_funccal(char_u *arg, typval_T *rettv, exarg_T *eap, evalarg_T *evalarg);
static int eval2(char_u **arg, typval_T *rettv, evalarg_T *evalarg);
static int eval3(char_u **arg, typval_T *rettv, evalarg_T *evalarg);
static int eval4(char_u **arg, typval_T *rettv, evalarg_T *evalarg);

View File

@ -1057,6 +1057,15 @@ ins_compl_insert_bytes(char_u *p, int len)
compl_ins_end_col = curwin->w_cursor.col;
}
/*
* Get current completion leader length
*/
static size_t
ins_compl_leader_len(void)
{
return compl_leader.string != NULL ? compl_leader.length : compl_orig_text.length;
}
/*
* Checks if the column is within the currently inserted completion text
* column range. If it is, it returns a special highlight attribute.
@ -1836,15 +1845,6 @@ ins_compl_leader(void)
return compl_leader.string != NULL ? compl_leader.string : compl_orig_text.string;
}
/*
* Get current completion leader length
*/
size_t
ins_compl_leader_len(void)
{
return compl_leader.string != NULL ? compl_leader.length : compl_orig_text.length;
}
/*
* Add any identifiers that match the given pattern "pat" in the list of
* dictionary files "dict_start" to the list of completions.

View File

@ -60,6 +60,7 @@ static int put_setstring(FILE *fd, char *cmd, char *name, char_u **valuep, long_
static int put_setnum(FILE *fd, char *cmd, char *name, long *valuep);
static int put_setbool(FILE *fd, char *cmd, char *name, int value);
static int istermoption(struct vimoption *p);
static int istermoption_idx(int opt_idx);
static char_u *get_varp_scope(struct vimoption *p, int scope);
static char_u *get_varp(struct vimoption *);
static void check_win_options(win_T *win);
@ -6410,7 +6411,7 @@ istermoption(struct vimoption *p)
/*
* Returns TRUE if the option at 'opt_idx' starts with 't_'
*/
int
static int
istermoption_idx(int opt_idx)
{
return istermoption(&options[opt_idx]);

View File

@ -40,7 +40,6 @@ char_u *eval_next_line(char_u *arg, evalarg_T *evalarg);
char_u *skipwhite_and_linebreak(char_u *arg, evalarg_T *evalarg);
int eval0(char_u *arg, typval_T *rettv, exarg_T *eap, evalarg_T *evalarg);
int may_call_simple_func(char_u *arg, typval_T *rettv);
int eval0_simple_funccal(char_u *arg, typval_T *rettv, exarg_T *eap, evalarg_T *evalarg);
int eval0_retarg(char_u *arg, typval_T *rettv, exarg_T *eap, evalarg_T *evalarg, char_u **retarg);
int eval1(char_u **arg, typval_T *rettv, evalarg_T *evalarg);
void eval_addblob(typval_T *tv1, typval_T *tv2);

View File

@ -34,7 +34,6 @@ unsigned int get_cot_flags(void);
int pum_wanted(void);
void ins_compl_show_pum(void);
char_u *ins_compl_leader(void);
size_t ins_compl_leader_len(void);
char_u *find_word_start(char_u *ptr);
char_u *find_word_end(char_u *ptr);
char_u *find_line_end(char_u *ptr);

View File

@ -117,7 +117,6 @@ void clear_termoptions(void);
void free_termoptions(void);
void free_one_termoption(char_u *var);
void set_term_defaults(void);
int istermoption_idx(int opt_idx);
void unset_global_local_option(char_u *name, void *from);
char_u *get_option_varp_scope(int opt_idx, int scope);
char_u *get_option_var(int opt_idx);

View File

@ -1,7 +1,6 @@
/* wayland.c */
int wayland_init_client(const char *display);
void wayland_uninit_client(void);
int wayland_client_is_connected(int quiet);
int wayland_client_update(void);
int wayland_cb_init(const char *seat);
void wayland_cb_uninit(void);

View File

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

View File

@ -985,7 +985,7 @@ wayland_uninit_client(void)
/*
* Return TRUE if Wayland display connection is valid and ready.
*/
int
static int
wayland_client_is_connected(int quiet)
{
if (vwl_display.proxy == NULL)