1
0
forked from aniani/vim

patch 9.0.0003: functions are global while they could be local

Problem:    Functions are global while they could be local.
Solution:   Add "static".  Add a few tests. (Yegappan Lakshmanan,
            closes #10612)
This commit is contained in:
Yegappan Lakshmanan
2022-06-29 12:55:36 +01:00
committed by Bram Moolenaar
parent c207fd2535
commit ee47eaceaa
16 changed files with 40 additions and 20 deletions

View File

@@ -24,9 +24,6 @@ void crypt_check_method(int method);
void crypt_check_current_method(void);
char_u *crypt_get_key(int store, int twice);
void crypt_append_msg(buf_T *buf);
int crypt_sodium_init(cryptstate_T *state, char_u *key, char_u *salt, int salt_len, char_u *seed, int seed_len);
long crypt_sodium_buffer_encode(cryptstate_T *state, char_u *from, size_t len, char_u **buf_out, int last);
long crypt_sodium_buffer_decode(cryptstate_T *state, char_u *from, size_t len, char_u **buf_out, int last);
int crypt_sodium_munlock(void *const addr, const size_t len);
void crypt_sodium_randombytes_buf(void *const buf, const size_t size);
/* vim: set ft=c : */

View File

@@ -14,7 +14,6 @@ int get_spellword(list_T *list, char_u **pp);
void prepare_vimvar(int idx, typval_T *save_tv);
void restore_vimvar(int idx, typval_T *save_tv);
char_u *eval_one_expr_in_str(char_u *p, garray_T *gap, int evaluate);
char_u *eval_all_expr_in_str(char_u *str);
list_T *heredoc_get(exarg_T *eap, char_u *cmd, int script_get, int vim9compile);
void ex_var(exarg_T *eap);
void ex_let(exarg_T *eap);

View File

@@ -9,7 +9,6 @@ int gui_init_font(char_u *font_list, int fontset);
int gui_get_wide_font(void);
void gui_set_ligatures(void);
void gui_update_cursor(int force, int clear_selection);
void gui_position_menu(void);
int gui_get_base_width(void);
int gui_get_base_height(void);
void gui_resize_shell(int pixel_width, int pixel_height);
@@ -51,7 +50,6 @@ void gui_check_colors(void);
guicolor_T gui_get_color(char_u *name);
int gui_get_lightness(guicolor_T pixel);
char_u *gui_bg_default(void);
void init_gui_options(void);
void gui_new_scrollbar_colors(void);
void gui_focus_change(int in_focus);
void gui_mouse_moved(int x, int y);

View File

@@ -4,7 +4,6 @@ char_u *highlight_group_name(int id);
int highlight_link_id(int id);
void init_highlight(int both, int reset);
int load_colors(char_u *name);
int lookup_color(int idx, int foreground, int *boldp);
void do_highlight(char_u *line, int forceit, int init);
void free_highlight(void);
void restore_cterm_colors(void);

View File

@@ -40,7 +40,6 @@ void ex_scriptversion(exarg_T *eap);
void ex_finish(exarg_T *eap);
void do_finish(exarg_T *eap, int reanimate);
int source_finished(char_u *(*fgetline)(int, void *, int, getline_opt_T), void *cookie);
char_u *script_name_after_autoload(scriptitem_T *si);
char_u *get_autoload_prefix(scriptitem_T *si);
char_u *may_prefix_autoload(char_u *name);
char_u *autoload_name(char_u *name);

View File

@@ -38,7 +38,6 @@ void user_func_error(int error, char_u *name, funcexe_T *funcexe);
int call_func(char_u *funcname, int len, typval_T *rettv, int argcount_in, typval_T *argvars_in, funcexe_T *funcexe);
char_u *printable_func_name(ufunc_T *fp);
char_u *trans_function_name(char_u **pp, int *is_global, int skip, int flags, funcdict_T *fdp, partial_T **partial, type_T **type);
char_u *untrans_function_name(char_u *name);
char_u *get_scriptlocal_funcname(char_u *funcname);
char_u *alloc_printable_func_name(char_u *fname);
char_u *save_function_name(char_u **name, int *is_global, int skip, int flags, funcdict_T *fudi);