Cover V01, I04
Article
Sidebar 1
Sidebar 2

nov92.tar


Sidebar: A terminfo Printer Definition

The following is the output of the command infocmp p1000 performed after installing the printer's terminfo file using the tic command. infocmp takes the compiled definition from the file it names in a comment (the line beginning with a "#" symbol) and then outputs the definitions in the three groups (booleans, numbers, strings) sorted by name. It puts as many items of the same group on a line as it can without making the lines too long; it will not, however, break up a long line, such as the cpi and lpi definitions below. The meanings of the terminfo names can be found in the terminfo(4) man page.

In the source file given to tic, control characters are designated by using a caret "^" followed by the corresponding printable character, not by using the actual control character. The simplest way to find out what printable character corresponds with the control character is to find the control character on an ASCII chart with 16-row layout. Since the corresponding printable character is always 64 positions after the control character, just move four columns to the right in the same row. Thus, the BEL character corresponds to the ^G, since "G" is four columns to the right. The DEL character is ^? since if you count four columns to the right on a 128-character ASCII chart, you would wrap around immediately to begin again with the leftmost column.

#   Reconstructed via infocmp from file:/usr/share/lib/terminfo/p/p1000
p1000|pana|panaprinter|Panasonic KX-P1000,
cpix, hc, msgr, os,
bufsz#1024, cols#80, cps#120, it#8, lines#66,
npins#9, orc#10, orhi#120, orl#12, orvi#72,
spinh#120, spinv#72,
bel=^G, bold=\Ee,
cpi=%?%p1%{10}%=%t\Ew0%e%p1%{12}%=%t\Ew1%e%p1%{15}%=%t\Ew2%e%p1%{17}%=%t\Ew3%;,
cr=\r, cub1=\b, cud1=\n, cuf1=\s, ff=\f, ht=\t,
is1=^Q^X, is2=\E@\Ex0\EF\E-0\EH\ET\EW0\E5,

lpi=%?%p1{2}%=%t\EA$%e%p1{3}%=%t\EA^X%e%p1{4}%=%t\EA^R%e%p1{6}%=%t\EA\f%e%p1{8}%=%t
\EA\t%e%
p1{12}%=%t\EA^F%;,
mc4=^S, mc5=^Q, ritm=\E5, rmul=\E-0, rshm=\EH,
rsubm=\ET, rsupm=\ET, rwidm=\EW0, scs=\Em%?%p1%d,
sdrfq=\Ex0, sgr0=\EF\E-0\EH\ET\EW0\E5, sitm=\E4,
slines=\EC%p1%d, smglp=\EL%p1%d, smgrp=\EQ%p1%d,
smul=\E-1, snlq=\Ex1, snrmq=\Ex0, sshm=\EG,
ssubm=\ES1, ssupm=\ES0, swidm=\EW1