slang-users mailing list

[2011 Date Index] [2011 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

[slang-users] [PATCH] Fix SLang_TT_Baud_Rate setting with faster baud rates


The baud rate constant list used for setting the SLang_TT_Baud_Rate
variable contains baud rates only up to 230400; any faster baud rate is
not properly detected, and SLang_TT_Baud_Rate is left as 0.  This caused
problems at least with the Midnight Commander:

  https://www.midnight-commander.org/ticket/2452

(recent versions of rxvt-unicode set speed 4000000 for the pty (and
there is no configurable option for this), and mc then considers such
terminal as "slow" due to SLang_TT_Baud_Rate == 0 and turns off some
useful UI options).

This patch adds missing values to the Baud_Rates array in src/slutty.c,
which fixes the baud rate detection problem.  It also brings this array
in sync with Baudrate_Map in modules/termios-module.c, where those
higher baud rates were already present for some time.


--- slang-2.2.3/src/slutty.c.alt-baud-rates	2010-12-15 13:56:48.000000000 +0300
+++ slang-2.2.3/src/slutty.c	2011-01-09 22:34:59.911000008 +0300
@@ -170,6 +170,42 @@ static Baud_Rate_Type Baud_Rates [] =
 #ifdef B230400
      {B230400, 230400},
 #endif
+#ifdef B460800
+     {B460800, 460800},
+#endif
+#ifdef B500000
+     {B500000, 500000},
+#endif
+#ifdef B576000
+     {B576000, 576000},
+#endif
+#ifdef B921600
+     {B921600, 921600},
+#endif
+#ifdef B1000000
+     {B1000000, 1000000},
+#endif
+#ifdef B1152000
+     {B1152000, 1152000},
+#endif
+#ifdef B1500000
+     {B1500000, 1500000},
+#endif
+#ifdef B2000000
+     {B2000000, 2000000},
+#endif
+#ifdef B2500000
+     {B2500000, 2500000},
+#endif
+#ifdef B3000000
+     {B3000000, 3000000},
+#endif
+#ifdef B3500000
+     {B3500000, 3500000},
+#endif
+#ifdef B4000000
+     {B4000000, 4000000},
+#endif
      {0, 0}
 };
 

Attachment: signature.asc
Description: Digital signature






[2011 date index] [2011 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]