1*0a69e036Stpaul.\" $NetBSD: capfile.5,v 1.5 2020/08/23 20:23:56 tpaul Exp $ 2258cf0abSroy.\" 3258cf0abSroy.\" Copyright (c) 2012 The NetBSD Foundation, Inc. 4258cf0abSroy.\" All rights reserved. 5258cf0abSroy.\" 6258cf0abSroy.\" This code is derived from software contributed to The NetBSD Foundation 7258cf0abSroy.\" by Roy Marples. 8258cf0abSroy.\" 9258cf0abSroy.\" Redistribution and use in source and binary forms, with or without 10258cf0abSroy.\" modification, are permitted provided that the following conditions 11258cf0abSroy.\" are met: 12258cf0abSroy.\" 1. Redistributions of source code must retain the above copyright 13258cf0abSroy.\" notice, this list of conditions and the following disclaimer. 14258cf0abSroy.\" 2. Redistributions in binary form must reproduce the above copyright 15258cf0abSroy.\" notice, this list of conditions and the following disclaimer in the 16258cf0abSroy.\" documentation and/or other materials provided with the distribution. 17258cf0abSroy.\" 18258cf0abSroy.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 19258cf0abSroy.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20258cf0abSroy.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21258cf0abSroy.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22258cf0abSroy.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23258cf0abSroy.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24258cf0abSroy.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25258cf0abSroy.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26258cf0abSroy.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27258cf0abSroy.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28258cf0abSroy.\" POSSIBILITY OF SUCH DAMAGE. 29258cf0abSroy.\" 30258cf0abSroy.Dd March 27, 2012 31258cf0abSroy.Dt CAPFILE 5 32258cf0abSroy.Os 33258cf0abSroy.Sh NAME 34258cf0abSroy.Nm capfile 35258cf0abSroy.Nd capability database files 36258cf0abSroy.Sh DESCRIPTION 37258cf0abSroy.Nm 38*0a69e036Stpauldescribes the format of capability database files, 39258cf0abSroymade popular by 40258cf0abSroy.Nm termcap . 41258cf0abSroy.Nm termcap 42258cf0abSroyitself has been superseded by 43258cf0abSroy.Xr terminfo 5 , 44258cf0abSroywhich contains equivalent 45258cf0abSroy.Nm termcap 46258cf0abSroycapabilities, 47258cf0abSroyand this page exists solely to document the 48258cf0abSroy.Nm termcap 49258cf0abSroyformat as it is still used by other programs such as 50258cf0abSroy.Xr rtadvd.conf 5 . 51258cf0abSroy.Pp 52258cf0abSroyEntries in 53258cf0abSroy.Nm 54258cf0abSroyconsist of a number of `:'-separated fields. 55258cf0abSroyThe first entry for each record gives the names that are known for the 56258cf0abSroyrecord, separated by `|' characters. 57258cf0abSroyBy convention, the last name is usually a comment and is not intended as a 58258cf0abSroylookup tag. 59258cf0abSroyThe entry must be terminated by the `:' character. 60258cf0abSroy.Ss A Sample Entry 61258cf0abSroyThe following entry describes the Teletype model 33. 62258cf0abSroy.Pp 63258cf0abSroy.Bd -literal 64258cf0abSroyT3\||\|tty33\||\|33\||\|tty\||\|Teletype model 33:\e 65258cf0abSroy :bl=^G:co#72:.cr=9^M:cr=^M:do=^J:hc:os:am@: 66258cf0abSroy.Ed 67258cf0abSroy.Pp 68258cf0abSroyEntries may continue onto multiple lines by giving a \e as the last 69258cf0abSroycharacter of a line, and empty fields 70258cf0abSroymay be included for readability (here between the last field on a line 71258cf0abSroyand the first field on the next). 72258cf0abSroyComments may be included on lines beginning with 73258cf0abSroy.Dq # . 74258cf0abSroy.Ss Types of Capabilities 75258cf0abSroyCapabilities in 76258cf0abSroy.Nm 77258cf0abSroyare of three types: Boolean capabilities, 78258cf0abSroynumeric capabilities, 79258cf0abSroyand string capabilities. 80258cf0abSroy.Pp 81258cf0abSroyBoolean capabilities are just the name, to indicate the ability is present. 82258cf0abSroy.Pp 83258cf0abSroyNumeric capabilities are followed by the character `#' then the value. 84258cf0abSroyIn the example above 85258cf0abSroy.Sy \&co 86258cf0abSroygives the value `72'. 87258cf0abSroy.Pp 88258cf0abSroyString capabilities are followed by the character `=' and then the string. 89258cf0abSroyIn the example above 90258cf0abSroy.Sy \&bl 91258cf0abSroygives the value `^G'. 92258cf0abSroy.Pp 93258cf0abSroySometimes individual capabilities must be commented out. 94258cf0abSroyTo do this, put a period (`.') before the capability name. 95258cf0abSroyFor example, see the first 96258cf0abSroy.Sy \&cr 97258cf0abSroyin the example above. 98258cf0abSroy.Pp 99258cf0abSroySometimes individual capabilities must be marked as absent. 100258cf0abSroyTo do this, put a @ after the capability name. 101258cf0abSroyFor example, see the last 102258cf0abSroy.Sy \&am 103258cf0abSroyin the example above. 104258cf0abSroyThis is only useful when merging entries. 105258cf0abSroySee the tc=name discussion below for more details. 106258cf0abSroy.Ss Encoding 107258cf0abSroyNumeric capability values may be given in one of three numeric bases. 108258cf0abSroyIf the number starts with either 109258cf0abSroy.Ql 0x 110258cf0abSroyor 111258cf0abSroy.Ql 0X 112258cf0abSroyit is interpreted as a hexadecimal number (both upper and lower case a-f 113258cf0abSroymay be used to denote the extended hexadecimal digits). 114258cf0abSroyOtherwise, if the number starts with a 115258cf0abSroy.Ql 0 116258cf0abSroyit is interpreted as an octal number. 117258cf0abSroyOtherwise the number is interpreted as a decimal number. 118258cf0abSroy.Pp 119258cf0abSroyString capability values may contain any character. 120258cf0abSroyNon-printable 121258cf0abSroy.Dv ASCII 122258cf0abSroycodes, new lines, and colons may be conveniently represented by the use 123258cf0abSroyof escape sequences: 124258cf0abSroy.Bl -column "\eX,X\eX" "(ASCII octal nnn)" 12501869ca4Swiz.It ^X ('\fIX\fP' & 037) control-\fIX\fP 126258cf0abSroy.It \eb, \eB (ASCII 010) backspace 127258cf0abSroy.It \et, \eT (ASCII 011) tab 128258cf0abSroy.It \en, \eN (ASCII 012) line feed (newline) 129258cf0abSroy.It \ef, \eF (ASCII 014) form feed 130258cf0abSroy.It \er, \eR (ASCII 015) carriage return 131258cf0abSroy.It \ee, \eE (ASCII 027) escape 132258cf0abSroy.It \ec, \eC (:) colon 133258cf0abSroy.It \e\e (\e\|) back slash 134258cf0abSroy.It \e^ (^) caret 135258cf0abSroy.It \e\fInnn\fP (ASCII octal \fInnn\fP) 136258cf0abSroy.El 137258cf0abSroy.Pp 138258cf0abSroyA 139258cf0abSroy.Sq \e 140258cf0abSroyfollowed by up to three octal digits directly specifies 141258cf0abSroythe numeric code for a character. 142258cf0abSroyThe use of 143258cf0abSroy.Tn ASCII 144258cf0abSroy.Dv NUL Ns s , 145258cf0abSroywhile easily 146258cf0abSroyencoded, causes all sorts of problems and must be used with care since 147258cf0abSroy.Dv NUL Ns s 148258cf0abSroyare typically used to denote the end of strings; many applications 149258cf0abSroyuse 150258cf0abSroy.Sq \e200 151258cf0abSroyto represent a 152258cf0abSroy.Dv NUL . 153258cf0abSroy.Pp 154258cf0abSroyA special capability, 155258cf0abSroy.Qq tc=name , 156258cf0abSroyis used to indicate that the record specified by 157258cf0abSroy.Fa name 158258cf0abSroyshould be substituted for the 159258cf0abSroy.Qq tc 160258cf0abSroycapability. 161258cf0abSroy.Qq tc 162258cf0abSroycapabilities may interpolate records which also contain 163258cf0abSroy.Qq tc 164258cf0abSroycapabilities and more than one 165258cf0abSroy.Qq tc 166258cf0abSroycapability may be used in a record. 167258cf0abSroyA 168258cf0abSroy.Qq tc 169258cf0abSroyexpansion scope (i.e. where the argument is searched for) contains the 170258cf0abSroyfile in which the 171258cf0abSroy.Qq tc 172258cf0abSroyis declared and all subsequent files in the file array. 173258cf0abSroy.Sh SEE ALSO 174258cf0abSroy.Xr cgetcap 3 , 175258cf0abSroy.Xr termcap 3 , 176258cf0abSroy.Xr terminfo 5 177258cf0abSroy.Sh HISTORY 178258cf0abSroy.Nm termcap 179258cf0abSroydescribed the capabilities of terminals, used by programs such as 180258cf0abSroy.Xr vi 1 181258cf0abSroyand 182258cf0abSroy.Xr hack 6 . 183258cf0abSroyThese programs still use 184258cf0abSroy.Nm termcap 185258cf0abSroytoday, but their capability requests are mapped onto 186258cf0abSroy.Xr terminfo 5 187258cf0abSroyones instead. 188258cf0abSroyAs such, the termcap database file is no longer shipped with 189258cf0abSroy.Nx . 190258cf0abSroy.Sh AUTHORS 191a5684d07Swiz.An Roy Marples Aq Mt roy@NetBSD.org 192