⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 termcap.5

📁 早期freebsd实现
💻 5
📖 第 1 页 / 共 4 页
字号:
They will be printed in the following order:.Sy \&is ;setting tabs using.Sy \&ctand.Sy \&st ;and finally.Sy \&if ..Pf ( Xr Terminfouses.Sy \&i\&1-i2instead of.Sy \&isand runs the program.Sy \&iPand prints.Sy "\&i\&3"after the other initializations.)A pair of sequences that does a harder reset from a totally unknown statecan be analogously given as.Sy \&rsand.Sy \&if .These strings are output by the.Xr resetprogram, which is used when the terminal gets into a wedged state..Pf ( Xr Terminfouses.Sy "\&r1-r3"instead of.Sy \&rs . )Commands are normally placed in.Sy \&rsand.Sy \&rfonly if they produce annoying effects on the screen and are not necessarywhen logging in.For example, the command to set the VT100 into 80-column modewould normally be part of.Sy \&is ,but it causes an annoying glitch of the screen and is not normally neededsince the terminal is usually already in 80-column mode..PpIf the terminal has hardware tabs,the command to advance to the next tab stop can be given as.Sy \&ta(usually.Sy \&^I ) .A.Dq backtabcommand which moves leftward to the previous tab stopcan be given as.Sy \&bt .By convention,if the terminal driver modes indicate that tab stops are being expandedby the computer rather than being sent to the terminal,programs should not use.Sy \&taor.Sy \&bteven if they are present,since the user may not have the tab stops properly set.If the terminal has hardware tabs that are initially set every.Ar npositions when the terminal is powered up, then the numeric parameter.Sy \&itis given, showing the number of positions between tab stops.This is normally used by the.Xr tsetcommand to determine whether to set the driver mode for hardware tabexpansion, and whether to set the tab stops.If the terminal has tab stops that can be saved in nonvolatile memory, the.Nm termcapdescription can assume that they are properly set..PpIf there are commands to set and clear tab stops, they can be given as.Sy \&ct(clear all tab stops) and.Sy \&st(set a tab stop in the current column of every row).If a more complex sequence is needed to set the tabs than can bedescribed by this, the sequence can be placed in.Sy \&isor.Sy \&if ..Ss DelaysCertain capabilities control padding in the terminal driver.These are primarily needed by hardcopy terminals and are used by the.Xr tsetprogram to set terminal driver modes appropriately.Delays embedded in the capabilities.Sy \&cr ,.Sy \&sf ,.Sy \&le ,.Sy \&ff ,and.Sy \&tawill cause the appropriate delay bits to be set in the terminal driver.If.Sy \&pb(padding baud rate) is given, these values can be ignored at baud ratesbelow the value of.Sy \&pb .For.Bx 4.2.Xr tset ,the delays are given as numeric capabilities.Sy \&dC ,.Sy \&dN ,.Sy \&dB ,.Sy \&dF ,and.Sy \&dTinstead..Ss MiscellaneousIf the terminal requires other than a.Dv NUL(zero) character as a pad,this can be given as.Sy \&pc .Only the first character of the.Sy \&pcstring is used..PpIf the terminal has commands to save and restore the position of thecursor, give them as.Sy \&scand.Sy \&rc ..PpIf the terminal has an extra.Dq status linethat is not normally used bysoftware, this fact can be indicated.If the status line is viewed as an extra line below the bottom line,then the capability.Sy \&hsshould be given.Special strings to go to a position in the status line and to returnfrom the status line can be given as.Sy \&tsand.Sy \&fs ..Pf ( Xr \&fsmust leave the cursor position in the same place that it was before.Sy \&ts .If necessary, the.Sy \&scand.Sy \&rcstrings can be included in.Sy \&tsand.Sy \&fsto get this effect.)The capability.Sy \&tstakes one parameter, which is the column number of the status lineto which the cursor is to be moved.If escape sequences and other special commands such as tab work while inthe status line, the flag.Sy \&escan be given.A string that turns off the status line (or otherwise erases its contents)should be given as.Sy \&ds .The status line is normally assumed to be the same width as therest of the screen,.Em i.e . ,.Sy \&co .If the status line is a different width (possibly because the terminaldoes not allow an entire line to be loaded), then its width in columnscan be indicated with the numeric parameter.Sy \&ws ..PpIf the terminal can move up or down half a line, this can beindicated with.Sy \&hu(half-line up) and.Sy \&hd(half-line down).This is primarily useful for superscripts and subscripts on hardcopyterminals.If a hardcopy terminal can eject to the next page (form feed),give this as.Sy \&ff(usually.Sy \&^L ) ..PpIf there is a command to repeat a given character a given number of times(to save time transmitting a large number of identical characters),this can be indicated with the parameterized string.Sy \&rp .The first parameter is the character to be repeated and the second isthe number of times to repeat it.(This is a.Xr terminfofeature that is unlikely to be supported by a program that uses.Nm termcap . ).PpIf the terminal has a settable command character, such as theTektronix 4025, this can be indicated with.Sy \&CC .A prototype command character is chosen which is used in all capabilities.This character is given in the.Sy \&CCcapability to identify it.The following convention is supported on some.Uxsystems:The environment is to be searched for a.Ev \&CCvariable,and if found,all occurrences of the prototype character are replaced by the characterin the environment variable.This use of the.Ev \&CCenvironment variableis a very bad idea, as it conflicts with.Xr make 1 ..PpTerminal descriptions that do not represent a specific kind of knownterminal, such as.Em switch ,.Em dialup ,.Em patch ,and.Xr network ,should include the.Sy \&gn(generic) capability so that programs can complain that they do not knowhow to talk to the terminal.(This capability does not apply to.Em virtualterminal descriptions for which the escape sequences are known.).PpIf the terminal uses xoff/xon.Pq Tn DC3 Ns / Ns Tn DC1handshaking for flow control, give.Sy \&xo .Padding information should still be included so that routines can makebetter decisions about costs, but actual pad characters will not betransmitted..PpIf the terminal has a.Dq meta keywhich acts as a shift key, setting the8th bit of any character transmitted, then this fact can be indicated with.Sy \&km .Otherwise, software will assume that the 8th bit is parity and it willusually be cleared.If strings exist to turn this.Dq meta modeon and off, they can be given as.Sy \&mmand.Sy \&mo ..PpIf the terminal has more lines of memory than will fit on the screen at once,the number of lines of memory can be indicated with.Sy \&lm .An explicit value of 0 indicates that the number of lines is not fixed,but that there is still more memory than fits on the screen..PpIf the terminal is one of those supported by the.Uxsystem virtualterminal protocol, the terminal number can be given as.Sy \&vt ..PpMedia copy strings which control an auxiliary printerconnected to the terminal can be given as.Sy \&ps :print the contents of the screen;.Sy \&pf :turn off the printer; and.Sy \&po :turn on the printer.When the printer is on, all text sent to the terminal will be sent to theprinter.It is undefined whether the text is also displayed on the terminal screenwhen the printer is on.A variation.Sy \&pOtakes one parameter and leaves the printer on for as many characters as thevalue of the parameter, then turns the printer off.The parameter should not exceed 255.All text, including.Sy \&pf ,is transparently passed to the printer while.Sy \&pOis in effect..PpStrings to program function keys can be given as.Sy \&pk ,.Sy \&pl ,and.Sy \&px .Each of these strings takes two parameters: the function key numberto program (from 0 to 9) and the string to program it with.Function key numbers out of this range may program undefined keysin a terminal-dependent manner.The differences among the capabilities are that.Sy \&pkcauses pressing the given key to be the same as the user typing the givenstring;.Sy \&plcauses the string to be executed by the terminal in local mode;and.Sy \&pxcauses the string to be transmitted to the computer.Unfortunately, due to lack of a definition for string parameters in.Nm termcap ,only.Xr terminfosupports these capabilities..Ss Glitches and BraindamageHazeltine terminals, which do not allow `~' characters to be displayed,should indicate.Sy \&hz ..PpThe.Sy \&nccapability, now obsolete, formerly indicated Datamedia terminals,which echo.Sy \&\er \enforcarriage return then ignore a following linefeed..PpTerminals that ignore a linefeed immediately after an.Sy \&amwrap, such as the Concept, should indicate.Sy \&xn ..PpIf.Sy \&ceis required to get rid of standout(instead of merely writing normal text on top of it),.Sy \&xsshould be given..PpTeleray terminals, where tabs turn all characters moved over to blanks,should indicate.Sy \&xt(destructive tabs).This glitch is also taken to mean that it is not possibleto position the cursor on top of a \*(lqmagic cookie\*(rq, and thatto erase standout mode it is necessary to use delete and insert line..PpThe Beehive Superbee, which is unable to correctly transmit the.Dv ESCor.Sy \&^Ccharacters, has.Sy \&xb ,indicating that the.Dq \&f\&1key is used for.Dv ESCand.Dq \&f\&2for ^C.(Only certain Superbees have this problem, depending on the.Tn ROM . ).PpOther specific terminal problems may be corrected by adding morecapabilities of the form.Sy x Em x ..Ss Similar TerminalsIf there are two very similar terminals,one can be defined as being just like the other with certain exceptions.The string capability.Sy \&tccan be givenwith the name of the similar terminal.This capability must be.Em last ,and the combined length of the entriesmust not exceed 1024.The capabilities given before.Sy \&tcoverride those in the terminal type invoked by.Sy \&tc .A capability can be canceled by placing.Sy \&xx@to the left of the.Sy \&tcinvocation, where.Sy \&xxis the capability.For example, the entry.Bd -literal -offset indenthn\||\|2621\-nl:ks@:ke@:tc=2621:.Ed.Ppdefines a.Dq 2621\-nlthat does not have the.Sy \&ksor.Sy \&kecapabilities,hence does not turn on the function key labels when in visual mode.This is useful for different modes for a terminal, or for differentuser preferences..Sh FILES.Bl -tag -width /usr/share/misc/termcap.db -compact.It Pa /usr/share/misc/termcapFile containing terminal descriptions..It Pa /usr/share/misc/termcap.dbHash database file containing terminal descriptions (see .Xr cap_mkdb 1 ) ..El.Sh SEE ALSO.Xr \&ex 1 ,.Xr cap_mkdb 1 ,.Xr more 1 ,.Xr tset 1 ,.Xr \&ul 1 ,.Xr vi 1 ,.Xr curses 3 ,.Xr printf 3 ,.Xr termcap 3 ,.Xr term 7.Sh CAVEATS AND BUGSThe.Em Note :.Nm termcapfunctionswere replaced by.Xr terminfoin.At VRelease 2.0.The transition will be relatively painless if capabilities flagged as.Dq obsoleteare avoided..PpLines and columns are now stored by the kernel as well as in the termcapentry.Most programs now use the kernel information primarily; the informationin this file is used only if the kernel does not have any information..Pp.Xr \&Viallows only 256 characters for string capabilities, and the routinesin.Xr termlib 3do not check for overflow of this buffer.The total length of a single entry (excluding only escaped newlines)may not exceed 1024..PpNot all programs support all entries..Sh HISTORYThe.Nmfile format appeared in.Bx 3 .

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -