Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!oliveb!sun!gorodish!guy From: guy@gorodish.Sun.COM (Guy Harris) Newsgroups: comp.unix.wizards Subject: Re: Parity on 4.x BSD UNIX ports Message-ID: <49665@sun.uucp> Date: 15 Apr 88 05:43:56 GMT References: <12952@brl-adm.ARPA> <11057@mimsy.UUCP> <49535@sun.uucp> <11065@mimsy.UUCP> Sender: news@sun.uucp Lines: 38 > >>... Berkeley CSRG are working on a POSIX-like tty interface [me] > > >I presume it's POSIX-compatible, not just "POSIX-like". [guy] > > I said `POSIX-like' because, strictly speaking, POSIX does not exist > yet. True. Unfortunately, "POSIX-like" may connote "we've lifted some ideas from POSIX, but we have no committment to make it particularly look like POSIX" rather than "we'll try our best to make it look like POSIX"; I believe the latter is what was intended. (The same problem exists with "UNIX-like", a term that is much overused, especially when used to refer to systems derived from AT&T code....) > >Actually, we'll provide it with SunOS 4.0. ... > >Basically, output is never stripped to 7 bits by the software; the only such > >stripping is done by the hardware if you set the character width to 7 bits. > > There is some confusion here when you get to simplistic hardware that > does not do parity at all. In that case I would assume the software > will emulate the nonexistent hardware stripping. (Actually, if you set > the `device' to 7 bits, no parity, the driver is obliged to fake up a > parity bit [1 or 0, I forget] to emulate a stop bit, given the lack of > anything better, on such hardware. Fortunately, we have no such > hardware around here ... Are you certain? The 4.3BSD VAX "vax/cons.c" console driver does use "partab" when transmitting to the console. "partab" dates back to the aforementioned flavor of hardware, namely various DL-11 flavors on PDP-11 UNIX. Actually, what I should have said is "output is never stripped to 7 bits by the line discipline; the only such stripping is done by the hardware or the low-level device driver if you set the character width to 7 bits." If you have hardware that doesn't do parity generation or checking, the driver would do the former (and perhaps the latter, if anybody cares) and present to the line discipline the appearance of a device that does it. ("line discipline" refers, in systems such as SunOS 4.0 that use streams for the tty subsystem, to the streams module that performs the functions of a line discipline in systems that don't use streams for the tty subsystem.)