aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/watch/watch.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1995-08-04 07:17:24 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1995-08-04 07:17:24 +0000
commit8a9c356059ccf359f2d774e6f7e77bd1b9b566b8 (patch)
treec5f08caeb82795b8b2b59e8343a203fdb7a9b786 /usr.sbin/watch/watch.c
parentba508869caebae8c24606cd50b6edf4469b6ccb7 (diff)
downloadsrc-8a9c356059ccf359f2d774e6f7e77bd1b9b566b8.tar.gz
src-8a9c356059ccf359f2d774e6f7e77bd1b9b566b8.zip
Notes
Diffstat (limited to 'usr.sbin/watch/watch.c')
-rw-r--r--usr.sbin/watch/watch.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/watch/watch.c b/usr.sbin/watch/watch.c
index 6691067820a1..6aebc999e1f7 100644
--- a/usr.sbin/watch/watch.c
+++ b/usr.sbin/watch/watch.c
@@ -18,13 +18,13 @@
#include <stdlib.h>
#include <signal.h>
#include <string.h>
+#include <termcap.h>
+#include <sgtty.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/select.h>
#include <sys/fcntl.h>
-#include <sys/ioctl.h>
-#include <sys/ioctl_compat.h>
#include <sys/snoop.h>
@@ -92,6 +92,7 @@ set_tty()
sgn = sgo;
sgn.sg_flags |= CBREAK;
sgn.sg_flags &= ~ECHO;
+ ospeed = sgo.sg_ospeed;
ioctl(std_in, TIOCSETP, &sgn);
}
@@ -162,8 +163,8 @@ setup_scr()
if (tgetent(tbuf, term) == 1)
if (tgetstr("cl", &cbuf))
clear_ok = 1;
- clear();
set_tty();
+ clear();
}