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