termcap vs terminfo
Posted in 1992
Path: emory!wupost!uunet!mcsun!uknet!vision!chris From: chris@visionware.co.uk (Chris Davies) Newsgroups: comp.databases.informix Message-ID: <1992Feb6.164107.6727@visionware.co.uk> Date: 6 Feb 92 16:41:07 GMT Sender: chris@visionware.co.uk (Chris Davies) Organization: VisionWare Ltd., Leeds, UK I don't know about the rest of you, but I've been finding it a pain that Informix products appear to use (their own) termcap file in preference to the terminfo stuff that AT&T Sys V.3 Unix supplies. Until now this has meant that we've had to supply/create both terminfo and termcap entries for our terminals... ugh. Finally I came up with this little cludge which I thought you might liek to share. Basically it takes your current terminfo values and munges them on the fly to produce a termcap entry specific to your terminal type... It assumes that you've got the 'infocmp' command (not all SysV.3 machines appear to have this, unfortunately), and that your terminal type is a valid one (eg xterm :-) # # Munge any current TERM setting to a TERMCAP equivalent # TERMCAP=` infocmp -C | sed -e 's/^\\([^|]*\\)|[^:]*/\\1|\\1/' -e 's/^[@]//' -e 's/:\\\\[@]*$//' | tr -d '\\012' echo ` The @ symbols should each be replaced with both a tab and a space. If you want an explanation of how it works, do email me; I'll post a reply if there are lots of you! Chris -- VISIONWARE LTD, 57 Cardigan Lane, LEEDS LS4 2LE, England Tel +44 532 788858 x238. Fax +44 532 304676. Email chris@visionware.co.uk ------------ "VisionWare: The home of DOS/SQL/UNIX/X integration" -----------