Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jan 2002 20:40:42 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Ruslan Ermilov <ru@FreeBSD.org>
Cc:        "Andrey A. Chernov" <ache@nagual.pp.ru>, "Bruce A. Mah" <bmah@FreeBSD.org>, Murray Stokely <murray.stokely@windriver.com>, <cvs-committers@FreeBSD.org>, <cvs-all@FreeBSD.org>
Subject:   Re: cvs commit: src/contrib/ncurses/ncurses/tinfo lib_baudrate.c
Message-ID:  <20020115202442.X690-100000@gamplex.bde.org>
In-Reply-To: <20020114200844.C68211@sunbay.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 14 Jan 2002, Ruslan Ermilov wrote:

> On Mon, Jan 14, 2002 at 09:02:19PM +0300, Andrey A. Chernov wrote:
> > ospeed termcap variable value calculation was wrong for *BSD, so any
> > termcap capability which have delay, like xx=<some number>..., may produce
> > wrong delay, too big or too small.
> >
> Wow!  This was indeed important to fix.
>
> Could you please tell me how exactly it was broken?

I'm not sure if this is imporant or urgent :-), since it has been broken
for more than 2 years without causing many problems.  Andrey originally
fixed it more than 6 years ago in:

RCS file: /home/ncvs/src/lib/libtermcap/Attic/tospeed.c,v
Working file: tospeed.c
head: 1.3
...
----------------------------
revision 1.1
date: 1995/08/04 06:39:55;  author: ache;  state: Exp;
Add non-standard function: _set_ospeed(speed)
Basically all termios+termcap pgms needs it.
It set ospeed variable using nearest-matched stty speeds,
which helps termcap pgms works with non-fixed termios speeds
and not duplicate ospeed switch into every pgm.
Also it isn't standard function, its source code is too big to include it
in whole to every termcap+termios pgm.
=============================================================================

The fixed ncurses version is still inferior to this, since it requires
an exact match.  _nc_ospeed() converts all unknown speeds to 1 (equivalant
to 50 bps), while _set_ospeed() converts to the encoded value of a nearby
speed (e.g., 76800 gets converted to the USE_OLD_TTY value of either
B57600 (16) or B115200 (17)).

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020115202442.X690-100000>