mirror of
https://github.com/neovim/neovim.git
synced 2026-03-31 04:42:03 +00:00
vim-patch:8.1.2021: some global functions can be local to the file
Problem: Some global functions can be local to the file.
Solution: Add "static". (Yegappan Lakshmanan, closes vim/vim#4917)
840d16fd36
Partial port because patch 8.2.0256 moves the timer functions to time.c.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -5865,7 +5865,7 @@ static list_T *string_to_list(const char *str, size_t len, const bool keepempty)
|
||||
}
|
||||
|
||||
/// os_system wrapper. Handles 'verbose', :profile, and v:shell_error.
|
||||
void get_system_output_as_rettv(typval_T *argvars, typval_T *rettv, bool retlist)
|
||||
static void get_system_output_as_rettv(typval_T *argvars, typval_T *rettv, bool retlist)
|
||||
{
|
||||
proftime_T wait_time;
|
||||
bool profiling = do_profiling == PROF_YES;
|
||||
@@ -5963,6 +5963,17 @@ void get_system_output_as_rettv(typval_T *argvars, typval_T *rettv, bool retlist
|
||||
}
|
||||
}
|
||||
|
||||
/// f_system - the Vimscript system() function
|
||||
void f_system(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
|
||||
{
|
||||
get_system_output_as_rettv(argvars, rettv, false);
|
||||
}
|
||||
|
||||
void f_systemlist(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
|
||||
{
|
||||
get_system_output_as_rettv(argvars, rettv, true);
|
||||
}
|
||||
|
||||
/// Get a callback from "arg". It can be a Funcref or a function name.
|
||||
bool callback_from_typval(Callback *const callback, const typval_T *const arg)
|
||||
FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT
|
||||
|
||||
@@ -7950,17 +7950,6 @@ static void f_synstack(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
|
||||
}
|
||||
}
|
||||
|
||||
/// f_system - the Vimscript system() function
|
||||
static void f_system(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
|
||||
{
|
||||
get_system_output_as_rettv(argvars, rettv, false);
|
||||
}
|
||||
|
||||
static void f_systemlist(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
|
||||
{
|
||||
get_system_output_as_rettv(argvars, rettv, true);
|
||||
}
|
||||
|
||||
/// "tabpagebuflist()" function
|
||||
static void f_tabpagebuflist(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user