Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!husc6!rice!sun-spots-request From: auspex!guy@uunet.uu.net (Guy Harris) Newsgroups: comp.sys.sun Subject: Re: Epson printers on the Sun Message-ID: <780@auspex.UUCP> Date: 3 Jan 89 18:21:56 GMT References: <8812141239.AA04837@uk.ac.oxford.robots> Sender: usenet@rice.edu Organization: Sun-Spots Lines: 31 Approved: Sun-Spots@rice.edu Original-Date: 22 Dec 88 07:45:40 GMT X-Sun-Spots-Digest: Volume 7, Issue 85, message 4 of 14 >The downside is that we cannot now use 8-bit (RAW mode) communications >which makes graphics a bit trickier. One day, I'll get round to >writing a filter which sets the interface in RAW mode and handles >XON/XOFF coming from the printer, but never meddles with any character >going out. Why can't the UNIX tty driver provide such an environment? >Surely it must be useful in other circumstances. It is useful. In fact, it's so useful that Berkeley implemented it somewhere between 4.1BSD and 4.2BSD (and, in 4.3BSD, got rid of the bug that required you to do an extra "ioctl"). It's supported in all SunOS releases that I know of (*sans* the bug in question). See the LITOUT mode in TTY(4) (releases up to but not including 4.0), or either the LITOUT mode in TTCOMPAT(4M) or a variety of modes in TERMIO(4) (4.0 and later). LITOUT gives you a full 8-bit output data path, and performs no processing on output whatsoever (no tab expansion, no NL->CR/LF mapping, no nothing). It does not, however, turn XON/XOFF processing off. It's one of the "local mode bits", so it should be set with the "xc" capability in "/etc/printcap" (see PRINTCAP(5)). In 4.0, the "mc" capability in "/etc/printcap" permits you to set the modes without having to look up (or, haha, remember) what the octal values for the various bits are; you can give an "stty"-like specification for the modes. If you set "cs8" and clear "parenb", you will get 8 bits and no parity bit on output; if you set "ixon", you will get XON/XOFF flow control. You will, unless you turn "opost" off, get output processing performed (tab expansion, etc.). Or, if you just want LITOUT, say "litout" and be done with it.