termcap.5 (f350abf81491e0c03827f0826f4516d1c0f61d6a) termcap.5 (c2d6966a951d53144707facae9b624de03aeb20f)
1.\" Copyright (c) 1985, 1991, 1993, 1994
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 113 unchanged lines hidden (view full) ---

122capability.
123You may find some codes in the description field:
124.Pp
125.Bl -tag -width #[1-9]
126.It (P)
127indicates that padding may be specified.
128.It #[1-9]
129in the description field indicates that the string is passed through
1.\" Copyright (c) 1985, 1991, 1993, 1994
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 113 unchanged lines hidden (view full) ---

122capability.
123You may find some codes in the description field:
124.Pp
125.Bl -tag -width #[1-9]
126.It (P)
127indicates that padding may be specified.
128.It #[1-9]
129in the description field indicates that the string is passed through
130.Xr tparm
130.Xr tparm 3
131or
131or
132.Xr tgoto
132.Xr tgoto 3
133with parms as given (#\fIi\fP).
134.It (P*)
135indicates that padding may vary in proportion to the number of
136lines affected.
137.It (#\d\fIi\fP\u)
138indicates the \fIi\fP\uth\d parameter.
139.El
140.Pp

--- 624 unchanged lines hidden (view full) ---

765Finally, string-valued capabilities, such as
766.Sy \&ce
767(clear-to-end-of-line
768sequence) are given by the two-letter code, an `=', then a string
769ending at the next following `:'.
770A delay in milliseconds may appear after
771the `=' in such a capability,
772which causes padding characters to be supplied by
133with parms as given (#\fIi\fP).
134.It (P*)
135indicates that padding may vary in proportion to the number of
136lines affected.
137.It (#\d\fIi\fP\u)
138indicates the \fIi\fP\uth\d parameter.
139.El
140.Pp

--- 624 unchanged lines hidden (view full) ---

765Finally, string-valued capabilities, such as
766.Sy \&ce
767(clear-to-end-of-line
768sequence) are given by the two-letter code, an `=', then a string
769ending at the next following `:'.
770A delay in milliseconds may appear after
771the `=' in such a capability,
772which causes padding characters to be supplied by
773.Xr tputs
773.Xr tputs 3
774after the remainder of the string is sent to provide this delay.
775The delay can be either a number,
776such as `20', or a number followed by
777an `*',
778such as `3*'.
779An `*' indicates that the padding required is proportional
780to the number of lines affected by the operation, and the amount given is
781the per-affected-line padding required.

--- 61 unchanged lines hidden (view full) ---

843.Sy \&ta
844in the example above.
845.Ss Preparing Descriptions
846The most effective way to prepare a terminal description is by imitating
847the description of a similar terminal in
848.Nm
849and to build up a description gradually, using partial descriptions
850with
774after the remainder of the string is sent to provide this delay.
775The delay can be either a number,
776such as `20', or a number followed by
777an `*',
778such as `3*'.
779An `*' indicates that the padding required is proportional
780to the number of lines affected by the operation, and the amount given is
781the per-affected-line padding required.

--- 61 unchanged lines hidden (view full) ---

843.Sy \&ta
844in the example above.
845.Ss Preparing Descriptions
846The most effective way to prepare a terminal description is by imitating
847the description of a similar terminal in
848.Nm
849and to build up a description gradually, using partial descriptions
850with
851.Xr \&vi
851.Xr \&vi 1
852to check that they are correct.
853Be aware that a very unusual terminal may expose deficiencies in
854the ability of the
855.Nm
856file to describe it
857or bugs in
852to check that they are correct.
853Be aware that a very unusual terminal may expose deficiencies in
854the ability of the
855.Nm
856file to describe it
857or bugs in
858.Xr \&vi .
858.Xr \&vi 1 .
859To easily test a new terminal description you are working on
860you can put it in your home directory in a file called
861.Pa .termcap
862and programs will look there before looking in
863.Pa /usr/share/misc/termcap .
864You can also set the environment variable
865.Ev TERMPATH
866to a list of absolute file pathnames (separated by spaces or colons),

--- 6 unchanged lines hidden (view full) ---

873environment variable is usually set to the
874.Nm
875entry itself
876to avoid reading files when starting up a program.
877.Pp
878To get the padding for insert-line right
879(if the terminal manufacturer did not document it),
880a severe test is to use
859To easily test a new terminal description you are working on
860you can put it in your home directory in a file called
861.Pa .termcap
862and programs will look there before looking in
863.Pa /usr/share/misc/termcap .
864You can also set the environment variable
865.Ev TERMPATH
866to a list of absolute file pathnames (separated by spaces or colons),

--- 6 unchanged lines hidden (view full) ---

873environment variable is usually set to the
874.Nm
875entry itself
876to avoid reading files when starting up a program.
877.Pp
878To get the padding for insert-line right
879(if the terminal manufacturer did not document it),
880a severe test is to use
881.Xr \&vi
881.Xr \&vi 1
882to edit
883.Pa /etc/passwd
884at 9600 baud, delete roughly 16 lines from the middle of the screen,
885then hit the `u' key several times quickly.
886If the display messes up, more padding is usually needed.
887A similar test can be used for insert-character.
888.Ss Basic Capabilities
889The number of columns on each line of the display is given by the

--- 171 unchanged lines hidden (view full) ---

1061capability.)
1062.Pp
1063The
1064.Sy \&%
1065encodings have the following meanings:
1066.Bl -column xxxxx
1067.It "%% output `%'"
1068.It "%d output value as in"
882to edit
883.Pa /etc/passwd
884at 9600 baud, delete roughly 16 lines from the middle of the screen,
885then hit the `u' key several times quickly.
886If the display messes up, more padding is usually needed.
887A similar test can be used for insert-character.
888.Ss Basic Capabilities
889The number of columns on each line of the display is given by the

--- 171 unchanged lines hidden (view full) ---

1061capability.)
1062.Pp
1063The
1064.Sy \&%
1065encodings have the following meanings:
1066.Bl -column xxxxx
1067.It "%% output `%'"
1068.It "%d output value as in"
1069.Xr printf
1069.Xr printf 3
1070%d
1071.It "%2 output value as in"
1070%d
1071.It "%2 output value as in"
1072.Xr printf
1072.Xr printf 3
1073%2d
1074.It "%3 output value as in"
1073%2d
1074.It "%3 output value as in"
1075.Xr printf
1075.Xr printf 3
1076%3d
1077.It "%. output value as in"
1076%3d
1077.It "%. output value as in"
1078.Xr printf
1078.Xr printf 3
1079%c
1080.It "%+" Ns Em x Ta No add
1081.Em x
1082to value, then do %.
1083.It "%>" Ns Em \&xy Ta No if
1084value >
1085.Em x
1086then add

--- 588 unchanged lines hidden (view full) ---

1675and
1676.Sy \&if ,
1677the name of a file containing long initialization strings.
1678These strings are expected to set the terminal into modes
1679consistent with the rest of the
1680.Nm
1681description.
1682They are normally sent to the terminal by the
1079%c
1080.It "%+" Ns Em x Ta No add
1081.Em x
1082to value, then do %.
1083.It "%>" Ns Em \&xy Ta No if
1084value >
1085.Em x
1086then add

--- 588 unchanged lines hidden (view full) ---

1675and
1676.Sy \&if ,
1677the name of a file containing long initialization strings.
1678These strings are expected to set the terminal into modes
1679consistent with the rest of the
1680.Nm
1681description.
1682They are normally sent to the terminal by the
1683.Xr tset
1683.Xr tset 1
1684program each time the user logs in.
1685They will be printed in the following order:
1686.Sy \&is ;
1687setting tabs using
1688.Sy \&ct
1689and
1690.Sy \&st ;
1691and finally

--- 9 unchanged lines hidden (view full) ---

1701.Sy "\&i\&3"
1702after the other initializations.)
1703A pair of sequences that does a harder reset from a totally unknown state
1704can be analogously given as
1705.Sy \&rs
1706and
1707.Sy \&if .
1708These strings are output by the
1684program each time the user logs in.
1685They will be printed in the following order:
1686.Sy \&is ;
1687setting tabs using
1688.Sy \&ct
1689and
1690.Sy \&st ;
1691and finally

--- 9 unchanged lines hidden (view full) ---

1701.Sy "\&i\&3"
1702after the other initializations.)
1703A pair of sequences that does a harder reset from a totally unknown state
1704can be analogously given as
1705.Sy \&rs
1706and
1707.Sy \&if .
1708These strings are output by the
1709.Xr reset
1709.Xr reset 1
1710program, which is used when the terminal gets into a wedged state.
1711.Pf ( Xr Terminfo
1712uses
1713.Sy "\&r1-r3"
1714instead of
1715.Sy \&rs . )
1716Commands are normally placed in
1717.Sy \&rs

--- 27 unchanged lines hidden (view full) ---

1745even if they are present,
1746since the user may not have the tab stops properly set.
1747If the terminal has hardware tabs that are initially set every
1748.Ar n
1749positions when the terminal is powered up, then the numeric parameter
1750.Sy \&it
1751is given, showing the number of positions between tab stops.
1752This is normally used by the
1710program, which is used when the terminal gets into a wedged state.
1711.Pf ( Xr Terminfo
1712uses
1713.Sy "\&r1-r3"
1714instead of
1715.Sy \&rs . )
1716Commands are normally placed in
1717.Sy \&rs

--- 27 unchanged lines hidden (view full) ---

1745even if they are present,
1746since the user may not have the tab stops properly set.
1747If the terminal has hardware tabs that are initially set every
1748.Ar n
1749positions when the terminal is powered up, then the numeric parameter
1750.Sy \&it
1751is given, showing the number of positions between tab stops.
1752This is normally used by the
1753.Xr tset
1753.Xr tset 1
1754command to determine whether to set the driver mode for hardware tab
1755expansion, and whether to set the tab stops.
1756If the terminal has tab stops that can be saved in nonvolatile memory, the
1757.Nm
1758description can assume that they are properly set.
1759.Pp
1760If there are commands to set and clear tab stops, they can be given as
1761.Sy \&ct
1762(clear all tab stops) and
1763.Sy \&st
1764(set a tab stop in the current column of every row).
1765If a more complex sequence is needed to set the tabs than can be
1766described by this, the sequence can be placed in
1767.Sy \&is
1768or
1769.Sy \&if .
1770.Ss Delays
1771Certain capabilities control padding in the terminal driver.
1772These are primarily needed by hardcopy terminals and are used by the
1754command to determine whether to set the driver mode for hardware tab
1755expansion, and whether to set the tab stops.
1756If the terminal has tab stops that can be saved in nonvolatile memory, the
1757.Nm
1758description can assume that they are properly set.
1759.Pp
1760If there are commands to set and clear tab stops, they can be given as
1761.Sy \&ct
1762(clear all tab stops) and
1763.Sy \&st
1764(set a tab stop in the current column of every row).
1765If a more complex sequence is needed to set the tabs than can be
1766described by this, the sequence can be placed in
1767.Sy \&is
1768or
1769.Sy \&if .
1770.Ss Delays
1771Certain capabilities control padding in the terminal driver.
1772These are primarily needed by hardcopy terminals and are used by the
1773.Xr tset
1773.Xr tset 1
1774program to set terminal driver modes appropriately.
1775Delays embedded in the capabilities
1776.Sy \&cr ,
1777.Sy \&sf ,
1778.Sy \&le ,
1779.Sy \&ff ,
1780and
1781.Sy \&ta
1782will cause the appropriate delay bits to be set in the terminal driver.
1783If
1784.Sy \&pb
1785(padding baud rate) is given, these values can be ignored at baud rates
1786below the value of
1787.Sy \&pb .
1788For
1789.Bx 4.2
1774program to set terminal driver modes appropriately.
1775Delays embedded in the capabilities
1776.Sy \&cr ,
1777.Sy \&sf ,
1778.Sy \&le ,
1779.Sy \&ff ,
1780and
1781.Sy \&ta
1782will cause the appropriate delay bits to be set in the terminal driver.
1783If
1784.Sy \&pb
1785(padding baud rate) is given, these values can be ignored at baud rates
1786below the value of
1787.Sy \&pb .
1788For
1789.Bx 4.2
1790.Xr tset ,
1790.Xr tset 1 ,
1791the delays are given as numeric capabilities
1792.Sy \&dC ,
1793.Sy \&dN ,
1794.Sy \&dB ,
1795.Sy \&dF ,
1796and
1797.Sy \&dT
1798instead.

--- 106 unchanged lines hidden (view full) ---

1905.Xr make 1 .
1906.Pp
1907Terminal descriptions that do not represent a specific kind of known
1908terminal, such as
1909.Em switch ,
1910.Em dialup ,
1911.Em patch ,
1912and
1791the delays are given as numeric capabilities
1792.Sy \&dC ,
1793.Sy \&dN ,
1794.Sy \&dB ,
1795.Sy \&dF ,
1796and
1797.Sy \&dT
1798instead.

--- 106 unchanged lines hidden (view full) ---

1905.Xr make 1 .
1906.Pp
1907Terminal descriptions that do not represent a specific kind of known
1908terminal, such as
1909.Em switch ,
1910.Em dialup ,
1911.Em patch ,
1912and
1913.Xr network ,
1913.Em network ,
1914should include the
1915.Sy \&gn
1916(generic) capability so that programs can complain that they do not know
1917how to talk to the terminal.
1918(This capability does not apply to
1919.Em virtual
1920terminal descriptions for which the escape sequences are known.)
1921.Pp

--- 224 unchanged lines hidden ---
1914should include the
1915.Sy \&gn
1916(generic) capability so that programs can complain that they do not know
1917how to talk to the terminal.
1918(This capability does not apply to
1919.Em virtual
1920terminal descriptions for which the escape sequences are known.)
1921.Pp

--- 224 unchanged lines hidden ---