doc/ja_JP.eucJP/man/man3/tcsendbreak.3
Jun Kuriyama fc733ebccd Japanese version of section 3 manual pages based on 3.1-RELEASE.
This section is based on catpages contributed by Mainichi
Communications, Inc.

Translated by:	MYCOM team
Converted by:	Japanese Online Manual Project <man-jp@jp.FreeBSD.ORG>
Submitted by:	Kazuo Horikawa <k-horik@yk.rim.or.jp>
1999-12-09 16:26:08 +00:00

169 lines
4.2 KiB
Groff

.\" Copyright (c) 1991, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)tcsendbreak.3 8.1 (Berkeley) 6/4/93
.\"
.Dd June 4, 1993
.Dt TCSENDBREAK 3
.Os
.Sh 名称
.Nm tcsendbreak ,
.Nm tcdrain ,
.Nm tcflush ,
.Nm tcflow
.Nd ライン制御関数
.Sh 書式
.Fd #include <termios.h>
.Ft int
.Fn tcdrain "int fd"
.Ft int
.Fn tcflow "int fd" "int action"
.Ft int
.Fn tcflush "int fd" "int action"
.Ft int
.Fn tcsendbreak "int fd" "int len"
.Sh 解説
.Fn tcdrain
関数は、
.Fa fd
で参照される端末へ書込まれるすべての出力が端末に
転送されるまで待ちます。
.Pp
.Fn tcflow
関数は、
.Fa action
の値に応じて、
.Fa fd
で参照される端末へのデータの
送信またはその端末からのデータの受信を一時停止します。
.Fa action
の値は、
次のいずれかでなければなりません:
.Bl -tag -width "TCIOFF"
.It Fa TCOOFF
出力を一時停止します。
.It Fa TCOON
一時停止した出力を再開します。
.It Fa TCIOFF
端末がシステムへのデータ送信を停止するように、
STOP
キャラクタを送信します
(
.Xr termios 4
.Ql Input Modes
セクションの
IXOFF
の解説を
参照して下さい
)。
.It Fa TCION
端末がシステムへのデータ送信を開始するように、
START
キャラクタ
を送信します
(
.Xr termios 4
.Ql Input Modes
セクションの
IXOFF
の解説を
参照してください
)。
.El
.Pp
.Fn tcflush
関数は、
.Fa fd
で参照される端末へ書込まれるべきデータ
であるがまだ端末に送信されていないすべてのデータ、またはその端末から
受信したデータであるがまだ読み込んでいないすべてのデータを、
.Fa action
の値に
応じて廃棄します。
.Fa action
の値は、次のいずれかでなければなりません:
.Bl -tag -width "TCIOFLUSH"
.It Fa TCIFLUSH
受信したが読み込んでいないデータを捨てます。
.It Fa TCOFLUSH
書込んだが送信していないデータを捨てます。
.It Fa TCIOFLUSH
受信したが読み込んでいないデータ、および書込んだが
送信していないデータの両方を捨てます。
.El
.Pp
.Fn tcsendbreak
関数は、ゼロ値ビットの連続ストリームを
0.4
秒間の間
.Fa fd
で参照される端末へ送信します。
.Fa len
パラメータは、このシステムでは無視されます。
.Sh 戻り値
処理が成功すると、上記のすべての関数は値ゼロを返します。
.Sh エラー
エラーが起きた場合は
-1 の値が返され、エラーを示すグローバル変数
.Va errno
が次のように設定されます:
.Bl -tag -width Er
.It Bq Er EBADF
引数
.Fa fd
が有効なファイル記述子ではありません。
.It Bq Er EINVAL
引数
.Fa action
の値が適当ではありません。
.It Bq Er ENOTTY
.Fa fd
に結びつけられるファイルが端末ではありません。
.It Bq Er EINTR
.Fn tcdrain
関数は信号により中断されました。
.El
.Sh 参照
.Xr tcsetattr 3 ,
.Xr termios 4
.Sh 規格
.Fn tcsendbreak
.Fn tcdrain
.Fn tcflush
および
.Fn tcflow
関数は、
.St -p1003.1-88
規格に準拠していると考えられます。