Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site umd5.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!umcp-cs!cvl!umd5!zben From: zben@umd5.UUCP Newsgroups: net.unix,net.unix-wizards Subject: Re: curses Message-ID: <571@umd5.UUCP> Date: Wed, 12-Jun-85 08:07:53 EDT Article-I.D.: umd5.571 Posted: Wed Jun 12 08:07:53 1985 Date-Received: Sun, 16-Jun-85 07:22:29 EDT References: <427@mmintl.UUCP> <505@dicomed.UUCP> Reply-To: zben@umd5.UUCP (Ben Cranston) Organization: U of Md, CSC, College Park, Md Lines: 42 Xref: linus net.unix:4223 net.unix-wizards:10716 Summary: Curses does not support *input* translation I posted flames on the same point. Curses does not support input translation. Instead, there is a terminal-independant input language for each of the Unix screen editors. While this setup may have some merit (once you learn it you can use any available terminal) I have a Pascal screen editor that I run on Univac 1100 and IBM 370 systems that I would like to also support Unix. This screen editor operates by catching the keystrokes and updating an incore image of the current screen. Thus, it MUST know what each keystroke is doing to the screen... The amount of brain damage out there in the terminal world is enormous. There are dozens of cursor addressing schemes, at least three ways of doing carriage return/line feed, and several ways of insert/delete character/line schemes. Without knowing any better, I had coded a separate handler procedure for each different type of terminal. Each is only one or two pages, but at this point my terminal handlers are bigger than the rest of the editor! I would really like to move in the direction of terminal capabilities database, but on input there are some real sticky questions. For example, when you are in column one, what does a left arrow do? On many terminals it does nothing, on many more it goes to column 80 of the previous line, on some it goes to column 80 of the SAME line. What does an up arrow do on line one? Unix finesses all these questions by refusing to echo the character in these situations. On mainframes without smart echo, one does not have that handy copout. Thus, in addition to the simple question of what code does each key generate, these little quirks must all be represented in the database. One additional example. On many terminals, when you do an insert-line operation, the cursor is left wherever it was. But, on the Heathkit, the cursor is returned to column one! If you REALLY want to see some brain- damage, look at the insert mode on the Datamedia 2000/3000 line. The one example I have seen this done really well on is the Series/1 front end for IBM 370 machines. This software talks to your cheap ASCII terminal and presents a 3270 interface to the mainframe. Basically replaces one brain-damaged terminal with another, i.e. attributes eat a screen posn etc. Putting in a new terminal requires building a bunch of character lookup tables, however, and reassembling the program, so its not quite as nice as being database-based. -- Ben Cranston ...{seismo!umcp-cs,ihnp4!rlgvax}!cvl!umd5!zben zben@umd2.ARPA