1
0
forked from aniani/vim

patch 8.1.1979: code for handling file names is spread out

Problem:    Code for handling file names is spread out.
Solution:   Move code to new filepath.c file.  Graduate FEAT_MODIFY_FNAME.
This commit is contained in:
Bram Moolenaar
2019-09-04 15:54:55 +02:00
parent 1e1d30048e
commit b005cd80cf
24 changed files with 2226 additions and 2205 deletions

View File

@@ -2815,3 +2815,19 @@ simplify_filename(char_u *filename)
} while (*p != NUL);
#endif // !AMIGA
}
#if defined(FEAT_EVAL) || defined(PROTO)
/*
* "simplify()" function
*/
void
f_simplify(typval_T *argvars, typval_T *rettv)
{
char_u *p;
p = tv_get_string(&argvars[0]);
rettv->vval.v_string = vim_strsave(p);
simplify_filename(rettv->vval.v_string); /* simplify in place */
rettv->v_type = VAR_STRING;
}
#endif // FEAT_EVAL