|
Karsten Hopp |
78ae54 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
78ae54 |
Subject: Patch 7.3.083
|
|
Karsten Hopp |
78ae54 |
Fcc: outbox
|
|
Karsten Hopp |
78ae54 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
78ae54 |
Mime-Version: 1.0
|
|
Karsten Hopp |
78ae54 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
78ae54 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
78ae54 |
------------
|
|
Karsten Hopp |
78ae54 |
|
|
Karsten Hopp |
78ae54 |
Patch 7.3.083
|
|
Karsten Hopp |
78ae54 |
Problem: When a read() or write() is interrupted by a signal it fails.
|
|
Karsten Hopp |
78ae54 |
Solution: Add read_eintr() and write_eintr().
|
|
Karsten Hopp |
78ae54 |
Files: src/fileio.c, src/proto/fileio.pro, src/memfile.c, src/memline.c,
|
|
Karsten Hopp |
78ae54 |
src/os_unix.c, src/undo.c, src/vim.h
|
|
Karsten Hopp |
78ae54 |
|
|
Karsten Hopp |
78ae54 |
|
|
Karsten Hopp |
78ae54 |
*** ../vim-7.3.082/src/fileio.c 2010-08-15 21:57:26.000000000 +0200
|
|
Karsten Hopp |
78ae54 |
--- src/fileio.c 2010-12-17 16:04:30.000000000 +0100
|
|
Karsten Hopp |
78ae54 |
***************
|
|
Karsten Hopp |
78ae54 |
*** 918,924 ****
|
|
Karsten Hopp |
78ae54 |
{
|
|
Karsten Hopp |
78ae54 |
/* Read the first line (and a bit more). Immediately rewind to
|
|
Karsten Hopp |
78ae54 |
* the start of the file. If the read() fails "len" is -1. */
|
|
Karsten Hopp |
78ae54 |
! len = vim_read(fd, firstline, 80);
|
|
Karsten Hopp |
78ae54 |
lseek(fd, (off_t)0L, SEEK_SET);
|
|
Karsten Hopp |
78ae54 |
for (p = firstline; p < firstline + len; ++p)
|
|
Karsten Hopp |
78ae54 |
if (*p >= 0x80)
|
|
Karsten Hopp |
78ae54 |
--- 918,924 ----
|
|
Karsten Hopp |
78ae54 |
{
|
|
Karsten Hopp |
78ae54 |
/* Read the first line (and a bit more). Immediately rewind to
|
|
Karsten Hopp |
78ae54 |
* the start of the file. If the read() fails "len" is -1. */
|
|
Karsten Hopp |
78ae54 |
! len = read_eintr(fd, firstline, 80);
|
|
Karsten Hopp |
78ae54 |
lseek(fd, (off_t)0L, SEEK_SET);
|
|
Karsten Hopp |
78ae54 |
for (p = firstline; p < firstline + len; ++p)
|
|
Karsten Hopp |
78ae54 |
if (*p >= 0x80)
|
|
Karsten Hopp |
78ae54 |
***************
|
|
Karsten Hopp |
78ae54 |
*** 1373,1379 ****
|
|
Karsten Hopp |
78ae54 |
/*
|
|
Karsten Hopp |
78ae54 |
* Read bytes from the file.
|
|
Karsten Hopp |
78ae54 |
*/
|
|
Karsten Hopp |
78ae54 |
! size = vim_read(fd, ptr, size);
|
|
Karsten Hopp |
78ae54 |
}
|
|
Karsten Hopp |
78ae54 |
|
|
Karsten Hopp |
78ae54 |
if (size <= 0)
|
|
Karsten Hopp |
78ae54 |
--- 1373,1379 ----
|
|
Karsten Hopp |
78ae54 |
/*
|
|
Karsten Hopp |
78ae54 |
* Read bytes from the file.
|
|
Karsten Hopp |
78ae54 |
*/
|
|
Karsten Hopp |
78ae54 |
! size = read_eintr(fd, ptr, size);
|
|
Karsten Hopp |
78ae54 |
}
|
|
Karsten Hopp |
78ae54 |
|
|
Karsten Hopp |
78ae54 |
if (size <= 0)
|
|
Karsten Hopp |
78ae54 |
***************
|
|
Karsten Hopp |
78ae54 |
*** 4000,4006 ****
|
|
Karsten Hopp |
78ae54 |
#ifdef HAS_BW_FLAGS
|
|
Karsten Hopp |
78ae54 |
write_info.bw_flags = FIO_NOCONVERT;
|
|
Karsten Hopp |
78ae54 |
#endif
|
|
Karsten Hopp |
78ae54 |
! while ((write_info.bw_len = vim_read(fd, copybuf,
|
|
Karsten Hopp |
78ae54 |
BUFSIZE)) > 0)
|
|
Karsten Hopp |
78ae54 |
{
|
|
Karsten Hopp |
78ae54 |
if (buf_write_bytes(&write_info) == FAIL)
|
|
Karsten Hopp |
78ae54 |
--- 4000,4006 ----
|
|
Karsten Hopp |
78ae54 |
#ifdef HAS_BW_FLAGS
|
|
Karsten Hopp |
78ae54 |
write_info.bw_flags = FIO_NOCONVERT;
|
|
Karsten Hopp |
78ae54 |
#endif
|
|
Karsten Hopp |
78ae54 |
! while ((write_info.bw_len = read_eintr(fd, copybuf,
|
|
Karsten Hopp |
78ae54 |
BUFSIZE)) > 0)
|
|
Karsten Hopp |
78ae54 |
{
|
|
Karsten Hopp |
78ae54 |
if (buf_write_bytes(&write_info) == FAIL)
|
|
Karsten Hopp |
78ae54 |
***************
|
|
Karsten Hopp |
78ae54 |
*** 4813,4819 ****
|
|
Karsten Hopp |
78ae54 |
#ifdef HAS_BW_FLAGS
|
|
Karsten Hopp |
78ae54 |
write_info.bw_flags = FIO_NOCONVERT;
|
|
Karsten Hopp |
78ae54 |
#endif
|
|
Karsten Hopp |
78ae54 |
! while ((write_info.bw_len = vim_read(fd, smallbuf,
|
|
Karsten Hopp |
78ae54 |
SMBUFSIZE)) > 0)
|
|
Karsten Hopp |
78ae54 |
if (buf_write_bytes(&write_info) == FAIL)
|
|
Karsten Hopp |
78ae54 |
break;
|
|
Karsten Hopp |
78ae54 |
--- 4813,4819 ----
|
|
Karsten Hopp |
78ae54 |
#ifdef HAS_BW_FLAGS
|
|
Karsten Hopp |
78ae54 |
write_info.bw_flags = FIO_NOCONVERT;
|
|
Karsten Hopp |
78ae54 |
#endif
|
|
Karsten Hopp |
78ae54 |
! while ((write_info.bw_len = read_eintr(fd, smallbuf,
|
|
Karsten Hopp |
78ae54 |
SMBUFSIZE)) > 0)
|
|
Karsten Hopp |
78ae54 |
if (buf_write_bytes(&write_info) == FAIL)
|
|
Karsten Hopp |
78ae54 |
break;
|
|
Karsten Hopp |
78ae54 |
***************
|
|
Karsten Hopp |
78ae54 |
*** 5330,5336 ****
|
|
Karsten Hopp |
78ae54 |
|
|
Karsten Hopp |
78ae54 |
/*
|
|
Karsten Hopp |
78ae54 |
* Call write() to write a number of bytes to the file.
|
|
Karsten Hopp |
78ae54 |
! * Also handles encryption and 'encoding' conversion.
|
|
Karsten Hopp |
78ae54 |
*
|
|
Karsten Hopp |
78ae54 |
* Return FAIL for failure, OK otherwise.
|
|
Karsten Hopp |
78ae54 |
*/
|
|
Karsten Hopp |
78ae54 |
--- 5330,5336 ----
|
|
Karsten Hopp |
78ae54 |
|
|
Karsten Hopp |
78ae54 |
/*
|
|
Karsten Hopp |
78ae54 |
* Call write() to write a number of bytes to the file.
|
|
Karsten Hopp |
78ae54 |
! * Handles encryption and 'encoding' conversion.
|
|
Karsten Hopp |
78ae54 |
*
|
|
Karsten Hopp |
78ae54 |
* Return FAIL for failure, OK otherwise.
|
|
Karsten Hopp |
78ae54 |
*/
|
|
Karsten Hopp |
78ae54 |
***************
|
|
Karsten Hopp |
78ae54 |
*** 5702,5717 ****
|
|
Karsten Hopp |
78ae54 |
crypt_encode(buf, len, buf);
|
|
Karsten Hopp |
78ae54 |
#endif
|
|
Karsten Hopp |
78ae54 |
|
|
Karsten Hopp |
78ae54 |
! /* Repeat the write(), it may be interrupted by a signal. */
|
|
Karsten Hopp |
78ae54 |
! while (len > 0)
|
|
Karsten Hopp |
78ae54 |
! {
|
|
Karsten Hopp |
78ae54 |
! wlen = vim_write(ip->bw_fd, buf, len);
|
|
Karsten Hopp |
78ae54 |
! if (wlen <= 0) /* error! */
|
|
Karsten Hopp |
78ae54 |
! return FAIL;
|
|
Karsten Hopp |
78ae54 |
! len -= wlen;
|
|
Karsten Hopp |
78ae54 |
! buf += wlen;
|
|
Karsten Hopp |
78ae54 |
! }
|
|
Karsten Hopp |
78ae54 |
! return OK;
|
|
Karsten Hopp |
78ae54 |
}
|
|
Karsten Hopp |
78ae54 |
|
|
Karsten Hopp |
78ae54 |
#ifdef FEAT_MBYTE
|
|
Karsten Hopp |
78ae54 |
--- 5702,5709 ----
|
|
Karsten Hopp |
78ae54 |
crypt_encode(buf, len, buf);
|
|
Karsten Hopp |
78ae54 |
#endif
|
|
Karsten Hopp |
78ae54 |
|
|
Karsten Hopp |
78ae54 |
! wlen = write_eintr(ip->bw_fd, buf, len);
|
|
Karsten Hopp |
78ae54 |
! return (wlen < len) ? FAIL : OK;
|
|
Karsten Hopp |
78ae54 |
}
|
|
Karsten Hopp |
78ae54 |
|
|
Karsten Hopp |
78ae54 |
#ifdef FEAT_MBYTE
|
|
Karsten Hopp |
78ae54 |
***************
|
|
Karsten Hopp |
78ae54 |
*** 6662,6669 ****
|
|
Karsten Hopp |
78ae54 |
return -1;
|
|
Karsten Hopp |
78ae54 |
}
|
|
Karsten Hopp |
78ae54 |
|
|
Karsten Hopp |
78ae54 |
! while ((n = vim_read(fd_in, buffer, BUFSIZE)) > 0)
|
|
Karsten Hopp |
78ae54 |
! if (vim_write(fd_out, buffer, n) != n)
|
|
Karsten Hopp |
78ae54 |
{
|
|
Karsten Hopp |
78ae54 |
errmsg = _("E208: Error writing to \"%s\"");
|
|
Karsten Hopp |
78ae54 |
break;
|
|
Karsten Hopp |
78ae54 |
--- 6654,6661 ----
|
|
Karsten Hopp |
78ae54 |
return -1;
|
|
Karsten Hopp |
78ae54 |
}
|
|
Karsten Hopp |
78ae54 |
|
|
Karsten Hopp |
78ae54 |
! while ((n = read_eintr(fd_in, buffer, BUFSIZE)) > 0)
|
|
Karsten Hopp |
78ae54 |
! if (write_eintr(fd_out, buffer, n) != n)
|
|
Karsten Hopp |
78ae54 |
{
|
|
Karsten Hopp |
78ae54 |
errmsg = _("E208: Error writing to \"%s\"");
|
|
Karsten Hopp |
78ae54 |
break;
|
|
Karsten Hopp |
78ae54 |
***************
|
|
Karsten Hopp |
78ae54 |
*** 10304,10306 ****
|
|
Karsten Hopp |
78ae54 |
--- 10296,10350 ----
|
|
Karsten Hopp |
78ae54 |
}
|
|
Karsten Hopp |
78ae54 |
return reg_pat;
|
|
Karsten Hopp |
78ae54 |
}
|
|
Karsten Hopp |
78ae54 |
+
|
|
Karsten Hopp |
78ae54 |
+ #if defined(EINTR) || defined(PROTO)
|
|
Karsten Hopp |
78ae54 |
+ /*
|
|
Karsten Hopp |
78ae54 |
+ * Version of read() that retries when interrupted by EINTR (possibly
|
|
Karsten Hopp |
78ae54 |
+ * by a SIGWINCH).
|
|
Karsten Hopp |
78ae54 |
+ */
|
|
Karsten Hopp |
78ae54 |
+ long
|
|
Karsten Hopp |
78ae54 |
+ read_eintr(fd, buf, bufsize)
|
|
Karsten Hopp |
78ae54 |
+ int fd;
|
|
Karsten Hopp |
78ae54 |
+ void *buf;
|
|
Karsten Hopp |
78ae54 |
+ size_t bufsize;
|
|
Karsten Hopp |
78ae54 |
+ {
|
|
Karsten Hopp |
78ae54 |
+ long ret;
|
|
Karsten Hopp |
78ae54 |
+
|
|
Karsten Hopp |
78ae54 |
+ for (;;)
|
|
Karsten Hopp |
78ae54 |
+ {
|
|
Karsten Hopp |
78ae54 |
+ ret = vim_read(fd, buf, bufsize);
|
|
Karsten Hopp |
78ae54 |
+ if (ret >= 0 || errno != EINTR)
|
|
Karsten Hopp |
78ae54 |
+ break;
|
|
Karsten Hopp |
78ae54 |
+ }
|
|
Karsten Hopp |
78ae54 |
+ return ret;
|
|
Karsten Hopp |
78ae54 |
+ }
|
|
Karsten Hopp |
78ae54 |
+
|
|
Karsten Hopp |
78ae54 |
+ /*
|
|
Karsten Hopp |
78ae54 |
+ * Version of write() that retries when interrupted by EINTR (possibly
|
|
Karsten Hopp |
78ae54 |
+ * by a SIGWINCH).
|
|
Karsten Hopp |
78ae54 |
+ */
|
|
Karsten Hopp |
78ae54 |
+ long
|
|
Karsten Hopp |
78ae54 |
+ write_eintr(fd, buf, bufsize)
|
|
Karsten Hopp |
78ae54 |
+ int fd;
|
|
Karsten Hopp |
78ae54 |
+ void *buf;
|
|
Karsten Hopp |
78ae54 |
+ size_t bufsize;
|
|
Karsten Hopp |
78ae54 |
+ {
|
|
Karsten Hopp |
78ae54 |
+ long ret = 0;
|
|
Karsten Hopp |
78ae54 |
+ long wlen;
|
|
Karsten Hopp |
78ae54 |
+
|
|
Karsten Hopp |
78ae54 |
+ /* Repeat the write() so long it didn't fail, other than being interrupted
|
|
Karsten Hopp |
78ae54 |
+ * by a signal. */
|
|
Karsten Hopp |
78ae54 |
+ while (ret < (long)bufsize)
|
|
Karsten Hopp |
78ae54 |
+ {
|
|
Karsten Hopp |
78ae54 |
+ wlen = vim_write(fd, buf + ret, bufsize - ret);
|
|
Karsten Hopp |
78ae54 |
+ if (wlen < 0)
|
|
Karsten Hopp |
78ae54 |
+ {
|
|
Karsten Hopp |
78ae54 |
+ if (errno != EINTR)
|
|
Karsten Hopp |
78ae54 |
+ break;
|
|
Karsten Hopp |
78ae54 |
+ }
|
|
Karsten Hopp |
78ae54 |
+ else
|
|
Karsten Hopp |
78ae54 |
+ ret += wlen;
|
|
Karsten Hopp |
78ae54 |
+ }
|
|
Karsten Hopp |
78ae54 |
+ return ret;
|
|
Karsten Hopp |
78ae54 |
+ }
|
|
Karsten Hopp |
78ae54 |
+ #endif
|
|
Karsten Hopp |
78ae54 |
*** ../vim-7.3.082/src/proto/fileio.pro 2010-08-15 21:57:28.000000000 +0200
|
|
Karsten Hopp |
78ae54 |
--- src/proto/fileio.pro 2010-12-17 15:01:26.000000000 +0100
|
|
Karsten Hopp |
78ae54 |
***************
|
|
Karsten Hopp |
78ae54 |
*** 54,57 ****
|
|
Karsten Hopp |
78ae54 |
--- 54,59 ----
|
|
Karsten Hopp |
78ae54 |
int match_file_pat __ARGS((char_u *pattern, regprog_T *prog, char_u *fname, char_u *sfname, char_u *tail, int allow_dirs));
|
|
Karsten Hopp |
78ae54 |
int match_file_list __ARGS((char_u *list, char_u *sfname, char_u *ffname));
|
|
Karsten Hopp |
78ae54 |
char_u *file_pat_to_reg_pat __ARGS((char_u *pat, char_u *pat_end, char *allow_dirs, int no_bslash));
|
|
Karsten Hopp |
78ae54 |
+ long read_eintr __ARGS((int fd, void *buf, size_t bufsize));
|
|
Karsten Hopp |
78ae54 |
+ long write_eintr __ARGS((int fd, void *buf, size_t bufsize));
|
|
Karsten Hopp |
78ae54 |
/* vim: set ft=c : */
|
|
Karsten Hopp |
78ae54 |
*** ../vim-7.3.082/src/memfile.c 2010-08-15 21:57:25.000000000 +0200
|
|
Karsten Hopp |
78ae54 |
--- src/memfile.c 2010-12-17 16:02:54.000000000 +0100
|
|
Karsten Hopp |
78ae54 |
***************
|
|
Karsten Hopp |
78ae54 |
*** 1049,1055 ****
|
|
Karsten Hopp |
78ae54 |
PERROR(_("E294: Seek error in swap file read"));
|
|
Karsten Hopp |
78ae54 |
return FAIL;
|
|
Karsten Hopp |
78ae54 |
}
|
|
Karsten Hopp |
78ae54 |
! if ((unsigned)vim_read(mfp->mf_fd, hp->bh_data, size) != size)
|
|
Karsten Hopp |
78ae54 |
{
|
|
Karsten Hopp |
78ae54 |
PERROR(_("E295: Read error in swap file"));
|
|
Karsten Hopp |
78ae54 |
return FAIL;
|
|
Karsten Hopp |
78ae54 |
--- 1049,1055 ----
|
|
Karsten Hopp |
78ae54 |
PERROR(_("E294: Seek error in swap file read"));
|
|
Karsten Hopp |
78ae54 |
return FAIL;
|
|
Karsten Hopp |
78ae54 |
}
|
|
Karsten Hopp |
78ae54 |
! if ((unsigned)read_eintr(mfp->mf_fd, hp->bh_data, size) != size)
|
|
Karsten Hopp |
78ae54 |
{
|
|
Karsten Hopp |
78ae54 |
PERROR(_("E295: Read error in swap file"));
|
|
Karsten Hopp |
78ae54 |
return FAIL;
|
|
Karsten Hopp |
78ae54 |
***************
|
|
Karsten Hopp |
78ae54 |
*** 1168,1174 ****
|
|
Karsten Hopp |
78ae54 |
}
|
|
Karsten Hopp |
78ae54 |
#endif
|
|
Karsten Hopp |
78ae54 |
|
|
Karsten Hopp |
78ae54 |
! if ((unsigned)vim_write(mfp->mf_fd, data, size) != size)
|
|
Karsten Hopp |
78ae54 |
result = FAIL;
|
|
Karsten Hopp |
78ae54 |
|
|
Karsten Hopp |
78ae54 |
#ifdef FEAT_CRYPT
|
|
Karsten Hopp |
78ae54 |
--- 1168,1174 ----
|
|
Karsten Hopp |
78ae54 |
}
|
|
Karsten Hopp |
78ae54 |
#endif
|
|
Karsten Hopp |
78ae54 |
|
|
Karsten Hopp |
78ae54 |
! if ((unsigned)write_eintr(mfp->mf_fd, data, size) != size)
|
|
Karsten Hopp |
78ae54 |
result = FAIL;
|
|
Karsten Hopp |
78ae54 |
|
|
Karsten Hopp |
78ae54 |
#ifdef FEAT_CRYPT
|
|
Karsten Hopp |
78ae54 |
*** ../vim-7.3.082/src/memline.c 2010-12-08 13:16:58.000000000 +0100
|
|
Karsten Hopp |
78ae54 |
--- src/memline.c 2010-12-17 15:46:49.000000000 +0100
|
|
Karsten Hopp |
78ae54 |
***************
|
|
Karsten Hopp |
78ae54 |
*** 2062,2068 ****
|
|
Karsten Hopp |
78ae54 |
fd = mch_open((char *)fname, O_RDONLY | O_EXTRA, 0);
|
|
Karsten Hopp |
78ae54 |
if (fd >= 0)
|
|
Karsten Hopp |
78ae54 |
{
|
|
Karsten Hopp |
78ae54 |
! if (read(fd, (char *)&b0, sizeof(b0)) == sizeof(b0))
|
|
Karsten Hopp |
78ae54 |
{
|
|
Karsten Hopp |
78ae54 |
if (STRNCMP(b0.b0_version, "VIM 3.0", 7) == 0)
|
|
Karsten Hopp |
78ae54 |
{
|
|
Karsten Hopp |
78ae54 |
--- 2062,2068 ----
|
|
Karsten Hopp |
78ae54 |
fd = mch_open((char *)fname, O_RDONLY | O_EXTRA, 0);
|
|
Karsten Hopp |
78ae54 |
if (fd >= 0)
|
|
Karsten Hopp |
78ae54 |
{
|
|
Karsten Hopp |
78ae54 |
! if (read_eintr(fd, &b0, sizeof(b0)) == sizeof(b0))
|
|
Karsten Hopp |
78ae54 |
{
|
|
Karsten Hopp |
78ae54 |
if (STRNCMP(b0.b0_version, "VIM 3.0", 7) == 0)
|
|
Karsten Hopp |
78ae54 |
{
|
|
Karsten Hopp |
78ae54 |
***************
|
|
Karsten Hopp |
78ae54 |
*** 4392,4398 ****
|
|
Karsten Hopp |
78ae54 |
fd = mch_open((char *)fname, O_RDONLY | O_EXTRA, 0);
|
|
Karsten Hopp |
78ae54 |
if (fd >= 0)
|
|
Karsten Hopp |
78ae54 |
{
|
|
Karsten Hopp |
78ae54 |
! if (read(fd, (char *)&b0, sizeof(b0)) == sizeof(b0))
|
|
Karsten Hopp |
78ae54 |
{
|
|
Karsten Hopp |
78ae54 |
/*
|
|
Karsten Hopp |
78ae54 |
* If the swapfile has the same directory as the
|
|
Karsten Hopp |
78ae54 |
--- 4392,4398 ----
|
|
Karsten Hopp |
78ae54 |
fd = mch_open((char *)fname, O_RDONLY | O_EXTRA, 0);
|
|
Karsten Hopp |
78ae54 |
if (fd >= 0)
|
|
Karsten Hopp |
78ae54 |
{
|
|
Karsten Hopp |
78ae54 |
! if (read_eintr(fd, &b0, sizeof(b0)) == sizeof(b0))
|
|
Karsten Hopp |
78ae54 |
{
|
|
Karsten Hopp |
78ae54 |
/*
|
|
Karsten Hopp |
78ae54 |
* If the swapfile has the same directory as the
|
|
Karsten Hopp |
78ae54 |
*** ../vim-7.3.082/src/os_unix.c 2010-10-20 19:17:43.000000000 +0200
|
|
Karsten Hopp |
78ae54 |
--- src/os_unix.c 2010-12-17 16:17:43.000000000 +0100
|
|
Karsten Hopp |
78ae54 |
***************
|
|
Karsten Hopp |
78ae54 |
*** 4454,4460 ****
|
|
Karsten Hopp |
78ae54 |
++noread_cnt;
|
|
Karsten Hopp |
78ae54 |
while (RealWaitForChar(fromshell_fd, 10L, NULL))
|
|
Karsten Hopp |
78ae54 |
{
|
|
Karsten Hopp |
78ae54 |
! len = read(fromshell_fd, (char *)buffer
|
|
Karsten Hopp |
78ae54 |
# ifdef FEAT_MBYTE
|
|
Karsten Hopp |
78ae54 |
+ buffer_off, (size_t)(BUFLEN - buffer_off)
|
|
Karsten Hopp |
78ae54 |
# else
|
|
Karsten Hopp |
78ae54 |
--- 4454,4460 ----
|
|
Karsten Hopp |
78ae54 |
++noread_cnt;
|
|
Karsten Hopp |
78ae54 |
while (RealWaitForChar(fromshell_fd, 10L, NULL))
|
|
Karsten Hopp |
78ae54 |
{
|
|
Karsten Hopp |
78ae54 |
! len = read_eintr(fromshell_fd, buffer
|
|
Karsten Hopp |
78ae54 |
# ifdef FEAT_MBYTE
|
|
Karsten Hopp |
78ae54 |
+ buffer_off, (size_t)(BUFLEN - buffer_off)
|
|
Karsten Hopp |
78ae54 |
# else
|
|
Karsten Hopp |
78ae54 |
*** ../vim-7.3.082/src/undo.c 2010-11-03 19:32:36.000000000 +0100
|
|
Karsten Hopp |
78ae54 |
--- src/undo.c 2010-12-17 15:39:24.000000000 +0100
|
|
Karsten Hopp |
78ae54 |
***************
|
|
Karsten Hopp |
78ae54 |
*** 1386,1392 ****
|
|
Karsten Hopp |
78ae54 |
char_u mbuf[UF_START_MAGIC_LEN];
|
|
Karsten Hopp |
78ae54 |
int len;
|
|
Karsten Hopp |
78ae54 |
|
|
Karsten Hopp |
78ae54 |
! len = vim_read(fd, mbuf, UF_START_MAGIC_LEN);
|
|
Karsten Hopp |
78ae54 |
close(fd);
|
|
Karsten Hopp |
78ae54 |
if (len < UF_START_MAGIC_LEN
|
|
Karsten Hopp |
78ae54 |
|| memcmp(mbuf, UF_START_MAGIC, UF_START_MAGIC_LEN) != 0)
|
|
Karsten Hopp |
78ae54 |
--- 1386,1392 ----
|
|
Karsten Hopp |
78ae54 |
char_u mbuf[UF_START_MAGIC_LEN];
|
|
Karsten Hopp |
78ae54 |
int len;
|
|
Karsten Hopp |
78ae54 |
|
|
Karsten Hopp |
78ae54 |
! len = read_eintr(fd, mbuf, UF_START_MAGIC_LEN);
|
|
Karsten Hopp |
78ae54 |
close(fd);
|
|
Karsten Hopp |
78ae54 |
if (len < UF_START_MAGIC_LEN
|
|
Karsten Hopp |
78ae54 |
|| memcmp(mbuf, UF_START_MAGIC, UF_START_MAGIC_LEN) != 0)
|
|
Karsten Hopp |
78ae54 |
*** ../vim-7.3.082/src/vim.h 2010-12-02 16:01:23.000000000 +0100
|
|
Karsten Hopp |
78ae54 |
--- src/vim.h 2010-12-17 14:55:04.000000000 +0100
|
|
Karsten Hopp |
78ae54 |
***************
|
|
Karsten Hopp |
78ae54 |
*** 1642,1647 ****
|
|
Karsten Hopp |
78ae54 |
--- 1642,1652 ----
|
|
Karsten Hopp |
78ae54 |
# define USE_INPUT_BUF
|
|
Karsten Hopp |
78ae54 |
#endif
|
|
Karsten Hopp |
78ae54 |
|
|
Karsten Hopp |
78ae54 |
+ #ifndef EINTR
|
|
Karsten Hopp |
78ae54 |
+ # define read_eintr(fd, buf, count) vim_read((fd), (buf), (count))
|
|
Karsten Hopp |
78ae54 |
+ # define write_eintr(fd, buf, count) vim_write((fd), (buf), (count))
|
|
Karsten Hopp |
78ae54 |
+ #endif
|
|
Karsten Hopp |
78ae54 |
+
|
|
Karsten Hopp |
78ae54 |
#ifdef MSWIN
|
|
Karsten Hopp |
78ae54 |
/* On MS-Windows the third argument isn't size_t. This matters for Win64,
|
|
Karsten Hopp |
78ae54 |
* where sizeof(size_t)==8, not 4 */
|
|
Karsten Hopp |
78ae54 |
*** ../vim-7.3.082/src/version.c 2010-12-17 12:19:14.000000000 +0100
|
|
Karsten Hopp |
78ae54 |
--- src/version.c 2010-12-17 16:10:58.000000000 +0100
|
|
Karsten Hopp |
78ae54 |
***************
|
|
Karsten Hopp |
78ae54 |
*** 716,717 ****
|
|
Karsten Hopp |
78ae54 |
--- 716,719 ----
|
|
Karsten Hopp |
78ae54 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
78ae54 |
+ /**/
|
|
Karsten Hopp |
78ae54 |
+ 83,
|
|
Karsten Hopp |
78ae54 |
/**/
|
|
Karsten Hopp |
78ae54 |
|
|
Karsten Hopp |
78ae54 |
--
|
|
Karsten Hopp |
78ae54 |
How To Keep A Healthy Level Of Insanity:
|
|
Karsten Hopp |
78ae54 |
9. As often as possible, skip rather than walk.
|
|
Karsten Hopp |
78ae54 |
|
|
Karsten Hopp |
78ae54 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
78ae54 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
78ae54 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
78ae54 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|