mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
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.
This commit is contained in:
@@ -1310,6 +1310,27 @@ f_mkdir(typval_T *argvars, typval_T *rettv)
|
||||
rettv->vval.v_number = vim_mkdir_emsg(dir, prot);
|
||||
}
|
||||
|
||||
/*
|
||||
* "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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user