0
0
mirror of https://github.com/vim/vim.git synced 2025-11-15 23:14:06 -05:00

updated for version 7.0109

This commit is contained in:
Bram Moolenaar
2005-07-18 21:58:11 +00:00
parent bbebc85750
commit ce0842a6ee
30 changed files with 178 additions and 134 deletions

View File

@@ -698,8 +698,7 @@ set_b0_fname(b0p, buf)
/* Systems that cannot translate "~user" back into a path: copy the
* file name unmodified. Do use slashes instead of backslashes for
* portability. */
STRNCPY(b0p->b0_fname, buf->b_ffname, B0_FNAME_SIZE);
b0p->b0_fname[B0_FNAME_SIZE - 1] = NUL;
vim_strncpy(b0p->b0_fname, buf->b_ffname, B0_FNAME_SIZE - 1);
# ifdef BACKSLASH_IN_FILENAME
forward_slash(b0p->b0_fname);
# endif
@@ -721,10 +720,7 @@ set_b0_fname(b0p, buf)
/* If there is no user name or it is too long, don't use "~/" */
if (get_user_name(uname, B0_UNAME_SIZE) == FAIL
|| (ulen = STRLEN(uname)) + flen > B0_FNAME_SIZE - 1)
{
STRNCPY(b0p->b0_fname, buf->b_ffname, B0_FNAME_SIZE);
b0p->b0_fname[B0_FNAME_SIZE - 1] = NUL;
}
vim_strncpy(b0p->b0_fname, buf->b_ffname, B0_FNAME_SIZE - 1);
else
{
mch_memmove(b0p->b0_fname + ulen + 1, b0p->b0_fname + 1, flen);