summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1995-08-04 06:54:18 +0000
committerache <ache@FreeBSD.org>1995-08-04 06:54:18 +0000
commite287a130ea50f3c18310f1a5c00a1a2db79cd340 (patch)
treef90ca9798e6092cbc20f83c4467e8c57af813144 /usr.bin
parentc69710868eb888bc07bc2ab5e4d1099ef65d6b33 (diff)
downloadFreeBSD-src-e287a130ea50f3c18310f1a5c00a1a2db79cd340.zip
FreeBSD-src-e287a130ea50f3c18310f1a5c00a1a2db79cd340.tar.gz
Allow it works with non-fixed termios speeds.
Replace ospeed switch with new _set_ospeed
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/window/ttgeneric.c2
-rw-r--r--usr.bin/window/wwinit.c14
2 files changed, 9 insertions, 7 deletions
diff --git a/usr.bin/window/ttgeneric.c b/usr.bin/window/ttgeneric.c
index 4dddd21..704cb30 100644
--- a/usr.bin/window/ttgeneric.c
+++ b/usr.bin/window/ttgeneric.c
@@ -42,7 +42,6 @@ static char sccsid[] = "@(#)ttgeneric.c 8.1 (Berkeley) 6/6/93";
#include "tt.h"
char PC, *BC, *UP;
-short ospeed;
/* normal frame */
short gen_frame[16] = {
@@ -393,7 +392,6 @@ tt_generic()
{
gen_PC = tttgetstr("pc");
PC = gen_PC ? *gen_PC->ts_str : 0;
- ospeed = wwospeed;
gen_CM = ttxgetstr("cm"); /* may not work */
gen_IM = ttxgetstr("im");
diff --git a/usr.bin/window/wwinit.c b/usr.bin/window/wwinit.c
index a20bef1..2124f41 100644
--- a/usr.bin/window/wwinit.c
+++ b/usr.bin/window/wwinit.c
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)wwinit.c 8.1 (Berkeley) 6/6/93";
#include "tt.h"
#include <sys/signal.h>
#include <fcntl.h>
+#include <termcap.h>
#include "char.h"
wwinit()
@@ -122,11 +123,8 @@ wwinit()
goto bad;
}
#ifdef OLD_TTY
- wwospeed = wwoldtty.ww_sgttyb.sg_ospeed;
-#else
- wwospeed = cfgetospeed(&wwoldtty.ww_termios);
-#endif
- switch (wwospeed) {
+ ospeed = wwoldtty.ww_sgttyb.sg_ospeed;
+ switch (ospeed) {
default:
case B0:
goto bad;
@@ -194,6 +192,12 @@ wwinit()
break;
#endif
}
+#else
+ if ((wwbaud = cfgetospeed(&wwoldtty.ww_termios)) == B0)
+ goto bad;
+ _set_ospeed(wwbaud);
+#endif
+ wwospeed = ospeed;
if (xxinit() < 0)
goto bad;
OpenPOWER on IntegriCloud