summaryrefslogtreecommitdiffstats
path: root/src/ex_getln.c
diff options
context:
space:
mode:
authorYegappan Lakshmanan <yegappan@yahoo.com>2022-01-08 18:43:40 +0000
committerBram Moolenaar <Bram@vim.org>2022-01-08 18:43:40 +0000
commit782b43d89473dac00e3a8e02224a8330b88dbfef (patch)
tree4309b548ce74ff64dccec70435826e602d3b21e8 /src/ex_getln.c
parent7c24dfddc28776eeff7464982ae5b94e187b6135 (diff)
patch 8.2.4045: some global functions are only used in one filev8.2.4045
Problem: Some global functions are only used in one file. Solution: Make the functions static. (Yegappan Lakshmanan, closes #9492)
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r--src/ex_getln.c38
1 files changed, 20 insertions, 18 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c
index ede0f2020f..c63c8960f5 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -4095,32 +4095,16 @@ f_setcmdpos(typval_T *argvars, typval_T *rettv)
if (pos >= 0)
rettv->vval.v_number = set_cmdline_pos(pos);
}
-
-/*
- * "getcmdtype()" function
- */
- void
-f_getcmdtype(typval_T *argvars UNUSED, typval_T *rettv)
-{
- rettv->v_type = VAR_STRING;
- rettv->vval.v_string = alloc(2);
- if (rettv->vval.v_string != NULL)
- {
- rettv->vval.v_string[0] = get_cmdline_type();
- rettv->vval.v_string[1] = NUL;
- }
-}
-
#endif
-#if defined(FEAT_EVAL) || defined(FEAT_CMDWIN) || defined(PROTO)
+#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.
*/
- int
+ static int
get_cmdline_type(void)
{
cmdline_info_T *p = get_ccline_ptr();
@@ -4137,6 +4121,24 @@ get_cmdline_type(void)
}
#endif
+#if defined(FEAT_EVAL) || defined(PROTO)
+/*
+ * "getcmdtype()" function
+ */
+ void
+f_getcmdtype(typval_T *argvars UNUSED, typval_T *rettv)
+{
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = alloc(2);
+ if (rettv->vval.v_string != NULL)
+ {
+ rettv->vval.v_string[0] = get_cmdline_type();
+ rettv->vval.v_string[1] = NUL;
+ }
+}
+
+#endif
+
/*
* Return the first character of the current command line.
*/