Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
International Rescue Committe

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
Copyright Info
Terms of Use
Privacy Info
Masthead / Impressum
Your Account

Private Messages

News Archive
Submit News
User Articles
Web Links


The Web

Who's Online
There are currently, 81 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here






       Compiled terminfo descriptions are placed under the direc­
       tory /usr/share/terminfo.  In  order  to  avoid  a  linear
       search of a huge UNIX system directory, a two-level scheme
       is used: /usr/share/terminfo/c/name where name is the name
       of  the  terminal,  and  c is the first character of name.
       Thus, act4  can  be  found  in  the  file  /usr/share/ter­
       minfo/a/act4.   Synonyms  for the same terminal are imple­
       mented by multiple links to the same compiled file.

       The format has been chosen so that it will be the same  on
       all  hardware.   An  8 or more bit byte is assumed, but no
       assumptions about byte  ordering  or  sign  extension  are

       The  compiled  file  is  created with the tic program, and
       read by the routine setupterm.  The file is  divided  into
       six parts: the header, terminal names, boolean flags, num­
       bers, strings, and string table.

       The header section begins the file.  This section contains
       six  short  integers in the format described below.  These
       integers are (1) the magic number (octal  0432);  (2)  the
       size,  in  bytes,  of the names section; (3) the number of
       bytes in the boolean section;  (4)  the  number  of  short
       integers in the numbers section; (5) the number of offsets
       (short integers) in the strings section; (6) the size,  in
       bytes, of the string table.

       Short  integers  are stored in two 8-bit bytes.  The first
       byte contains the least significant 8 bits of  the  value,
       and  the second byte contains the most significant 8 bits.
       (Thus, the value represented  is  256*second+first.)   The
       value -1 is represented by the two bytes 0377, 0377; other
       negative values are illegal. This  value  generally  means
       that  the  corresponding  capability  is missing from this
       terminal.  Note that this format corresponds to the  hard­
       ware  of  the  VAX  and  PDP-11  (that  is,  little-endian
       machines).  Machines where this does not correspond to the
       hardware  must  read the integers as two bytes and compute
       the little-endian value.

       The terminal names section comes next.   It  contains  the
       first  line of the terminfo description, listing the vari­
       ous names for the terminal, separated by the  `|'  charac­
       ter.   The section is terminated with an ASCII NUL charac­

       The boolean flags have one byte for each flag.  This  byte
       capability is taken to be missing.

       The  strings  section is also similar.  Each capability is
       stored as a short integer, in the format above.   A  value
       of  -1  means  the  capability is missing.  Otherwise, the
       value is taken as an offset  from  the  beginning  of  the
       string table.  Special characters in ^X or \c notation are
       stored in their interpreted form, not the printing  repre­
       sentation.  Padding information $<nn> and parameter infor­
       mation %x are stored intact in uninterpreted form.

       The final section is the string table.   It  contains  all
       the values of string capabilities referenced in the string
       section.  Each string is null terminated.

       Note that it is possible for setupterm to expect a differ­
       ent  set  of capabilities than are actually present in the
       file.  Either the database may  have  been  updated  since
       setupterm has been recompiled (resulting in extra unrecog­
       nized entries in the file) or the program  may  have  been
       recompiled  more  recently  than  the database was updated
       (resulting in missing  entries).   The  routine  setupterm
       must  be prepared for both possibilities - this is why the
       numbers and sizes are included.   Also,  new  capabilities
       must  always  be added at the end of the lists of boolean,
       number, and string capabilities.

       Despite the consistent use of  little-endian  for  numbers
       and  the  otherwise self-describing format, it is not wise
       to count on portability of binary terminfo entries between
       commercial  UNIX  versions.  The problem is that there are
       at least three versions of terminfo (under HP-UX, AIX, and
       OSF/1)  which  diverged from System V terminfo after SVr1,
       and have added extension capabilities to the string  table
       that  (in the binary format) collide with System V and XSI
       Curses extensions.  See terminfo(5) for  detailed  discus­
       sion of terminfo source compatibility issues.

       As  an  example, here is a hex dump of the description for
       the Lear-Siegler ADM-3, a  popular  though  rather  stupid
       early terminal:

       adm3a|lsi adm3a,
               cols#80, lines#24,
               bel=^G, clear= 32$<1>, cr=^M, cub1=^H, cud1=^J,
               cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K,
               home=^^, ind=^J,

       0000  1a 01 10 00 02 00 03 00  82 00 31 00 61 64 6d 33  ........ ..1.adm3
       0010  61 7c 6c 73 69 20 61 64  6d 33 61 00 00 01 50 00  a|lsi ad m3a...P.
       0020  ff ff 18 00 ff ff 00 00  02 00 ff ff ff ff 04 00  ........ ........
       0110  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
       0120  ff ff ff ff ff ff 2f 00  07 00 0d 00 1a 24 3c 31  ....../. .....$<1
       0130  3e 00 1b 3d 25 70 31 25  7b 33 32 7d 25 2b 25 63  >..=%p1% {32}%+%c
       0140  25 70 32 25 7b 33 32 7d  25 2b 25 63 00 0a 00 1e  %p2%{32} %+%c....
       0150  00 08 00 0c 00 0b 00 0a  00                       ........ .

       Some  limitations:  total  compiled  entries cannot exceed
       4096 bytes.  The name field cannot exceed 128 bytes.


       /usr/share/terminfo/*/*  compiled terminal capability data


       ncurses(3NCURSES), terminfo(5).


The Linux Tutorial is always looking for new contributors.



Security Code
Security Code
Type Security Code

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!

Amazon Wish List

Did You Know?
You can help in many different ways.


Tell a Friend About Us

Bookmark and Share

Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.14 Seconds