summaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2008-11-28 20:29:07 +0000
committerBram Moolenaar <Bram@vim.org>2008-11-28 20:29:07 +0000
commitfe86f2d7cdb284f18543cac2e6cbbe11352c7f48 (patch)
tree9b8155ee2c3fe3142e4258590d210451db55db1f /src/os_unix.c
parenta40b46614a54de01a74d37a771db4dbfa44afee9 (diff)
downloadvim-git-fe86f2d7cdb284f18543cac2e6cbbe11352c7f48.tar.gz
updated for version 7.2-055v7.2.055
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 782265bd9..9d6f6cb6f 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -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)
{