Converts a termcap file to a terminfo descriptor file.
captoinfo [ -wNumber ] [ -v ] [ -V ] [ -1 ] [ FileName...]
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.
Notes:
-1 | Displays one terminfo field per line. |
captoinfo Wyse50.tc
captoinfo Wyse50.tc > Wyse50.ti
captoinfo -1 -v Wyse50.tc
captoinfo -w 40The 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,
The terminfo file format.
The Curses Overview for Programming in AIX General Programming Concepts: Writing and Debugging Programs.