]> git.saurik.com Git - apple/libc.git/blob - gen/tcsendbreak.3
Libc-763.11.tar.gz
[apple/libc.git] / gen / tcsendbreak.3
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
39 .Nm tcdrain ,
40 .Nm tcflow ,
41 .Nm tcflush ,
42 .Nm tcsendbreak
43 .Nd line control functions
44 .Sh LIBRARY
45 .Lb libc
46 .Sh SYNOPSIS
47 .In termios.h
48 .Ft int
49 .Fo tcdrain
50 .Fa "int fildes"
51 .Fc
52 .Ft int
53 .Fo tcflow
54 .Fa "int fildes"
55 .Fa "int action"
56 .Fc
57 .Ft int
58 .Fo tcflush
59 .Fa "int fildes"
60 .Fa "int action"
61 .Fc
62 .Ft int
63 .Fo tcsendbreak
64 .Fa "int fildes"
65 .Fa "int duration"
66 .Fc
67 .Sh DESCRIPTION
68 The
69 .Fn tcdrain
70 function waits until all output written to the terminal referenced by
71 .Fa fildes
72 has been transmitted to the terminal.
73 .Pp
74 The
75 .Fn tcflow
76 function suspends transmission of data to,
77 or the reception of data from,
78 the terminal referenced by
79 .Fa fildes ,
80 depending on the value of
81 .Fa action .
82 The value of
83 .Fa action
84 must be one of the following:
85 .Bl -tag -width "TCIOFF"
86 .It Fa TCOOFF
87 Suspend output.
88 .It Fa TCOON
89 Restart suspended output.
90 .It Fa TCIOFF
91 Transmit a STOP character, which is intended to cause the terminal to stop
92 transmitting data to the system.
93 (See the description of IXOFF in the
94 .Ql Input Modes
95 section of
96 .Xr termios 4 ) .
97 .It Fa TCION
98 Transmit a START character, which is intended to cause the terminal to start
99 transmitting data to the system.
100 (See the description of IXOFF in the
101 .Ql Input Modes
102 section of
103 .Xr termios 4 ) .
104 .El
105 .Pp
106 The
107 .Fn tcflush
108 function discards any data written to the terminal referenced by
109 .Fa fildes
110 which has not been transmitted to the terminal, or any data received
111 from the terminal but not yet read, depending on the value of
112 .Fa action .
113 The value of
114 .Fa action
115 must be one of the following:
116 .Bl -tag -width "TCIOFLUSH"
117 .It Fa TCIFLUSH
118 Flush data received but not read.
119 .It Fa TCOFLUSH
120 Flush data written but not transmitted.
121 .It Fa TCIOFLUSH
122 Flush both data received but not read and data written but not transmitted.
123 .El
124 .Pp
125 The
126 .Fn tcsendbreak
127 function transmits a continuous stream of zero-valued bits for four-tenths
128 of a second to the terminal referenced by
129 .Fa fildes .
130 The
131 .Fa duration
132 parameter is ignored in this implementation.
133 .Sh RETURN VALUES
134 Upon successful completion, all of these functions return a value of zero.
135 .Sh ERRORS
136 If any error occurs, a value of -1 is returned and the global variable
137 .Va errno
138 is set to indicate the error, as follows:
139 .Bl -tag -width Er
140 .It Bq Er EBADF
141 The
142 .Fa fildes
143 argument is not a valid file descriptor.
144 .It Bq Er EINTR
145 A signal interrupted the
146 .Fn tcdrain
147 function.
148 .It Bq Er EINVAL
149 The
150 .Fa action
151 argument is not a proper value.
152 .It Bq Er ENOTTY
153 The file associated with
154 .Fa fildes
155 is not a terminal.
156 .El
157 .Sh SEE ALSO
158 .Xr tcsetattr 3 ,
159 .Xr termios 4
160 .Sh STANDARDS
161 The
162 .Fn tcsendbreak ,
163 .Fn tcdrain ,
164 .Fn tcflush
165 and
166 .Fn tcflow
167 functions are expected to be compliant with the
168 .St -p1003.1-88
169 specification.