comparison src/filepath.c @ 17986:5c8906f653f5 v8.1.1989

patch 8.1.1989: the evalfunc.c file is still too big Commit: https://github.com/vim/vim/commit/af7645d3733fdd3cd2df03ec7b653601d26969ef Author: Bram Moolenaar <Bram@vim.org> Date: Thu Sep 5 22:33:28 2019 +0200 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.
author Bram Moolenaar <Bram@vim.org>
date Thu, 05 Sep 2019 22:45:04 +0200
parents 8f4cc259ed7a
children d1e77015f60b
comparison
equal deleted inserted replaced
17985:9b43688b26bf 17986:5c8906f653f5
1309 } 1309 }
1310 rettv->vval.v_number = vim_mkdir_emsg(dir, prot); 1310 rettv->vval.v_number = vim_mkdir_emsg(dir, prot);
1311 } 1311 }
1312 1312
1313 /* 1313 /*
1314 * "pathshorten()" function
1315 */
1316 void
1317 f_pathshorten(typval_T *argvars, typval_T *rettv)
1318 {
1319 char_u *p;
1320
1321 rettv->v_type = VAR_STRING;
1322 p = tv_get_string_chk(&argvars[0]);
1323 if (p == NULL)
1324 rettv->vval.v_string = NULL;
1325 else
1326 {
1327 p = vim_strsave(p);
1328 rettv->vval.v_string = p;
1329 if (p != NULL)
1330 shorten_dir(p);
1331 }
1332 }
1333
1334 /*
1314 * "readdir()" function 1335 * "readdir()" function
1315 */ 1336 */
1316 void 1337 void
1317 f_readdir(typval_T *argvars, typval_T *rettv) 1338 f_readdir(typval_T *argvars, typval_T *rettv)
1318 { 1339 {