[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
_nc_baudrate() bug; phase out USE_OLD_TTY
From: |
Christian Weisgerber |
Subject: |
_nc_baudrate() bug; phase out USE_OLD_TTY |
Date: |
Mon, 9 Dec 2013 16:29:44 +0100 |
User-agent: |
Mutt/1.5.22 (2013-10-16) |
Hi,
1. There is a typo in _nc_baudrate().
2. I suggest to remove the USE_OLD_TTY hack for OpenBSD. I'm working
on removing the last remains of the 4.3BSD tty system from OpenBSD,
so this hack will stop working in the future.
In fact, I think consideration should be given to retiring this
hack completely. Yes, it means ospeed should move to int on these
platforms.
--- ncurses/tinfo/lib_baudrate.c.orig 2010-12-19 02:50:50.000000000 +0100
+++ ncurses/tinfo/lib_baudrate.c 2013-12-09 16:09:54.000000000 +0100
@@ -49,7 +49,7 @@
* of the indices up to B115200 fit nicely in a 'short', allowing us to retain
* ospeed's type for compatibility.
*/
-#if (defined(__FreeBSD__) && (__FreeBSD_version < 700000)) ||
defined(__NetBSD__) || defined(__OpenBSD__)
+#if (defined(__FreeBSD__) && (__FreeBSD_version < 700000)) ||
defined(__NetBSD__)
#undef B0
#undef B50
#undef B75
@@ -167,7 +167,7 @@ _nc_baudrate(int OSpeed)
}
}
#if !USE_REENTRANT
- if (OSpeed == last_OSpeed) {
+ if (OSpeed != last_OSpeed) {
last_OSpeed = OSpeed;
last_baudrate = result;
}
--
Christian "naddy" Weisgerber address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- _nc_baudrate() bug; phase out USE_OLD_TTY,
Christian Weisgerber <=