From owner-cvs-all Tue Jan 15 1:39:45 2002 Delivered-To: cvs-all@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id A5F5437B420; Tue, 15 Jan 2002 01:39:38 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id UAA09836; Tue, 15 Jan 2002 20:39:34 +1100 Date: Tue, 15 Jan 2002 20:40:42 +1100 (EST) From: Bruce Evans X-X-Sender: To: Ruslan Ermilov Cc: "Andrey A. Chernov" , "Bruce A. Mah" , Murray Stokely , , Subject: Re: cvs commit: src/contrib/ncurses/ncurses/tinfo lib_baudrate.c In-Reply-To: <20020114200844.C68211@sunbay.com> Message-ID: <20020115202442.X690-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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=..., 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