diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-07-18 21:43:02 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-07-18 21:43:02 +0000 |
commit | fe3ca8ddd9b85240387b6fa7934af3317e25b731 (patch) | |
tree | c855bb725bd10a5a00670bdd43218dfc17041832 /src/os_mswin.c | |
parent | b635633989f0ff5a5dbb564d65d332741f0e3e8d (diff) | |
download | vim-git-fe3ca8ddd9b85240387b6fa7934af3317e25b731.tar.gz |
updated for version 7.0109
Diffstat (limited to 'src/os_mswin.c')
-rw-r--r-- | src/os_mswin.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/os_mswin.c b/src/os_mswin.c index b0c137fca..6bffdb90b 100644 --- a/src/os_mswin.c +++ b/src/os_mswin.c @@ -410,8 +410,7 @@ mch_FullName( cname = ucs2_to_enc((short_u *)wbuf, NULL); if (cname != NULL) { - STRNCPY(buf, cname, len); - buf[len - 1] = NUL; + vim_strncpy(buf, cname, len - 1); nResult = OK; } } @@ -423,8 +422,8 @@ mch_FullName( { if (_fullpath(buf, fname, len - 1) == NULL) { - STRNCPY(buf, fname, len); /* failed, use relative path name */ - buf[len - 1] = NUL; + /* failed, use relative path name */ + vim_strncpy(buf, fname, len - 1); } else nResult = OK; @@ -493,8 +492,7 @@ vim_stat(const char *name, struct stat *stp) char buf[_MAX_PATH + 1]; char *p; - STRNCPY(buf, name, _MAX_PATH); - buf[_MAX_PATH] = NUL; + vim_strncpy(buf, name, _MAX_PATH); p = buf + strlen(buf); if (p > buf) mb_ptr_back(buf, p); @@ -1527,8 +1525,7 @@ clip_mch_set_selection(VimClipboard *cbd) if (lpszMem) { - STRNCPY(lpszMem, str, metadata.txtlen); - lpszMem[metadata.txtlen] = NUL; + vim_strncpy(lpszMem, str, metadata.txtlen); GlobalUnlock(hMem); } } |