Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site cbosgd.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!whuxlm!whuxl!houxm!ihnp4!cbosgd!mark From: mark@cbosgd.UUCP (Mark Horton) Newsgroups: net.info-terms Subject: Re: autowrapping terminals Message-ID: <436@cbosgd.UUCP> Date: Tue, 23-Oct-84 12:46:01 EDT Article-I.D.: cbosgd.436 Posted: Tue Oct 23 12:46:01 1984 Date-Received: Fri, 26-Oct-84 09:22:30 EDT References: <459@uwvax.UUCP> Reply-To: mark@cbpavo.UUCP (Mark Horton) Organization: Bell Labs, Columbus Lines: 48 Summary: the real story on the eat newline glitch What an amazing amount of information and misinformation! Here's the real story. From termcap and terminfo's point of view, there are three ways that terminals wrap. (1) Auto-margins. When you pass column 80 (or cols, actually) the cursor goes back to the beginning of the next line. This scrolls the terminal if you're on the bottom line. This terminal has am. (2) No auto-margins. The cursor hammers on the right margin no matter how much you output. This terminal has neither am nor xenl. This includes the VT100 with the auto-newline flag clear (e.g. vt100-nam). (3) Eat-newline-glitch. This includes the Concept 100, Concept 108, and the VT100 when the auto-newline flag is set (vt100-am.) On this terminal, when you output something in column 80, it goes into a funny state, and if you output a CRLF immediately it eats the CRLF and otherwise acts like (1). If you do anything else while in this state, the action is undefined. (In particular, the Concepts put the cursor on the next line while in this state, the VT100 leaves it on the previous line.) Such terminals have am and xenl (that's am and xn on termcap.) As far as I know, the SVR2 manual page is correct. The Concepts also have in, but that's a different glitch. Strictly speaking, this isn't quite true - the VT100 does not clear the funny state until you actually send it a printing character, so if you do certain things (e.g. go to col 80 of the NEXT line and output a char) you get weird behavior. I don't know how to get around this problem. Some VT100 clones have xenl, some don't. As far as I know, the Datamedia version is a perfect clone except that it is said to need less padding. As to people who want a 99% solution with 10% of the code, I wish you the best of luck. Curses one problem is that the code is rather large, around 30K. I don't recommend running my version on a 16 bit machine. However, the great majority of applications run on 32 bit machines these days and 30K is no big deal. For those of you running on, say, an IBM PC, there is nothing to prevent a special purpose back end from being written that has the same function call interface as curses but only works on the PC screen - it could be very small and simple. Doug Gwyn points out that if you have a VT100 with the auto-newline flag set, and use TERM=vt100-nam, things work. I have not tried this but it seems like it should work. Mark Horton