mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-11 09:50:12 +00:00
Allow it works with non-fixed termios speeds.
Replace ospeed switch with new _set_ospeed
This commit is contained in:
parent
23b227cadc
commit
3c0ba277d4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=9891
@ -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");
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user