263:
database content to find the database record for the target terminal type. The terminal type name index is, effectively, the Unix/POSIX filesystem's ordinary directory structure. Originally, Unix had severe performance problems with large directories containing many files, and thus terminfo uses a two-level structure, dividing up the directory entries by first letter into a series of subdirectories. More recent filesystem formats used on Unix systems don't suffer as much from such problems (because their on-disc directory structures are no longer simple arrays of entries, but are organized into trees or hash tables) and so the necessity for this design element, that still exists in modern terminfo implementations, has since disappeared.
160:. This database consists of a series of records (each of which consists of one or more lines in the file, joined by backslash characters at the ends of each line that continues onto a following one) each of which represents the capabilities of a particular terminal. The fields of the record comprise the terminal type name, or names, followed by a sequence of capabilities, separated by colons. The capability fields themselves fall into three groups:
49:) is capable of, but that a teletypewriter is not; such as moving the terminal's cursor to positions on the screen, clearing and scrolling all or parts of the screen, turning on and off attached printer devices, programming programmable function keys, changing display colours and attributes (such as
129:
with windows, dialogue boxes, buttons, labels, input fields, menus, and so forth. The intention is that this allows applications programs to be independent of actual terminal characteristics. They don't need to hardwire any control codes or escape sequences into their code, and so don't have
262:
The use of a machine-readable format was to avoid the unnecessary overhead, in applications programs using systems such as the termcap library, of repeatedly parsing the database content to read the fields of a record. The use of multiple files was to avoid the similar overhead of parsing the
173:
These comprise the control codes and escape sequences sent to the terminal in order for it to perform some action (not necessarily a display action). An example of one of the simplest is the output sequence to clear the screen, which may be the
285:(which is, presumably, the terminal by which the function denoted by the capability is to be performed). One of the simplest operations is clearing the screen. The name of the database field that stores the output sequence for this is
336:
to look up a different terminal type in the database, with a command-line option to the command. So, for example, to issue the reset sequence appropriate for the type of terminal named "vt100" in the database (usually a
167:
These comprise such things as the (nominal) number of rows and columns the terminal's display has, whether output automatically wraps onto the next line when it reaches the end of a line, and so forth.
227:
rmation") library was developed for System V systems. It uses a database stored in multiple files within a directory, which can be variously (on different Unices and POSIX-compatible systems)
246:
Unlike the termcap database, the terminfo database is compiled, a machine-readable database that is constructed from a human-readable source file format by a utility program,
301:
Another operation is initializing or resetting the terminal to a known default state (of character attributes, fonts, colours, and so forth). The commands for this are:
694:
670:
643:
624:
600:
581:
558:
537:
516:
196:
These comprise the control codes and escape sequences that the terminal sends to the host to represent various actions and events, such as
109:, these capabilities are encoded in databases that are configured by a system administrator and accessed from programs via the
41:
that can be sent to or received from the terminal. The escape codes sent to the terminal perform various functions that a
118:
25:
689:
329:
106:
250:. They can be decompiled from machine-readable form back to human-readable form by another utility program,
281:
command is used to look up a specific capability in the system's database, and output it to the command's
126:
53:), and setting display title strings. The escape codes received from the terminal signify things such as
325:
187:
254:. The command to output the human-readable form of the "vt100" terminal definition, for example, is:
240:
33:, that host systems (and the programs that run on them) can make use of. They are (mainly) of
666:
639:
620:
596:
577:
554:
533:
512:
46:
341:
terminal), irrespective of terminal type specified in environment variables, the command is:
282:
42:
614:
610:
156:
abilities") library was developed for BSD systems. It uses a database stored in the file
570:
527:
30:
683:
548:
50:
197:
125:
libraries, by which applications programs use the terminal capabilities to provide
54:
34:
38:
86:
82:
29:
are various terminal features, above and beyond what is available from a pure
201:
175:
58:
182:) character on some types of terminal but may, say, be the escape sequence
130:
problems being used on a range of terminals with a range of capabilities.
214:
110:
78:
74:
70:
62:
139:
122:
114:
66:
474:
472:
90:
338:
102:
330:
controlling environment variables of the POSIX terminal interface
619:. Addison-Wesley professional computing series. Addison-Wesley.
272:
117:
library), upon which in turn are built libraries such as the
576:. A nutshell handbook (3rd ed.). O'Reilly Media, Inc.
665:. Nutshell handbook (3rd ed.). O'Reilly Media, Inc.
432:
430:
405:
403:
390:
388:
386:
384:
382:
369:
367:
365:
363:
16:
Features of a computer terminal beyond displaying text
239:. (Its location isn't even uniform across different
459:
457:
569:
267:Utility programs to exercise terminal capabilities
661:Strang, John; Mui, Linda; O'Reilly, Tim (1991).
321:command uses the terminal type specified by the
170:control sequences sent as output to the terminal
636:Solaris 8 Advanced System Administrator's Guide
550:UNIX system V release 4: the complete reference
193:control sequences sent as input by the terminal
332:. This can be overridden, however, to force
8:
529:Linux Command Line and Shell Scripting Bible
97:Unix and POSIX: termcap, terminfo, et al.
19:In computing and telecommunications, the
183:
179:
478:
359:
490:
436:
421:
409:
394:
532:. Bible Series. John Wiley and Sons.
448:
373:
7:
509:UNIX unbounded: a beginning approach
463:
113:library (which supersedes the older
105:-compliant systems that support the
638:(3rd ed.). Prentice Hall PTR.
289:, so the command arguments to the
14:
593:Encyclopaedia of Operating System
293:program to clear the screen are
595:. Anmol Publications PVT. LTD.
572:Essential system administration
511:(5th ed.). Prentice Hall.
164:characteristics of the terminal
1:
695:Telecommunications equipment
186:on a terminal that requires
616:The art of Unix programming
711:
270:
212:
137:
61:, and other special key (
547:Coffin, Stephen (1991).
493:, p. 244–245.
481:, p. 144–145.
343:
311:
303:
295:
256:
107:POSIX terminal interface
634:Winsor, Janice (2001).
553:. Osborne McGraw-Hill.
237:/usr/share/lib/terminfo
127:textual user interfaces
45:terminal (and software
591:Kumar, Sudhir (2004).
568:Frisch, รleen (2002).
526:Blum, Richard (2008).
241:distributions of Linux
277:On Unix systems, the
271:Further information:
188:ANSI escape sequences
663:Termcap and terminfo
507:Afzal, Amir (2008).
326:environment variable
233:/usr/share/terminfo
690:Computer terminals
355:What supports what
101:In Unix and other
47:terminal emulators
672:978-0-937175-22-4
645:978-0-13-027703-9
626:978-0-13-142901-7
602:978-81-261-1792-5
583:978-0-596-00343-2
560:978-0-07-881653-6
539:978-0-470-25128-7
518:978-0-13-119449-6
345:tput-Tvt100reset
229:/usr/lib/terminfo
702:
676:
649:
630:
611:Raymond, Eric S.
606:
587:
575:
564:
543:
522:
494:
488:
482:
476:
467:
461:
452:
446:
440:
434:
425:
419:
413:
407:
398:
392:
377:
371:
335:
324:
320:
292:
280:
253:
249:
238:
234:
230:
159:
147:
89:, and so forth)
710:
709:
705:
704:
703:
701:
700:
699:
680:
679:
673:
660:
657:
655:Further reading
652:
646:
633:
627:
609:
603:
590:
584:
567:
561:
546:
540:
525:
519:
506:
502:
497:
489:
485:
477:
470:
462:
455:
447:
443:
435:
428:
420:
416:
408:
401:
393:
380:
372:
361:
357:
352:
347:
346:
333:
322:
318:
315:
314:
307:
306:
299:
298:
290:
288:
283:standard output
278:
275:
269:
260:
259:
251:
247:
236:
232:
228:
219:The terminfo ("
217:
211:
185:
181:
157:
145:
142:
136:
99:
17:
12:
11:
5:
708:
706:
698:
697:
692:
682:
681:
678:
677:
671:
656:
653:
651:
650:
644:
631:
625:
607:
601:
588:
582:
565:
559:
544:
538:
523:
517:
503:
501:
498:
496:
495:
483:
468:
453:
451:, p. 417.
441:
439:, p. 769.
426:
424:, p. 372.
414:
412:, p. 115.
399:
397:, p. 770.
378:
376:, p. 419.
358:
356:
353:
351:
348:
344:
312:
304:
296:
286:
268:
265:
257:
213:Main article:
210:
207:
206:
205:
204:being pressed.
194:
191:
171:
168:
165:
138:Main article:
135:
132:
98:
95:
31:teletypewriter
15:
13:
10:
9:
6:
4:
3:
2:
707:
696:
693:
691:
688:
687:
685:
674:
668:
664:
659:
658:
654:
647:
641:
637:
632:
628:
622:
618:
617:
612:
608:
604:
598:
594:
589:
585:
579:
574:
573:
566:
562:
556:
552:
551:
545:
541:
535:
531:
530:
524:
520:
514:
510:
505:
504:
499:
492:
487:
484:
480:
475:
473:
469:
466:, p. 31.
465:
460:
458:
454:
450:
445:
442:
438:
433:
431:
427:
423:
418:
415:
411:
406:
404:
400:
396:
391:
389:
387:
385:
383:
379:
375:
370:
368:
366:
364:
360:
354:
349:
342:
340:
331:
328:, one of the
327:
317:Normally the
310:
302:
294:
284:
274:
266:
264:
258:infocmpvt100
255:
244:
242:
226:
222:
216:
208:
203:
199:
198:function keys
195:
192:
189:
177:
172:
169:
166:
163:
162:
161:
155:
151:
141:
133:
131:
128:
124:
120:
116:
112:
108:
104:
96:
94:
92:
88:
84:
80:
76:
72:
68:
64:
60:
56:
52:
51:reverse video
48:
44:
40:
36:
35:control codes
32:
28:
27:
22:
662:
635:
615:
592:
571:
549:
528:
508:
500:Sources used
486:
479:Raymond 2004
444:
417:
316:
308:
300:
276:
261:
245:
224:
220:
218:
158:/etc/termcap
153:
149:
143:
100:
55:function key
39:escape codes
24:
21:capabilities
20:
18:
491:Winsor 2001
437:Frisch 2002
422:Coffin 1991
410:Coffin 1991
395:Frisch 2002
684:Categories
449:Kumar 2004
374:Afzal 2008
350:References
313:tputreset
297:tputclear
235:, or even
202:arrow keys
91:keystrokes
87:delete key
83:insert key
464:Blum 2008
339:DEC VT100
305:tputinit
176:form feed
59:arrow key
613:(2004).
215:terminfo
209:terminfo
111:terminfo
79:PgDn key
75:PgUp key
71:help key
63:home key
26:terminal
252:infocmp
178:(ASCII
146:termcap
140:termcap
134:termcap
123:ncurses
115:termcap
67:end key
669:
642:
623:
599:
580:
557:
536:
515:
148:(for "
119:curses
287:clear
223:inal
152:inal
103:POSIX
23:of a
667:ISBN
640:ISBN
621:ISBN
597:ISBN
578:ISBN
555:ISBN
534:ISBN
513:ISBN
334:tput
323:TERM
319:tput
309:and
291:tput
279:tput
273:tput
225:info
221:term
200:and
150:term
144:The
121:and
37:and
248:tic
243:.)
184:โ2J
154:cap
43:CRT
686::
471:^
456:^
429:^
402:^
381:^
362:^
231:,
180:FF
93:.
85:,
81:,
77:,
73:,
69:,
65:,
57:,
675:.
648:.
629:.
605:.
586:.
563:.
542:.
521:.
190:.
Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.