CAPFILE(5) | File Formats Manual | CAPFILE(5) |
Entries in capfile consist of a number of `:'-separated fields. The first entry for each record gives the names that are known for the record, separated by `|' characters. By convention, the last name is usually a comment and is not intended as a lookup tag. The entry must be terminated by the `:' character.
T3|tty33|33|tty|Teletype model 33:\ :bl=^G:co#72:.cr=9^M:cr=^M:do=^J:hc:os:am@:
Entries may continue onto multiple lines by giving a \ as the last character of a line, and empty fields may be included for readability (here between the last field on a line and the first field on the next). Comments may be included on lines beginning with “#”.
Boolean capabilities are just the name, to indicate the ability is present.
Numeric capabilities are followed by the character `#' then the value. In the example above co gives the value `72'.
String capabilities are followed by the character `=' and then the string. In the example above bl gives the value `^G'.
Sometimes individual capabilities must be commented out. To do this, put a period (`.') before the capability name. For example, see the first cr in the example above.
Sometimes individual capabilities must be marked as absent. To do this, put a @ after the capability name. For example, see the last am in the example above. This is only useful when merging entries. See the tc=name discussion below for more details.
0x
’ or ‘0X
’ it is interpreted as a hexadecimal number (both upper and lower case a-f may be used to denote the extended hexadecimal digits). Otherwise, if the number starts with a ‘0
’ it is interpreted as an octal number. Otherwise the number is interpreted as a decimal number.String capability values may contain any character. Non-printable ASCII codes, new lines, and colons may be conveniently represented by the use of escape sequences:
^X | ('X' & 037) | control-X |
\b, \B | (ASCII 010) | backspace |
\t, \T | (ASCII 011) | tab |
\n, \N | (ASCII 012) | line feed (newline) |
\f, \F | (ASCII 014) | form feed |
\r, \R | (ASCII 015) | carriage return |
\e, \E | (ASCII 027) | escape |
\c, \C | (:) | colon |
\\ | (\) | back slash |
\^ | (^) | caret |
\nnn | (ASCII octal nnn) |
A ‘\’ followed by up to three octal digits directly specifies the numeric code for a character. The use of ASCII NULs, while easily encoded, causes all sorts of problems and must be used with care since NULs are typically used to denote the end of strings; many applications use ‘\200’ to represent a NUL.
A special capability, “tc=name”, is used to indicate that the record specified by name should be substituted for the “tc” capability. “tc” capabilities may interpolate records which also contain “tc” capabilities and more than one “tc” capability may be used in a record. A “tc” expansion scope (i.e. where the argument is searched for) contains the file in which the “tc” is declared and all subsequent files in the file array.
March 27, 2012 | NetBSD 7.1 |