Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!sdd.hp.com!spool.mu.edu!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!hp4nl!ahds!dick From: dick@ahds.UUCP (Dick Heijne CCS/TS) Newsgroups: comp.unix.programmer Subject: Re: termcap str + params -> control seq. How? Message-ID: <1938@ahds.UUCP> Date: 9 Apr 91 17:22:10 GMT References: <577@bria> <1931@ahds.UUCP> <4797@cernvax.cern.ch> <7068@auspex.auspex.com> Organization: Ahold NV, Zaandam, Netherlands, EEC Lines: 37 In article <7068@auspex.auspex.com>, guy@auspex.auspex.com (Guy Harris) writes: > ("terminfo", of course, already has an equivalent capability, namely > "cuf".) You're absolutely right, but what if neither package covers your needs? The reason I decided to stick to termcap rather than terminfo was, that I had to write an alternative to curses, since the applications run on many different terminals, and also terminals with a specific emulation (i.e. vt220 or wyse50) from many different manufacturers, so all with different labels on the keyboard and sometimes with totally different keyboards. So, I added not only new entries but also new capabilities, by introducing a new type, i.e. the '%|' type. An example of such an entry is: :NX=\E[6~%|Next Scrn: which means that the logical "Next Screen" function is performed by the key that sends the \E[6~ sequence, and is labeled with the text Next Scrn. On the product of another manufacturer the text can be different or the sent sequence or both. The program, however only looks for the NX entry in order to perform its LOGICAL Next Screen function. This also worked out to be very useful in generating Help screens, which all show now the logical function of the specific application, next to the label of the button on the keyboard. And that is what they should display. This way, we ended up to remain totally independend of the creative minds of the various terminal manufacturers. As you notice I created lots of logical functions next to the physical ones in termcap. This ended out much more practical in programming applications. You can think of it what you like, but my programmers AND end-users like the results of it very much. All of this is absolutely impossible in terminfo. I hope I made myself a bit more clear. Regards, Dick.