summaryrefslogtreecommitdiffstats
path: root/usr.sbin/watch
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1995-08-04 07:17:24 +0000
committerache <ache@FreeBSD.org>1995-08-04 07:17:24 +0000
commit56e4caf6767790745ef3d60d01bb8d6009bde4f1 (patch)
treec5f08caeb82795b8b2b59e8343a203fdb7a9b786 /usr.sbin/watch
parente73cbd277f433e0f2f5c42c015330b8f76726410 (diff)
downloadFreeBSD-src-56e4caf6767790745ef3d60d01bb8d6009bde4f1.zip
FreeBSD-src-56e4caf6767790745ef3d60d01bb8d6009bde4f1.tar.gz
Add missing ospeed initialization
Diffstat (limited to 'usr.sbin/watch')
-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 6691067..6aebc99 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();
}
OpenPOWER on IntegriCloud