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

📄 termios.4

📁 早期freebsd实现
💻 4
📖 第 1 页 / 共 3 页
字号:
.Dv STARTcharacters, which areintended to cause the terminal device to resume transmitting data, assoon as the device can continue transmitting data without risk ofoverflowing the input queue.  The precise conditions under which.Dv STOPandSTARTcharacters are transmitted are implementation defined..PpIf.Dv IMAXBELis set and the input queue is full, subsequent input shall cause an.Tn ASCII.Dv BELcharacter to be transmitted to thethe output queue..PpThe initial input control value after open() is implementation defined..Ss Output ModesValues of the.Fa c_oflagfield describe the basic terminal output control,and are composed of the following masks:.Pp.Bl -tag -width OXTABS -offset indent -compact.It Dv OPOST/* enable following output processing */.It Dv ONLCR/* map NL to CR-NL (ala.Dv CRMOD)*/.It Dv OXTABS/* expand tabs to spaces */.It Dv ONOEOT/* discard.Dv EOT Ns 's.Ql \&^Don output) */.El.PpIf.Dv OPOSTis set, the remaining flag masks are interpreted as follows;otherwise characters are transmitted without change..PpIf.Dv ONLCRis set, newlines are translated to carriage return, linefeeds..PpIf.Dv OXTABSis set, tabs are expanded to the appropriate number ofspaces (assuming 8 column tab stops)..PpIf.Dv ONOEOTis set,.Tn ASCII.Dv EOT NS 'sare discarded on output..Ss Control ModesValues of the.Fa c_cflagfield describe the basicterminal hardware control, and are composed of thefollowing masks.Not all valuesspecified are supported by all hardware..Pp.Bl -tag -width CRTSXIFLOW -offset indent -compact.It Dv CSIZE/* character size mask */.It Dv CS5/* 5 bits (pseudo) */.It Dv CS6/* 6 bits */.It Dv CS7/* 7 bits */.It Dv CS8/* 8 bits */.It Dv CSTOPB/* send 2 stop bits */.It Dv CREAD/* enable receiver */.It Dv PARENB/* parity enable */.It Dv PARODD/* odd parity, else even */.It Dv HUPCL/* hang up on last close */.It Dv CLOCAL/* ignore modem status lines */.It Dv CCTS_OFLOW/*.Dv CTSflow control of output */.It Dv CRTSCTS/* same as.Dv CCTS_OFLOW*/.It Dv CRTS_IFLOW/* RTS flow control of input */.It Dv MDMBUF/* flow control output via Carrier */.El.PpThe.Dv CSIZEbits specify the byte size in bits for both transmission andreception.  The.Fa c_cflagis masked with.Dv CSIZEand compared with thevalues.Dv CS5 ,.Dv CS6 ,.Dv CS7 ,or.Dv CS8 .This size does not include the parity bit, if any.  If.Dv CSTOPBis set, two stop bits are used, otherwise one stop bit.  For example, at110 baud, two stop bits are normally used..PpIf.Dv CREADis set, the receiver is enabled.  Otherwise, no character isreceived. Not all hardware supports this bit.  In fact, this flagis pretty silly and if it were not part of the.Nm termiosspecificationit would be omitted..PpIf.Dv PARENBis set, parity generation and detection are enabled and a paritybit is added to each character.  If parity is enabled,.Dv PARODDspecifiesodd parity if set, otherwise even parity is used..PpIf.Dv HUPCLis set, the modem control lines for the port are loweredwhen the last process with the port open closes the port or the processterminates.  The modem connection is broken..PpIf.Dv CLOCALis set, a connection does not depend on the state of the modemstatus lines.  If.Dv CLOCALis clear, the modem status lines aremonitored..PpUnder normal circumstances, a call to the open() function waits forthe modem connection to complete.  However, if the.Dv O_NONBLOCKflag is setor if.Dv CLOCALhas been set, the open() function returnsimmediately without waiting for the connection..PpThe.Dv CCTS_OFLOW.Pf ( Dv CRTSCTS )flag is currently unused..PpIf.Dv MDMBUFis set then output flow control is controlled by the stateof Carrier Detect..PpIf the object for which the control modes are set is not an asynchronousserial connection, some of the modes may be ignored; for example, if anattempt is made to set the baud rate on a network connection to aterminal on another host, the baud rate may or may not be set on theconnection between that terminal and the machine it is directly connectedto..Ss Local ModesValues of the.Fa c_lflagfield describe the control ofvarious functions, and are composed of the followingmasks..Pp.Bl -tag -width NOKERNINFO -offset indent -compact.It Dv ECHOKE/* visual erase for line kill */.It Dv ECHOE/* visually erase chars */.It Dv ECHO/* enable echoing */.It Dv ECHONL/* echo.Dv NLeven if.Dv ECHOis off */.It Dv ECHOPRT/* visual erase mode for hardcopy */.It Dv ECHOCTL/* echo control chars as ^(Char) */.It Dv ISIG/* enable signals.Dv INTR ,.Dv QUIT ,.Dv [D]SUSP*/.It Dv ICANON/* canonicalize input lines */.It Dv ALTWERASE/* use alternate.Dv WERASEalgorithm */.It Dv IEXTEN/* enable.Dv DISCARDand.Dv LNEXT*/.It Dv EXTPROC/* external processing */.It Dv TOSTOP/* stop background jobs from output */.It Dv FLUSHO/* output being flushed (state) */.It Dv NOKERNINFO/* no kernel output from.Dv VSTATUS*/.It Dv PENDIN/* XXX retype pending input (state) */.It Dv NOFLSH/* don't flush after interrupt */.El.PpIf.Dv ECHOis set, input characters are echoed back to the terminal.  If.Dv ECHOis not set, input characters are not echoed..PpIf.Dv ECHOEand.Dv ICANONare set, the.Dv ERASEcharacter causes the terminalto erase the last character in the current line from the display, ifpossible.  If there is no character to erase, an implementation may echoan indication that this was the case or do nothing..PpIf.Dv ECHOKand.Dv ICANONare set, the.Dv KILLcharacter causesthe current line to be discarded and the system echoes the.Ql \&\encharacter after the.Dv KILLcharacter..PpIf.Dv ECHOKEand.Dv ICANONare set, the.Dv KILLcharacter causesthe current line to be discarded and the system causesthe terminalto erase the line from the display..PpIf.Dv ECHOPRTand.Dv ICANONare set, the system assumesthat the display is a printing device and prints abackslash and the erased characters when processing.Dv ERASEcharacters, followed by a forward slash..PpIf.Dv ECHOCTLis set, the system echoes control charactersin a visible fashion using a caret followed by the control character..PpIf.Dv ALTWERASEis set, the system uses an alternative algorithmfor determining what constitutes a word when processing.Dv WERASEcharacters (see.Dv WERASE ) ..PpIf.Dv ECHONLand.Dv ICANONare set, the.Ql \&\encharacter echoes even if.Dv ECHOis not set..PpIf.Dv ICANONis set, canonical processing is enabled.  This enables theerase and kill edit functions, and the assembly of input characters intolines delimited by.Dv NL,.Dv EOF ,and.Dv EOL,as described in.Sx "Canonical Mode Input Processing" ..PpIf.Dv ICANONis not set, read requests are satisfied directly from the inputqueue.  A read is not satisfied until at least.Dv MINbytes have beenreceived or the timeout value.Dv TIMEexpired between bytes.  The time valuerepresents tenths of seconds.  See.Sx "Noncanonical Mode Input Processing"for more details..PpIf.Dv ISIGis set, each input character is checked against the specialcontrol characters.Dv INTR ,.Dv QUIT ,and.Dv SUSP(job control only).  If an inputcharacter matches one of these control characters, the functionassociated with that character is performed.  If.Dv ISIGis not set, nochecking is done.  Thus these special input functions are possible onlyif.Dv ISIGis set..PpIf.Dv IEXTENis set, implementation-defined functions are recognizedfrom the input data.  How.Dv IEXTENbeing setinteracts with.Dv ICANON ,.Dv ISIG ,.Dv IXON ,or.Dv IXOFFis implementation defined.If.Dv IEXTENis not set, thenimplementation-defined functions are not recognized, and thecorresponding input characters are not processed as described for.Dv ICANON ,.Dv ISIG ,.Dv IXON ,and.Dv IXOFF ..PpIf.Dv NOFLSHis set, the normal flush of the input and output queuesassociated with the.Dv INTR ,.Dv QUIT ,and.Dv SUSPcharactersare not be done..PpIf.Dv TOSTOPis set, the signal.Dv SIGTTOUis sent to the process group of a process that tries to write toits controlling terminal if it is not in the foreground process group forthat terminal.  This signal, by default, stops the members of the processgroup.  Otherwise, the output generated by that process is output to thecurrent output stream.  Processes that are blocking or ignoring.Dv SIGTTOUsignals are excepted and allowed to produce output and the.Dv SIGTTOUsignalis not sent..PpIf.Dv NOKERNINFOis set, the kernel does not produce a status messagewhen processing.Dv STATUScharacters (see.Dv STATUS ) ..Ss Special Control CharactersThe special control characters values are defined by the array.Fa c_cc .This table lists the array index, the corresponding special character,and the system default value.  For an accurate list ofthe system defaults, consult the header file.Aq Pa ttydefaults.h ..Pp.Bl -column "Index Name" "Special Character" -offset indent -compact.It Em "Index Name	Special Character	Default Value".It Dv VEOF Ta EOF Ta \&^D.It Dv VEOL Ta EOL Ta _POSIX_VDISABLE.It Dv VEOL2 Ta EOL2 Ta _POSIX_VDISABLE.It Dv VERASE Ta ERASE Ta \&^? Ql \&\e177.It Dv VWERASE  Ta WERASE Ta \&^W.It Dv VKILL Ta KILL Ta \&^U.It Dv VREPRINT Ta REPRINT Ta \&^R.It Dv VINTR Ta INTR Ta \&^C.It Dv VQUIT Ta QUIT Ta \&^\e\e Ql \&\e34.It Dv VSUSP Ta SUSP Ta \&^Z.It Dv VDSUSP Ta DSUSP Ta \&^Y.It Dv VSTART Ta START Ta \&^Q.It Dv VSTOP Ta STOP Ta \&^S.It Dv VLNEXT Ta LNEXT Ta \&^V.It Dv VDISCARD Ta DISCARD Ta \&^O.It Dv VMIN Ta --- Ta \&1.It Dv VTIME Ta --- Ta \&0.It Dv VSTATUS Ta STATUS Ta \&^T.El.PpIf thevalue of one of the changeable special control characters (see.Sx "Special Characters" )is.Dv {_POSIX_VDISABLE} ,that function is disabled; that is, no inputdata is recognized as the disabled special character.If.Dv ICANONisnot set, the value of.Dv {_POSIX_VDISABLE}has no special meaning for the.Dv VMINand.Dv VTIMEentries of the.Fa c_ccarray..PpThe initial values of the flags and control charactersafter open() is set according tothe values in the header.Aq Pa sys/ttydefaults.h .

⌨️ 快捷键说明

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