Message-ID: <bnews.cornell.3348> Newsgroups: net.general Path: utzoo!decvax!harpo!floyd!vax135!cornell!pavel X-Path: utzoo!decvax!harpo!floyd!vax135!cornell!pavel From: cornell!pavel Date: Sun Jul 11 03:55:13 1982 Subject: New Curses/Terminfo Package Posted: Sat Jul 10 15:10:14 1982 Received: Sun Jul 11 03:55:13 1982 At this past week's USENIX meeting, Mark Horton announced the completion of a replacement database/interface for the Berkeley 'termcap' setup. The new version is called 'terminfo' and has several advantages over termcap: - The database is compiled and therefore start-up time for programs using the package is considerably reduced, even faster than reading a single-entry termcap database. - The database is more human-readable and flexible. - Many more terminals can be supported due to the addition of several new capabilities, generalised parameter mechanisms (enabling the full use of, for example, the ANSI cursor-forward capability by allowing you to say 'move forward 35 spaces' as opposed to 'move forward' 35 times), a fully general yet efficient arithmetic mechanism which should allow the use of \any/ bizarre cursor-addressing scheme which can be computed, etc. - A \far/ better set of routines for accessing the database, requiring, for example, only a single call to read in an entire entry, making all of the terminal's capabilities fully available to the calling program. No more need for 'tgetent', 'tgetstr', etc. Conversion of existing programs from termcap to terminfo is very easy and usually consists mostly of throwing out all of the garbage needed to read and store a termcap entry. As a companion to the change to terminfo, Mark has also completed work on a re-vamped version of the Curses screen-handling library package. The new version has many, many advantages over the previous version, some of which are listed below: - New curses can use insert/delete line/character capabilities in terminals which have them, considerably speeding up many applications - It is possible to use the new curses on more than one type of terminal at once - All of the video attributes of a terminal (e.g. reverse video, boldface, blinking, etc.) can be used, in tandem if possible - New curses handles terminals like the Televideos with the so-called 'magic cookie' glitch which leaves markers on the screen for each change of video attributes - The arrow and function keys of terminals can be input just as though they were single characters, even on terminals which use multi-character sequences for these functions. The new curses does all necessary interpretation, passing back to the program only a defined constant telling which key was pressed. - There is a user-accessable scrolling region - The use of shell escapes and the csh ^Z job control feature is supported more fully - On systems which can support the notion, updates of the screen will abort if a character is typed at the keyboard, thus allowing the application to possibly avoid useless output - It should now be possible for most programs to be written very portably to run on most versions of UNIX, including System III, Berkeley UNIX, V7, Bell Labs internal UNIX, etc. This portability extends to the use of most terminal modes, such as raw mode, echoing, etc. Now for the bad news. Mark, being an employee of Bell Labs, cannot release any of his code. Estimates currently run as high as 18 months for a Bell release. Even then, nothing could be guaranteed as to its price. As a result, I have decided to do a public-domain implementation of both terminfo and the new curses. They will be compatible with Mark's versions. I have arranged for the library/database to be distributed with the next Berkeley Software Distribution, 4.2BSD, in December of this year. It will also be made available for free to any requestor. I agree with Mark when he says that terminfo is clearly superior to termcap and deserves to be made a new and lasting standard. I expect to be able to begin recruiting test sites for both curses and terminfo by the end of September. If you have any questions, comments or suggestions, please send them to me, not the network. Pavel Curtis {decvax,allegra,vax135,harpo,...}!cornell!pavel Pavel.Cornell@Udel-Relay
Message-ID: <bnews.cornell.3635> Newsgroups: net.unix-wizards Path: utzoo!decvax!harpo!floyd!vax135!cornell!pavel X-Path: utzoo!decvax!harpo!floyd!vax135!cornell!pavel From: cornell!pavel Date: Mon Oct 25 01:49:55 1982 Subject: Curses/Terminfo Public Domain Test Release Posted: Sun Oct 24 13:57:33 1982 Received: Mon Oct 25 01:49:55 1982 From floyd!trb Sun Oct 24 09:25:35 1982 To: cbosgd!mark cornell!pavel harpo!ihps3!ihuxx!ignatz Subject: curses At the last usenix, cornell!pavel (or someone at cornell) claimed that they were going to write a public domain curses that was compatible with Mark's. What's up? Andy What an interesting coincidence. It was only yesterday that I finished the documentation for the first test release of my package. I am now seeking test sites and would be glad to send you a copy, Andy. The following caveats are in order, however, wrt to this preliminary release: 1) The package has not yet been tuned or profiled. As a result, it runs about 50-75% slower than the old package. It also does not yet have any register variables, a marvelous source of speed. 2) The backbone of the redisplay algorithm is in fine shape, but the lowest-level routines still do some dumb things. Also, I have not yet hacked it to make use of all of the really obscure features available (such as scrolling a dumb terminal to achieve a limited delete-line capability). The update module is due to be redone (to take advantage of hard-won wisdom) before the final release. 3) Three of the features documented in the paper Mark gave at USENIX are not yet supported, pending the rewrite of the update module. They are: a. The 'Typeahead Check' which aborts a refresh() if a character is typed at the keyboard. This is to allow programs the option of not producing a lot of useless output (have you ever hit ^F^F^F^F in vi and then waited for a while for it to catch up? b. The MINICURSES subset feature, allowing the user to only bring in a very small portion of the package if they have no need of the multi-windowing and fancy keyboard input facilities. c. Support for terminals with the so-called 'magic-cookie' glitch, wherein changes of video attributes leave one or more blank-like special characters on the screen. All of these features are fairly easy to provide and will appear in the final release. Compatibility with Mark's package is, obviously, fairly difficult to guarantee, considering that he and I have an ocean of lawyers betwixt us. However, the paper given out at the conference really contained a great amount of information, yielding a pretty coherent picture of what kinds of extensions had been made. At the very least, my package jibes with the info in that paper and with the old package. The final release of the public-domain package will be timed to coincide with the final 'freeze' on code to appear in the 4.2BSD release, at which time I will make a grand and wonderful announcement on USENET and Unix-Wizards. Before that, though, I would be happy to send tapes to anyone who is willing to run it. I really can't afford to just send out tapes, being a lowly grad-student, but if folks are willing to send me tapes of their own, I will tar it off and send it back. Please send tapes to Pavel Curtis Computer Science Dept. 405 Upson Hall Cornell University Ithaca, NY 14853 Ph- (607) 256-4934 If you do send me a tape, please also send me net-mail to warn me about it. I do so hate surprises. Pavel