Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!wuarchive!texbell!sugar!ficc!peter From: peter@ficc.uu.net (Peter da Silva) Newsgroups: comp.unix.questions Subject: Re: TERMINFO to TERMCAP conversion. Message-ID: Date: 9 Apr 90 16:03:19 GMT References: <9237@cbnewsh.ATT.COM> <461@svcs1.UUCP> <12538@smoke.BRL.MIL> Reply-To: peter@ficc.uu.net (Peter da Silva) Organization: Xenix Support, FICC Lines: 62 In article <12538@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn) writes: > Wrong. Mark Horton was motivated to develop terminfo primarily because > the structure of termcap was too restrictive for many attributes of > modern terminals. Problems included: > - 1024 characters are not enough for a complete description That limit could have been changed without doing a complete redesign. An evolutionary change. > - parsing the huge database was taking too long That's an implementation detail. Set up an index file, or use the TERMCAP environment variable (which is even more flexible). An evolutionary change. > - some cursor positioning sequences require programmable logic That could have been fixed by updating "cm" or adding a "cp". Again, an evolutionary change. > - some capabilities require more than two parameters Again, an evolutionary change. Create a "tgoto3", or a "tgotof". > - the 2-letter capability names are getting quite strained My own implementation of termcap for CP/M didn't have this limitation. This could have been an evolutionary change. > No, when multiple agents try to add their own termcap extensions, they > usually end up stepping on each other. This is a problem whenever people share a namespace. But it's better than not having the option at all. Better to just expand the namespace. > >Recently I used this to good advantage to add a "meta-key" field for > >the use of Emacs here... > Of course what you should have done is use the official termcap > capability for this. Which is not documented in our manual. And if I needed a new capability not in our terminfo I'd be out of luck. Besides, *your* meta_off and meta_on fields (which I just found in our System V manual) don't serve the purpose of the meta_prefix entry I need. Both sets of terminals we have here have a meta-key, on the TVI-950 it's called "func" and acts like a shift key, sending "^A?^M" (Where ? is the key hit while FUNC is depressed). On the AT keyboards it's called ALT and sends "^[n?" (Again, ? is the key hit while ALT is depressed). How do I support that in terminfo? In termcap I just defined a "KM" string that used a percent-sign to stand for the special character. > >Termcap could have been updated with all the features and performance > >advantages of terminfo, and without confusing the world by creating t[w]o > >partially-compatible standards. > The database parsing issue is the one thing I don't see how you could > fix using compatible extensions to termcap. Set up an index file, that you rehash whenever you change it. This is a solved problem. -- _--_|\ `-_-' Peter da Silva. +1 713 274 5180. . / \ 'U` \_.--._/ v