aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/window
diff options
context:
space:
mode:
authorSheldon Hearn <sheldonh@FreeBSD.org>2001-07-26 11:02:39 +0000
committerSheldon Hearn <sheldonh@FreeBSD.org>2001-07-26 11:02:39 +0000
commite1b4d8d0746069292d84708b0e11b17a7e1ef5e0 (patch)
treebd2ac2627dbeab7d3427432bb98d2c73085b61c1 /usr.bin/window
parent8155f5e200803441caa6e1bba5d9fa1f836d232f (diff)
Notes
Diffstat (limited to 'usr.bin/window')
-rw-r--r--usr.bin/window/ttoutput.c3
-rw-r--r--usr.bin/window/wwrint.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/window/ttoutput.c b/usr.bin/window/ttoutput.c
index cc9afd9c0e73b..1be0fa056fd19 100644
--- a/usr.bin/window/ttoutput.c
+++ b/usr.bin/window/ttoutput.c
@@ -43,6 +43,7 @@ static char rcsid[] =
#include "ww.h"
#include "tt.h"
#include <errno.h>
+#include <unistd.h>
/*
* Buffered output package.
@@ -65,7 +66,7 @@ ttflush()
wwnflush++;
for (p = tt_ob; p < tt_obp;) {
wwnwr++;
- n = write(1, p, tt_obp - p);
+ n = write(STDOUT_FILENO, p, tt_obp - p);
if (n < 0) {
wwnwre++;
if (errno != EWOULDBLOCK) {
diff --git a/usr.bin/window/wwrint.c b/usr.bin/window/wwrint.c
index 5d753f5e85404..3332273be4594 100644
--- a/usr.bin/window/wwrint.c
+++ b/usr.bin/window/wwrint.c
@@ -46,6 +46,7 @@ static char rcsid[] =
#include <fcntl.h>
#endif
+#include <unistd.h>
/*
* Tty input interrupt handler.
* (1) Read input into buffer (wwib*).
@@ -68,7 +69,7 @@ wwrint()
/* we have set c_cc[VMIN] to 0 */
(void) fcntl(0, F_SETFL, O_NONBLOCK|wwnewtty.ww_fflags);
#endif
- n = read(0, wwibq, wwibe - wwibq);
+ n = read(STDIN_FILENO, wwibq, wwibe - wwibq);
#if defined(OLD_TTY) || defined(VMIN_BUG)
(void) fcntl(0, F_SETFL, wwnewtty.ww_fflags);
#endif