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

📄 2.4.t

📁 早期freebsd实现
💻 T
字号:
.\" Copyright (c) 1983, 1993.\"	The Regents of the University of California.  All rights reserved..\".\" Redistribution and use in source and binary forms, with or without.\" modification, are permitted provided that the following conditions.\" are met:.\" 1. Redistributions of source code must retain the above copyright.\"    notice, this list of conditions and the following disclaimer..\" 2. Redistributions in binary form must reproduce the above copyright.\"    notice, this list of conditions and the following disclaimer in the.\"    documentation and/or other materials provided with the distribution..\" 3. All advertising materials mentioning features or use of this software.\"    must display the following acknowledgement:.\"	This product includes software developed by the University of.\"	California, Berkeley and its contributors..\" 4. Neither the name of the University nor the names of its contributors.\"    may be used to endorse or promote products derived from this software.\"    without specific prior written permission..\".\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF.\" SUCH DAMAGE..\".\"	@(#)2.4.t	8.1 (Berkeley) 6/8/93.\".sh "Terminals and Devices.NH 3Terminals.PPTerminals support \fIread\fP and \fIwrite\fP I/O operations,as well as a collection of terminal specific \fIioctl\fP operations,to control input character interpretation and editing,and output format and delays..NH 4Terminal input.PPTerminals are handled according to the underlying communicationcharacteristics such as baud rate and required delays,and a set of software parameters..NH 5Input modes.PPA terminal is in one of three possible modes: \fIraw\fP, \fIcbreak\fP,or \fIcooked\fP.In raw mode all input is passed through to thereading process immediately and without interpretation.In cbreak mode, the handler interprets input only by lookingfor characters that cause interrupts or output flow control;all other characters are made available as in raw mode.In cooked mode, inputis processed to provide standard line-oriented local editing functions,and input is presented on a line-by-line basis..NH 5Interrupt characters.PPInterrupt characters are interpreted by the terminal handler only incbreak and cooked modes, andcause a software interrupt to be sent to all processes in the processgroup associated with the terminal.  Interrupt characters existto send SIGINTand SIGQUIT signals,and to stop a process groupwith the SIGTSTP signal either immediately, or whenall input up to the stop character has been read..NH 5Line editing.PPWhen the terminal is in cooked mode, editing of an input lineis performed.  Editing facilities allow deletion of the previouscharacter or word, or deletion of the current input line. In addition, a special character may be used to reprint the currentinput line after some number of editing operations have been applied..PPCertain other characters are interpreted specially when a process isin cooked mode.  The \fIend of line\fP character determinesthe end of an input record.  The \fIend of file\fP character simulatesan end of file occurrence on terminal input.  Flow control is providedby \fIstop output\fP and \fIstart output\fP control characters.  Outputmay be flushed with the \fIflush output\fP character; and a \fIliteralcharacter\fP may be used to force literal input of the immediatelyfollowing character in the input line..PPInput characters may be echoed to the terminal as they are received.Non-graphic ASCII input characters may be echoed as a two-characterprintable representation, ``^character.''.NH 4Terminal output.PPOn output, the terminal handler provides some simple formatting services.These include converting the carriage return character to thetwo character return-linefeed sequence,inserting delays after certain standard control characters,expanding tabs, and providing translationsfor upper-case only terminals..NH 4Terminal control operations.PPWhen a terminal is first opened it is initialized to a standardstate and configured with a set of standard control, editing,and interrupt characters.  A processmay alter this configuration with certaincontrol operations, specifying parameters in a standard structure:\(dg.FS\(dg The control interface described here is an internal interface onlyin 4.3BSD.  Future releases will probably use a modified interfacebased on currently-proposed standards..FE.DS._fstruct ttymode {	short	tt_ispeed;	/* input speed */	int	tt_iflags;	/* input flags */	short	tt_ospeed;	/* output speed */	int	tt_oflags;	/* output flags */};.DEand ``special characters'' are specified with the \fIttychars\fP structure,.DS._fstruct ttychars {	char	tc_erasec;	/* erase char */	char	tc_killc;	/* erase line */	char	tc_intrc;	/* interrupt */	char	tc_quitc;	/* quit */	char	tc_startc;	/* start output */	char	tc_stopc;	/* stop output */	char	tc_eofc;	/* end-of-file */	char	tc_brkc;	/* input delimiter (like nl) */	char	tc_suspc;	/* stop process signal */	char	tc_dsuspc;	/* delayed stop process signal */	char	tc_rprntc;	/* reprint line */	char	tc_flushc;	/* flush output (toggles) */	char	tc_werasc;	/* word erase */	char	tc_lnextc;	/* literal next character */};.DE.NH 4Terminal hardware support.PPThe terminal handler allows a user to access basichardware related functions; e.g. line speed,modem control, parity, and stop bits.  A special signal,SIGHUP, is automaticallysent to processes in a terminal's processgroup when a carrier transition is detected.  This isnormally associated with a user hanging up on a modemcontrolled terminal line..NH 3Structured devices.PPStructures devices are typified by disks and magnetictapes, but may represent any random-access device.The system performs read-modify-write type buffering actions on blockdevices to allow them to be read and written in a totally randomaccess fashion like ordinary files.File systems are normally created in block devices..NH 3Unstructured devices.PPUnstructured devices are those devices whichdo not support block structure.  Familiar unstructured devicesare raw communications lines (withno terminal handler), raster plotters, magnetic tape and disks unfetteredby buffering and permitting large block input/output and positioningand formatting commands.

⌨️ 快捷键说明

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