patch 8.1.1989: the evalfunc.c file is still too big
Problem: The evalfunc.c file is still too big.
Solution: Move f_pathshorten() to filepath.c. Move f_cscope_connection() to
if_cscope.c. Move diff_ functions to diff.c. Move timer_
functions to ex_cmds2.c. move callback functions to evalvars.c.
diff --git a/src/filepath.c b/src/filepath.c
index 21cd767..811682e 100644
--- a/src/filepath.c
+++ b/src/filepath.c
@@ -1311,6 +1311,27 @@
}
/*
+ * "pathshorten()" function
+ */
+ void
+f_pathshorten(typval_T *argvars, typval_T *rettv)
+{
+ char_u *p;
+
+ rettv->v_type = VAR_STRING;
+ p = tv_get_string_chk(&argvars[0]);
+ if (p == NULL)
+ rettv->vval.v_string = NULL;
+ else
+ {
+ p = vim_strsave(p);
+ rettv->vval.v_string = p;
+ if (p != NULL)
+ shorten_dir(p);
+ }
+}
+
+/*
* "readdir()" function
*/
void