Mercurial > vim
diff src/fileio.c @ 14730:193471015e1a v8.1.0377
patch 8.1.0377: xdiff doesn't use the Vim memory allocation functions
commit https://github.com/vim/vim/commit/42335f50bc6fac444a8af74c81df8369d722a6fb
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Sep 13 15:33:43 2018 +0200
patch 8.1.0377: xdiff doesn't use the Vim memory allocation functions
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".
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 13 Sep 2018 15:45:05 +0200 |
parents | 0a3b9ecf7cb8 |
children | 27055ad9276b |
line wrap: on
line diff
--- 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 *f { 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'); }