Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ll-xn!ames!ptsfa!ihnp4!pegasus!hansen From: hansen@pegasus.UUCP (Tony L. Hansen) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: Re: terminfo .vs. termcap Message-ID: <2956@pegasus.UUCP> Date: Wed, 18-Mar-87 14:16:17 EST Article-I.D.: pegasus.2956 Posted: Wed Mar 18 14:16:17 1987 Date-Received: Fri, 20-Mar-87 01:42:53 EST References: <272@dlcdev.UUCP> Reply-To: hansen@pegasus.UUCP (60021254-Tony L. Hansen;LZ 3B-315;6243) Organization: AT&T-IS Labs, Lincroft, NJ Lines: 54 Keywords: terminfo, termcap Summary: use 'infocmp -C' Xref: mnetor comp.unix.questions:1498 comp.unix.wizards:1514 Time to put in another plug for the AT&T UNIX Toolchest. (Just call 1-201-522-6900 and login as "guest" [there is no passwd] to browse through the Toolchest.) Within it you will find a program, cheap, named "infocmp". Among the options, you will find "-C", which converts a terminfo entry into termcap format. You'd be hard pressed to do a better job by hand. The infocmp program is included with System V release 3, but you must go to the Toolchest if you want to get it without Vr3. Tony Hansen ihnp4!pegasus!hansen The man page says this: The source produced by the -C option may be used directly as a termcap entry, but not all of the parameterized strings may be changed to the termcap format. infocmp will attempt to convert most of the parameterized information, but that which it doesn't will be plainly marked in the output and commented out. These should be edited by hand. All padding information for strings will be collected together and placed at the beginning of the string where termcap expects it. Mandatory padding (padding information with a trailing '/') will become optional. All termcap variables no longer supported by terminfo(4), but which are derivable from other terminfo(4) variables, will be output. Not all terminfo(4) capabilities will be translated; only those variables which were part of termcap will normally be output. Specifying the -r option will take off this restriction, allowing all capabilities to be output in termcap form. Note that because padding is collected to the beginning of the capability, not all capabilities are output, mandatory padding is not supported, and termcap strings were not as flexible, it is not always possible to convert a terminfo(4) string capability into an equivalent termcap format. Not all of these strings will be able to be converted. A subsequent conversion of the termcap file back into terminfo(4) format will not necessarily reproduce the original terminfo(4) source. Some common terminfo parameter sequences, their termcap equivalents, and some terminal types which commonly have such sequences, are: Terminfo Termcap Representative Terminals %p1%c %. adm %p1%d %d HP, ANSI standard, vt100 %p1%'x'%+%c %+x concept %i %i ANSI standard, vt100 %p1%?%'x'%>%t%p1%'y'%+%; %>xy concept %p2 is printed before %p1 %r hp