diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-09-13 15:33:43 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-09-13 15:33:43 +0200 |
commit | 42335f50bc6fac444a8af74c81df8369d722a6fb (patch) | |
tree | fc6596503a515a25a7c2a046321108642848b935 /src/fileio.c | |
parent | c787539747f6bb2510a56aa14dbf6808aff5681a (diff) | |
download | vim-git-42335f50bc6fac444a8af74c81df8369d722a6fb.tar.gz |
patch 8.1.0377: xdiff doesn't use the Vim memory allocation functionsv8.1.0377
Problem: Xdiff doesn't use the Vim memory allocation functions.
Solution: Change the xdl_ defines. Check for out-of-memory. Rename
"ignored" to "vim_ignored".
Diffstat (limited to 'src/fileio.c')
-rw-r--r-- | src/fileio.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/fileio.c b/src/fileio.c index 056ac914d..d7e05bfbe 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -2408,7 +2408,7 @@ failed: { /* Use stderr for stdin, makes shell commands work. */ close(0); - ignored = dup(2); + vim_ignored = dup(2); } #endif @@ -3751,7 +3751,7 @@ buf_write( { # ifdef UNIX # ifdef HAVE_FCHOWN - ignored = fchown(fd, st_old.st_uid, st_old.st_gid); + vim_ignored = fchown(fd, st_old.st_uid, st_old.st_gid); # endif if (mch_stat((char *)IObuff, &st) < 0 || st.st_uid != st_old.st_uid @@ -4509,7 +4509,7 @@ restore_backup: #endif #ifdef HAVE_FTRUNCATE if (!append) - ignored = ftruncate(fd, (off_t)0); + vim_ignored = ftruncate(fd, (off_t)0); #endif #if defined(WIN3264) @@ -4789,7 +4789,7 @@ restore_backup: || st.st_gid != st_old.st_gid) { /* changing owner might not be possible */ - ignored = fchown(fd, st_old.st_uid, -1); + vim_ignored = fchown(fd, st_old.st_uid, -1); /* if changing group fails clear the group permissions */ if (fchown(fd, -1, st_old.st_gid) == -1 && perm > 0) perm &= ~070; @@ -6482,9 +6482,9 @@ vim_fgets(char_u *buf, int size, FILE *fp) { tbuf[FGETS_SIZE - 2] = NUL; #ifdef USE_CR - ignoredp = fgets_cr((char *)tbuf, FGETS_SIZE, fp); + vim_ignoredp = fgets_cr((char *)tbuf, FGETS_SIZE, fp); #else - ignoredp = fgets((char *)tbuf, FGETS_SIZE, fp); + vim_ignoredp = fgets((char *)tbuf, FGETS_SIZE, fp); #endif } while (tbuf[FGETS_SIZE - 2] != NUL && tbuf[FGETS_SIZE - 2] != '\n'); } |