captoinfo Command

Purpose

Converts a termcap file to a terminfo descriptor file.

Syntax

captoinfo [ -wNumber ] [ -v ] [ -V ] [ -1 ] [ FileName...]

Description

The captoinfo command converts a termcap source file to a terminfo source file and displays it on the screen. The termcap file format is an older format. The termcap and terminfo files differ mainly in the capability names and the entry syntax. Therefore, the captoinfo command only makes the syntactical transformations and vocabulary substitutions. The command also strips obsolete termcap capabilities such as nc, and 2-character termcap names like D3.

By default, the captoinfo command converts the termcap description for the terminal specified by the TERM environment variable. The command reads the description of the terminal from the /etc/termcap file and outputs a terminfo-style description. If you specify the Filename parameter, the command converts all the descriptions in the file to terminfo format.

You can redirect the output of the captoinfo command to a file.

Flags

Item Description
-v Turns on the verbose mode.
-V Displays the version number.
-wNumber Defines the line width of the terminfo entry. The captoinfo command fits as many terminfo fields in this width as is possible on the output line. A terminfo field consists of a capability name and a corresponding value. If you specify the -w flag, you must specify a Number parameter. By default, the line width is 60.
Notes:
  1. If the width you specify is too small to contain even one field, the command displays one field per line.
  2. If the width you specify is zero or negative, the line width will be set to 60.
-1 Displays one terminfo field per line.

Examples

  1. To convert the termcap file Wyse50.tc to a terminfo file and see the results on the display, enter:
    captoinfo   Wyse50.tc
  2. To convert the termcap file Wyse50.tc to a terminfo file and save the results, enter:
    captoinfo   Wyse50.tc   >   Wyse50.ti 
  3. To display one terminfo field per line and see more information, enter:
    captoinfo   -1   -v   Wyse50.tc
  4. To produce a terminfo description of an ibm3101 terminal defined by the TERM environment variable, enter:
    captoinfo -w 40
    The captoinfo command converts the ibm3101 description in the /etc/termcap file into a terminfo description and produces a description with a 40 character width. The output of the command is similar to the following:
    ibm|ibm3101|3101|i3101|IBM 3101-10,
             am, xon,
             cols#80, lines#24,
             bel=^G, clear=\EK, cr=\r, cub1=\b,
             cud1=\n, cuf1=\EC,
             cup=\EY%p1%'\s'%+%c%p2%'\s'%+%c,
             cuu1=\EA, ed=\EJ, el=\EI,
             home=\EH, ht=\t, ind=\n,
             kcub1=\ED, kcud1=\EB, kcuf1=\EC,
             kcuu1=\EA,