0
0
mirror of https://github.com/vim/vim.git synced 2025-10-09 06:14:17 -04:00

patch 8.2.4045: some global functions are only used in one file

Problem:    Some global functions are only used in one file.
Solution:   Make the functions static. (Yegappan Lakshmanan, closes #9492)
This commit is contained in:
Yegappan Lakshmanan
2022-01-08 18:43:40 +00:00
committed by Bram Moolenaar
parent 7c24dfddc2
commit 782b43d894
11 changed files with 117 additions and 119 deletions

View File

@@ -4095,7 +4095,33 @@ f_setcmdpos(typval_T *argvars, typval_T *rettv)
if (pos >= 0)
rettv->vval.v_number = set_cmdline_pos(pos);
}
#endif
#if defined(FEAT_EVAL) || defined(FEAT_CMDWIN)
/*
* Get the current command-line type.
* Returns ':' or '/' or '?' or '@' or '>' or '-'
* Only works when the command line is being edited.
* Returns NUL when something is wrong.
*/
static int
get_cmdline_type(void)
{
cmdline_info_T *p = get_ccline_ptr();
if (p == NULL)
return NUL;
if (p->cmdfirstc == NUL)
return
# ifdef FEAT_EVAL
(p->input_fn) ? '@' :
# endif
'-';
return p->cmdfirstc;
}
#endif
#if defined(FEAT_EVAL) || defined(PROTO)
/*
* "getcmdtype()" function
*/
@@ -4113,30 +4139,6 @@ f_getcmdtype(typval_T *argvars UNUSED, typval_T *rettv)
#endif
#if defined(FEAT_EVAL) || defined(FEAT_CMDWIN) || defined(PROTO)
/*
* Get the current command-line type.
* Returns ':' or '/' or '?' or '@' or '>' or '-'
* Only works when the command line is being edited.
* Returns NUL when something is wrong.
*/
int
get_cmdline_type(void)
{
cmdline_info_T *p = get_ccline_ptr();
if (p == NULL)
return NUL;
if (p->cmdfirstc == NUL)
return
# ifdef FEAT_EVAL
(p->input_fn) ? '@' :
# endif
'-';
return p->cmdfirstc;
}
#endif
/*
* Return the first character of the current command line.
*/