0
0
mirror of https://github.com/vim/vim.git synced 2025-11-13 22:54:27 -05:00

updated for version 7.1-126

This commit is contained in:
Bram Moolenaar
2007-09-30 12:02:55 +00:00
parent 78ab331e0d
commit d089d9b33a
9 changed files with 81 additions and 36 deletions

View File

@@ -114,7 +114,7 @@ struct bw_info
{
int bw_fd; /* file descriptor */
char_u *bw_buf; /* buffer with data to be written */
int bw_len; /* lenght of data */
int bw_len; /* length of data */
#ifdef HAS_BW_FLAGS
int bw_flags; /* FIO_ flags */
#endif
@@ -5553,6 +5553,27 @@ make_bom(buf, name)
}
#endif
/*
* Try to find a shortname by comparing the fullname with the current
* directory.
* Returns "full_path" or pointer into "full_path" if shortened.
*/
char_u *
shorten_fname1(full_path)
char_u *full_path;
{
char_u dirname[MAXPATHL];
char_u *p = full_path;
if (mch_dirname(dirname, MAXPATHL) == OK)
{
p = shorten_fname(full_path, dirname);
if (p == NULL || *p == NUL)
p = full_path;
}
return p;
}
/*
* Try to find a shortname by comparing the fullname with the current
* directory.