diff --git a/usr.bin/window/ttgeneric.c b/usr.bin/window/ttgeneric.c index 4dddd215f914..704cb305fba0 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 a20bef18467e..2124f4123dcc 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 #include +#include #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;