1*7c478bd9Sstevel@tonic-gate# Copyright 1989 Sun Microsystems, Inc.  All rights reserved.
2*7c478bd9Sstevel@tonic-gate# Use is subject to license terms.
3*7c478bd9Sstevel@tonic-gate
4*7c478bd9Sstevel@tonic-gate# Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
5*7c478bd9Sstevel@tonic-gate# All Rights Reserved
6*7c478bd9Sstevel@tonic-gate
7*7c478bd9Sstevel@tonic-gate# Portions of this source code were derived from Berkeley 4.3 BSD
8*7c478bd9Sstevel@tonic-gate# under license from the Regents of the University of California.
9*7c478bd9Sstevel@tonic-gate
10*7c478bd9Sstevel@tonic-gate#ident	"%Z%%M%	%I%	%E% SMI"
11*7c478bd9Sstevel@tonic-gate
12*7c478bd9Sstevel@tonic-gateDescription of terminal tables for new nroff:
13*7c478bd9Sstevel@tonic-gate(In the following description, "white space" means any combination
14*7c478bd9Sstevel@tonic-gateof spaces, tabs and new-lines).
15*7c478bd9Sstevel@tonic-gate
16*7c478bd9Sstevel@tonic-gateThe first line should contain the name of the terminal -- just a string,
17*7c478bd9Sstevel@tonic-gatebut with no embedded white space.
18*7c478bd9Sstevel@tonic-gate
19*7c478bd9Sstevel@tonic-gateThis is followed by a table of 25 lines (defining the first 25 items
20*7c478bd9Sstevel@tonic-gatein struct t, laid out in tw.h):
21*7c478bd9Sstevel@tonic-gate
22*7c478bd9Sstevel@tonic-gate	bset	[integer]	/*bits that must be set for printing*/
23*7c478bd9Sstevel@tonic-gate	breset	[integer]	/*bits that must be reset for printing*/
24*7c478bd9Sstevel@tonic-gate	Hor	[integer]	/*size of unit of horizontal motion*/
25*7c478bd9Sstevel@tonic-gate	Vert	[integer]	/*size of unit of vertical motion*/
26*7c478bd9Sstevel@tonic-gate	Newline	[integer]	/*size of line of vertical motion*/
27*7c478bd9Sstevel@tonic-gate	Char	[integer]	/*size of character horizontally*/
28*7c478bd9Sstevel@tonic-gate	Em	[integer]	/*size of Em of horizontal motion*/
29*7c478bd9Sstevel@tonic-gate	Halfline [integer]	/*size of half line of vertical motion*/
30*7c478bd9Sstevel@tonic-gate	Adj	[integer]	/*horizontal resolution*/
31*7c478bd9Sstevel@tonic-gate	twinit	[string]	/*sequence to initialize terminal*/
32*7c478bd9Sstevel@tonic-gate	twrest	[string]	/*sequence to restore terminal*/
33*7c478bd9Sstevel@tonic-gate	twnl	[string]	/*sequence to print newline*/
34*7c478bd9Sstevel@tonic-gate	hlr	[string]	/*sequence for half-line reverse*/
35*7c478bd9Sstevel@tonic-gate	hlf	[string]	/*sequence for half-line forward*/
36*7c478bd9Sstevel@tonic-gate	flr	[string]	/*sequence for full-line reverse*/
37*7c478bd9Sstevel@tonic-gate	bdon	[string]	/*sequence to turn on bold*/
38*7c478bd9Sstevel@tonic-gate	bdoff	[string]	/*sequence to turn off bold*/
39*7c478bd9Sstevel@tonic-gate	iton	[string]	/*sequence to turn on italic*/
40*7c478bd9Sstevel@tonic-gate	itoff	[string]	/*sequence to turn off italic*/
41*7c478bd9Sstevel@tonic-gate	ploton	[string]	/*sequence to enter plot mode*/
42*7c478bd9Sstevel@tonic-gate	plotoff	[string]	/*sequence to leave plot mode*/
43*7c478bd9Sstevel@tonic-gate	up	[string]	/*sequence to move up 1 space in plot mode*/
44*7c478bd9Sstevel@tonic-gate	down	[string]	/*sequence to move down 1 space in plot mode*/
45*7c478bd9Sstevel@tonic-gate	right	[string]	/*sequence to move right 1 space in plot mode*/
46*7c478bd9Sstevel@tonic-gate	left	[string]	/*sequence to move left 1 space in plot mode*/
47*7c478bd9Sstevel@tonic-gate
48*7c478bd9Sstevel@tonic-gateThis table is fixed format, and the order cannot be changed.
49*7c478bd9Sstevel@tonic-gateEntries should be on separate lines, and should contain exactly
50*7c478bd9Sstevel@tonic-gatetwo fields (N.B. the comment should be omitted) separated by white space.
51*7c478bd9Sstevel@tonic-gateFirst field is the string identifying the value (this is not verified),
52*7c478bd9Sstevel@tonic-gatethen white space, and then the value.  The value is either an integer,
53*7c478bd9Sstevel@tonic-gateor a string, as specified above.  An integer is a sequence of digits.
54*7c478bd9Sstevel@tonic-gateIntegers describing sizes are expressed in units of 1/240 of an inch.
55*7c478bd9Sstevel@tonic-gateA string is a sequence of characters, probably surrounded by quotes
56*7c478bd9Sstevel@tonic-gate(to be on the safe side).  For non-printable ascii characters, the
57*7c478bd9Sstevel@tonic-gatefollowing escapes hold (as in C):
58*7c478bd9Sstevel@tonic-gate	\b	backspace
59*7c478bd9Sstevel@tonic-gate	\t	tab
60*7c478bd9Sstevel@tonic-gate	\n	newline
61*7c478bd9Sstevel@tonic-gate	\r	carriage return
62*7c478bd9Sstevel@tonic-gate	\\	\
63*7c478bd9Sstevel@tonic-gate	\"	"
64*7c478bd9Sstevel@tonic-gate	\ followed by 3 octal digits specifies the ascii character
65*7c478bd9Sstevel@tonic-gate					with the value of those digits
66*7c478bd9Sstevel@tonic-gate
67*7c478bd9Sstevel@tonic-gateThis is followed by a line containing the word "charset", and then by the table of
68*7c478bd9Sstevel@tonic-gatespecial characters -- all the non-ASCII characters that nroff/troff
69*7c478bd9Sstevel@tonic-gateknows by 2-character names, e.g. \(hy and \(ga.  The entries in this
70*7c478bd9Sstevel@tonic-gatetable can be in any order (put the most used ones first), and
71*7c478bd9Sstevel@tonic-gatethe entries should be restricted to only those characters that
72*7c478bd9Sstevel@tonic-gatecan be printed on the terminal in question.  The format of each line
73*7c478bd9Sstevel@tonic-gate(defining one special character) is:  the (2-character) name of the
74*7c478bd9Sstevel@tonic-gatespecial character, followed by white space, followed by the width of
75*7c478bd9Sstevel@tonic-gatethe character (in ems), followed by white space, followed by the
76*7c478bd9Sstevel@tonic-gatesequence needed to produce the character.  This sequence may be
77*7c478bd9Sstevel@tonic-gatesurrounded by quotes.  The same escapes hold as for strings above.
78*7c478bd9Sstevel@tonic-gate
79*7c478bd9Sstevel@tonic-gateThe best way to create a terminal table for a new device is to take
80*7c478bd9Sstevel@tonic-gatea terminal table for an old device and modify it!
81*7c478bd9Sstevel@tonic-gateFor example, here is the first page of the terminal table for lp:
82*7c478bd9Sstevel@tonic-gate
83*7c478bd9Sstevel@tonic-gatelp
84*7c478bd9Sstevel@tonic-gatebset	0
85*7c478bd9Sstevel@tonic-gatebreset	0
86*7c478bd9Sstevel@tonic-gateHor	24
87*7c478bd9Sstevel@tonic-gateVert	40
88*7c478bd9Sstevel@tonic-gateNewline	40
89*7c478bd9Sstevel@tonic-gateChar	24
90*7c478bd9Sstevel@tonic-gateEm	24
91*7c478bd9Sstevel@tonic-gateHalfline	20
92*7c478bd9Sstevel@tonic-gateAdj	24
93*7c478bd9Sstevel@tonic-gatetwinit	""
94*7c478bd9Sstevel@tonic-gatetwrest	""
95*7c478bd9Sstevel@tonic-gatetwnl	"\n"
96*7c478bd9Sstevel@tonic-gatehlr	""
97*7c478bd9Sstevel@tonic-gatehlf	""
98*7c478bd9Sstevel@tonic-gateflr	"\0337"
99*7c478bd9Sstevel@tonic-gatebdon	""
100*7c478bd9Sstevel@tonic-gatebdoff	""
101*7c478bd9Sstevel@tonic-gateiton	""
102*7c478bd9Sstevel@tonic-gateitoff	""
103*7c478bd9Sstevel@tonic-gateploton	""
104*7c478bd9Sstevel@tonic-gateplotoff	""
105*7c478bd9Sstevel@tonic-gateup	""
106*7c478bd9Sstevel@tonic-gatedown	""
107*7c478bd9Sstevel@tonic-gateright	""
108*7c478bd9Sstevel@tonic-gateleft	""
109*7c478bd9Sstevel@tonic-gate
110*7c478bd9Sstevel@tonic-gatecharset
111*7c478bd9Sstevel@tonic-gate
112*7c478bd9Sstevel@tonic-gateem 1 -
113*7c478bd9Sstevel@tonic-gatehy 1 -
114*7c478bd9Sstevel@tonic-gate\- 1 -
115*7c478bd9Sstevel@tonic-gatebu 1 +\bo
116*7c478bd9Sstevel@tonic-gatesq 2 []
117*7c478bd9Sstevel@tonic-gateru 1 _
118*7c478bd9Sstevel@tonic-gate14 3 1/4
119*7c478bd9Sstevel@tonic-gate12 3 1/2
120*7c478bd9Sstevel@tonic-gate34 3 3/4
121*7c478bd9Sstevel@tonic-gatede 1 \344o\304
122*7c478bd9Sstevel@tonic-gatedg 1 |\b-
123*7c478bd9Sstevel@tonic-gatefm 1 '
124*7c478bd9Sstevel@tonic-gatect 1 c\b/
125*7c478bd9Sstevel@tonic-gaterg 1 r\bO
126*7c478bd9Sstevel@tonic-gateco 1 c\bO
127*7c478bd9Sstevel@tonic-gatepl 1 +
128*7c478bd9Sstevel@tonic-gatemi 1 -
129*7c478bd9Sstevel@tonic-gateeq 1 =
130*7c478bd9Sstevel@tonic-gate** 1 *
131