mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
unstatic some functions
This commit is contained in:
parent
3b0475927c
commit
700d7a037c
@ -1577,7 +1577,7 @@ static const char_u *skip_var_one(const char_u *arg)
|
|||||||
* List variables for hashtab "ht" with prefix "prefix".
|
* List variables for hashtab "ht" with prefix "prefix".
|
||||||
* If "empty" is TRUE also list NULL strings as empty strings.
|
* If "empty" is TRUE also list NULL strings as empty strings.
|
||||||
*/
|
*/
|
||||||
static void list_hashtable_vars(hashtab_T *ht, const char *prefix, int empty,
|
void list_hashtable_vars(hashtab_T *ht, const char *prefix, int empty,
|
||||||
int *first)
|
int *first)
|
||||||
{
|
{
|
||||||
hashitem_T *hi;
|
hashitem_T *hi;
|
||||||
@ -7728,7 +7728,7 @@ static int get_env_len(const char_u **arg)
|
|||||||
// Get the length of the name of a function or internal variable.
|
// Get the length of the name of a function or internal variable.
|
||||||
// "arg" is advanced to the first non-white character after the name.
|
// "arg" is advanced to the first non-white character after the name.
|
||||||
// Return 0 if something is wrong.
|
// Return 0 if something is wrong.
|
||||||
static int get_id_len(const char **const arg)
|
int get_id_len(const char **const arg)
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
@ -7829,7 +7829,7 @@ int get_name_len(const char **const arg,
|
|||||||
// "flags" can have FNE_INCL_BR and FNE_CHECK_START.
|
// "flags" can have FNE_INCL_BR and FNE_CHECK_START.
|
||||||
// Return a pointer to just after the name. Equal to "arg" if there is no
|
// Return a pointer to just after the name. Equal to "arg" if there is no
|
||||||
// valid name.
|
// valid name.
|
||||||
static const char_u *find_name_end(const char_u *arg, const char_u **expr_start,
|
const char_u *find_name_end(const char_u *arg, const char_u **expr_start,
|
||||||
const char_u **expr_end, int flags)
|
const char_u **expr_end, int flags)
|
||||||
{
|
{
|
||||||
int mb_nest = 0;
|
int mb_nest = 0;
|
||||||
@ -7968,7 +7968,7 @@ static char_u *make_expanded_name(const char_u *in_start, char_u *expr_start,
|
|||||||
* Return TRUE if character "c" can be used in a variable or function name.
|
* Return TRUE if character "c" can be used in a variable or function name.
|
||||||
* Does not include '{' or '}' for magic braces.
|
* Does not include '{' or '}' for magic braces.
|
||||||
*/
|
*/
|
||||||
static int eval_isnamec(int c)
|
int eval_isnamec(int c)
|
||||||
{
|
{
|
||||||
return ASCII_ISALNUM(c) || c == '_' || c == ':' || c == AUTOLOAD_CHAR;
|
return ASCII_ISALNUM(c) || c == '_' || c == ':' || c == AUTOLOAD_CHAR;
|
||||||
}
|
}
|
||||||
@ -7977,7 +7977,7 @@ static int eval_isnamec(int c)
|
|||||||
* Return TRUE if character "c" can be used as the first character in a
|
* Return TRUE if character "c" can be used as the first character in a
|
||||||
* variable or function name (excluding '{' and '}').
|
* variable or function name (excluding '{' and '}').
|
||||||
*/
|
*/
|
||||||
static int eval_isnamec1(int c)
|
int eval_isnamec1(int c)
|
||||||
{
|
{
|
||||||
return ASCII_ISALPHA(c) || c == '_';
|
return ASCII_ISALPHA(c) || c == '_';
|
||||||
}
|
}
|
||||||
@ -8283,7 +8283,7 @@ static bool tv_is_luafunc(typval_T *tv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// check the function name after "v:lua."
|
/// check the function name after "v:lua."
|
||||||
static int check_luafunc_name(const char *str, bool paren)
|
int check_luafunc_name(const char *str, bool paren)
|
||||||
{
|
{
|
||||||
const char *p = str;
|
const char *p = str;
|
||||||
while (ASCII_ISALNUM(*p) || *p == '_' || *p == '.') {
|
while (ASCII_ISALNUM(*p) || *p == '_' || *p == '.') {
|
||||||
@ -8634,7 +8634,7 @@ end:
|
|||||||
/// prefix.
|
/// prefix.
|
||||||
///
|
///
|
||||||
/// @return Scope hashtab, NULL if name is not valid.
|
/// @return Scope hashtab, NULL if name is not valid.
|
||||||
static hashtab_T *find_var_ht(const char *name, const size_t name_len,
|
hashtab_T *find_var_ht(const char *name, const size_t name_len,
|
||||||
const char **varname)
|
const char **varname)
|
||||||
{
|
{
|
||||||
dict_T *d;
|
dict_T *d;
|
||||||
@ -8730,7 +8730,7 @@ void vars_clear(hashtab_T *ht)
|
|||||||
/*
|
/*
|
||||||
* Like vars_clear(), but only free the value if "free_val" is TRUE.
|
* Like vars_clear(), but only free the value if "free_val" is TRUE.
|
||||||
*/
|
*/
|
||||||
static void vars_clear_ext(hashtab_T *ht, int free_val)
|
void vars_clear_ext(hashtab_T *ht, int free_val)
|
||||||
{
|
{
|
||||||
int todo;
|
int todo;
|
||||||
hashitem_T *hi;
|
hashitem_T *hi;
|
||||||
@ -9405,7 +9405,7 @@ static const char *find_option_end(const char **const arg, int *const opt_flags)
|
|||||||
/*
|
/*
|
||||||
* Start profiling function "fp".
|
* Start profiling function "fp".
|
||||||
*/
|
*/
|
||||||
static void func_do_profile(ufunc_T *fp)
|
void func_do_profile(ufunc_T *fp)
|
||||||
{
|
{
|
||||||
int len = fp->uf_lines.ga_len;
|
int len = fp->uf_lines.ga_len;
|
||||||
|
|
||||||
@ -9591,7 +9591,7 @@ static int prof_self_cmp(const void *s1, const void *s2)
|
|||||||
/// @param[in] reload If true, load script again when already loaded.
|
/// @param[in] reload If true, load script again when already loaded.
|
||||||
///
|
///
|
||||||
/// @return true if a package was loaded.
|
/// @return true if a package was loaded.
|
||||||
static bool script_autoload(const char *const name, const size_t name_len,
|
bool script_autoload(const char *const name, const size_t name_len,
|
||||||
const bool reload)
|
const bool reload)
|
||||||
{
|
{
|
||||||
// If there is no '#' after name[0] there is no package name.
|
// If there is no '#' after name[0] there is no package name.
|
||||||
@ -9638,7 +9638,7 @@ static bool script_autoload(const char *const name, const size_t name_len,
|
|||||||
/// @param[in] name_len Name length.
|
/// @param[in] name_len Name length.
|
||||||
///
|
///
|
||||||
/// @return [allocated] autoload script name.
|
/// @return [allocated] autoload script name.
|
||||||
static char *autoload_name(const char *const name, const size_t name_len)
|
char *autoload_name(const char *const name, const size_t name_len)
|
||||||
FUNC_ATTR_MALLOC FUNC_ATTR_WARN_UNUSED_RESULT
|
FUNC_ATTR_MALLOC FUNC_ATTR_WARN_UNUSED_RESULT
|
||||||
{
|
{
|
||||||
// Get the script file name: replace '#' with '/', append ".vim".
|
// Get the script file name: replace '#' with '/', append ".vim".
|
||||||
|
@ -168,7 +168,7 @@ static void register_closure(ufunc_T *fp)
|
|||||||
/// Parse a lambda expression and get a Funcref from "*arg".
|
/// Parse a lambda expression and get a Funcref from "*arg".
|
||||||
///
|
///
|
||||||
/// @return OK or FAIL. Returns NOTDONE for dict or {expr}.
|
/// @return OK or FAIL. Returns NOTDONE for dict or {expr}.
|
||||||
static int get_lambda_tv(char_u **arg, typval_T *rettv, bool evaluate)
|
int get_lambda_tv(char_u **arg, typval_T *rettv, bool evaluate)
|
||||||
{
|
{
|
||||||
garray_T newargs = GA_EMPTY_INIT_VALUE;
|
garray_T newargs = GA_EMPTY_INIT_VALUE;
|
||||||
garray_T *pnewargs;
|
garray_T *pnewargs;
|
||||||
@ -296,7 +296,7 @@ errret:
|
|||||||
/// was not found.
|
/// was not found.
|
||||||
///
|
///
|
||||||
/// @return name of the function.
|
/// @return name of the function.
|
||||||
static char_u *deref_func_name(const char *name, int *lenp,
|
char_u *deref_func_name(const char *name, int *lenp,
|
||||||
partial_T **const partialp, bool no_autoload)
|
partial_T **const partialp, bool no_autoload)
|
||||||
FUNC_ATTR_NONNULL_ARG(1, 2)
|
FUNC_ATTR_NONNULL_ARG(1, 2)
|
||||||
{
|
{
|
||||||
@ -357,7 +357,7 @@ static void emsg_funcname(char *ermsg, const char_u *name)
|
|||||||
* Allocate a variable for the result of a function.
|
* Allocate a variable for the result of a function.
|
||||||
* Return OK or FAIL.
|
* Return OK or FAIL.
|
||||||
*/
|
*/
|
||||||
static int
|
int
|
||||||
get_func_tv(
|
get_func_tv(
|
||||||
const char_u *name, // name of the function
|
const char_u *name, // name of the function
|
||||||
int len, // length of "name"
|
int len, // length of "name"
|
||||||
@ -505,7 +505,7 @@ static char_u *fname_trans_sid(const char_u *const name,
|
|||||||
|
|
||||||
/// Find a function by name, return pointer to it in ufuncs.
|
/// Find a function by name, return pointer to it in ufuncs.
|
||||||
/// @return NULL for unknown function.
|
/// @return NULL for unknown function.
|
||||||
static ufunc_T *find_func(const char_u *name)
|
ufunc_T *find_func(const char_u *name)
|
||||||
{
|
{
|
||||||
hashitem_T *hi;
|
hashitem_T *hi;
|
||||||
|
|
||||||
@ -1499,7 +1499,7 @@ static void list_func_head(ufunc_T *fp, int indent, bool force)
|
|||||||
/// Advances "pp" to just after the function name (if no error).
|
/// Advances "pp" to just after the function name (if no error).
|
||||||
///
|
///
|
||||||
/// @return the function name in allocated memory, or NULL for failure.
|
/// @return the function name in allocated memory, or NULL for failure.
|
||||||
static char_u *
|
char_u *
|
||||||
trans_function_name(
|
trans_function_name(
|
||||||
char_u **pp,
|
char_u **pp,
|
||||||
bool skip, // only find the end, don't evaluate
|
bool skip, // only find the end, don't evaluate
|
||||||
@ -2387,7 +2387,7 @@ ret_free:
|
|||||||
* Return 2 if "p" starts with "s:".
|
* Return 2 if "p" starts with "s:".
|
||||||
* Return 0 otherwise.
|
* Return 0 otherwise.
|
||||||
*/
|
*/
|
||||||
static int eval_fname_script(const char *const p)
|
int eval_fname_script(const char *const p)
|
||||||
{
|
{
|
||||||
// Use mb_strnicmp() because in Turkish comparing the "I" may not work with
|
// Use mb_strnicmp() because in Turkish comparing the "I" may not work with
|
||||||
// the standard library function.
|
// the standard library function.
|
||||||
@ -3014,7 +3014,7 @@ int current_func_returned(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get function call environment based on backtrace debug level
|
// Get function call environment based on backtrace debug level
|
||||||
static funccall_T *get_funccal(void)
|
funccall_T *get_funccal(void)
|
||||||
{
|
{
|
||||||
funccall_T *funccal = current_funccal;
|
funccall_T *funccal = current_funccal;
|
||||||
if (debug_backtrace_level > 0) {
|
if (debug_backtrace_level > 0) {
|
||||||
@ -3034,7 +3034,7 @@ static funccall_T *get_funccal(void)
|
|||||||
|
|
||||||
/// Return the hashtable used for local variables in the current funccal.
|
/// Return the hashtable used for local variables in the current funccal.
|
||||||
/// Return NULL if there is no current funccal.
|
/// Return NULL if there is no current funccal.
|
||||||
static hashtab_T *get_funccal_local_ht(void)
|
hashtab_T *get_funccal_local_ht(void)
|
||||||
{
|
{
|
||||||
if (current_funccal == NULL) {
|
if (current_funccal == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -3044,7 +3044,7 @@ static hashtab_T *get_funccal_local_ht(void)
|
|||||||
|
|
||||||
/// Return the hashtable used for argument in the current funccal.
|
/// Return the hashtable used for argument in the current funccal.
|
||||||
/// Return NULL if there is no current funccal.
|
/// Return NULL if there is no current funccal.
|
||||||
static hashtab_T *get_funccal_args_ht(void)
|
hashtab_T *get_funccal_args_ht(void)
|
||||||
{
|
{
|
||||||
if (current_funccal == NULL) {
|
if (current_funccal == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -3055,7 +3055,7 @@ static hashtab_T *get_funccal_args_ht(void)
|
|||||||
/*
|
/*
|
||||||
* List function variables, if there is a function.
|
* List function variables, if there is a function.
|
||||||
*/
|
*/
|
||||||
static void list_func_vars(int *first)
|
void list_func_vars(int *first)
|
||||||
{
|
{
|
||||||
if (current_funccal != NULL) {
|
if (current_funccal != NULL) {
|
||||||
list_hashtable_vars(¤t_funccal->l_vars.dv_hashtab, "l:", false,
|
list_hashtable_vars(¤t_funccal->l_vars.dv_hashtab, "l:", false,
|
||||||
|
Loading…
Reference in New Issue
Block a user