xref: /csrg-svn/lib/libc/gen/tcsendbreak.3 (revision 61111)
1*61111Sbostic.\" Copyright (c) 1991, 1993
2*61111Sbostic.\"	The Regents of the University of California.  All rights reserved.
351202Smarc.\"
451202Smarc.\" %sccs.include.redist.roff%
551202Smarc.\"
6*61111Sbostic.\"	@(#)tcsendbreak.3	8.1 (Berkeley) 06/04/93
751202Smarc.\"
852295Sbostic.Dd ""
952832Sbostic.Dt TCSENDBREAK 3
1052294Smarc.Os
1152294Smarc.Sh NAME
1252295Sbostic.Nm tcsendbreak ,
1352295Sbostic.Nm tcdrain ,
1452295Sbostic.Nm tcflush ,
1552294Smarc.Nm tcflow
1652295Sbostic.Nd line control functions
1752295Sbostic.Sh SYNOPSIS
1852295Sbostic.Fd #include <termios.h>
1952294Smarc.Ft int
2052294Smarc.Fn tcdrain "int fd"
2152294Smarc.Ft int
2252294Smarc.Fn tcflow "int fd" "int action"
2352294Smarc.Ft int
2452295Sbostic.Fn tcflush "int fd" "int action"
2552294Smarc.Ft int
2652294Smarc.Fn tcsendbreak "int fd" "int len"
2752295Sbostic.Sh DESCRIPTION
2852295SbosticThe
2952295Sbostic.Nm tcdrain
3052295Sbosticfunction waits until all output written to the terminal referenced by
3152295Sbostic.Fa fd
3252295Sbostichas been transmitted to the terminal.
3352295Sbostic.Pp
3452295SbosticThe
3552295Sbostic.Nm tcflow
3652295Sbosticfunction suspends transmission of data to or the reception of data from
3752295Sbosticthe terminal referenced by
3852295Sbostic.Fa fd
3952295Sbosticdepending on the value of
4052295Sbostic.Fa action .
4152295SbosticThe value of
4252295Sbostic.Fa action
4352295Sbosticmust be one of the following:
4452295Sbostic.Bl -tag -width "TCIOFF"
4552295Sbostic.It Fa TCOOFF
4652295SbosticSuspend output.
4752295Sbostic.It Fa TCOON
4852295SbosticRestart suspended output.
4952295Sbostic.It Fa TCIOFF
5052295SbosticTransmit a STOP character, which is intended to cause the terminal to stop
5152295Sbostictransmitting data to the system.
5252295Sbostic(See the description of IXOFF in the
5352295Sbostic.Ql Input Modes
5452295Sbosticsection of
5552295Sbostic.Xr termios 4 ).
5652295Sbostic.It Fa TCION
5752295SbosticTransmit a START character, which is intended to cause the terminal to start
5852295Sbostictransmitting data to the system.
5952295Sbostic(See the description of IXOFF in the
6052295Sbostic.Ql Input Modes
6152295Sbosticsection of
6252295Sbostic.Xr termios 4 ).
6352295Sbostic.El
6452295Sbostic.Pp
6552295SbosticThe
6652295Sbostic.Nm tcflush
6752295Sbosticfunction discards any data written to the terminal referenced by
6852295Sbostic.Fa fd
6952295Sbosticwhich has not been transmitted to the terminal, or any data received
7052295Sbosticfrom the terminal but not yet read, depending on the value of
7152295Sbostic.Fa action .
7252295SbosticThe value of
7352295Sbostic.Fa action
7452295Sbosticmust be one of the following:
7552295Sbostic.Bl -tag -width "TCIOFLUSH"
7652295Sbostic.It Fa TCIFLUSH
7752295SbosticFlush data received but not read.
7852295Sbostic.It Fa TCOFLUSH
7952295SbosticFlush data written but not transmitted.
8052295Sbostic.It Fa TCIOFLUSH
8152295SbosticFlush both data received but not read and data written but not transmitted.
8252295Sbostic.El
8352295Sbostic.Pp
8452295SbosticThe
8552295Sbostic.Nm tcsendbreak
8652295Sbosticfunction transmits a continuous stream of zero-valued bits for four-tenths
8752295Sbosticof a second to the terminal referenced by
8852295Sbostic.Fa fd .
8952295SbosticThe
9052295Sbostic.Fa len
9152295Sbosticparameter is ignored in this implementation.
9252295Sbostic.Sh RETURN VALUES
9352295SbosticUpon successful completion, all of these functions return a value of zero.
9452295Sbostic.Sh ERRORS
9552295SbosticIf any error occurs, a value of -1 is returned and the global variable
9652295Sbostic.Va errno
9752295Sbosticis set to indicate the error, as follows:
9852295Sbostic.Bl -tag -width Er
9952295Sbostic.It Bq Er EBADF
10052295SbosticThe
10152295Sbostic.Fa fd
10252295Sbosticargument is not a valid file descriptor.
10352295Sbostic.It Bq Er EINVAL
10452295SbosticThe
10552295Sbostic.Fa action
10652295Sbosticargument is not a proper value.
10752295Sbostic.It Bq Er ENOTTY
10852295SbosticThe file associated with
10952295Sbostic.Fa fd
11052295Sbosticis not a terminal.
11152295Sbostic.It Bq Er EINTR
11252295SbosticA signal interrupted the
11352295Sbostic.Nm tcdrain
11452295Sbosticfunction.
11552295Sbostic.El
11652295Sbostic.Sh SEE ALSO
11752295Sbostic.Xr tcsetattr 3 ,
11852295Sbostic.Xr termios 4
11952295Sbostic.Sh STANDARDS
12052295SbosticThe
12152295Sbostic.Nm tcsendbreak ,
12252295Sbostic.Nm tcdrain ,
12352295Sbostic.Nm tcflush
12452295Sbosticand
12552295Sbostic.Nm tcflow
12652295Sbosticfunctions are expected to be compliant with the
12752295Sbostic.St -p1003.1-88
12852295Sbosticspecification.
129