]> git.saurik.com Git - apple/libc.git/blame - gen/tcsendbreak.3
Libc-594.1.4.tar.gz
[apple/libc.git] / gen / tcsendbreak.3
CommitLineData
5b2abdfb
A
1.\" Copyright (c) 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\" notice, this list of conditions and the following disclaimer in the
11.\" documentation and/or other materials provided with the distribution.
12.\" 3. All advertising materials mentioning features or use of this software
13.\" must display the following acknowledgement:
14.\" This product includes software developed by the University of
15.\" California, Berkeley and its contributors.
16.\" 4. Neither the name of the University nor the names of its contributors
17.\" may be used to endorse or promote products derived from this software
18.\" without specific prior written permission.
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)tcsendbreak.3 8.1 (Berkeley) 6/4/93
33.\" $FreeBSD: src/lib/libc/gen/tcsendbreak.3,v 1.8 2001/10/01 16:08:51 ru Exp $
34.\"
35.Dd June 4, 1993
36.Dt TCSENDBREAK 3
37.Os
38.Sh NAME
5b2abdfb 39.Nm tcdrain ,
224c7076 40.Nm tcflow ,
5b2abdfb 41.Nm tcflush ,
224c7076 42.Nm tcsendbreak
5b2abdfb
A
43.Nd line control functions
44.Sh LIBRARY
45.Lb libc
46.Sh SYNOPSIS
47.In termios.h
48.Ft int
224c7076
A
49.Fo tcdrain
50.Fa "int fildes"
51.Fc
5b2abdfb 52.Ft int
224c7076
A
53.Fo tcflow
54.Fa "int fildes"
55.Fa "int action"
56.Fc
5b2abdfb 57.Ft int
224c7076
A
58.Fo tcflush
59.Fa "int fildes"
60.Fa "int action"
61.Fc
5b2abdfb 62.Ft int
224c7076
A
63.Fo tcsendbreak
64.Fa "int fildes"
65.Fa "int duration"
66.Fc
5b2abdfb
A
67.Sh DESCRIPTION
68The
69.Fn tcdrain
70function waits until all output written to the terminal referenced by
224c7076 71.Fa fildes
5b2abdfb
A
72has been transmitted to the terminal.
73.Pp
74The
75.Fn tcflow
224c7076
A
76function suspends transmission of data to,
77or the reception of data from,
5b2abdfb 78the terminal referenced by
224c7076 79.Fa fildes ,
5b2abdfb
A
80depending on the value of
81.Fa action .
82The value of
83.Fa action
84must be one of the following:
85.Bl -tag -width "TCIOFF"
86.It Fa TCOOFF
87Suspend output.
88.It Fa TCOON
89Restart suspended output.
90.It Fa TCIOFF
91Transmit a STOP character, which is intended to cause the terminal to stop
92transmitting data to the system.
93(See the description of IXOFF in the
94.Ql Input Modes
95section of
96.Xr termios 4 ) .
97.It Fa TCION
98Transmit a START character, which is intended to cause the terminal to start
99transmitting data to the system.
100(See the description of IXOFF in the
101.Ql Input Modes
102section of
103.Xr termios 4 ) .
104.El
105.Pp
106The
107.Fn tcflush
108function discards any data written to the terminal referenced by
224c7076 109.Fa fildes
5b2abdfb
A
110which has not been transmitted to the terminal, or any data received
111from the terminal but not yet read, depending on the value of
112.Fa action .
113The value of
114.Fa action
115must be one of the following:
116.Bl -tag -width "TCIOFLUSH"
117.It Fa TCIFLUSH
118Flush data received but not read.
119.It Fa TCOFLUSH
120Flush data written but not transmitted.
121.It Fa TCIOFLUSH
122Flush both data received but not read and data written but not transmitted.
123.El
124.Pp
125The
126.Fn tcsendbreak
127function transmits a continuous stream of zero-valued bits for four-tenths
128of a second to the terminal referenced by
224c7076 129.Fa fildes .
5b2abdfb 130The
224c7076 131.Fa duration
5b2abdfb
A
132parameter is ignored in this implementation.
133.Sh RETURN VALUES
134Upon successful completion, all of these functions return a value of zero.
135.Sh ERRORS
136If any error occurs, a value of -1 is returned and the global variable
137.Va errno
138is set to indicate the error, as follows:
139.Bl -tag -width Er
140.It Bq Er EBADF
141The
224c7076 142.Fa fildes
5b2abdfb 143argument is not a valid file descriptor.
224c7076
A
144.It Bq Er EINTR
145A signal interrupted the
146.Fn tcdrain
147function.
5b2abdfb
A
148.It Bq Er EINVAL
149The
150.Fa action
151argument is not a proper value.
152.It Bq Er ENOTTY
153The file associated with
224c7076 154.Fa fildes
5b2abdfb 155is not a terminal.
5b2abdfb
A
156.El
157.Sh SEE ALSO
158.Xr tcsetattr 3 ,
159.Xr termios 4
160.Sh STANDARDS
161The
162.Fn tcsendbreak ,
163.Fn tcdrain ,
164.Fn tcflush
165and
166.Fn tcflow
167functions are expected to be compliant with the
168.St -p1003.1-88
169specification.