Subject: fixes for window(1), tset(1) and telnet(1)
To: None <netbsd-bugs@sun-lamp.cs.berkeley.edu>
From: Frank van der Linden <vdlinden@fwi.uva.nl>
List: netbsd-bugs
Date: 12/02/1993 22:01:14
 Hi,

 There's a small bug in window(1). Whenever your terminal speed equals
57600 or 115200, window gives a bus error.
After I caught that bug, I checked for other programs not handling
57600 and 115200. tset(1) and telnet(1) where the ones I found.
Fixes for all three programs below.

Onno van der Linden   c/o   vdlinden@fwi.uva.nl (Frank van der Linden)

*** /usr/src/usr.bin/window/wwinit.c.old	Thu Dec  2 21:12:18 1993
--- /usr/src/usr.bin/window/wwinit.c	Thu Dec  2 21:12:20 1993
***************
*** 182,185 ****
--- 182,195 ----
  		wwbaud = 38400;
  		break;
+ #ifdef B57600
+ 	case B57600:
+ 		wwbaud = 57600;
+ 		break;
+ #endif
+ #ifdef B115200
+ 	case B115200:
+ 		wwbaud = 115200;
+ 		break;
+ #endif
  	}
  
*** /usr/src/usr.bin/tset/map.c.old	Thu Dec  2 21:37:25 1993
--- /usr/src/usr.bin/tset/map.c	Thu Dec  2 21:38:55 1993
***************
*** 244,247 ****
--- 244,253 ----
  	"exta",		B19200,
  	"extb",		B38400,
+ #ifdef B57600
+ 	"57600",	B57600,
+ #endif
+ #ifdef B115200
+ 	"115200",	B115200,
+ #endif
  	NULL
  };
*** /usr/src/usr.bin/telnet/sys_bsd.c.old	Thu Dec  2 21:40:46 1993
--- /usr/src/usr.bin/telnet/sys_bsd.c	Thu Dec  2 21:43:24 1993
***************
*** 699,702 ****
--- 699,710 ----
  #endif
  
+ #ifndef B57600
+ # define B57600 B38400
+ #endif
+ 
+ #ifndef B115200
+ # define B115200 B57600
+ #endif
+ 
  /*
   * This code assumes that the values B0, B50, B75...
***************
*** 713,717 ****
  	{ 1200,  B1200 },  { 1800,  B1800 }, { 2400,  B2400 },
  	{ 4800,  B4800 },  { 9600,  B9600 }, { 19200, B19200 },
! 	{ 38400, B38400 }, { -1,    B38400 }
  };
  
--- 721,726 ----
  	{ 1200,  B1200 },  { 1800,  B1800 }, { 2400,  B2400 },
  	{ 4800,  B4800 },  { 9600,  B9600 }, { 19200, B19200 },
! 	{ 38400, B38400 }, { 57600, B57600 },{ 115200,B115200},
! 	{ -1,    B115200 }
  };
  

------------------------------------------------------------------------------