From 9bfb9eedcddf3ab4e79532e863cf16c5ff381090 Mon Sep 17 00:00:00 2001 From: sheldonh Date: Thu, 26 Jul 2001 11:02:39 +0000 Subject: Use STD{ERR,IN,OUT}_FILENO instead of their numeric values. The definitions are more readable, and it's possible that they're more portable to pathalogical platforms. Submitted by: David Hill --- usr.bin/window/ttoutput.c | 3 ++- usr.bin/window/wwrint.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'usr.bin/window') diff --git a/usr.bin/window/ttoutput.c b/usr.bin/window/ttoutput.c index cc9afd9..1be0fa0 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 +#include /* * 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 5d753f5..3332273 100644 --- a/usr.bin/window/wwrint.c +++ b/usr.bin/window/wwrint.c @@ -46,6 +46,7 @@ static char rcsid[] = #include #endif +#include /* * 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 -- cgit v1.1