Added .SS headers to give some structure to this page; and a small

amount of reordering.
This commit is contained in:
Michael Kerrisk 2006-12-28 05:17:28 +00:00
parent 4a837837ba
commit 87d1fd8703
1 changed files with 16 additions and 11 deletions

View File

@ -70,6 +70,7 @@ get and set terminal attributes, line control, get and set baud rate
.SH DESCRIPTION
The termios functions describe a general terminal interface that is
provided to control asynchronous communications ports.
.SS "The termios structure"
.LP
Many of the functions described here have a \fItermios_p\fP argument
that is a pointer to a \fItermios\fP structure. This structure contains
@ -483,6 +484,7 @@ MIN characters have been received. If only TIME is set, the read will
return as soon as either at least one character has been received,
or the timer times out. If neither is set, the read will return
immediately, only giving the currently already available characters.
.SS "Retrieving and changing terminal settings"
.PP
.BR tcgetattr ()
gets the parameters associated with the object referred by \fIfd\fP and
@ -508,6 +510,7 @@ the change occurs after all output written to the object referred by
.I fd
has been transmitted, and all input that has been received but not read
will be discarded before the change is made.
.SS "Line control"
.LP
.BR tcsendbreak ()
transmits a continuous stream of zero-valued bits for a specific
@ -558,17 +561,7 @@ transmitting data to the system.
The default on open of a terminal file is that neither its input nor its
output is suspended.
.LP
The baud rate functions are provided for getting and setting the values
of the input and output baud rates in the \fItermios\fP structure. The
new values do not take effect
until \fBtcsetattr\fP() is successfully called.
Setting the speed to \fBB0\fP instructs the modem to "hang up".
The actual bit rate corresponding to \fBB38400\fP may be altered with
\fBsetserial\fP(8).
.LP
The input and output baud rates are stored in the \fItermios\fP
structure.
.SS "Raw mode"
.LP
\fBcfmakeraw\fP() sets the terminal attributes as follows:
.nf
@ -580,6 +573,18 @@ structure.
termios_p->c_cflag &= ~(CSIZE | PARENB);
termios_p->c_cflag |= CS8;
.fi
.SS "Line speed"
The baud rate functions are provided for getting and setting the values
of the input and output baud rates in the \fItermios\fP structure. The
new values do not take effect
until \fBtcsetattr\fP() is successfully called.
Setting the speed to \fBB0\fP instructs the modem to "hang up".
The actual bit rate corresponding to \fBB38400\fP may be altered with
\fBsetserial\fP(8).
.LP
The input and output baud rates are stored in the \fItermios\fP
structure.
.LP
.BR cfgetospeed ()
returns the output baud rate stored in the \fItermios\fP structure