1
0
forked from aniani/vim

updated for version 7.2-055

This commit is contained in:
Bram Moolenaar
2008-11-28 20:29:07 +00:00
parent a40b46614a
commit fe86f2d7cd
23 changed files with 157 additions and 129 deletions

View File

@@ -315,12 +315,15 @@ static struct signalinfo
{-1, "Unknown!", FALSE}
};
/*
* Write s[len] to the screen.
*/
void
mch_write(s, len)
char_u *s;
int len;
{
write(1, (char *)s, len);
ignored = (int)write(1, (char *)s, len);
if (p_wd) /* Unix is too fast, slow down a bit more */
RealWaitForChar(read_cmd_fd, p_wd, NULL);
}
@@ -3927,9 +3930,9 @@ mch_call_shell(cmd, options)
*/
if (fd >= 0)
{
dup(fd); /* To replace stdin (file descriptor 0) */
dup(fd); /* To replace stdout (file descriptor 1) */
dup(fd); /* To replace stderr (file descriptor 2) */
ignored = dup(fd); /* To replace stdin (fd 0) */
ignored = dup(fd); /* To replace stdout (fd 1) */
ignored = dup(fd); /* To replace stderr (fd 2) */
/* Don't need this now that we've duplicated it */
close(fd);
@@ -3997,13 +4000,13 @@ mch_call_shell(cmd, options)
/* set up stdin/stdout/stderr for the child */
close(0);
dup(pty_slave_fd);
ignored = dup(pty_slave_fd);
close(1);
dup(pty_slave_fd);
ignored = dup(pty_slave_fd);
if (gui.in_use)
{
close(2);
dup(pty_slave_fd);
ignored = dup(pty_slave_fd);
}
close(pty_slave_fd); /* has been dupped, close it now */
@@ -4014,13 +4017,13 @@ mch_call_shell(cmd, options)
/* set up stdin for the child */
close(fd_toshell[1]);
close(0);
dup(fd_toshell[0]);
ignored = dup(fd_toshell[0]);
close(fd_toshell[0]);
/* set up stdout for the child */
close(fd_fromshell[0]);
close(1);
dup(fd_fromshell[1]);
ignored = dup(fd_fromshell[1]);
close(fd_fromshell[1]);
# ifdef FEAT_GUI
@@ -4028,7 +4031,7 @@ mch_call_shell(cmd, options)
{
/* set up stderr for the child */
close(2);
dup(1);
ignored = dup(1);
}
# endif
}
@@ -4159,7 +4162,8 @@ mch_call_shell(cmd, options)
&& (lnum !=
curbuf->b_ml.ml_line_count
|| curbuf->b_p_eol)))
write(toshell_fd, "\n", (size_t)1);
ignored = write(toshell_fd, "\n",
(size_t)1);
++lnum;
if (lnum > curbuf->b_op_end.lnum)
{