]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/terminfo.tail
280aead0b71bb59fd86b4862f7f4672cfd30238f
[ncurses.git] / man / terminfo.tail
1 .\" $Id: terminfo.tail,v 1.72 2016/10/15 18:34:58 tom Exp $
2 .\" Beginning of terminfo.tail file
3 .\" This file is part of ncurses.
4 .\" See "terminfo.head" for copyright.
5 .ps +1
6 .SS User-Defined Capabilities
7 .
8 The preceding section listed the \fIpredefined\fP capabilities.
9 They deal with some special features for terminals no longer
10 (or possibly never) produced.
11 Occasionally there are special features of newer terminals which
12 are awkward or impossible to represent by reusing the predefined
13 capabilities.
14 .PP
15 \fBncurses\fP addresses this limitation by allowing user-defined capabilities.
16 The \fB@TIC@\fP and \fB@INFOCMP@\fP programs provide
17 the \fB\-x\fP option for this purpose.
18 When \fB\-x\fP is set,
19 \fB@TIC@\fP treats unknown capabilities as user-defined.
20 That is, if \fB@TIC@\fP encounters a capability name
21 which it does not recognize,
22 it infers its type (boolean, number or string) from the syntax
23 and makes an extended table entry for that capability.
24 The \fBuse_extended_names\fP function makes this information
25 conditionally available to applications.
26 The ncurses library provides the data leaving most of the behavior
27 to applications:
28 .bP
29 User-defined capability strings whose name begins
30 with \*(``k\*('' are treated as function keys.
31 .bP
32 The types (boolean, number, string) determined by \fB@TIC@\fP
33 can be inferred by successful calls on \fBtigetflag\fP, etc.
34 .bP
35 If the capability name happens to be two characters,
36 the capability is also available through the termcap interface.
37 .PP
38 While termcap is said to be extensible because it does not use a predefined set
39 of capabilities,
40 in practice it has been limited to the capabilities defined by
41 terminfo implementations.
42 As a rule,
43 user-defined capabilities intended for use by termcap applications should
44 be limited to booleans and numbers to avoid running past the 1023 byte
45 limit assumed by termcap implementations and their applications.
46 In particular, providing extended sets of function keys (past the 60
47 numbered keys and the handful of special named keys) is best done using
48 the longer names available using terminfo.
49 .
50 .SS A Sample Entry
51 .
52 The following entry, describing an ANSI-standard terminal, is representative
53 of what a \fBterminfo\fR entry for a modern terminal typically looks like.
54 .PP
55 .nf
56 .ft CW
57 \s-2ansi|ansi/pc-term compatible with color,
58         am, mc5i, mir, msgr,
59         colors#8, cols#80, it#8, lines#24, ncv#3, pairs#64,
60         acsc=+\\020\\,\\021-\\030.^Y0\\333`\\004a\\261f\\370g\\361h\\260
61              j\\331k\\277l\\332m\\300n\\305o~p\\304q\\304r\\304s_t\\303
62              u\\264v\\301w\\302x\\263y\\363z\\362{\\343|\\330}\\234~\\376,
63         bel=^G, blink=\\E[5m, bold=\\E[1m, cbt=\\E[Z, clear=\\E[H\\E[J,
64         cr=^M, cub=\\E[%p1%dD, cub1=\\E[D, cud=\\E[%p1%dB, cud1=\\E[B,
65         cuf=\\E[%p1%dC, cuf1=\\E[C, cup=\\E[%i%p1%d;%p2%dH,
66         cuu=\\E[%p1%dA, cuu1=\\E[A, dch=\\E[%p1%dP, dch1=\\E[P,
67         dl=\\E[%p1%dM, dl1=\\E[M, ech=\\E[%p1%dX, ed=\\E[J, el=\\E[K,
68         el1=\\E[1K, home=\\E[H, hpa=\\E[%i%p1%dG, ht=\\E[I, hts=\\EH,
69         ich=\\E[%p1%d@, il=\\E[%p1%dL, il1=\\E[L, ind=^J,
70         indn=\\E[%p1%dS, invis=\\E[8m, kbs=^H, kcbt=\\E[Z, kcub1=\\E[D,
71         kcud1=\\E[B, kcuf1=\\E[C, kcuu1=\\E[A, khome=\\E[H, kich1=\\E[L,
72         mc4=\\E[4i, mc5=\\E[5i, nel=\\r\\E[S, op=\\E[39;49m,
73         rep=%p1%c\\E[%p2%{1}%-%db, rev=\\E[7m, rin=\\E[%p1%dT,
74         rmacs=\\E[10m, rmpch=\\E[10m, rmso=\\E[m, rmul=\\E[m,
75         s0ds=\\E(B, s1ds=\\E)B, s2ds=\\E*B, s3ds=\\E+B,
76         setab=\\E[4%p1%dm, setaf=\\E[3%p1%dm,
77         sgr=\\E[0;10%?%p1%t;7%;
78                    %?%p2%t;4%;
79                    %?%p3%t;7%;
80                    %?%p4%t;5%;
81                    %?%p6%t;1%;
82                    %?%p7%t;8%;
83                    %?%p9%t;11%;m,
84         sgr0=\\E[0;10m, smacs=\\E[11m, smpch=\\E[11m, smso=\\E[7m,
85         smul=\\E[4m, tbc=\\E[3g, u6=\\E[%i%d;%dR, u7=\\E[6n,
86         u8=\\E[?%[;0123456789]c, u9=\\E[c, vpa=\\E[%i%p1%dd,
87 .fi
88 .ft R
89 .PP
90 Entries may continue onto multiple lines by placing white space at
91 the beginning of each line except the first.
92 Comments may be included on lines beginning with \*(``#\*(''.
93 Capabilities in
94 .I terminfo
95 are of three types:
96 .bP
97 Boolean capabilities which indicate that the terminal has
98 some particular feature,
99 .bP
100 numeric capabilities giving the size of the terminal
101 or the size of particular delays, and
102 .bP
103 string
104 capabilities, which give a sequence which can be used to perform particular
105 terminal operations.
106 .PP
107 .SS Types of Capabilities
108 .PP
109 All capabilities have names.
110 For instance, the fact that
111 ANSI-standard terminals have
112 .I "automatic margins"
113 (i.e., an automatic return and line-feed
114 when the end of a line is reached) is indicated by the capability \fBam\fR.
115 Hence the description of ansi includes \fBam\fR.
116 Numeric capabilities are followed by the character \*(``#\*('' and then a positive value.
117 Thus \fBcols\fR, which indicates the number of columns the terminal has,
118 gives the value \*(``80\*('' for ansi.
119 Values for numeric capabilities may be specified in decimal, octal or hexadecimal,
120 using the C programming language conventions (e.g., 255, 0377 and 0xff or 0xFF).
121 .PP
122 Finally, string valued capabilities, such as \fBel\fR (clear to end of line
123 sequence) are given by the two-character code, an \*(``=\*('', and then a string
124 ending at the next following \*(``,\*(''.
125 .PP
126 A number of escape sequences are provided in the string valued capabilities
127 for easy encoding of characters there.
128 Both \fB\eE\fR and \fB\ee\fR
129 map to an \s-1ESCAPE\s0 character,
130 \fB^x\fR maps to a control-x for any appropriate x, and the sequences
131 \fB\en \el \er \et \eb \ef \es\fR give
132 a newline, line-feed, return, tab, backspace, form-feed, and space.
133 Other escapes include
134 .bP
135 \fB\e^\fR for \fB^\fR,
136 .bP
137 \fB\e\e\fR for \fB\e\fR,
138 .bP
139 \fB\e\fR, for comma,
140 .bP
141 \fB\e:\fR for \fB:\fR,
142 .bP
143 and \fB\e0\fR for null.
144 .IP
145 \fB\e0\fR will produce \e200, which does not terminate a string but behaves
146 as a null character on most terminals, providing CS7 is specified.
147 See stty(1).
148 .IP
149 The reason for this quirk is to maintain binary compatibility of the
150 compiled terminfo files with other implementations,
151 e.g., the SVr4 systems, which document this.
152 Compiled terminfo files use null-terminated strings, with no lengths.
153 Modifying this would require a new binary format, 
154 which would not work with other implementations.
155 .PP
156 Finally, characters may be given as three octal digits after a \fB\e\fR.
157 .PP
158 A delay in milliseconds may appear anywhere in a string capability, enclosed in
159 $<..> brackets, as in \fBel\fP=\eEK$<5>,
160 and padding characters are supplied by \fBtputs\fP
161 to provide this delay.
162 .bP
163 The delay must be a number with at most one decimal
164 place of precision; it may be followed by suffixes \*(``*\*('' or \*(``/\*('' or both.
165 .bP
166 A \*(``*\*(''
167 indicates that the padding required is proportional to the number of lines
168 affected by the operation, and the amount given is the per-affected-unit
169 padding required.
170 (In the case of insert character, the factor is still the
171 number of \fIlines\fP affected.)
172 .IP
173 Normally, padding is advisory if the device has the \fBxon\fR
174 capability; it is used for cost computation but does not trigger delays.
175 .bP
176 A \*(``/\*(''
177 suffix indicates that the padding is mandatory and forces a delay of the given
178 number of milliseconds even on devices for which \fBxon\fR is present to
179 indicate flow control.
180 .PP
181 Sometimes individual capabilities must be commented out.
182 To do this, put a period before the capability name.
183 For example, see the second
184 .B ind
185 in the example above.
186 .br
187 .ne 5
188 .PP
189 .SS Fetching Compiled Descriptions
190 .PP
191 The \fBncurses\fP library searches for terminal descriptions in several places.
192 It uses only the first description found.
193 The library has a compiled-in list of places to search
194 which can be overridden by environment variables.
195 Before starting to search,
196 \fBncurses\fP eliminates duplicates in its search list.
197 .bP
198 If the environment variable TERMINFO is set, it is interpreted as the pathname
199 of a directory containing the compiled description you are working on.
200 Only that directory is searched.
201 .bP
202 If TERMINFO is not set,
203 \fBncurses\fR will instead look in the directory \fB$HOME/.terminfo\fR
204 for a compiled description.
205 .bP
206 Next, if the environment variable TERMINFO_DIRS is set,
207 \fBncurses\fR will interpret the contents of that variable
208 as a list of colon-separated directories (or database files) to be searched.
209 .IP
210 An empty directory name (i.e., if the variable begins or ends
211 with a colon, or contains adjacent colons)
212 is interpreted as the system location \fI\*d\fR.
213 .bP
214 Finally, \fBncurses\fP searches these compiled-in locations:
215 .RS
216 .bP
217 a list of directories (@TERMINFO_DIRS@), and
218 .bP
219 the system terminfo directory, \fI\*d\fR (the compiled-in default).
220 .RE
221 .SS Preparing Descriptions
222 .PP
223 We now outline how to prepare descriptions of terminals.
224 The most effective way to prepare a terminal description is by imitating
225 the description of a similar terminal in
226 .I terminfo
227 and to build up a description gradually, using partial descriptions
228 with
229 .I vi
230 or some other screen-oriented program to check that they are correct.
231 Be aware that a very unusual terminal may expose deficiencies in
232 the ability of the
233 .I terminfo
234 file to describe it
235 or bugs in the screen-handling code of the test program.
236 .PP
237 To get the padding for insert line right (if the terminal manufacturer
238 did not document it) a severe test is to edit a large file at 9600 baud,
239 delete 16 or so lines from the middle of the screen, then hit the \*(``u\*(''
240 key several times quickly.
241 If the terminal messes up, more padding is usually needed.
242 A similar test can be used for insert character.
243 .PP
244 .SS Basic Capabilities
245 .PP
246 The number of columns on each line for the terminal is given by the
247 \fBcols\fR numeric capability.
248 If the terminal is a \s-1CRT\s0, then the
249 number of lines on the screen is given by the \fBlines\fR capability.
250 If the terminal wraps around to the beginning of the next line when
251 it reaches the right margin, then it should have the \fBam\fR capability.
252 If the terminal can clear its screen, leaving the cursor in the home
253 position, then this is given by the \fBclear\fR string capability.
254 If the terminal overstrikes
255 (rather than clearing a position when a character is struck over)
256 then it should have the \fBos\fR capability.
257 If the terminal is a printing terminal, with no soft copy unit,
258 give it both
259 .B hc
260 and
261 .BR os .
262 .RB ( os
263 applies to storage scope terminals, such as \s-1TEKTRONIX\s+1 4010
264 series, as well as hard copy and APL terminals.)
265 If there is a code to move the cursor to the left edge of the current
266 row, give this as
267 .BR cr .
268 (Normally this will be carriage return, control M.)
269 If there is a code to produce an audible signal (bell, beep, etc)
270 give this as
271 .BR bel .
272 .PP
273 If there is a code to move the cursor one position to the left
274 (such as backspace) that capability should be given as
275 .BR cub1 .
276 Similarly, codes to move to the right, up, and down should be
277 given as
278 .BR cuf1 ,
279 .BR cuu1 ,
280 and
281 .BR cud1 .
282 These local cursor motions should not alter the text they pass over,
283 for example, you would not normally use \*(``\fBcuf1\fP=\ \*('' because the
284 space would erase the character moved over.
285 .PP
286 A very important point here is that the local cursor motions encoded
287 in
288 .I terminfo
289 are undefined at the left and top edges of a \s-1CRT\s0 terminal.
290 Programs should never attempt to backspace around the left edge,
291 unless
292 .B bw
293 is given,
294 and never attempt to go up locally off the top.
295 In order to scroll text up, a program will go to the bottom left corner
296 of the screen and send the
297 .B ind
298 (index) string.
299 .PP
300 To scroll text down, a program goes to the top left corner
301 of the screen and sends the
302 .B ri
303 (reverse index) string.
304 The strings
305 .B ind
306 and
307 .B ri
308 are undefined when not on their respective corners of the screen.
309 .PP
310 Parameterized versions of the scrolling sequences are
311 .B indn
312 and
313 .B rin
314 which have the same semantics as
315 .B ind
316 and
317 .B ri
318 except that they take one parameter, and scroll that many lines.
319 They are also undefined except at the appropriate edge of the screen.
320 .PP
321 The \fBam\fR capability tells whether the cursor sticks at the right
322 edge of the screen when text is output, but this does not necessarily
323 apply to a
324 .B cuf1
325 from the last column.
326 The only local motion which is defined from the left edge is if
327 .B bw
328 is given, then a
329 .B cub1
330 from the left edge will move to the right edge of the previous row.
331 If
332 .B bw
333 is not given, the effect is undefined.
334 This is useful for drawing a box around the edge of the screen, for example.
335 If the terminal has switch selectable automatic margins,
336 the
337 .I terminfo
338 file usually assumes that this is on; i.e., \fBam\fR.
339 If the terminal has a command which moves to the first column of the next
340 line, that command can be given as
341 .B nel
342 (newline).
343 It does not matter if the command clears the remainder of the current line,
344 so if the terminal has no
345 .B cr
346 and
347 .B lf
348 it may still be possible to craft a working
349 .B nel
350 out of one or both of them.
351 .PP
352 These capabilities suffice to describe hard-copy and \*(lqglass-tty\*(rq terminals.
353 Thus the model 33 teletype is described as
354 .PP
355 .DT
356 .nf
357 .ft CW
358 .\".in -2
359 \s-133\||\|tty33\||\|tty\||\|model 33 teletype,
360         bel=^G, cols#72, cr=^M, cud1=^J, hc, ind=^J, os,\s+1
361 .\".in +2
362 .ft R
363 .fi
364 .PP
365 while the Lear Siegler \s-1ADM-3\s0 is described as
366 .PP
367 .DT
368 .nf
369 .ft CW
370 .\".in -2
371 \s-1adm3\||\|3\||\|lsi adm3,
372         am, bel=^G, clear=^Z, cols#80, cr=^M, cub1=^H, cud1=^J,
373         ind=^J, lines#24,\s+1
374 .\".in +2
375 .ft R
376 .fi
377 .PP
378 .SS Parameterized Strings
379 .PP
380 Cursor addressing and other strings requiring parameters
381 in the terminal are described by a
382 parameterized string capability,
383 with \fIprintf\fP-like escapes such as \fI%x\fR in it.
384 For example, to address the cursor, the
385 .B cup
386 capability is given, using two parameters:
387 the row and column to address to.
388 (Rows and columns are numbered from zero and refer to the
389 physical screen visible to the user, not to any unseen memory.)
390 If the terminal has memory relative cursor addressing,
391 that can be indicated by
392 .BR mrcup .
393 .PP
394 The parameter mechanism uses a stack and special \fB%\fP codes
395 to manipulate it.
396 Typically a sequence will push one of the
397 parameters onto the stack and then print it in some format.
398 Print (e.g., "%d") is a special case.
399 Other operations, including "%t" pop their operand from the stack.
400 It is noted that more complex operations are often necessary,
401 e.g., in the \fBsgr\fP string.
402 .PP
403 The \fB%\fR encodings have the following meanings:
404 .PP
405 .TP 5
406 \fB%%\fP
407 outputs \*(``%\*(''
408 .TP
409 \fB%\fP\fI[[\fP:\fI]flags][width[.precision]][\fP\fBdoxXs\fP\fI]\fP
410 as in \fBprintf\fP, flags are \fI[\-+#]\fP and \fIspace\fP.
411 Use a \*(``:\*('' to allow the next character to be a \*(``\-\*('' flag,
412 avoiding interpreting "%\-" as an operator.
413 .TP
414 \f(CW%c\fP
415 print \fIpop()\fP like %c in \fBprintf\fP
416 .TP
417 \fB%s\fP
418 print \fIpop()\fP like %s in \fBprintf\fP
419 .TP
420 \fB%p\fP\fI[1\-9]\fP
421 push \fIi\fP'th parameter
422 .TP
423 \fB%P\fP\fI[a\-z]\fP
424 set dynamic variable \fI[a\-z]\fP to \fIpop()\fP
425 .TP
426 \fB%g\fP\fI[a\-z]/\fP
427 get dynamic variable \fI[a\-z]\fP and push it
428 .TP
429 \fB%P\fP\fI[A\-Z]\fP
430 set static variable \fI[a\-z]\fP to \fIpop()\fP
431 .TP
432 \fB%g\fP\fI[A\-Z]\fP
433 get static variable \fI[a\-z]\fP and push it
434 .IP
435 The terms "static" and "dynamic" are misleading.
436 Historically, these are simply two different sets of variables,
437 whose values are not reset between calls to \fBtparm\fP.
438 However, that fact is not documented in other implementations.
439 Relying on it will adversely impact portability to other implementations.
440 .TP
441 \fB%'\fP\fIc\fP\fB'\fP
442 char constant \fIc\fP
443 .TP
444 \fB%{\fP\fInn\fP\fB}\fP
445 integer constant \fInn\fP
446 .TP
447 \fB%l\fP
448 push strlen(pop)
449 .TP
450 \fB%+\fP, \fB%\-\fP, \fB%*\fP, \fB%/\fP, \fB%m\fP
451 arithmetic (%m is \fImod\fP): \fIpush(pop() op pop())\fP
452 .TP
453 \fB%&\fP, \fB%|\fP, \fB%^\fP
454 bit operations (AND, OR and exclusive-OR): \fIpush(pop() op pop())\fP
455 .TP
456 \fB%=\fP, \fB%>\fP, \fB%<\fP
457 logical operations: \fIpush(pop() op pop())\fP
458 .TP
459 \fB%A\fP, \fB%O\fP
460 logical AND and OR operations (for conditionals)
461 .TP
462 \fB%!\fP, \fB%~\fP
463 unary operations (logical and bit complement): \fIpush(op pop())\fP
464 .TP
465 \fB%i\fP
466 add 1 to first two parameters (for ANSI terminals)
467 .TP
468 \fB%?\fP \fIexpr\fP \fB%t\fP \fIthenpart\fP \fB%e\fP \fIelsepart\fP \fB%;\fP
469 This forms an if-then-else.
470 The \fB%e\fP \fIelsepart\fP is optional.
471 Usually the \fB%?\fP \fIexpr\fP part pushes a value onto the stack,
472 and \fB%t\fP pops it from the stack, testing if it is nonzero (true).
473 If it is zero (false), control passes to the \fB%e\fP (else) part.
474 .IP
475 It is possible to form else-if's a la Algol 68:
476 .RS
477 \fB%?\fP c\d1\u \fB%t\fP b\d1\u \fB%e\fP c\d2\u \fB%t\fP b\d2\u \fB%e\fP c\d3\u \fB%t\fP b\d3\u \fB%e\fP c\d4\u \fB%t\fP b\d4\u \fB%e\fP \fB%;\fP
478 .RE
479 .IP
480 where c\di\u are conditions, b\di\u are bodies.
481 .IP
482 Use the \fB\-f\fP option of \fB@TIC@\fP or \fB@INFOCMP@\fP to see
483 the structure of if-then-else's.
484 Some strings, e.g., \fBsgr\fP can be very complicated when written
485 on one line.
486 The \fB\-f\fP option splits the string into lines with the parts indented.
487 .PP
488 Binary operations are in postfix form with the operands in the usual order.
489 That is, to get x\-5 one would use "%gx%{5}%-".
490 \fB%P\fP and \fB%g\fP variables are
491 persistent across escape-string evaluations.
492 .PP
493 Consider the HP2645, which, to get to row 3 and column 12, needs
494 to be sent \eE&a12c03Y padded for 6 milliseconds.
495 Note that the order
496 of the rows and columns is inverted here, and that the row and column
497 are printed as two digits.
498 Thus its \fBcup\fR capability is \*(lqcup=6\eE&%p2%2dc%p1%2dY\*(rq.
499 .PP
500 The Microterm \s-1ACT-IV\s0 needs the current row and column sent
501 preceded by a \fB^T\fR, with the row and column simply encoded in binary,
502 \*(lqcup=^T%p1%c%p2%c\*(rq.
503 Terminals which use \*(lq%c\*(rq need to be able to
504 backspace the cursor (\fBcub1\fR),
505 and to move the cursor up one line on the screen (\fBcuu1\fR).
506 This is necessary because it is not always safe to transmit \fB\en\fR
507 \fB^D\fR and \fB\er\fR, as the system may change or discard them.
508 (The library routines dealing with terminfo set tty modes so that
509 tabs are never expanded, so \et is safe to send.
510 This turns out to be essential for the Ann Arbor 4080.)
511 .PP
512 A final example is the \s-1LSI ADM\s0-3a, which uses row and column
513 offset by a blank character, thus \*(lqcup=\eE=%p1%' '%+%c%p2%' '%+%c\*(rq.
514 After sending \*(``\eE=\*('', this pushes the first parameter, pushes the
515 ASCII value for a space (32), adds them (pushing the sum on the stack
516 in place of the two previous values) and outputs that value as a character.
517 Then the same is done for the second parameter.
518 More complex arithmetic is possible using the stack.
519 .PP
520 .SS Cursor Motions
521 .PP
522 If the terminal has a fast way to home the cursor
523 (to very upper left corner of screen) then this can be given as
524 \fBhome\fR; similarly a fast way of getting to the lower left-hand corner
525 can be given as \fBll\fR; this may involve going up with \fBcuu1\fR
526 from the home position,
527 but a program should never do this itself (unless \fBll\fR does) because it
528 can make no assumption about the effect of moving up from the home position.
529 Note that the home position is the same as addressing to (0,0):
530 to the top left corner of the screen, not of memory.
531 (Thus, the \eEH sequence on HP terminals cannot be used for
532 .BR home .)
533 .PP
534 If the terminal has row or column absolute cursor addressing,
535 these can be given as single parameter capabilities
536 .B hpa
537 (horizontal position absolute)
538 and
539 .B vpa
540 (vertical position absolute).
541 Sometimes these are shorter than the more general two parameter
542 sequence (as with the hp2645) and can be used in preference to
543 .BR cup .
544 If there are parameterized local motions (e.g., move
545 .I n
546 spaces to the right) these can be given as
547 .BR cud ,
548 .BR cub ,
549 .BR cuf ,
550 and
551 .BR cuu
552 with a single parameter indicating how many spaces to move.
553 These are primarily useful if the terminal does not have
554 .BR cup ,
555 such as the \s-1TEKTRONIX\s+1 4025.
556 .PP
557 If the terminal needs to be in a special mode when running
558 a program that uses these capabilities,
559 the codes to enter and exit this mode can be given as \fBsmcup\fR and \fBrmcup\fR.
560 This arises, for example, from terminals like the Concept with more than
561 one page of memory.
562 If the terminal has only memory relative cursor addressing and not screen
563 relative cursor addressing, a one screen-sized window must be fixed into
564 the terminal for cursor addressing to work properly.
565 This is also used for the \s-1TEKTRONIX\s+1 4025,
566 where
567 .B smcup
568 sets the command character to be the one used by terminfo.
569 If the \fBsmcup\fP sequence will not restore the screen after an
570 \fBrmcup\fP sequence is output (to the state prior to outputting
571 \fBrmcup\fP), specify \fBnrrmc\fP.
572 .PP
573 .SS Area Clears
574 .PP
575 If the terminal can clear from the current position to the end of the
576 line, leaving the cursor where it is, this should be given as \fBel\fR.
577 If the terminal can clear from the beginning of the line to the current
578 position inclusive, leaving
579 the cursor where it is, this should be given as \fBel1\fP.
580 If the terminal can clear from the current position to the end of the
581 display, then this should be given as \fBed\fR.
582 \fBEd\fR is only defined from the first column of a line.
583 (Thus, it can be simulated by a request to delete a large number of lines,
584 if a true
585 .B ed
586 is not available.)
587 .PP
588 .SS Insert/delete line and vertical motions
589 .PP
590 If the terminal can open a new blank line before the line where the cursor
591 is, this should be given as \fBil1\fR; this is done only from the first
592 position of a line.
593 The cursor must then appear on the newly blank line.
594 If the terminal can delete the line which the cursor is on, then this
595 should be given as \fBdl1\fR; this is done only from the first position on
596 the line to be deleted.
597 Versions of
598 .B il1
599 and
600 .B dl1
601 which take a single parameter and insert or delete that many lines can
602 be given as
603 .B il
604 and
605 .BR dl .
606 .PP
607 If the terminal has a settable scrolling region (like the vt100)
608 the command to set this can be described with the
609 .B csr
610 capability, which takes two parameters:
611 the top and bottom lines of the scrolling region.
612 The cursor position is, alas, undefined after using this command.
613 .PP
614 It is possible to get the effect of insert or delete line using
615 .B csr
616 on a properly chosen region; the
617 .B sc
618 and
619 .B rc
620 (save and restore cursor) commands may be useful for ensuring that
621 your synthesized insert/delete string does not move the cursor.
622 (Note that the \fBncurses\fR(3X) library does this synthesis
623 automatically, so you need not compose insert/delete strings for
624 an entry with \fBcsr\fR).
625 .PP
626 Yet another way to construct insert and delete might be to use a combination of
627 index with the memory-lock feature found on some terminals (like the HP\-700/90
628 series, which however also has insert/delete).
629 .PP
630 Inserting lines at the top or bottom of the screen can also be
631 done using
632 .B ri
633 or
634 .B ind
635 on many terminals without a true insert/delete line,
636 and is often faster even on terminals with those features.
637 .PP
638 The boolean \fBnon_dest_scroll_region\fR should be set if each scrolling
639 window is effectively a view port on a screen-sized canvas.
640 To test for
641 this capability, create a scrolling region in the middle of the screen,
642 write something to the bottom line, move the cursor to the top of the region,
643 and do \fBri\fR followed by \fBdl1\fR or \fBind\fR.
644 If the data scrolled
645 off the bottom of the region by the \fBri\fR re-appears, then scrolling
646 is non-destructive.
647 System V and XSI Curses expect that \fBind\fR, \fBri\fR,
648 \fBindn\fR, and \fBrin\fR will simulate destructive scrolling; their
649 documentation cautions you not to define \fBcsr\fR unless this is true.
650 This \fBcurses\fR implementation is more liberal and will do explicit erases
651 after scrolling if \fBndstr\fR is defined.
652 .PP
653 If the terminal has the ability to define a window as part of
654 memory, which all commands affect,
655 it should be given as the parameterized string
656 .BR wind .
657 The four parameters are the starting and ending lines in memory
658 and the starting and ending columns in memory, in that order.
659 .PP
660 If the terminal can retain display memory above, then the
661 \fBda\fR capability should be given; if display memory can be retained
662 below, then \fBdb\fR should be given.
663 These indicate
664 that deleting a line or scrolling may bring non-blank lines up from below
665 or that scrolling back with \fBri\fR may bring down non-blank lines.
666 .PP
667 .SS Insert/Delete Character
668 .PP
669 There are two basic kinds of intelligent terminals with respect to
670 insert/delete character which can be described using
671 .I terminfo.
672 The most common insert/delete character operations affect only the characters
673 on the current line and shift characters off the end of the line rigidly.
674 Other terminals, such as the Concept 100 and the Perkin Elmer Owl, make
675 a distinction between typed and untyped blanks on the screen, shifting
676 upon an insert or delete only to an untyped blank on the screen which is
677 either eliminated, or expanded to two untyped blanks.
678 .PP
679 You can determine the
680 kind of terminal you have by clearing the screen and then typing
681 text separated by cursor motions.
682 Type \*(lqabc\ \ \ \ def\*(rq using local
683 cursor motions (not spaces) between the \*(lqabc\*(rq and the \*(lqdef\*(rq.
684 Then position the cursor before the \*(lqabc\*(rq and put the terminal in insert
685 mode.
686 If typing characters causes the rest of the line to shift
687 rigidly and characters to fall off the end, then your terminal does
688 not distinguish between blanks and untyped positions.
689 If the \*(lqabc\*(rq
690 shifts over to the \*(lqdef\*(rq which then move together around the end of the
691 current line and onto the next as you insert, you have the second type of
692 terminal, and should give the capability \fBin\fR, which stands for
693 \*(lqinsert null\*(rq.
694 .PP
695 While these are two logically separate attributes (one line versus multi-line
696 insert mode, and special treatment of untyped spaces) we have seen no
697 terminals whose insert mode cannot be described with the single attribute.
698 .PP
699 Terminfo can describe both terminals which have an insert mode, and terminals
700 which send a simple sequence to open a blank position on the current line.
701 Give as \fBsmir\fR the sequence to get into insert mode.
702 Give as \fBrmir\fR the sequence to leave insert mode.
703 Now give as \fBich1\fR any sequence needed to be sent just before sending
704 the character to be inserted.
705 Most terminals with a true insert mode
706 will not give \fBich1\fR; terminals which send a sequence to open a screen
707 position should give it here.
708 .PP
709 If your terminal has both, insert mode is usually preferable to \fBich1\fR.
710 Technically, you should not give both unless the terminal actually requires
711 both to be used in combination.
712 Accordingly, some non-curses applications get
713 confused if both are present; the symptom is doubled characters in an update
714 using insert.
715 This requirement is now rare; most \fBich\fR sequences do not
716 require previous smir, and most smir insert modes do not require \fBich1\fR
717 before each character.
718 Therefore, the new \fBcurses\fR actually assumes this
719 is the case and uses either \fBrmir\fR/\fBsmir\fR or \fBich\fR/\fBich1\fR as
720 appropriate (but not both).
721 If you have to write an entry to be used under
722 new curses for a terminal old enough to need both, include the
723 \fBrmir\fR/\fBsmir\fR sequences in \fBich1\fR.
724 .PP
725 If post insert padding is needed, give this as a number of milliseconds
726 in \fBip\fR (a string option).
727 Any other sequence which may need to be
728 sent after an insert of a single character may also be given in \fBip\fR.
729 If your terminal needs both to be placed into an \*(``insert mode\*('' and
730 a special code to precede each inserted character, then both
731 .BR smir / rmir
732 and
733 .B ich1
734 can be given, and both will be used.
735 The
736 .B ich
737 capability, with one parameter,
738 .IR n ,
739 will repeat the effects of
740 .B ich1
741 .I n
742 times.
743 .PP
744 If padding is necessary between characters typed while not
745 in insert mode, give this as a number of milliseconds padding in \fBrmp\fP.
746 .PP
747 It is occasionally necessary to move around while in insert mode
748 to delete characters on the same line (e.g., if there is a tab after
749 the insertion position).
750 If your terminal allows motion while in
751 insert mode you can give the capability \fBmir\fR to speed up inserting
752 in this case.
753 Omitting \fBmir\fR will affect only speed.
754 Some terminals
755 (notably Datamedia's) must not have \fBmir\fR because of the way their
756 insert mode works.
757 .PP
758 Finally, you can specify
759 .B dch1
760 to delete a single character,
761 .B dch
762 with one parameter,
763 .IR n ,
764 to delete
765 .I n characters,
766 and delete mode by giving \fBsmdc\fR and \fBrmdc\fR
767 to enter and exit delete mode (any mode the terminal needs to be placed
768 in for
769 .B dch1
770 to work).
771 .PP
772 A command to erase
773 .I n
774 characters (equivalent to outputting
775 .I n
776 blanks without moving the cursor)
777 can be given as
778 .B ech
779 with one parameter.
780 .PP
781 .SS "Highlighting, Underlining, and Visible Bells"
782 .PP
783 If your terminal has one or more kinds of display attributes,
784 these can be represented in a number of different ways.
785 You should choose one display form as
786 \f2standout mode\fR,
787 representing a good, high contrast, easy-on-the-eyes,
788 format for highlighting error messages and other attention getters.
789 (If you have a choice, reverse video plus half-bright is good,
790 or reverse video alone.)
791 The sequences to enter and exit standout mode
792 are given as \fBsmso\fR and \fBrmso\fR, respectively.
793 If the code to change into or out of standout
794 mode leaves one or even two blank spaces on the screen,
795 as the TVI 912 and Teleray 1061 do,
796 then \fBxmc\fR should be given to tell how many spaces are left.
797 .PP
798 Codes to begin underlining and end underlining can be given as \fBsmul\fR
799 and \fBrmul\fR respectively.
800 If the terminal has a code to underline the current character and move
801 the cursor one space to the right,
802 such as the Microterm Mime,
803 this can be given as \fBuc\fR.
804 .PP
805 Other capabilities to enter various highlighting modes include
806 .B blink
807 (blinking)
808 .B bold
809 (bold or extra bright)
810 .B dim
811 (dim or half-bright)
812 .B invis
813 (blanking or invisible text)
814 .B prot
815 (protected)
816 .B rev
817 (reverse video)
818 .B sgr0
819 (turn off
820 .I all
821 attribute modes)
822 .B smacs
823 (enter alternate character set mode)
824 and
825 .B rmacs
826 (exit alternate character set mode).
827 Turning on any of these modes singly may or may not turn off other modes.
828 .PP
829 If there is a sequence to set arbitrary combinations of modes,
830 this should be given as
831 .B sgr
832 (set attributes),
833 taking 9 parameters.
834 Each parameter is either 0 or nonzero, as the corresponding attribute is on or off.
835 The 9 parameters are, in order:
836 standout, underline, reverse, blink, dim, bold, blank, protect, alternate
837 character set.
838 Not all modes need be supported by
839 .BR sgr ,
840 only those for which corresponding separate attribute commands exist.
841 .PP
842 For example, the DEC vt220 supports most of the modes:
843 .PP
844 .TS
845 center;
846 l l l
847 l l l
848 lw18 lw14 lw18.
849 \fBtparm parameter      attribute       escape sequence\fP
850
851 none    none    \\E[0m
852 p1      standout        \\E[0;1;7m
853 p2      underline       \\E[0;4m
854 p3      reverse \\E[0;7m
855 p4      blink   \\E[0;5m
856 p5      dim     not available
857 p6      bold    \\E[0;1m
858 p7      invis   \\E[0;8m
859 p8      protect not used
860 p9      altcharset      ^O (off) ^N (on)
861 .TE
862 .PP
863 We begin each escape sequence by turning off any existing modes, since
864 there is no quick way to determine whether they are active.
865 Standout is set up to be the combination of reverse and bold.
866 The vt220 terminal has a protect mode,
867 though it is not commonly used in sgr
868 because it protects characters on the screen from the host's erasures.
869 The altcharset mode also is different in that it is either ^O or ^N,
870 depending on whether it is off or on.
871 If all modes are turned on, the resulting sequence is \\E[0;1;4;5;7;8m^N.
872 .PP
873 Some sequences are common to different modes.
874 For example, ;7 is output when either p1 or p3 is true, that is, if
875 either standout or reverse modes are turned on.
876 .PP
877 Writing out the above sequences, along with their dependencies yields
878 .PP
879 .ne 11
880 .TS
881 center;
882 l l l
883 l l l
884 lw18 lw14 lw18.
885 \fBsequence     when to output  terminfo translation\fP
886
887 .ft CW
888 \\E[0   always  \\E[0
889 ;1      if p1 or p6     %?%p1%p6%|%t;1%;
890 ;4      if p2   %?%p2%|%t;4%;
891 ;5      if p4   %?%p4%|%t;5%;
892 ;7      if p1 or p3     %?%p1%p3%|%t;7%;
893 ;8      if p7   %?%p7%|%t;8%;
894 m       always  m
895 ^N or ^O        if p9 ^N, else ^O       %?%p9%t^N%e^O%;
896 .ft R
897 .TE
898 .PP
899 Putting this all together into the sgr sequence gives:
900 .PP
901 .ft CW
902 .nf
903     sgr=\\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p4%t;5%;
904         %?%p1%p3%|%t;7%;%?%p7%t;8%;m%?%p9%t\\016%e\\017%;,
905 .fi
906 .ft R
907 .PP
908 Remember that if you specify sgr, you must also specify sgr0.
909 Also, some implementations rely on sgr being given if sgr0 is,
910 Not all terminfo entries necessarily have an sgr string, however.
911 Many terminfo entries are derived from termcap entries
912 which have no sgr string.
913 The only drawback to adding an sgr string is that termcap also
914 assumes that sgr0 does not exit alternate character set mode.
915 .PP
916 Terminals with the \*(``magic cookie\*('' glitch
917 .RB ( xmc )
918 deposit special \*(``cookies\*('' when they receive mode-setting sequences,
919 which affect the display algorithm rather than having extra bits for
920 each character.
921 Some terminals, such as the HP 2621, automatically leave standout
922 mode when they move to a new line or the cursor is addressed.
923 Programs using standout mode should exit standout mode before
924 moving the cursor or sending a newline,
925 unless the
926 .B msgr
927 capability, asserting that it is safe to move in standout mode, is present.
928 .PP
929 If the terminal has
930 a way of flashing the screen to indicate an error quietly (a bell replacement)
931 then this can be given as \fBflash\fR; it must not move the cursor.
932 .PP
933 If the cursor needs to be made more visible than normal when it is
934 not on the bottom line (to make, for example, a non-blinking underline into an
935 easier to find block or blinking underline)
936 give this sequence as
937 .BR cvvis .
938 If there is a way to make the cursor completely invisible, give that as
939 .BR civis .
940 The capability
941 .BR cnorm
942 should be given which undoes the effects of both of these modes.
943 .PP
944 If your terminal correctly generates underlined characters
945 (with no special codes needed)
946 even though it does not overstrike,
947 then you should give the capability \fBul\fR.
948 If a character overstriking another leaves both characters on the screen,
949 specify the capability \fBos\fP.
950 If overstrikes are erasable with a blank,
951 then this should be indicated by giving \fBeo\fR.
952 .PP
953 .SS Keypad and Function Keys
954 .PP
955 If the terminal has a keypad that transmits codes when the keys are pressed,
956 this information can be given.
957 Note that it is not possible to handle
958 terminals where the keypad only works in local (this applies, for example,
959 to the unshifted HP 2621 keys).
960 If the keypad can be set to transmit or not transmit,
961 give these codes as \fBsmkx\fR and \fBrmkx\fR.
962 Otherwise the keypad is assumed to always transmit.
963 .PP
964 The codes sent by the left arrow, right arrow, up arrow, down arrow,
965 and home keys can be given as
966 \fBkcub1, kcuf1, kcuu1, kcud1, \fRand\fB khome\fR respectively.
967 If there are function keys such as f0, f1, ..., f10, the codes they send
968 can be given as \fBkf0, kf1, ..., kf10\fR.
969 If these keys have labels other than the default f0 through f10, the labels
970 can be given as \fBlf0, lf1, ..., lf10\fR.
971 .PP
972 The codes transmitted by certain other special keys can be given:
973 .bP
974 .B kll
975 (home down),
976 .bP
977 .B kbs
978 (backspace),
979 .bP
980 .B ktbc
981 (clear all tabs),
982 .bP
983 .B kctab
984 (clear the tab stop in this column),
985 .bP
986 .B kclr
987 (clear screen or erase key),
988 .bP
989 .B kdch1
990 (delete character),
991 .bP
992 .B kdl1
993 (delete line),
994 .bP
995 .B krmir
996 (exit insert mode),
997 .bP
998 .B kel
999 (clear to end of line),
1000 .bP
1001 .B ked
1002 (clear to end of screen),
1003 .bP
1004 .B kich1
1005 (insert character or enter insert mode),
1006 .bP
1007 .B kil1
1008 (insert line),
1009 .bP
1010 .B knp
1011 (next page),
1012 .bP
1013 .B kpp
1014 (previous page),
1015 .bP
1016 .B kind
1017 (scroll forward/down),
1018 .bP
1019 .B kri
1020 (scroll backward/up),
1021 .bP
1022 .B khts
1023 (set a tab stop in this column).
1024 .PP
1025 In addition, if the keypad has a 3 by 3 array of keys including the four
1026 arrow keys, the other five keys can be given as
1027 .BR ka1 ,
1028 .BR ka3 ,
1029 .BR kb2 ,
1030 .BR kc1 ,
1031 and
1032 .BR kc3 .
1033 These keys are useful when the effects of a 3 by 3 directional pad are needed.
1034 .PP
1035 Strings to program function keys can be given as
1036 .BR pfkey ,
1037 .BR pfloc ,
1038 and
1039 .BR pfx .
1040 A string to program screen labels should be specified as \fBpln\fP.
1041 Each of these strings takes two parameters: the function key number to
1042 program (from 0 to 10) and the string to program it with.
1043 Function key numbers out of this range may program undefined keys in
1044 a terminal dependent manner.
1045 The difference between the capabilities is that
1046 .B pfkey
1047 causes pressing the given key to be the same as the user typing the
1048 given string;
1049 .B pfloc
1050 causes the string to be executed by the terminal in local; and
1051 .B pfx
1052 causes the string to be transmitted to the computer.
1053 .PP
1054 The capabilities \fBnlab\fP, \fBlw\fP and \fBlh\fP
1055 define the number of programmable
1056 screen labels and their width and height.
1057 If there are commands to turn the labels on and off,
1058 give them in \fBsmln\fP and \fBrmln\fP.
1059 \fBsmln\fP is normally output after one or more pln
1060 sequences to make sure that the change becomes visible.
1061 .PP
1062 .SS Tabs and Initialization
1063 .PP
1064 If the terminal has hardware tabs, the command to advance to the next
1065 tab stop can be given as
1066 .B ht
1067 (usually control I).
1068 A \*(``back-tab\*('' command which moves leftward to the preceding tab stop can
1069 be given as
1070 .BR cbt .
1071 By convention, if the teletype modes indicate that tabs are being
1072 expanded by the computer rather than being sent to the terminal,
1073 programs should not use
1074 .B ht
1075 or
1076 .B cbt
1077 even if they are present, since the user may not have the tab stops
1078 properly set.
1079 If the terminal has hardware tabs which are initially set every
1080 .I n
1081 spaces when the terminal is powered up,
1082 the numeric parameter
1083 .B it
1084 is given, showing the number of spaces the tabs are set to.
1085 This is normally used by the
1086 .IR @TSET@
1087 command to determine whether to set the mode for hardware tab expansion,
1088 and whether to set the tab stops.
1089 If the terminal has tab stops that can be saved in non-volatile memory,
1090 the terminfo description can assume that they are properly set.
1091 .PP
1092 Other capabilities
1093 include
1094 .BR is1 ,
1095 .BR is2 ,
1096 and
1097 .BR is3 ,
1098 initialization strings for the terminal,
1099 .BR iprog ,
1100 the path name of a program to be run to initialize the terminal,
1101 and \fBif\fR, the name of a file containing long initialization strings.
1102 These strings are expected to set the terminal into modes consistent
1103 with the rest of the terminfo description.
1104 They are normally sent to the terminal, by the
1105 .I init
1106 option of the
1107 .IR @TPUT@
1108 program, each time the user logs in.
1109 They will be printed in the following order:
1110 .RS
1111 .TP
1112 run the program
1113 .BR iprog
1114 .TP
1115 output
1116 .BR is1
1117 .BR is2
1118 .TP
1119 set the margins using
1120 .BR mgc ,
1121 .BR smgl
1122 and
1123 .BR smgr
1124 .TP
1125 set tabs using
1126 .B tbc
1127 and
1128 .BR hts
1129 .TP
1130 print the file
1131 .BR if
1132 .TP
1133 and finally
1134 output
1135 .BR is3 .
1136 .RE
1137 .PP
1138 Most initialization is done with
1139 .BR is2 .
1140 Special terminal modes can be set up without duplicating strings
1141 by putting the common sequences in
1142 .B is2
1143 and special cases in
1144 .B is1
1145 and
1146 .BR is3 .
1147 .PP
1148 A set of sequences that does a harder reset from a totally unknown state
1149 can be given as
1150 .BR rs1 ,
1151 .BR rs2 ,
1152 .BR rf
1153 and
1154 .BR rs3 ,
1155 analogous to
1156 .B is1 ,
1157 .B is2 ,
1158 .B if
1159 and
1160 .BR is3
1161 respectively.
1162 These strings are output by the \fB@RESET@\fP program,
1163 which is used when the terminal gets into a wedged state.
1164 Commands are normally placed in
1165 .BR rs1 ,
1166 .BR rs2
1167 .B rs3
1168 and
1169 .B rf
1170 only if they produce annoying effects on the screen and are not
1171 necessary when logging in.
1172 For example, the command to set the vt100 into 80-column mode would
1173 normally be part of
1174 .BR is2 ,
1175 but it causes an annoying glitch of the screen and is not normally
1176 needed since the terminal is usually already in 80 column mode.
1177 .PP
1178 The \fB@RESET@\fP program writes strings including
1179 .BR iprog ,
1180 etc., in the same order as the
1181 .IR init
1182 program, using 
1183 .BR rs1 ,
1184 etc., instead of
1185 .BR is1 ,
1186 etc.
1187 If any of
1188 .BR rs1 ,
1189 .BR rs2 ,
1190 .BR rs3 ,
1191 or
1192 .BR rf
1193 reset capability strings are missing, the \fB@RESET@\fP 
1194 program falls back upon the corresponding initialization capability string.
1195 .PP
1196 If there are commands to set and clear tab stops, they can be given as
1197 .B tbc
1198 (clear all tab stops)
1199 and
1200 .B hts
1201 (set a tab stop in the current column of every row).
1202 If a more complex sequence is needed to set the tabs than can be
1203 described by this, the sequence can be placed in
1204 .B is2
1205 or
1206 .BR if .
1207 .SS Delays and Padding
1208 .PP
1209 Many older and slower terminals do not support either XON/XOFF or DTR
1210 handshaking, including hard copy terminals and some very archaic CRTs
1211 (including, for example, DEC VT100s).
1212 These may require padding characters
1213 after certain cursor motions and screen changes.
1214 .PP
1215 If the terminal uses xon/xoff handshaking for flow control (that is,
1216 it automatically emits ^S back to the host when its input buffers are
1217 close to full), set
1218 .BR xon .
1219 This capability suppresses the emission of padding.
1220 You can also set it
1221 for memory-mapped console devices effectively that do not have a speed limit.
1222 Padding information should still be included so that routines can
1223 make better decisions about relative costs, but actual pad characters will
1224 not be transmitted.
1225 .PP
1226 If \fBpb\fR (padding baud rate) is given, padding is suppressed at baud rates
1227 below the value of \fBpb\fR.
1228 If the entry has no padding baud rate, then
1229 whether padding is emitted or not is completely controlled by \fBxon\fR.
1230 .PP
1231 If the terminal requires other than a null (zero) character as a pad,
1232 then this can be given as \fBpad\fR.
1233 Only the first character of the
1234 .B pad
1235 string is used.
1236 .PP
1237 .SS Status Lines
1238 Some terminals have an extra \*(``status line\*('' which is not normally used by
1239 software (and thus not counted in the terminal's \fBlines\fR capability).
1240 .PP
1241 The simplest case is a status line which is cursor-addressable but not
1242 part of the main scrolling region on the screen; the Heathkit H19 has
1243 a status line of this kind, as would a 24-line VT100 with a 23-line
1244 scrolling region set up on initialization.
1245 This situation is indicated
1246 by the \fBhs\fR capability.
1247 .PP
1248 Some terminals with status lines need special sequences to access the
1249 status line.
1250 These may be expressed as a string with single parameter
1251 \fBtsl\fR which takes the cursor to a given zero-origin column on the
1252 status line.
1253 The capability \fBfsl\fR must return to the main-screen
1254 cursor positions before the last \fBtsl\fR.
1255 You may need to embed the
1256 string values of \fBsc\fR (save cursor) and \fBrc\fR (restore cursor)
1257 in \fBtsl\fR and \fBfsl\fR to accomplish this.
1258 .PP
1259 The status line is normally assumed to be the same width as the width
1260 of the terminal.
1261 If this is untrue, you can specify it with the numeric
1262 capability \fBwsl\fR.
1263 .PP
1264 A command to erase or blank the status line may be specified as \fBdsl\fR.
1265 .PP
1266 The boolean capability \fBeslok\fR specifies that escape sequences, tabs,
1267 etc., work ordinarily in the status line.
1268 .PP
1269 The \fBncurses\fR implementation does not yet use any of these capabilities.
1270 They are documented here in case they ever become important.
1271 .PP
1272 .SS Line Graphics
1273 .PP
1274 Many terminals have alternate character sets useful for forms-drawing.
1275 Terminfo and \fBcurses\fR build in support for the drawing characters
1276 supported by the VT100, with some characters from the AT&T 4410v1 added.
1277 This alternate character set may be specified by the \fBacsc\fR capability.
1278 .PP
1279 .TS H
1280 center expand;
1281 l l l l
1282 l l l l
1283 lw25 lw10 lw6 lw6.
1284 .\".TH
1285 \fBGlyph        ACS     Ascii   VT100\fR
1286 \fBName Name    Default Name\fR
1287 UK pound sign           ACS_STERLING    f       }
1288 arrow pointing down     ACS_DARROW      v       .
1289 arrow pointing left     ACS_LARROW      <       ,
1290 arrow pointing right    ACS_RARROW      >       +
1291 arrow pointing up       ACS_UARROW      ^       \-
1292 board of squares        ACS_BOARD       #       h
1293 bullet                  ACS_BULLET      o       ~
1294 checker board (stipple) ACS_CKBOARD     :       a
1295 degree symbol           ACS_DEGREE      \e      f
1296 diamond                 ACS_DIAMOND     +       `
1297 greater-than-or-equal-to        ACS_GEQUAL      >       z
1298 greek pi                ACS_PI  *       {
1299 horizontal line         ACS_HLINE       \-      q
1300 lantern symbol          ACS_LANTERN     #       i
1301 large plus or crossover ACS_PLUS        +       n
1302 less-than-or-equal-to   ACS_LEQUAL      <       y
1303 lower left corner       ACS_LLCORNER    +       m
1304 lower right corner      ACS_LRCORNER    +       j
1305 not-equal               ACS_NEQUAL      !       |
1306 plus/minus              ACS_PLMINUS     #       g
1307 scan line 1             ACS_S1          ~       o
1308 scan line 3             ACS_S3          \-      p
1309 scan line 7             ACS_S7          \-      r
1310 scan line 9             ACS_S9          \&_     s
1311 solid square block      ACS_BLOCK       #       0
1312 tee pointing down       ACS_TTEE        +       w
1313 tee pointing left       ACS_RTEE        +       u
1314 tee pointing right      ACS_LTEE        +       t
1315 tee pointing up         ACS_BTEE        +       v
1316 upper left corner       ACS_ULCORNER    +       l
1317 upper right corner      ACS_URCORNER    +       k
1318 vertical line           ACS_VLINE       |       x
1319 .TE
1320 .PP
1321 The best way to define a new device's graphics set is to add a column
1322 to a copy of this table for your terminal, giving the character which
1323 (when emitted between \fBsmacs\fR/\fBrmacs\fR switches) will be rendered
1324 as the corresponding graphic.
1325 Then read off the VT100/your terminal
1326 character pairs right to left in sequence; these become the ACSC string.
1327 .PP
1328 .SS Color Handling
1329 .PP
1330 Most color terminals are either \*(``Tektronix-like\*('' or \*(``HP-like\*(''.
1331 Tektronix-like
1332 terminals have a predefined set of N colors (where N usually 8), and can set
1333 character-cell foreground and background characters independently, mixing them
1334 into N\ *\ N color-pairs.
1335 On HP-like terminals, the use must set each color
1336 pair up separately (foreground and background are not independently settable).
1337 Up to M color-pairs may be set up from 2*M different colors.
1338 ANSI-compatible
1339 terminals are Tektronix-like.
1340 .PP
1341 Some basic color capabilities are independent of the color method.
1342 The numeric
1343 capabilities \fBcolors\fR and \fBpairs\fR specify the maximum numbers of colors
1344 and color-pairs that can be displayed simultaneously.
1345 The \fBop\fR (original
1346 pair) string resets foreground and background colors to their default values
1347 for the terminal.
1348 The \fBoc\fR string resets all colors or color-pairs to
1349 their default values for the terminal.
1350 Some terminals (including many PC
1351 terminal emulators) erase screen areas with the current background color rather
1352 than the power-up default background; these should have the boolean capability
1353 \fBbce\fR.
1354 .PP
1355 To change the current foreground or background color on a Tektronix-type
1356 terminal, use \fBsetaf\fR (set ANSI foreground) and \fBsetab\fR (set ANSI
1357 background) or \fBsetf\fR (set foreground) and \fBsetb\fR (set background).
1358 These take one parameter, the color number.
1359 The SVr4 documentation describes
1360 only \fBsetaf\fR/\fBsetab\fR; the XPG4 draft says that "If the terminal
1361 supports ANSI escape sequences to set background and foreground, they should
1362 be coded as \fBsetaf\fR and \fBsetab\fR, respectively.
1363 If the terminal
1364 supports other escape sequences to set background and foreground, they should
1365 be coded as \fBsetf\fR and \fBsetb\fR, respectively.
1366 The \fBvidputs\fR
1367 function and the refresh functions use \fBsetaf\fR and \fBsetab\fR if they are
1368 defined."
1369 .PP
1370 The \fBsetaf\fR/\fBsetab\fR and \fBsetf\fR/\fBsetb\fR capabilities take a
1371 single numeric argument each.
1372 Argument values 0-7 of \fBsetaf\fR/\fBsetab\fR are portably defined as
1373 follows (the middle column is the symbolic #define available in the header for
1374 the \fBcurses\fR or \fBncurses\fR libraries).
1375 The terminal hardware is free to
1376 map these as it likes, but the RGB values indicate normal locations in color
1377 space.
1378 .PP
1379 .TS H
1380 center;
1381 l c c c
1382 l l n l.
1383 \fBColor        #define         Value   RGB\fR
1384 black   \fBCOLOR_BLACK\fR       0       0, 0, 0
1385 red     \fBCOLOR_RED\ \fR       1       max,0,0
1386 green   \fBCOLOR_GREEN\fR       2       0,max,0
1387 yellow  \fBCOLOR_YELLOW\fR      3       max,max,0
1388 blue    \fBCOLOR_BLUE\fR        4       0,0,max
1389 magenta \fBCOLOR_MAGENTA\fR     5       max,0,max
1390 cyan    \fBCOLOR_CYAN\fR        6       0,max,max
1391 white   \fBCOLOR_WHITE\fR       7       max,max,max
1392 .TE
1393 .PP
1394 The argument values of \fBsetf\fR/\fBsetb\fR historically correspond to
1395 a different mapping, i.e.,
1396 .TS H
1397 center;
1398 l c c c
1399 l l n l.
1400 \fBColor        #define         Value   RGB\fR
1401 black   \fBCOLOR_BLACK\fR       0       0, 0, 0
1402 blue    \fBCOLOR_BLUE\fR        1       0,0,max
1403 green   \fBCOLOR_GREEN\fR       2       0,max,0
1404 cyan    \fBCOLOR_CYAN\fR        3       0,max,max
1405 red     \fBCOLOR_RED\ \fR       4       max,0,0
1406 magenta \fBCOLOR_MAGENTA\fR     5       max,0,max
1407 yellow  \fBCOLOR_YELLOW\fR      6       max,max,0
1408 white   \fBCOLOR_WHITE\fR       7       max,max,max
1409 .TE
1410 .PP
1411 It is important to not confuse the two sets of color capabilities;
1412 otherwise red/blue will be interchanged on the display.
1413 .PP
1414 On an HP-like terminal, use \fBscp\fR with a color-pair number parameter to set
1415 which color pair is current.
1416 .PP
1417 On a Tektronix-like terminal, the capability \fBccc\fR may be present to
1418 indicate that colors can be modified.
1419 If so, the \fBinitc\fR capability will
1420 take a color number (0 to \fBcolors\fR \- 1)and three more parameters which
1421 describe the color.
1422 These three parameters default to being interpreted as RGB
1423 (Red, Green, Blue) values.
1424 If the boolean capability \fBhls\fR is present,
1425 they are instead as HLS (Hue, Lightness, Saturation) indices.
1426 The ranges are
1427 terminal-dependent.
1428 .PP
1429 On an HP-like terminal, \fBinitp\fR may give a capability for changing a
1430 color-pair value.
1431 It will take seven parameters; a color-pair number (0 to
1432 \fBmax_pairs\fR \- 1), and two triples describing first background and then
1433 foreground colors.
1434 These parameters must be (Red, Green, Blue) or
1435 (Hue, Lightness, Saturation) depending on \fBhls\fR.
1436 .PP
1437 On some color terminals, colors collide with highlights.
1438 You can register
1439 these collisions with the \fBncv\fR capability.
1440 This is a bit-mask of
1441 attributes not to be used when colors are enabled.
1442 The correspondence with the
1443 attributes understood by \fBcurses\fR is as follows:
1444 .PP
1445 .TS
1446 center;
1447 l l l l
1448 lw20 lw2 lw10 lw10.
1449 \fBAttribute    Bit     Decimal Set by\fR
1450 A_STANDOUT      0       1       sgr
1451 A_UNDERLINE     1       2       sgr
1452 A_REVERSE       2       4       sgr
1453 A_BLINK         3       8       sgr
1454 A_DIM           4       16      sgr
1455 A_BOLD          5       32      sgr
1456 A_INVIS         6       64      sgr
1457 A_PROTECT       7       128     sgr
1458 A_ALTCHARSET    8       256     sgr
1459 A_HORIZONTAL    9       512     sgr1
1460 A_LEFT  10      1024    sgr1
1461 A_LOW   11      2048    sgr1
1462 A_RIGHT 12      4096    sgr1
1463 A_TOP   13      8192    sgr1
1464 A_VERTICAL      14      16384   sgr1
1465 A_ITALIC        15      32768   sitm
1466 .TE
1467 .PP
1468 For example, on many IBM PC consoles, the underline attribute collides with the
1469 foreground color blue and is not available in color mode.
1470 These should have
1471 an \fBncv\fR capability of 2.
1472 .PP
1473 SVr4 curses does nothing with \fBncv\fR, ncurses recognizes it and optimizes
1474 the output in favor of colors.
1475 .PP
1476 .SS Miscellaneous
1477 If the terminal requires other than a null (zero) character as a pad, then this
1478 can be given as pad.
1479 Only the first character of the pad string is used.
1480 If the terminal does not have a pad character, specify npc.
1481 Note that ncurses implements the termcap-compatible \fBPC\fR variable;
1482 though the application may set this value to something other than
1483 a null, ncurses will test \fBnpc\fR first and use napms if the terminal
1484 has no pad character.
1485 .PP
1486 If the terminal can move up or down half a line,
1487 this can be indicated with
1488 .B hu
1489 (half-line up)
1490 and
1491 .B hd
1492 (half-line down).
1493 This is primarily useful for superscripts and subscripts on hard-copy terminals.
1494 If a hard-copy terminal can eject to the next page (form feed), give this as
1495 .B ff
1496 (usually control L).
1497 .PP
1498 If there is a command to repeat a given character a given number of
1499 times (to save time transmitting a large number of identical characters)
1500 this can be indicated with the parameterized string
1501 .BR rep .
1502 The first parameter is the character to be repeated and the second
1503 is the number of times to repeat it.
1504 Thus, tparm(repeat_char, 'x', 10) is the same as \*(``xxxxxxxxxx\*(''.
1505 .PP
1506 If the terminal has a settable command character, such as the \s-1TEKTRONIX\s+1 4025,
1507 this can be indicated with
1508 .BR cmdch .
1509 A prototype command character is chosen which is used in all capabilities.
1510 This character is given in the
1511 .B cmdch
1512 capability to identify it.
1513 The following convention is supported on some UNIX systems:
1514 The environment is to be searched for a
1515 .B CC
1516 variable, and if found, all
1517 occurrences of the prototype character are replaced with the character
1518 in the environment variable.
1519 .PP
1520 Terminal descriptions that do not represent a specific kind of known
1521 terminal, such as
1522 .IR switch ,
1523 .IR dialup ,
1524 .IR patch ,
1525 and
1526 .IR network ,
1527 should include the
1528 .B gn
1529 (generic) capability so that programs can complain that they do not know
1530 how to talk to the terminal.
1531 (This capability does not apply to
1532 .I virtual
1533 terminal descriptions for which the escape sequences are known.)
1534 .PP
1535 If the terminal has a \*(``meta key\*('' which acts as a shift key,
1536 setting the 8th bit of any character transmitted, this fact can
1537 be indicated with
1538 .BR km .
1539 Otherwise, software will assume that the 8th bit is parity and it
1540 will usually be cleared.
1541 If strings exist to turn this \*(``meta mode\*('' on and off, they
1542 can be given as
1543 .B smm
1544 and
1545 .BR rmm .
1546 .PP
1547 If the terminal has more lines of memory than will fit on the screen
1548 at once, the number of lines of memory can be indicated with
1549 .BR lm .
1550 A value of
1551 .BR lm #0
1552 indicates that the number of lines is not fixed,
1553 but that there is still more memory than fits on the screen.
1554 .PP
1555 If the terminal is one of those supported by the \s-1UNIX\s+1 virtual
1556 terminal protocol, the terminal number can be given as
1557 .BR vt .
1558 .PP
1559 Media copy
1560 strings which control an auxiliary printer connected to the terminal
1561 can be given as
1562 .BR mc0 :
1563 print the contents of the screen,
1564 .BR mc4 :
1565 turn off the printer, and
1566 .BR mc5 :
1567 turn on the printer.
1568 When the printer is on, all text sent to the terminal will be sent
1569 to the printer.
1570 It is undefined whether the text is also displayed on the terminal screen
1571 when the printer is on.
1572 A variation
1573 .B mc5p
1574 takes one parameter, and leaves the printer on for as many characters
1575 as the value of the parameter, then turns the printer off.
1576 The parameter should not exceed 255.
1577 All text, including
1578 .BR mc4 ,
1579 is transparently passed to the printer while an
1580 .B mc5p
1581 is in effect.
1582 .PP
1583 .SS Glitches and Braindamage
1584 .PP
1585 Hazeltine terminals, which do not allow \*(``~\*('' characters to be displayed should
1586 indicate \fBhz\fR.
1587 .PP
1588 Terminals which ignore a line-feed immediately after an \fBam\fR wrap,
1589 such as the Concept and vt100,
1590 should indicate \fBxenl\fR.
1591 .PP
1592 If
1593 .B el
1594 is required to get rid of standout
1595 (instead of merely writing normal text on top of it),
1596 \fBxhp\fP should be given.
1597 .PP
1598 Teleray terminals, where tabs turn all characters moved over to blanks,
1599 should indicate \fBxt\fR (destructive tabs).
1600 Note: the variable indicating this is now \*(``dest_tabs_magic_smso\*(''; in
1601 older versions, it was teleray_glitch.
1602 This glitch is also taken to mean that it is not possible to position
1603 the cursor on top of a \*(``magic cookie\*('',
1604 that to erase standout mode it is instead necessary to use
1605 delete and insert line.
1606 The ncurses implementation ignores this glitch.
1607 .PP
1608 The Beehive Superbee, which is unable to correctly transmit the escape
1609 or control C characters, has
1610 .BR xsb ,
1611 indicating that the f1 key is used for escape and f2 for control C.
1612 (Only certain Superbees have this problem, depending on the ROM.)
1613 Note that in older terminfo versions, this capability was called
1614 \*(``beehive_glitch\*(''; it is now \*(``no_esc_ctl_c\*(''.
1615 .PP
1616 Other specific terminal problems may be corrected by adding more
1617 capabilities of the form \fBx\fR\fIx\fR.
1618 .PP
1619 .SS Similar Terminals
1620 .PP
1621 If there are two very similar terminals, one (the variant) can be defined as
1622 being just like the other (the base) with certain exceptions.
1623 In the
1624 definition of the variant, the string capability \fBuse\fR can be given with
1625 the name of the base terminal.
1626 The capabilities given before
1627 .B use
1628 override those in the base type named by
1629 .BR use .
1630 If there are multiple \fBuse\fR capabilities, they are merged in reverse order.
1631 That is, the rightmost \fBuse\fR reference is processed first, then the one to
1632 its left, and so forth.
1633 Capabilities given explicitly in the entry override
1634 those brought in by \fBuse\fR references.
1635 .PP
1636 A capability can be canceled by placing \fBxx@\fR to the left of the
1637 use reference that imports it, where \fIxx\fP is the capability.
1638 For example, the entry
1639 .RS
1640 .PP
1641 2621\-nl, smkx@, rmkx@, use=2621,
1642 .RE
1643 .PP
1644 defines a 2621\-nl that does not have the \fBsmkx\fR or \fBrmkx\fR capabilities,
1645 and hence does not turn on the function key labels when in visual mode.
1646 This is useful for different modes for a terminal, or for different
1647 user preferences.
1648 .PP
1649 .SS Pitfalls of Long Entries
1650 .PP
1651 Long terminfo entries are unlikely to be a problem; to date, no entry has even
1652 approached terminfo's 4096-byte string-table maximum.
1653 Unfortunately, the termcap
1654 translations are much more strictly limited (to 1023 bytes), thus termcap translations
1655 of long terminfo entries can cause problems.
1656 .PP
1657 The man pages for 4.3BSD and older versions of \fBtgetent\fP instruct the user to
1658 allocate a 1024-byte buffer for the termcap entry.
1659 The entry gets null-terminated by
1660 the termcap library, so that makes the maximum safe length for a termcap entry
1661 1k\-1 (1023) bytes.
1662 Depending on what the application and the termcap library
1663 being used does, and where in the termcap file the terminal type that \fBtgetent\fP
1664 is searching for is, several bad things can happen.
1665 .PP
1666 Some termcap libraries print a warning message or exit if they find an
1667 entry that's longer than 1023 bytes; others do not; others truncate the
1668 entries to 1023 bytes.
1669 Some application programs allocate more than
1670 the recommended 1K for the termcap entry; others do not.
1671 .PP
1672 Each termcap entry has two important sizes associated with it: before
1673 "tc" expansion, and after "tc" expansion.
1674 "tc" is the capability that
1675 tacks on another termcap entry to the end of the current one, to add
1676 on its capabilities.
1677 If a termcap entry does not use the "tc"
1678 capability, then of course the two lengths are the same.
1679 .PP
1680 The "before tc expansion" length is the most important one, because it
1681 affects more than just users of that particular terminal.
1682 This is the
1683 length of the entry as it exists in /etc/termcap, minus the
1684 backslash-newline pairs, which \fBtgetent\fP strips out while reading it.
1685 Some termcap libraries strip off the final newline, too (GNU termcap does not).
1686 Now suppose:
1687 .bP
1688 a termcap entry before expansion is more than 1023 bytes long,
1689 .bP
1690 and the application has only allocated a 1k buffer,
1691 .bP
1692 and the termcap library (like the one in BSD/OS 1.1 and GNU) reads
1693 the whole entry into the buffer, no matter what its length, to see
1694 if it is the entry it wants,
1695 .bP
1696 and \fBtgetent\fP is searching for a terminal type that either is the
1697 long entry, appears in the termcap file after the long entry, or
1698 does not appear in the file at all (so that \fBtgetent\fP has to search
1699 the whole termcap file).
1700 .PP
1701 Then \fBtgetent\fP will overwrite memory, perhaps its stack, and probably core dump
1702 the program.
1703 Programs like telnet are particularly vulnerable; modern telnets
1704 pass along values like the terminal type automatically.
1705 The results are almost
1706 as undesirable with a termcap library, like SunOS 4.1.3 and Ultrix 4.4, that
1707 prints warning messages when it reads an overly long termcap entry.
1708 If a
1709 termcap library truncates long entries, like OSF/1 3.0, it is immune to dying
1710 here but will return incorrect data for the terminal.
1711 .PP
1712 The "after tc expansion" length will have a similar effect to the
1713 above, but only for people who actually set TERM to that terminal
1714 type, since \fBtgetent\fP only does "tc" expansion once it is found the
1715 terminal type it was looking for, not while searching.
1716 .PP
1717 In summary, a termcap entry that is longer than 1023 bytes can cause,
1718 on various combinations of termcap libraries and applications, a core
1719 dump, warnings, or incorrect operation.
1720 If it is too long even before
1721 "tc" expansion, it will have this effect even for users of some other
1722 terminal types and users whose TERM variable does not have a termcap
1723 entry.
1724 .PP
1725 When in \-C (translate to termcap) mode, the \fBncurses\fR implementation of
1726 \fB@TIC@\fR(1M) issues warning messages when the pre-tc length of a termcap
1727 translation is too long.
1728 The \-c (check) option also checks resolved (after tc
1729 expansion) lengths.
1730 .SS Binary Compatibility
1731 It is not wise to count on portability of binary terminfo entries between
1732 commercial UNIX versions.
1733 The problem is that there are at least two versions
1734 of terminfo (under HP\-UX and AIX) which diverged from System V terminfo after
1735 SVr1, and have added extension capabilities to the string table that (in the
1736 binary format) collide with System V and XSI Curses extensions.
1737 .SH EXTENSIONS
1738 .PP
1739 Searching for terminal descriptions in
1740 \fB$HOME/.terminfo\fR and TERMINFO_DIRS 
1741 is not supported by older implementations.
1742 .PP
1743 Some SVr4 \fBcurses\fR implementations, and all previous to SVr4, do not
1744 interpret the %A and %O operators in parameter strings.
1745 .PP
1746 SVr4/XPG4 do not specify whether \fBmsgr\fR licenses movement while in
1747 an alternate-character-set mode (such modes may, among other things, map
1748 CR and NL to characters that do not trigger local motions).
1749 The \fBncurses\fR implementation ignores \fBmsgr\fR in \fBALTCHARSET\fR
1750 mode.
1751 This raises the possibility that an XPG4
1752 implementation making the opposite interpretation may need terminfo
1753 entries made for \fBncurses\fR to have \fBmsgr\fR turned off.
1754 .PP
1755 The \fBncurses\fR library handles insert-character and insert-character modes
1756 in a slightly non-standard way to get better update efficiency.
1757 See
1758 the \fBInsert/Delete Character\fR subsection above.
1759 .PP
1760 The parameter substitutions for \fBset_clock\fR and \fBdisplay_clock\fR are
1761 not documented in SVr4 or the XSI Curses standard.
1762 They are deduced from the
1763 documentation for the AT&T 505 terminal.
1764 .PP
1765 Be careful assigning the \fBkmous\fR capability.
1766 The \fBncurses\fR wants to
1767 interpret it as \fBKEY_MOUSE\fR, for use by terminals and emulators like xterm
1768 that can return mouse-tracking information in the keyboard-input stream.
1769 .PP
1770 X/Open Curses does not mention italics.
1771 Portable applications must assume that numeric capabilities are
1772 signed 16-bit values.
1773 This includes the \fIno_color_video\fP (ncv) capability.
1774 The 32768 mask value used for italics with ncv can be confused with
1775 an absent or cancelled ncv.
1776 If italics should work with colors,
1777 then the ncv value must be specified, even if it is zero.
1778 .PP
1779 Different commercial ports of terminfo and curses support different subsets of
1780 the XSI Curses standard and (in some cases) different extension sets.
1781 Here
1782 is a summary, accurate as of October 1995:
1783 .PP
1784 \fBSVR4, Solaris, ncurses\fR \-\-
1785 These support all SVr4 capabilities.
1786 .PP
1787 \fBSGI\fR \-\-
1788 Supports the SVr4 set, adds one undocumented extended string
1789 capability (\fBset_pglen\fR).
1790 .PP
1791 \fBSVr1, Ultrix\fR \-\-
1792 These support a restricted subset of terminfo capabilities.
1793 The booleans end with \fBxon_xoff\fR;
1794 the numerics with \fBwidth_status_line\fR;
1795 and the strings with \fBprtr_non\fR.
1796 .PP
1797 \fBHP/UX\fR \-\-
1798 Supports the SVr1 subset, plus the SVr[234] numerics \fBnum_labels\fR,
1799 \fBlabel_height\fR, \fBlabel_width\fR, plus function keys 11 through 63, plus
1800 \fBplab_norm\fR, \fBlabel_on\fR, and \fBlabel_off\fR, plus some incompatible
1801 extensions in the string table.
1802 .PP
1803 \fBAIX\fR \-\-
1804 Supports the SVr1 subset, plus function keys 11 through 63, plus a number
1805 of incompatible string table extensions.
1806 .PP
1807 \fBOSF\fR \-\-
1808 Supports both the SVr4 set and the AIX extensions.
1809 .SH FILES
1810 .TP 25
1811 \*d/?/*
1812 files containing terminal descriptions
1813 .SH SEE ALSO
1814 \fB@TIC@\fR(1M),
1815 \fB@INFOCMP@\fR(1M),
1816 \fBcurses\fR(3X),
1817 \fBprintf\fR(3),
1818 \fBterm\fR(\*n).
1819 \fBterm_variables\fR(3X).
1820 .SH AUTHORS
1821 Zeyd M. Ben-Halim, Eric S. Raymond, Thomas E. Dickey.
1822 Based on pcurses by Pavel Curtis.