OSDN Git Service

(split) LDP_man-pages: release ioctl.2 [JM:00378]
[linuxjm/LDP_man-pages.git] / draft / man3 / termios.3
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright (c) 1993 Michael Haardt
4 .\" (michael@moria.de)
5 .\" Fri Apr  2 11:32:09 MET DST 1993
6 .\"
7 .\" This is free documentation; you can redistribute it and/or
8 .\" modify it under the terms of the GNU General Public License as
9 .\" published by the Free Software Foundation; either version 2 of
10 .\" the License, or (at your option) any later version.
11 .\"
12 .\" The GNU General Public License's references to "object code"
13 .\" and "executables" are to be interpreted as the output of any
14 .\" document formatting or typesetting system, including
15 .\" intermediate and printed output.
16 .\"
17 .\" This manual is distributed in the hope that it will be useful,
18 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
19 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 .\" GNU General Public License for more details.
21 .\"
22 .\" You should have received a copy of the GNU General Public
23 .\" License along with this manual; if not, write to the Free
24 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
25 .\" USA.
26 .\"
27 .\" Modified 1993-07-24 by Rik Faith <faith@cs.unc.edu>
28 .\" Modified 1995-02-25 by Jim Van Zandt <jrv@vanzandt.mv.com>
29 .\" Modified 1995-09-02 by Jim Van Zandt <jrv@vanzandt.mv.com>
30 .\" moved to man3, aeb, 950919
31 .\" Modified 2001-09-22 by Michael Kerrisk <mtk.manpages@gmail.com>
32 .\" Modified 2001-12-17, aeb
33 .\" Modified 2004-10-31, aeb
34 .\" 2006-12-28, mtk:
35 .\"     Added .SS headers to give some structure to this page; and a
36 .\"     small amount of reordering.
37 .\"     Added a section on canonical and noncanonical mode.
38 .\"     Enhanced the discussion of "raw" mode for cfmakeraw().
39 .\"     Document CMSPAR.
40 .\"
41 .\" Japanese Version Copyright (c) 1998-1999
42 .\"   Michihide Hotta and NAKANO Takeo all rights reserved.
43 .\" Translated 1998-02-02, Michihide Hotta <sim@remus.dti.ne.jp>
44 .\" Updated 1999-03-14, NAKANO Takeo <nakano@apm.seikei.ac.jp>
45 .\" Updated 2001-02-17, Kentaro Shirakata <argrath@ub32.org>
46 .\" Updated 2001-10-16, Kentaro Shirakata <argrath@ub32.org>
47 .\" Updated 2002-01-04, Kentaro Shirakata <argrath@ub32.org>
48 .\" Updated 2003-09-01, Kentaro Shirakata <argrath@ub32.org>
49 .\" Updated 2006-07-26, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.36
50 .\" Updated 2007-05-01, Akihiro MOTOKI, LDP v2.46
51 .\" Updated 2007-09-06, Akihiro MOTOKI, LDP v2.64
52 .\"
53 .\"WORD:        carriage return         Éüµ¢(ʸ»ú)
54 .\"WORD:        new line                ²þ¹Ô(ʸ»ú)
55 .\"WORD:        fill character          ÊäŶʸ»ú
56 .\"WORD:        horizontal tab          ¿åÊ¿¥¿¥Ö
57 .\"WORD:        backspace               ¸åÂà(ʸ»ú)
58 .\"WORD:        vertical tab            ¿âľ¥¿¥Ö
59 .\"WORD:        feature test macro      µ¡Ç½¸¡ºº¥Þ¥¯¥í
60 .\"
61 .TH TERMIOS 3 2010-06-20 "Linux" "Linux Programmer's Manual"
62 .\"O .SH NAME
63 .\"O termios, tcgetattr, tcsetattr, tcsendbreak, tcdrain, tcflush, tcflow,
64 .\"O cfmakeraw, cfgetospeed, cfgetispeed, cfsetispeed, cfsetospeed, cfsetspeed \-
65 .\"O get and set terminal attributes, line control, get and set baud rate
66 .SH Ì¾Á°
67 termios, tcgetattr, tcsetattr, tcsendbreak, tcdrain, tcflush, tcflow,
68 cfmakeraw, cfgetospeed, cfgetispeed, cfsetispeed, cfsetospeed, cfsetspeed \-
69 ¥¿¡¼¥ß¥Ê¥ë°À­¤Î¼èÆÀ¡¦ÀßÄê¡¢¥é¥¤¥óÀ©¸æ¡¢¥Ü¡¼¥ì¡¼¥È¤Î¼èÆÀ¡¦ÀßÄê
70 .\"O .SH SYNOPSIS
71 .SH ½ñ¼°
72 .nf
73 .B #include <termios.h>
74 .br
75 .B #include <unistd.h>
76 .sp
77 .BI "int tcgetattr(int " fd ", struct termios *" termios_p );
78 .sp
79 .BI "int tcsetattr(int " fd ", int " optional_actions ,
80 .BI "              const struct termios *" termios_p );
81 .sp
82 .BI "int tcsendbreak(int " fd ", int " duration );
83 .sp
84 .BI "int tcdrain(int " fd );
85 .sp
86 .BI "int tcflush(int " fd ", int " queue_selector );
87 .sp
88 .BI "int tcflow(int " fd ", int " action );
89 .sp
90 .BI "void cfmakeraw(struct termios *" termios_p );
91 .sp
92 .BI "speed_t cfgetispeed(const struct termios *" termios_p );
93 .sp
94 .BI "speed_t cfgetospeed(const struct termios *" termios_p );
95 .sp
96 .BI "int cfsetispeed(struct termios *" termios_p ", speed_t " speed );
97 .sp
98 .BI "int cfsetospeed(struct termios *" termios_p ", speed_t " speed );
99 .sp
100 .BI "int cfsetspeed(struct termios *" termios_p ", speed_t " speed );
101 .fi
102 .sp
103 .in -4n
104 .\"O Feature Test Macro Requirements for glibc (see
105 .\"O .BR feature_test_macros (7)):
106 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
107 .RB ( feature_test_macros (7)
108 »²¾È):
109 .in
110 .sp
111 .BR cfsetspeed (),
112 .BR cfmakeraw ():
113 _BSD_SOURCE
114 .\"O .SH DESCRIPTION
115 .SH ÀâÌÀ
116 .\"O The termios functions describe a general terminal interface that is
117 .\"O provided to control asynchronous communications ports.
118 termios ´Ø¿ô·²¤Ï¡¢ÈóƱ´üÄÌ¿®¥Ý¡¼¥È¤òÀ©¸æ¤¹¤ë¤¿¤á¤ÎÈÆÍÑ
119 ¥¿¡¼¥ß¥Ê¥ë¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Ç¤¢¤ë¡£
120 .\"O .SS "The termios structure"
121 .SS "termios ¹½Â¤ÂÎ"
122 .LP
123 .\"O Many of the functions described here have a \fItermios_p\fP argument
124 .\"O that is a pointer to a \fItermios\fP structure.
125 .\"O This structure contains at least the following members:
126 ¤³¤³¤Ë¼¨¤µ¤ì¤Æ¤¤¤ë´Ø¿ô¤Î¿¤¯¤Ï¡¢°ú¤­¿ô¤Ë \fItermios_p\fP ¤òÍѤ¤¤ë¡£
127 ¤³¤Î°ú¤­¿ô¤Ï \fItermios\fP ¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤Ç¤¢¤ë¡£
128 ¤³¤Î¹½Â¤ÂΤˤϾ¯¤Ê¤¯¤È¤â°Ê²¼¤Ë¼¨¤¹¥á¥ó¥Ð¤¬´Þ¤Þ¤ì¤ë:
129 .sp
130 .in +4n
131 .nf
132 tcflag_t c_iflag;      /* input modes */
133 tcflag_t c_oflag;      /* output modes */
134 tcflag_t c_cflag;      /* control modes */
135 tcflag_t c_lflag;      /* local modes */
136 cc_t     c_cc[NCCS];   /* control chars */
137 .fi
138 .in
139 .PP
140 .\"O The values that may be assigned to these fields are described below.
141 .\"O In the case of the first four bit-mask fields,
142 .\"O the definitions of some of the associated flags that may be set are
143 .\"O only exposed if a specific feature test macro (see
144 .\"O .BR feature_test_macros (7))
145 .\"O is defined, as noted in brackets ("[]").
146 °Ê²¼¤Ë¡¢¤³¤ì¤é¤Î¥Õ¥£¡¼¥ë¥É¤Ë³ä¤êÅö¤Æ²Äǽ¤ÊÃͤˤĤ¤¤ÆÀâÌÀ¤¹¤ë¡£
147 ºÇ½é¤Î 4 ¤Ä¤Î¥Ó¥Ã¥È¥Þ¥¹¥¯¥Õ¥£¡¼¥ë¥É¤Ç¤Ï¡¢
148 ´Ø·¸¤¹¤ë¥Õ¥é¥°¤ÎÄêµÁ¤Î¤¤¤¯¤Ä¤«¤Ï¡¢ÆÃÄê¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í
149 .RB ( feature_test_macros (7)
150 »²¾È) ¤¬ÄêµÁ¤µ¤ì¤¿¾ì¹ç¤Ë¤Î¤ß¸ø³«¤µ¤ì¤ë¡£
151 ɬÍפʵ¡Ç½¸¡ºº¥Þ¥¯¥í¤Ï³Ñ³ç¸Ì ("[]") Æâ¤Ë½ñ¤«¤ì¤Æ¤¤¤ë¡£
152 .PP
153 .\"O In the descriptions below, "not in POSIX" means that the
154 .\"O value is not specified in POSIX.1-2001,
155 .\"O and "XSI" means that the value is specified in POSIX.1-2001
156 .\"O as part of the XSI extension.
157 °Ê²¼¤ÎÀâÌÀ¤Ç¡¢ "POSIX ¤Ë¤Ï¤Ê¤¤" ¤Ï
158 ¤½¤ÎÃͤ¬ POSIX.1-2001 ¤Çµ¬Äꤵ¤ì¤Æ¤¤¤Ê¤¤¤³¤È¤ò°ÕÌ£¤·¡¢
159 "XSI" ¤Ï¤½¤ÎÃͤ¬ POSIX.1-2001 ¤Î XSI ³ÈÄ¥¤Ç
160 µ¬Äꤵ¤ì¤Æ¤¤¤ë¤³¤È¤ò°ÕÌ£¤¹¤ë¡£
161 .PP
162 .\"O \fIc_iflag\fP flag constants:
163 \fIc_iflag\fP ¥Õ¥é¥°¤Ë¤Ï°Ê²¼¤ÎÍ×ÁǤò»ØÄê¤Ç¤­¤ë:
164 .TP
165 .B IGNBRK
166 .\"O Ignore BREAK condition on input.
167 ÆþÎÏÃæ¤Î BREAK ¿®¹æ¤ò̵»ë¤¹¤ë¡£
168 .TP
169 .B BRKINT
170 .\"O If \fBIGNBRK\fP is set, a BREAK is ignored.
171 .\"O If it is not set
172 .\"O but \fBBRKINT\fP is set, then a BREAK causes the input and output
173 .\"O queues to be flushed, and if the terminal is the controlling
174 .\"O terminal of a foreground process group, it will cause a
175 .\"O \fBSIGINT\fP to be sent to this foreground process group.
176 \fBIGNBRK\fP ¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢BREAK ¿®¹æ¤Ï̵»ë¤µ¤ì¤ë¡£
177 \fBIGNBRK\fP ¤¬ÀßÄꤵ¤ì¤Æ¤¤¤Ê¤¤¤¬¡¢\fBBRKINT\fP ¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢
178 BREAK ¿®¹æ¤Ë¤è¤Ã¤ÆÆþ½ÐÎÏ¥­¥å¡¼¤¬¥Õ¥é¥Ã¥·¥å¤µ¤ì¡¢
179 ¤µ¤é¤Ë¡¢Ã¼Ëö¤¬¥Õ¥©¥¢¥°¥é¥¦¥ó¥É¥×¥í¥»¥¹¥°¥ë¡¼¥×¤ÎÀ©¸æüËö¤Î¾ì¹ç¤Ï¡¢
180 ¥Õ¥©¥¢¥°¥é¥¦¥ó¥É¥×¥í¥»¥¹¥°¥ë¡¼¥×¤Ë \fBSIGINT\fP ¤¬Á÷¤é¤ì¤ë¡£
181 .\"O When neither \fBIGNBRK\fP nor \fBBRKINT\fP are set, a BREAK
182 .\"O reads as a null byte (\(aq\\0\(aq), except when \fBPARMRK\fP is set,
183 .\"O in which case it reads as the sequence \\377 \\0 \\0.
184 \fBIGNBRK\fP ¤â \fBBRKINT\fP ¤âÀßÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¡¢
185 BREAK ¤ò NULL ¥Ð¥¤¥È (\(aq\\0\(aq) ¤È¤·¤ÆÆɤ߹þ¤à¡£
186 ¤¿¤À¤·¡¢\fBPARMRK\fP ¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï \\377 \\0 \\0 ¤Î¥·¡¼¥±¥ó¥¹¤È¤·¤Æ
187 Æɤ߹þ¤à¡£
188 .TP
189 .B IGNPAR
190 .\"O Ignore framing errors and parity errors.
191 ¥Õ¥ì¡¼¥à¥¨¥é¡¼¤ª¤è¤Ó¥Ñ¥ê¥Æ¥£¥¨¥é¡¼¤ò̵»ë¤¹¤ë¡£
192 .TP
193 .B PARMRK
194 .\"O If \fBIGNPAR\fP is not set, prefix a character with a parity error or
195 .\"O framing error with \\377 \\0.
196 .\"O If neither \fBIGNPAR\fP nor \fBPARMRK\fP
197 .\"O is set, read a character with a parity error or framing error
198 .\"O as \\0.
199 \fBIGNPAR\fP ¤¬ÀßÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¡¢¥Ñ¥ê¥Æ¥£¥¨¥é¡¼¤¢¤ë¤¤¤Ï¥Õ¥ì¡¼¥à¥¨¥é¡¼
200 ¤ÎȯÀ¸¤·¤¿Ê¸»ú¤ÎÁ°¤Ë \\377 \\0 ¤òÉղ乤롣\fBIGNPAR\fP ¤â \fBPARMRK\fP ¤â
201 ÀßÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¡¢¥Ñ¥ê¥Æ¥£¥¨¥é¡¼¤¢¤ë¤¤¤Ï¥Õ¥ì¡¼¥à¥¨¥é¡¼¤ÎȯÀ¸¤·¤¿Ê¸»ú¤ò
202 \\0 ¤È¤·¤ÆÆɤ߹þ¤à¡£
203 .TP
204 .B INPCK
205 .\"O Enable input parity checking.
206 ÆþÎϤΥѥê¥Æ¥£¥Á¥§¥Ã¥¯¤òÍ­¸ú¤Ë¤¹¤ë¡£
207 .TP
208 .B ISTRIP
209 .\"O Strip off eighth bit.
210 8 ¥Ó¥Ã¥ÈÌܤòÍî¤È¤¹¡£
211 .TP
212 .B INLCR
213 .\"O Translate NL to CR on input.
214 ÆþÎϤΠNL (New Line: ²þ¹Ôʸ»ú) ¤ò CR (Carriage Return: Éüµ¢Ê¸»ú) ¤Ë
215 ÃÖ¤­´¹¤¨¤ë¡£
216 .TP
217 .B IGNCR
218 .\"O Ignore carriage return on input.
219 ÆþÎϤΠCR ¤ò̵»ë¤¹¤ë¡£
220 .TP
221 .B ICRNL
222 .\"O Translate carriage return to newline on input (unless \fBIGNCR\fP is set).
223 (\fBIGNCR\fP ¤¬ÀßÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç) ÆþÎϤΠCR ¤ò NL ¤ËÃÖ¤­´¹¤¨¤ë¡£
224 .TP
225 .B IUCLC
226 .\"O (not in POSIX) Map uppercase characters to lowercase on input.
227 (POSIX ¤Ë¤Ï¤Ê¤¤) ÆþÎϤÎÂçʸ»ú¤ò¾®Ê¸»ú¤ËÃÖ¤­´¹¤¨¤ë¡£
228 .TP
229 .B IXON
230 .\"O Enable XON/XOFF flow control on output.
231 ½ÐÎϤΠXON/XOFF ¥Õ¥í¡¼À©¸æ¤òÍ­¸ú¤Ë¤¹¤ë¡£
232 .TP
233 .B IXANY
234 .\"O (XSI) Typing any character will restart stopped output.
235 .\"O (The default is to allow just the START character to restart output.)
236 (XSI) Ç¤°Õ¤Îʸ»ú¤òÆþÎϤ¹¤ë¤È¡¢Ää»ß¤·¤Æ¤¤¤¿½ÐÎϤòºÆ³«¤¹¤ë
237 (¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢START Ê¸»ú¤Ç¤Î¤ß½ÐÎϤ¬ºÆ³«¤µ¤ì¤ë)¡£
238 .TP
239 .B IXOFF
240 .\"O Enable XON/XOFF flow control on input.
241 ÆþÎϤΠXON/XOFF ¥Õ¥í¡¼À©¸æ¤òÍ­¸ú¤Ë¤¹¤ë¡£
242 .TP
243 .B IMAXBEL
244 .\"O (not in POSIX) Ring bell when input queue is full.
245 .\"O Linux does not implement this bit, and acts as if it is always set.
246 (POSIX ¤Ë¤Ï¤Ê¤¤) ÆþÎÏ¥­¥å¡¼¤¬°ìÇդλþ¤Ë¥Ù¥ë¤òÌĤ餹¡£
247 Linux ¤Ç¤Ï¤³¤Î¥Ó¥Ã¥È¤Ï¼ÂÁõ¤µ¤ì¤Æ¤ª¤é¤º¡¢
248 ¾ï¤Ë¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¤«¤Î¤è¤¦¤Ë¿¶Éñ¤¦¡£
249 .TP
250 .\"O .BR IUTF8 " (since Linux 2.6.4)"
251 .BR IUTF8 " (Linux 2.6.4 °Ê¹ß)"
252 .\"O (not in POSIX) Input is UTF8;
253 .\"O this allows character-erase to be correctly performed in cooked mode.
254 (POSIX ¤Ë¤Ï¤Ê¤¤) ÆþÎϤ¬ UTF8 ¤Ç¤¢¤ë;
255 ¤³¤ì¤Ë¤è¤ê cooked mode ¤Çʸ»úºï½ü (character-erase) ¤ò
256 Àµ¤·¤¯µ¡Ç½¤µ¤»¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
257 .PP
258 .\"O \fIc_oflag\fP flag constants defined in POSIX.1:
259 POSIX.1 ¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ë \fIc_oflag\fP ¥Õ¥é¥°¤ò°Ê²¼¤Ë¼¨¤¹:
260 .TP
261 .B OPOST
262 .\"O Enable implementation-defined output processing.
263 ¼ÂÁõ¤Ë°Í¸¤·¤¿½ÐÎϽèÍý¤òÍ­¸ú¤Ë¤¹¤ë¡£
264 .PP
265 .\"O The remaining \fIc_oflag\fP flag constants are defined in POSIX.1-2001,
266 .\"O unless marked otherwise.
267 »Ä¤ê¤Î \fIc_oflag\fP ¥Õ¥é¥°¤Ï¡¢Æõ­¤Î¤Ê¤¤¸Â¤ê POSIX.1-2001 ¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£
268 .TP
269 .B OLCUC
270 .\"O (not in POSIX) Map lowercase characters to uppercase on output.
271 (POSIX ¤Ë¤Ï¤Ê¤¤) ½ÐÎÏ»þ¤Ë¾®Ê¸»ú¤òÂçʸ»ú¤ËÊÑ´¹¤¹¤ë¡£
272 .TP
273 .B ONLCR
274 .\"O (XSI) Map NL to CR-NL on output.
275 (XSI) ½ÐÎϤΠNL ¤ò CR-NL ¤ËÃÖ¤­´¹¤¨¤ë¡£
276 .TP
277 .B OCRNL
278 .\"O Map CR to NL on output.
279 ½ÐÎϤΠCR ¤ò NL ¤ËÃÖ¤­´¹¤¨¤ë¡£
280 .TP
281 .B ONOCR
282 .\"O Don't output CR at column 0.
283 0 ·åÌܤǠCR ¤ò½ÐÎϤ·¤Ê¤¤¡£
284 .TP
285 .B ONLRET
286 .\"O Don't output CR.
287 CR ¤ò½ÐÎϤ·¤Ê¤¤¡£
288 .TP
289 .B OFILL
290 .\"O Send fill characters for a delay, rather than using a timed delay.
291 žÁ÷»þ´Ö¤òÃ٤餻¤ë¤Î¤Ç¤Ï¤Ê¤¯¡¢ÊäŶʸ»ú (fill character) ¤òÁ÷¤ë¡£
292 (ÌõÃí:ÆÃÄê¤Îʸ»ú¤ËÂФ·¤Æ¡¢Ã¼Ëö¦¤Î½èÍý¤òÂԤĤ¿¤á¤ËžÁ÷¤ò°ìÄê»þ´Ö
293 Ã٤餻¤ë¤³¤È¤¬¤Ç¤­¤ë¡£¤Þ¤¿¡¢ \fBOFILL\fP ¤ò»ØÄꤹ¤ë¤È
294 žÁ÷¤òÃ٤餻¤ëÂå¤ï¤ê¤ËÊäŶʸ»ú¤òÁ÷¤ë¡£)
295 .TP
296 .B OFDEL
297 .\"O (not in POSIX) Fill character is ASCII DEL (0177).
298 .\"O If unset, fill character is ASCII NUL (\(aq\\0\(aq).
299 .\"O (Not implemented on Linux.)
300 (POSIX ¤Ë¤Ï¤Ê¤¤) ÊäŶʸ»ú¤ò ASCII DEL ¤Ë¤¹¤ë¡£
301 ¤³¤Î¥Õ¥é¥°¤¬ÀßÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï ASCII NUL (\(aq\\0\(aq) ¤Ë¤Ê¤ë¡£
302 (Linux ¤Ç¤Ï¼ÂÁõ¤µ¤ì¤Æ¤¤¤Ê¤¤)
303 .TP
304 .B NLDLY
305 .\"O Newline delay mask.
306 .\"O Values are \fBNL0\fP and \fBNL1\fP.
307 .\"O [requires
308 .\"O .B _BSD_SOURCE
309 .\"O or
310 .\"O .B _SVID_SOURCE
311 .\"O or
312 .\"O .BR _XOPEN_SOURCE ]
313 NL ¤ÎÃÙ±ä¤òÀßÄꤹ¤ë¡£ÃͤϠ\fBNL0\fP (ÃÙ±ä¤Ê¤·) ¤ª¤è¤Ó \fBNL1\fP ¤Ç¤¢¤ë¡£
314 .RB [ _BSD_SOURCE
315 ¤«
316 .B _SVID_SOURCE
317 ¤«
318 .B _XOPEN_SOURCE
319 ¤¬É¬Í×]
320 .TP
321 .B CRDLY
322 .\"O Carriage return delay mask.
323 .\"O Values are \fBCR0\fP, \fBCR1\fP, \fBCR2\fP, or \fBCR3\fP.
324 .\"O [requires
325 .\"O .B _BSD_SOURCE
326 .\"O or
327 .\"O .B _SVID_SOURCE
328 .\"O or
329 .\"O .BR _XOPEN_SOURCE ]
330 CR ¤ÎÃÙ±ä¤òÀßÄꤹ¤ë¡£ÃͤϠ\fBCR0\fP (ÃÙ±ä¤Ê¤·),
331 \fBCR1\fP, \fBCR2\fP,\fBCR3\fP ¤Ç¤¢¤ë¡£
332 .RB [ _BSD_SOURCE
333 ¤«
334 .B _SVID_SOURCE
335 ¤«
336 .B _XOPEN_SOURCE
337 ¤¬É¬Í×]
338 .TP
339 .B TABDLY
340 .\"O Horizontal tab delay mask.
341 .\"O Values are \fBTAB0\fP, \fBTAB1\fP, \fBTAB2\fP, \fBTAB3\fP (or \fBXTABS\fP).
342 .\"O [requires
343 .\"O .B _BSD_SOURCE
344 .\"O or
345 .\"O .B _SVID_SOURCE
346 .\"O or
347 .\"O .BR _XOPEN_SOURCE ]
348 ¿åÊ¿¥¿¥Ö (horizontal tab) ¤ÎÃÙ±ä¤òÀßÄꤹ¤ë¡£
349 ÃͤϠ\fBTAB0\fP (ÃÙ±ä¤Ê¤·),
350 \fBTAB1\fP, \fBTAB2\fP, \fBTAB3\fP (\fBXTABS\fP) ¤Ç¤¢¤ë¡£
351 .RB [ _BSD_SOURCE
352 ¤«
353 .B _SVID_SOURCE
354 ¤«
355 .B _XOPEN_SOURCE
356 ¤¬É¬Í×]
357 .\"O A value of TAB3, that is, XTABS, expands tabs to spaces
358 .\"O (with tab stops every eight columns).
359 XTAB3 (¤³¤ì¤Ï XTABS ¤ÈƱ¤¸¤Ç¤¢¤ë) ¤ÎÃͤϥ¿¥Ö¤ò¥¹¥Ú¡¼¥¹²¿¸Ä¤ËÊÑ´¹¤¹¤ë¤«¤ò¼¨¤¹
360 (¥¿¥Ö¤Ï 8 ·åËè¤Ë»ß¤Þ¤ë)¡£
361 .TP
362 .B BSDLY
363 .\"O Backspace delay mask.
364 .\"O Values are \fBBS0\fP or \fBBS1\fP.
365 .\"O (Has never been implemented.)
366 .\"O [requires
367 .\"O .B _BSD_SOURCE
368 .\"O or
369 .\"O .B _SVID_SOURCE
370 .\"O or
371 .\"O .BR _XOPEN_SOURCE ]
372 ¸åÂà (backspace) ¤ÎÃÙ±ä¤òÀßÄꤹ¤ë¡£
373 ÃͤϠ\fBBS0\fP (ÃÙ±ä¤Ê¤·) ¤¢¤ë¤¤¤Ï \fBBS1\fP ¤Ç¤¢¤ë¡£
374 (¼ÂÁõ¤µ¤ì¤¿¤³¤È¤Ï¤Ê¤¤)
375 .RB [ _BSD_SOURCE
376 ¤«
377 .B _SVID_SOURCE
378 ¤«
379 .B _XOPEN_SOURCE
380 ¤¬É¬Í×]
381 .TP
382 .B VTDLY
383 .\"O Vertical tab delay mask.
384 .\"O Values are \fBVT0\fP or \fBVT1\fP.
385 ¿âľ¥¿¥Ö (vertical tab) ¤ÎÃÙ±ä¤òÀßÄꤹ¤ë¡£
386 ÃͤϠ\fBVT0\fP (ÃÙ±ä¤Ê¤·) ¤¢¤ë¤¤¤Ï \fBVT1\fP ¤Ç¤¢¤ë¡£
387 .TP
388 .B FFDLY
389 .\"O Form feed delay mask.
390 .\"O Values are \fBFF0\fP or \fBFF1\fP.
391 .\"O [requires
392 .\"O .B _BSD_SOURCE
393 .\"O or
394 .\"O .B _SVID_SOURCE
395 .\"O or
396 .\"O .BR _XOPEN_SOURCE ]
397 ÊÇÁ÷¤ê (form feed) ¤ÎÃÙ±ä¤òÀßÄꤹ¤ë¡£
398 ÃͤϠ\fBFF0\fP (ÃÙ±ä¤Ê¤·) ¤¢¤ë¤¤¤Ï \fBFF1\fP ¤Ç¤¢¤ë¡£
399 .RB [ _BSD_SOURCE
400 ¤«
401 .B _SVID_SOURCE
402 ¤«
403 .B _XOPEN_SOURCE
404 ¤¬É¬Í×]
405 .PP
406 .\"O \fIc_cflag\fP flag constants:
407 \fIc_cflag\fP ¥Õ¥é¥°¤Ï°Ê²¼¤ÎÄ̤ê:
408 .TP
409 .B CBAUD
410 .\"O (not in POSIX) Baud speed mask (4+1 bits).
411 .\"O [requires
412 .\"O .B _BSD_SOURCE
413 .\"O or
414 .\"O .BR _SVID_SOURCE ]
415 (POSIX ¤Ë¤Ï¤Ê¤¤) ¥Ü¡¼¥ì¡¼¥È¥Þ¥¹¥¯ (4+1 ¥Ó¥Ã¥È)¡£
416 .RB [ _BSD_SOURCE
417 ¤«
418 .B _SVID_SOURCE
419 ¤¬É¬Í×]
420 .TP
421 .B CBAUDEX
422 .\"O (not in POSIX) Extra baud speed mask (1 bit), included in
423 .\"O .BR CBAUD .
424 .\"O [requires
425 .\"O .B _BSD_SOURCE
426 .\"O or
427 .\"O .BR _SVID_SOURCE ]
428 (POSIX ¤Ë¤Ï¤Ê¤¤) ÄɲäΥܡ¼¥ì¡¼¥È¥Þ¥¹¥¯ (1 ¥Ó¥Ã¥È)¡£
429 .B CBAUD
430 ¤Ë´Þ¤Þ¤ì¤Æ¤¤¤ë¡£
431 .RB [ _BSD_SOURCE
432 ¤«
433 .B _SVID_SOURCE
434 ¤¬É¬Í×]
435 .sp
436 .\"O (POSIX says that the baud speed is stored in the
437 .\"O .I termios
438 .\"O structure without specifying where precisely, and provides
439 .\"O .BR cfgetispeed ()
440 .\"O and
441 .\"O .BR cfsetispeed ()
442 .\"O for getting at it.
443 .\"O Some systems use bits selected by
444 .\"O .B CBAUD
445 .\"O in
446 .\"O .IR c_cflag ,
447 .\"O other systems use separate fields, for example,
448 .\"O .I sg_ispeed
449 .\"O and
450 .\"O .IR sg_ospeed .)
451 (POSIX ¤Ç¤Ï¡¢
452 .I termios
453 ¹½Â¤ÂΤ˳ÊǼ¤µ¤ì¤¿¥Ü¡¼¥ì¡¼¥È¤ÏÀµ³Î¤Ê¤â¤Î¤Ç¤Ï¤Ê¤¯¡¢
454 ¥Ü¡¼¥ì¡¼¥È¤òÁàºî¤¹¤ë¤¿¤á¤Ë
455 .BR cfgetispeed ()
456 ¤È
457 .BR cfsetispeed ()
458 ¤¬Ä󶡤µ¤ì¤Æ¤¤¤ë¡£
459 .I c_cflag
460 Æâ¤Î
461 .B CBAUD
462 ¤ÇÁªÂò¤µ¤ì¤¿¥Ó¥Ã¥È¤ò»È¤¦¥·¥¹¥Æ¥à¤â¤¢¤ì¤Ð¡¢
463 .I sg_ispeed
464 ¤ä
465 .I sg_ospeed
466 ¤È¤¤¤Ã¤¿ÆÈΩ¤·¤¿¥Õ¥£¡¼¥ë¥É¤ò»È¤¦¤â¤Î¤â¤¢¤ë¡£)
467 .TP
468 .B CSIZE
469 .\"O Character size mask.
470 .\"O Values are \fBCS5\fP, \fBCS6\fP, \fBCS7\fP, or \fBCS8\fP.
471 ʸ»ú¥µ¥¤¥º¤òÀßÄꤹ¤ë¡£
472 ÃͤϠ\fBCS5\fP, \fBCS6\fP, \fBCS7\fP, \fBCS8\fP ¤Ç¤¢¤ë¡£
473 .TP
474 .B CSTOPB
475 .\"O Set two stop bits, rather than one.
476 ¥¹¥È¥Ã¥×¥Ó¥Ã¥È¤ò 1 ¤Ç¤Ï¤Ê¤¯ 2 ¤Ë¤¹¤ë¡£
477 .TP
478 .B CREAD
479 .\"O Enable receiver.
480 ¼õ¿®¤òÍ­¸ú¤Ë¤¹¤ë¡£
481 .TP
482 .B PARENB
483 .\"O Enable parity generation on output and parity checking for input.
484 ½ÐÎϤ˥ѥê¥Æ¥£¤òÉղä·¡¢ÆþÎϤΥѥê¥Æ¥£¥Á¥§¥Ã¥¯¤ò¹Ô¤¦¡£
485 .TP
486 .B PARODD
487 .\"O If set, then parity for input and output is odd;
488 .\"O otherwise even parity is used.
489 ÀßÄꤵ¤ì¤ë¤È¡¢ÆþÎϤª¤è¤Ó½ÐÎϤËÂФ¹¤ë¥Ñ¥ê¥Æ¥£¤¬´ñ¿ô¥Ñ¥ê¥Æ¥£¤È¤Ê¤ë¡£
490 ÀßÄꤵ¤ì¤Ê¤¤¾ì¹ç¡¢¶ö¿ô¥Ñ¥ê¥Æ¥£¤¬»ÈÍѤµ¤ì¤ë¡£
491 .TP
492 .B HUPCL
493 .\"O Lower modem control lines after last process closes the device (hang up).
494 ºÇ¸å¤Î¥×¥í¥»¥¹¤¬¥Ç¥Ð¥¤¥¹¤ò¥¯¥í¡¼¥º¤·¤¿¸å¡¢¥â¥Ç¥à¤ÎÀ©¸æÀþ¤ò low ¤Ë¤¹¤ë
495 (ÀÚÃǤ¹¤ë)¡£
496 .TP
497 .B CLOCAL
498 .\"O Ignore modem control lines.
499 ¥â¥Ç¥à¤ÎÀ©¸æÀþ¤ò̵»ë¤¹¤ë¡£
500 .TP
501 .B LOBLK
502 .\"O (not in POSIX) Block output from a noncurrent shell layer.
503 .\"O For use by \fBshl\fP (shell layers).  (Not implemented on Linux.)
504 (POSIX ¤Ë¤Ï¤Ê¤¤) ¸½ºß¤Î¥·¥§¥ëÁذʳ°¤«¤é¤Î½ÐÎϤòÍÞÀ©¤¹¤ë¡£
505  \fBshl\fP (¥·¥§¥ëÁØ) ¤ÇÍѤ¤¤é¤ì¤ë¡£(Linux ¤Ç¤Ï¼ÂÁõ¤µ¤ì¤Æ¤¤¤Ê¤¤)
506 .TP
507 .B CIBAUD
508 .\"O (not in POSIX) Mask for input speeds.
509 .\"O The values for the
510 .\"O .B CIBAUD
511 .\"O bits are
512 .\"O the same as the values for the
513 .\"O .B CBAUD
514 .\"O bits, shifted left
515 .\"O .B IBSHIFT
516 .\"O bits.
517 .\"O [requires
518 .\"O .B _BSD_SOURCE
519 .\"O or
520 .\"O .BR _SVID_SOURCE ]
521 .\"O (Not implemented on Linux.)
522 (POSIX ¤Ë¤Ï¤Ê¤¤) ÆþÎÏ®Å٤Υޥ¹¥¯¡£
523 .B CIBAUD
524 ¥Ó¥Ã¥È¤Î¤¿¤á¤ÎÃͤÏ
525 .B CBAUD
526 ¥Ó¥Ã¥È¤Î¤¿¤á¤ÎÃͤÈƱ¤¸¤Ç¤¢¤ê¡¢
527 º¸¤Ë
528 .B IBSHIFT
529 ¥Ó¥Ã¥È¥·¥Õ¥È¤·¤¿¤â¤Î¤Ç¤¢¤ë¡£
530 .RB [ _BSD_SOURCE
531 ¤«
532 .B _SVID_SOURCE
533 ¤¬É¬Í×]
534 (Linux ¤Ç¤Ï¼ÂÁõ¤µ¤ì¤Æ¤¤¤Ê¤¤)
535 .TP
536 .B CMSPAR
537 .\"O (not in POSIX)
538 .\"O Use "stick" (mark/space) parity (supported on certain serial
539 .\"O devices): if
540 .\"O .B PARODD
541 .\"O is set, the parity bit is always 1; if
542 .\"O .B PARODD
543 .\"O is not set, then the parity bit is always 0).
544 .\"O [requires
545 .\"O .B _BSD_SOURCE
546 .\"O or
547 .\"O .BR _SVID_SOURCE ]
548 (POSIX ¤Ë¤Ï¤Ê¤¤)
549 (°ìÉô¤Î¥·¥ê¥¢¥ë¥Ç¥Ð¥¤¥¹¤Ç¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë)
550 ¡Ö¥¹¥Æ¥£¥Ã¥¯ (stick)¡×¥Ñ¥ê¥Æ¥£ (¥Þ¡¼¥¯/¥¹¥Ú¡¼¥¹ ¥Ñ¥ê¥Æ¥£)¤ò»ÈÍѤ¹¤ë¡£
551 .B PARODD
552 ¤¬ÀßÄꤵ¤ì¤¿¾ì¹ç¥Ñ¥ê¥Æ¥£¥Ó¥Ã¥È¤Ï¾ï¤Ë 1 ¤È¤Ê¤ê¡¢
553 ÀßÄꤵ¤ì¤Ê¤¤¾ì¹ç¤Ï¾ï¤Ë 0 ¤È¤Ê¤ë¡£
554 .RB [ _BSD_SOURCE
555 ¤«
556 .B _SVID_SOURCE
557 ¤¬É¬Í×]
558 .TP
559 .B CRTSCTS
560 .\"O (not in POSIX) Enable RTS/CTS (hardware) flow control.
561 .\"O [requires
562 .\"O .B _BSD_SOURCE
563 .\"O or
564 .\"O .BR _SVID_SOURCE ]
565 (POSIX ¤Ë¤Ï¤Ê¤¤) RTS/CTS (¥Ï¡¼¥É¥¦¥§¥¢) ¥Õ¥í¡¼À©¸æ¤òÍ­¸ú¤Ë¤¹¤ë¡£
566 .RB [ _BSD_SOURCE
567 ¤«
568 .B _SVID_SOURCE
569 ¤¬É¬Í×]
570 .PP
571 .\"O \fIc_lflag\fP flag constants:
572 \fIc_lflag\fP ¥Õ¥é¥°¤Ï°Ê²¼¤ÎÄ̤ê:
573 .TP
574 .B ISIG
575 .\"O When any of the characters INTR, QUIT, SUSP, or DSUSP are received,
576 .\"O generate the corresponding signal.
577 INTR, QUIT, SUSP, DSUSP ¤Îʸ»ú¤ò¼õ¿®¤·¤¿»þ¡¢Âбþ¤¹¤ë¥·¥°¥Ê¥ë¤ò
578 ȯÀ¸¤µ¤»¤ë¡£
579 .TP
580 .B ICANON
581 .\"O Enable canonical mode (described below).
582 ¥«¥Î¥Ë¥«¥ë¥â¡¼¥É¤òÍ­¸ú¤Ë¤¹¤ë (²¼µ­»²¾È)¡£
583 .TP
584 .B XCASE
585 .\"O (not in POSIX; not supported under Linux)
586 .\"O If \fBICANON\fP is also set, terminal is uppercase only.
587 .\"O Input is converted to lowercase, except for characters preceded by \\.
588 .\"O On output, uppercase characters are preceded by \\ and lowercase
589 .\"O characters are converted to uppercase.
590 (POSIX ¤Ë¤Ï¤Ê¤¤; Linux ¤Ç¤ÏÂбþ¤·¤Æ¤¤¤Ê¤¤)
591 \fBICANON\fP ¤¬Æ±»þ¤ËÀßÄꤵ¤ì¤¿¾ì¹ç¡¢Ã¼Ëö¤ÏÂçʸ»ú¤Î¤ß¤¬Í­¸ú¤Ç¤¢¤ë¡£
592 ÆþÎϤµ¤ì¤¿Ê¸»ú¤Ï \\ ¤¬ÉÕ¤¤¤¿Ê¸»ú¤ò½ü¤¤¤Æ¾®Ê¸»ú¤ËÊÑ´¹¤µ¤ì¤ë¡£
593 ½ÐÎÏ»þ¤Ï¡¢Âçʸ»ú¤ÎÁ°¤Ë \\ ¤¬ÉÕ¤­¡¢¾®Ê¸»ú¤ÏÂçʸ»ú¤ËÊÑ´¹¤µ¤ì¤ë¡£
594 .\"O [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]
595 .\"O .\" glibc is probably now wrong to allow
596 .RB [ _BSD_SOURCE
597 ¤¬
598 .B _SVID_SOURCE
599 ¤«
600 .B _XOPEN_SOURCE
601 ¤¬É¬Í×]
602 .\" °Ê²¼¤Ï¤ª¤½¤é¤¯ glibc ¤Î´Ö°ã¤¤¤Ç¤¢¤í¤¦¡£
603 .\"O .\" Define
604 .\"O .\" .B _XOPEN_SOURCE
605 .\"O .\" to expose
606 .\"O .\" .BR XCASE .
607 .\" .B XCASE
608 .\" ¤ò¸ø³«¤¹¤ë¤Ë¤Ï
609 .\" .B _XOPEN_SOURCE
610 .\" ¤òÄêµÁ¤¹¤ë¤³¤È¡£
611 .TP
612 .B ECHO
613 .\"O Echo input characters.
614 ÆþÎϤµ¤ì¤¿Ê¸»ú¤ò¥¨¥³¡¼¤¹¤ë¡£
615 .TP
616 .B ECHOE
617 .\"O If \fBICANON\fP is also set, the ERASE character erases the preceding
618 .\"O input character, and WERASE erases the preceding word.
619 \fBICANON\fP ¤âƱ»þ¤ËÀßÄꤵ¤ì¤¿¾ì¹ç¡¢ERASE Ê¸»ú¤ÏÁ°¤Îʸ»ú¤òºï½ü¤·¡¢
620 WERASE Ê¸»ú¤ÏÁ°¤Îñ¸ì¤òºï½ü¤¹¤ë¡£
621 .TP
622 .B ECHOK
623 .\"O If \fBICANON\fP is also set, the KILL character erases the current line.
624 \fBICANON\fP ¤âƱ»þ¤ËÀßÄꤵ¤ì¤¿¾ì¹ç¡¢KILL Ê¸»ú¤Ï¸½ºß¤Î¹Ô¤òºï½ü¤¹¤ë¡£
625 .TP
626 .B ECHONL
627 .\"O If \fBICANON\fP is also set, echo the NL character even if ECHO is not set.
628 \fBICANON\fP ¤âƱ»þ¤ËÀßÄꤵ¤ì¤¿¾ì¹ç¡¢
629 ECHO ¤¬ÀßÄꤵ¤ì¤Æ¤¤¤Ê¤¯¤Æ¤â NL Ê¸»ú¤ò¥¨¥³¡¼¤¹¤ë¡£
630 .TP
631 .B ECHOCTL
632 .\"O (not in POSIX) If \fBECHO\fP is also set, ASCII control signals other than
633 .\"O TAB, NL, START, and STOP are echoed as \fB^X\fP,
634 .\"O where X is the character with
635 .\"O ASCII code 0x40 greater than the control signal.
636 .\"O For example, character
637 .\"O 0x08 (BS) is echoed as \fB^H\fP.
638 .\"O [requires
639 .\"O .B _BSD_SOURCE
640 .\"O or
641 .\"O .BR _SVID_SOURCE ]
642 (POSIX ¤Ë¤Ï¤Ê¤¤) \fBECHO\fP ¤âƱ»þ¤ËÀßÄꤵ¤ì¤¿¾ì¹ç¡¢
643 TAB, NL, START, STOP ¤Î ASCII À©¸æʸ»ú¤¬ \fB^X\fP ¤È¤·¤Æ¥¨¥³¡¼¤µ¤ì¤ë¡£
644 X ¤ÏÀ©¸æʸ»ú¤è¤ê ASCII ¥³¡¼¥É¤Ç 0x10 ¤À¤±Â礭¤Êʸ»ú¤Ç¤¢¤ë¡£
645 Î㤨¤Ðʸ»ú 0x28 (BS) ¤Ï \fB^H\fP ¤È¥¨¥³¡¼¤µ¤ì¤ë¡£
646 .RB [ _BSD_SOURCE
647 ¤«
648 .B _SVID_SOURCE
649 ¤¬É¬Í×]
650 .TP
651 .B ECHOPRT
652 .\"O (not in POSIX) If \fBICANON\fP and \fBIECHO\fP are also set, characters
653 .\"O are printed as they are being erased.
654 .\"O [requires
655 .\"O .B _BSD_SOURCE
656 .\"O or
657 .\"O .BR _SVID_SOURCE ]
658 (POSIX ¤Ë¤Ï¤Ê¤¤) \fBICANON\fP ¤ª¤è¤Ó \fBIECHO\fP ¤¬Æ±»þ¤ËÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢
659 ºï½ü¤µ¤ì¤¿Ê¸»ú¤âɽ¼¨¤µ¤ì¤ë¡£
660 .RB [ _BSD_SOURCE
661 ¤«
662 .B _SVID_SOURCE
663 ¤¬É¬Í×]
664 .TP
665 .B ECHOKE
666 .\"O (not in POSIX) If \fBICANON\fP is also set, KILL is echoed by erasing
667 .\"O each character on the line, as specified by \fBECHOE\fP and \fBECHOPRT\fP.
668 .\"O [requires
669 .\"O .B _BSD_SOURCE
670 .\"O or
671 .\"O .BR _SVID_SOURCE ]
672 (POSIX ¤Ë¤Ï¤Ê¤¤) \fBICANON\fP ¤âÀßÄꤵ¤ì¤¿¾ì¹ç¡¢
673 KILL ¤¬¹Ô¤Î³Æʸ»ú¤ò¾Ãµî¤¹¤ëÂå¤ï¤ê¤Ë¥¨¥³¡¼¤µ¤ì¤ë¡£
674 ¤³¤ì¤Ï \fBECHOE\fP ¤ª¤è¤Ó \fBECHOPRT\fP ¤ò»ØÄꤹ¤ë¤³¤È¤ÈÅù¤·¤¤¡£
675 .RB [ _BSD_SOURCE
676 ¤«
677 .B _SVID_SOURCE
678 ¤¬É¬Í×]
679 .TP
680 .B DEFECHO
681 .\"O (not in POSIX) Echo only when a process is reading.
682 .\"O (Not implemented on Linux.)
683 (POSIX ¤Ë¤Ï¤Ê¤¤) ¥×¥í¥»¥¹¤¬Æɤ߹þ¤ó¤À¤È¤­¤Ë¤À¤±¥¨¥³¡¼¤¹¤ë¡£
684 (Linux ¤Ç¤Ï¼ÂÁõ¤µ¤ì¤Æ¤¤¤Ê¤¤)
685 .TP
686 .B FLUSHO
687 .\"O (not in POSIX; not supported under Linux)
688 .\"O Output is being flushed.
689 .\"O This flag is toggled by typing
690 .\"O the DISCARD character.
691 .\"O [requires
692 .\"O .B _BSD_SOURCE
693 .\"O or
694 .\"O .BR _SVID_SOURCE ]
695 (POSIX ¤Ë¤Ï¤Ê¤¤; Linux ¤Ç¤ÏÂбþ¤·¤Æ¤¤¤Ê¤¤)
696 ½ÐÎϤò¥Õ¥é¥Ã¥·¥å¤¹¤ë¡£¤³¤Î¥Õ¥é¥°¤Ï DISCARD Ê¸»ú¤òÆþÎϤ¹¤ë¤³¤È¤ÇÀÚÂؤ¨¤é¤ì¤ë¡£
697 .RB [ _BSD_SOURCE
698 ¤«
699 .B _SVID_SOURCE
700 ¤¬É¬Í×]
701 .TP
702 .B NOFLSH
703 .\"O Disable flushing the input and output queues when generating signals for the
704 .\"O INT, QUIT, and SUSP characters.
705 .\" Stevens lets SUSP only flush the input queue
706 INT, QUIT, SUSP Ê¸»ú¤ËÂбþ¤¹¤ë¥·¥°¥Ê¥ë¤òȯÀ¸¤¹¤ëºÝ¤Î
707 ÆþÎÏ¡¦½ÐÎÏ¥­¥å¡¼¤Î¥Õ¥é¥Ã¥·¥å¤ò̵¸ú¤Ë¤¹¤ë¡£
708 .TP
709 .B TOSTOP
710 .\"O Send the
711 .\"O .B SIGTTOU
712 .\"O signal to the process group of a background process
713 .\"O which tries to write to its controlling terminal.
714 ¥Ð¥Ã¥¯¥°¥é¥¦¥ó¥É¥×¥í¥»¥¹¤Î¥×¥í¥»¥¹¥°¥ë¡¼¥×¤ÇÀ©¸æüËö¤Ø
715 ʸ»ú¤ò½ÐÎϤ·¤è¤¦¤È¤·¤Æ¤¤¤ë¥×¥í¥»¥¹¤ËÂФ·¤Æ
716 .B SIGTTOU
717 ¥·¥°¥Ê¥ë¤òÁ÷¤ë¡£
718 .TP
719 .B PENDIN
720 .\"O (not in POSIX; not supported under Linux)
721 .\"O All characters in the input queue are reprinted when
722 .\"O the next character is read.
723 .\"O .RB ( bash (1)
724 .\"O handles typeahead this way.)
725 .\"O [requires
726 .\"O .B _BSD_SOURCE
727 .\"O or
728 .\"O .BR _SVID_SOURCE ]
729 (POSIX ¤Ë¤Ï¤Ê¤¤; Linux ¤Ç¤ÏÂбþ¤·¤Æ¤¤¤Ê¤¤)
730 ¼¡¤Îʸ»ú¤òÆɤ߹þ¤ó¤À»þ¡¢ÆþÎÏ¥­¥å¡¼Ãæ¤ÎÁ´Ê¸»ú¤òºÆɽ¼¨¤¹¤ë¡£
731 .RB ( bash (1)
732 ¤ÏÆþÎϹԤò¤³¤Î¤è¤¦¤Ë½èÍý¤·¤Æ¤¤¤ë¡£)
733 .RB [ _BSD_SOURCE
734 ¤«
735 .B _SVID_SOURCE
736 ¤¬É¬Í×]
737 .TP
738 .B IEXTEN
739 .\"O Enable implementation-defined input processing.
740 .\"O This flag, as well as \fBICANON\fP must be enabled for the
741 .\"O special characters EOL2, LNEXT, REPRINT, WERASE to be interpreted,
742 .\"O and for the \fBIUCLC\fP flag to be effective.
743 ¼ÂÁõ°Í¸¤ÎÆþÎϽèÍý¤òÍ­¸ú¤Ë¤¹¤ë¡£
744 ¤³¤Î¥Õ¥é¥°¤Ï¡¢Æüìʸ»ú¤Ç¤¢¤ë EOL2, LNEXT, REPRINT, WERASE ¤ä¡¢
745 \fBIUCLC\fP ¥Õ¥é¥°¤òÍ­¸ú¤Ë¤¹¤ë¤¿¤á¤ËɬÍפǤ¢¤ë¡£
746 .PP
747 .\"O The \fIc_cc\fP array defines the special control characters.
748 .\"O The symbolic indices (initial values) and meaning are:
749 \fIc_cc\fP ÇÛÎó¤ÏÆüì¤ÊÀ©¸æʸ»ú¤òÄêµÁ¤·¤Æ¤¤¤ë¡£
750 ¥·¥ó¥Ü¥ë¤Î°ìÍ÷ (½é´üÃÍ) ¤È°ÕÌ£¤Ï°Ê²¼¤ÎÄ̤ꡣ
751 .TP
752 .B VINTR
753 .\"O (003, ETX, Ctrl-C, or also 0177, DEL, rubout)
754 .\"O Interrupt character.
755 .\"O Send a
756 .\"O .B SIGINT
757 .\"O signal.
758 .\"O Recognized when
759 .\"O .B ISIG
760 .\"O is set, and then not passed as input.
761 (003, ETX, Ctrl-C ¤« 0177, DEL, rubout)
762 ³ä¤ê¹þ¤ßʸ»ú¡£
763 .B SIGINT
764 ¥·¥°¥Ê¥ë¤òÁ÷¤ë¡£
765 .B ISIG
766 ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ëǧ¼±¤·¡¢ÆþÎϤˤÏÅϤµ¤ì¤Ê¤¤¡£
767 .TP
768 .B VQUIT
769 .\"O (034, FS, Ctrl-\e)
770 .\"O Quit character.
771 .\"O Send
772 .\"O .B SIGQUIT
773 .\"O signal.
774 .\"O Recognized when
775 .\"O .B ISIG
776 .\"O is set, and then not passed as input.
777 (034, FS, Ctrl-\e)
778 ½ªÎ»Ê¸»ú¡£
779 .B SIGQUIT
780 ¥·¥°¥Ê¥ë¤òÁ÷¤ë¡£
781 .B ISIG
782 ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ëǧ¼±¤·¡¢ÆþÎϤˤÏÅϤµ¤ì¤Ê¤¤¡£
783 .TP
784 .B VERASE
785 .\"O (0177, DEL, rubout, or 010, BS, Ctrl-H, or also #)
786 .\"O Erase character.
787 .\"O This erases the previous not-yet-erased character,
788 .\"O but does not erase past EOF or beginning-of-line.
789 .\"O Recognized when
790 .\"O .B ICANON
791 .\"O is set, and then not passed as input.
792 (0177, DEL, rubout ¤« 010, BS, Ctrl-H ¤« #)
793 ¾Ãµîʸ»ú¡£¤³¤ì¤Ë¤è¤ê¡¢Ä¾Á°¤Î̤¾Ãµîʸ»ú¤ò¾Ãµî¤¹¤ë¡£
794 ¤·¤«¤·¡¢EOF ¤ä¹ÔƬ¤òĶ¤¨¤Æ¤Ï¾Ãµî¤·¤Ê¤¤¡£
795 .B ICANON
796 ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ëǧ¼±¤·¡¢ÆþÎϤˤÏÅϤµ¤ì¤Ê¤¤¡£
797 .TP
798 .B VKILL
799 .\"O (025, NAK, Ctrl-U, or Ctrl-X, or also @)
800 .\"O Kill character.
801 .\"O This erases the input since the last EOF or beginning-of-line.
802 .\"O Recognized when
803 .\"O .B ICANON
804 .\"O is set, and then not passed as input.
805 (025, NAK, Ctrl-U ¤« Ctrl-X ¤« @)
806 ´°Á´¾Ãµîʸ»ú¡£Ä¾Á°¤Î EOF ¤«¹ÔƬ°Ê¹ß¤ÎÁ´¤Æ¤ÎÆþÎϤò¾Ãµî¤¹¤ë¡£
807 .B ICANON
808 ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ëǧ¼±¤·¡¢ÆþÎϤˤÏÅϤµ¤ì¤Ê¤¤¡£
809 .TP
810 .B VEOF
811 .\"O (004, EOT, Ctrl-D)
812 .\"O End-of-file character.
813 (004, EOT, Ctrl-D)
814 ¥Õ¥¡¥¤¥ë½ªÃ¼Ê¸»ú¡£
815 .\"O More precisely: this character causes the pending tty buffer to be sent
816 .\"O to the waiting user program without waiting for end-of-line.
817 ¤è¤êÀµ³Î¤Ë¤Ï¡¢tty ¥Ð¥Ã¥Õ¥¡¤ÎÆâÍƤò¹ÔËö¤òÂÔ¤¿¤º¤Ë¥æ¡¼¥¶¡¼¥×¥í¥°¥é¥à¤ËÁ÷¤ë¡£
818 .\"O If it is the first character of the line, the
819 .\"O .BR read (2)
820 .\"O in the
821 .\"O user program returns 0, which signifies end-of-file.
822 ¤³¤ì¤¬¹Ô¤ÎºÇ½é¤Îʸ»ú¤À¤Ã¤¿¾ì¹ç¡¢¥æ¡¼¥¶¡¼¥×¥í¥°¥é¥à¤Î
823 .BR read (2)
824 ¤Ï 0 ¤ò
825 ÊÖ¤·¡¢¥Õ¥¡¥¤¥ë½ªÃ¼¤Ç¤¢¤ë¤³¤È¤òÃΤ餻¤ë¡£
826 .\"O Recognized when
827 .\"O .B ICANON
828 .\"O is set, and then not passed as input.
829 .B ICANON
830 ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ëǧ¼±¤·¡¢ÆþÎϤˤÏÅϤµ¤ì¤Ê¤¤¡£
831 .TP
832 .B VMIN
833 .\"O Minimum number of characters for noncanonical read.
834 È󥫥Υ˥«¥ëÆɤ߹þ¤ß»þ¤ÎºÇ¾®Ê¸»ú¿ô¡£
835 .TP
836 .B VEOL
837 (0, NUL)
838 .\"O Additional end-of-line character.
839 .\"O Recognized when
840 .\"O .B ICANON
841 .\"O is set.
842 ÄɲäιÔËöʸ»ú¡£
843 .B ICANON
844 ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ëǧ¼±¤¹¤ë¡£
845 .TP
846 .B VTIME
847 .\"O Timeout in deciseconds for noncanonical read.
848 È󥫥Υ˥«¥ëÆɤ߹þ¤ß»þ¤Î¥¿¥¤¥à¥¢¥¦¥È»þ´Ö (1/10 ÉÃñ°Ì)¡£
849 .TP
850 .B VEOL2
851 .\"O (not in POSIX; 0, NUL)
852 (POSIX ¤Ë¤Ï¤Ê¤¤; 0, NUL)
853 .\"O Yet another end-of-line character.
854 .\"O Recognized when
855 .\"O .B ICANON
856 .\"O is set.
857 ÄɲäιÔËöʸ»ú¡£
858 .B ICANON
859 ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ëǧ¼±¤¹¤ë¡£
860 .TP
861 .B VSWTCH
862 .\"O (not in POSIX; not supported under Linux; 0, NUL)
863 (POSIX ¤Ë¤Ï¤Ê¤¤; Linux ¤Ç¤ÏÂбþ¤·¤Æ¤¤¤Ê¤¤; 0, NUL)
864 .\"O Switch character.
865 .\"O (Used by \fBshl\fP only.)
866 ¥¹¥¤¥Ã¥Áʸ»ú (\fBshl\fP ¤Ç¤Î¤ßÍѤ¤¤é¤ì¤ë)¡£
867 .TP
868 .B VSTART
869 (021, DC1, Ctrl-Q)
870 .\"O Start character.
871 .\"O Restarts output stopped by the Stop character.
872 .\"O Recognized when
873 .\"O .B IXON
874 .\"O is set, and then not passed as input.
875 ³«»Ïʸ»ú¡£Ää»ßʸ»ú¤ÇÄä»ß¤·¤¿½ÐÎϤòºÆ³«¤¹¤ë¡£
876 .B IXON
877 ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ëǧ¼±¤·¡¢ÆþÎϤˤÏÅϤµ¤ì¤Ê¤¤¡£
878 .TP
879 .B VSTOP
880 (023, DC3, Ctrl-S)
881 .\"O Stop character.
882 .\"O Stop output until Start character typed.
883 .\"O Recognized when
884 .\"O .B IXON
885 .\"O is set, and then not passed as input.
886 Ää»ßʸ»ú¡£³«»Ïʸ»ú¤¬ÆþÎϤµ¤ì¤ë¤Þ¤Ç½ÐÎϤòÄä»ß¤¹¤ë¡£
887 .B IXON
888 ¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ëǧ¼±¤·¡¢ÆþÎϤˤÏÅϤµ¤ì¤Ê¤¤¡£
889 .TP
890 .B VSUSP
891 (032, SUB, Ctrl-Z)
892 .\"O Suspend character.
893 .\"O Send
894 .\"O .B SIGTSTP
895 .\"O signal.
896 .\"O Recognized when
897 .\"O .B ISIG
898 .\"O is set, and then not passed as input.
899 ÃæÃÇʸ»ú¡£
900 .B SIGTSTP
901 ¥·¥°¥Ê¥ë¤òÁ÷¤ë¡£
902 .B ISIG
903 ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ëǧ¼±¤·¡¢ÆþÎϤˤÏÅϤµ¤ì¤Ê¤¤¡£
904 .TP
905 .B VDSUSP
906 .\"O (not in POSIX; not supported under Linux; 031, EM, Ctrl-Y)
907 (POSIX ¤Ë¤Ï¤Ê¤¤; Linux ¤Ç¤ÏÂбþ¤·¤Æ¤¤¤Ê¤¤; 031, EM, Ctrl-Y)
908 .\"O Delayed suspend character:
909 .\"O send
910 .\"O .B SIGTSTP
911 .\"O signal when the character is read by the user program.
912 .\"O Recognized when
913 .\"O .B IEXTEN
914 .\"O and
915 .\"O .B ISIG
916 .\"O are set, and the system supports
917 .\"O job control, and then not passed as input.
918 ÃÙ±äÃæÃÇʸ»ú¡£¥æ¡¼¥¶¡¼¥×¥í¥°¥é¥à¤«¤éʸ»ú¤¬Æɤ߹þ¤Þ¤ì¤¿»þ¤Ë
919 .B SIGTSTP
920 ¥·¥°¥Ê¥ë¤òÁ÷¤ë¡£
921 .B IEXTEN
922 ¤È
923 .B ISIG
924 ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤Æ¡¢¥·¥¹¥Æ¥à¤¬¥¸¥ç¥ÖÀ©¸æ¤ËÂбþ¤·¤Æ¤¤¤ë¾ì¹ç¤Ë
925 ǧ¼±¤·¡¢ÆþÎϤˤÏÅϤµ¤ì¤Ê¤¤¡£
926 .TP
927 .B VLNEXT
928 .\"O (not in POSIX; 026, SYN, Ctrl-V)
929 (POSIX ¤Ë¤Ï¤Ê¤¤; 026, SYN Ctrl-V)
930 .\"O Literal next.
931 .\"O Quotes the next input character, depriving it of
932 .\"O a possible special meaning.
933 .\"O Recognized when
934 .\"O .B IEXTEN
935 .\"O is set, and then not passed as input.
936 ¥ê¥Æ¥é¥ë¡£¼¡¤ÎÆþÎÏʸ»ú¤ò¥¨¥¹¥±¡¼¥×¤·¡¢ÆÃÊ̤ʰÕÌ£¤¬¤¢¤Ã¤Æ¤â²ò¼á¤·¤Ê¤¤¡£
937 .B IEXTEN
938 ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ëǧ¼±¤·¡¢ÆþÎϤˤÏÅϤµ¤ì¤Ê¤¤¡£
939 .TP
940 .B VWERASE
941 .\"O (not in POSIX; 027, ETB, Ctrl-W)
942 (POSIX ¤Ë¤Ï¤Ê¤¤; 027, ETB, Ctrl-W)
943 .\"O Word erase.
944 ñ¸ì¾Ãµî¡£
945 .\"O Recognized when
946 .\"O .B ICANON
947 .\"O and
948 .\"O .B IEXTEN
949 .\"O are set, and then not passed as input.
950 .B ICANON
951 ¤È
952 .B IEXTEN
953 ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ëǧ¼±¤·¡¢ÆþÎϤˤÏÅϤµ¤ì¤Ê¤¤¡£
954 .TP
955 .B VREPRINT
956 .\"O (not in POSIX; 022, DC2, Ctrl-R)
957 (POSIX ¤Ë¤Ï¤Ê¤¤; 022, DC2, Ctrl-R)
958 .\"O Reprint unread characters.
959 ¤Þ¤ÀÆɤ߹þ¤ó¤Ç¤¤¤Ê¤¤Ê¸»úÎó¤òºÆɽ¼¨¤¹¤ë¡£
960 .\"O Recognized when
961 .\"O .B ICANON
962 .\"O and
963 .\"O .B IEXTEN
964 .\"O are set, and then not passed as input.
965 .B ICANON
966 ¤È
967 .B IEXTEN
968 ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ëǧ¼±¤·¡¢ÆþÎϤˤÏÅϤµ¤ì¤Ê¤¤¡£
969 .TP
970 .B VDISCARD
971 .\"O (not in POSIX; not supported under Linux; 017, SI, Ctrl-O)
972 (POSIX ¤Ë¤Ï¤Ê¤¤; Linux ¤Ç¤ÏÂбþ¤·¤Æ¤¤¤Ê¤¤; 017, SI, Ctrl-O)
973 .\"O Toggle: start/stop discarding pending output.
974 ̤Á÷¿®¥Ð¥Ã¥Õ¥¡¤ÎÆâÍƤÎÇË´þ/Êݸ¤òÀÚ¤êÂؤ¨¤ë¡£
975 .\"O Recognized when
976 .\"O .B IEXTEN
977 .\"O is set, and then not passed as input.
978 .B IEXTEN
979 ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ëǧ¼±¤·¡¢ÆþÎϤˤÏÅϤµ¤ì¤Ê¤¤¡£
980 .TP
981 .B VSTATUS
982 .\"O (not in POSIX; not supported under Linux;
983 .\"O status request: 024, DC4, Ctrl-T).
984 (POSIX ¤Ë¤Ï¤Ê¤¤; Linux ¤Ç¤ÏÂбþ¤·¤Æ¤¤¤Ê¤¤;
985 ¾õÂÖÍ×µá: 024, DC4, Ctrl-T)
986 .LP
987 .\"O These symbolic subscript values are all different, except that
988 .\"O .BR VTIME ,
989 .\"O .B VMIN
990 .\"O may have the same value as
991 .\"O .BR VEOL ,
992 .\"O .BR VEOF ,
993 .\"O respectively.
994 ¤³¤ì¤é¤Î¥·¥ó¥Ü¥ë¤Î¼¨¤¹ÃͤÏÁ´¤Æ°Û¤Ê¤ë¡£
995 ¤¿¤À¤·¡¢
996 .BR VTIME ,
997 .B VMIN
998 ¤Ï¤½¤ì¤¾¤ì
999 .BR VEOL ,
1000 .B VEOF
1001 ¤ÈƱ¤¸ÃͤǤ¢¤ë¡£
1002 .\"O In noncanonical mode the special character meaning is replaced
1003 .\"O by the timeout meaning.
1004 .\"O For an explanation of
1005 .\"O .B VMIN
1006 .\"O and
1007 .\"O .BR VTIME ,
1008 .\"O see the description of
1009 .\"O noncanonical mode below.
1010 È󥫥Υ˥«¥ë¥â¡¼¥É¤Ç¤Ï¡¢Æüìʸ»ú¤Î°ÕÌ£¤Ï¥¿¥¤¥à¥¢¥¦¥È¤Î°ÕÌ£¤ËÊѤï¤ë¡£
1011 .B VMIN
1012 ¤È
1013 .B VTIME
1014 ¤ÎÀâÌÀ¤Ë¤Ä¤¤¤Æ¤Ï¡¢²¼µ­¤ÎÈ󥫥Υ˥«¥ë¥â¡¼¥É¤ÎÀâÌÀ¤ò»²¾È¤Î¤³¤È¡£
1015 .\"O .SS "Retrieving and changing terminal settings"
1016 .SS "üËö¤ÎÀßÄê¤Î¼èÆÀ¤ÈÊѹ¹"
1017 .PP
1018 .\"O .BR tcgetattr ()
1019 .\"O gets the parameters associated with the object referred by \fIfd\fP and
1020 .\"O stores them in the \fItermios\fP structure referenced by
1021 .\"O \fItermios_p\fP.
1022 .\"O This function may be invoked from a background process;
1023 .\"O however, the terminal attributes may be subsequently changed by a
1024 .\"O foreground process.
1025 .BR tcgetattr ()
1026 ¤Ï \fIfd\fP ¤Ë´Ø¤¹¤ë¥Ñ¥é¥á¡¼¥¿¤ò¼èÆÀ¤·¡¢\fItermios_p\fP ¤¬»²¾È¤¹¤ë¹½
1027 ¤ÂΠ\fItermios\fP ¤ËÀßÄꤹ¤ë¡£¤³¤Î´Ø¿ô¤Ï¥Ð¥Ã¥¯¥°¥é¥¦¥ó¥É¥×¥í¥»¥¹¤«¤é
1028 ¸Æ¤Ð¤ì¤ë¤³¤È¤â¤¢¤ë¤¬¡¢¤³¤Î¾ì¹ç¡¢Ã¼Ëö¤Î°À­¤Ï¥Õ¥©¥¢¥°¥é¥¦¥ó¥É¥×¥í¥»¥¹
1029 ¤Ë¤è¤Ã¤ÆÊѲ½¤¹¤ë¤³¤È¤â¤¢¤ë¡£
1030 .LP
1031 .\"O .BR tcsetattr ()
1032 .\"O sets the parameters associated with the terminal (unless support is
1033 .\"O required from the underlying hardware that is not available) from the
1034 .\"O \fItermios\fP structure referred to by \fItermios_p\fP.
1035 .\"O \fIoptional_actions\fP specifies when the changes take effect:
1036 .BR tcsetattr ()
1037 ¤ÏüËö¤Ë´ØÏ¢¤·¤¿¥Ñ¥é¥á¡¼¥¿¤òÀßÄꤹ¤ë (¥Ï¡¼¥É¥¦¥§¥¢¤ÎÀßÄê¤ËɬÍפǡ¢¤³¤³¤Ç
1038 ÀßÄê¤Ç¤­¤Ê¤¤¤â¤Î¤ò½ü¤¯)¡£ÀßÄê¤Ë¤Ï \fItermios_p\fP ¤¬»²¾È¤¹¤ë
1039 \fItermios\fP ¹½Â¤ÂΤòÍѤ¤¤ë¡£
1040 \fIoptional_actions\fP ¤Ë¤ÏÊѹ¹¤¬Í­¸ú¤È¤Ê¤ë¥¿¥¤¥ß¥ó¥°¤òÀßÄꤹ¤ë:
1041 .IP \fBTCSANOW\fP
1042 .\"O the change occurs immediately.
1043 ¤¿¤À¤Á¤ËÊѹ¹¤¬Í­¸ú¤È¤Ê¤ë¡£
1044 .IP \fBTCSADRAIN\fP
1045 .\"O the change occurs after all output written to
1046 .\"O .I fd
1047 .\"O has been transmitted.
1048 .\"O This function should be used when changing
1049 .\"O parameters that affect output.
1050 .I fd
1051 ¤Ø¤Î½ÐÎϤ¬¤¹¤Ù¤ÆžÁ÷¤µ¤ì¤¿¸å¤ËÊѹ¹¤¬Í­¸ú¤Ë¤Ê¤ë¡£¤³¤Îµ¡Ç½¤Ï
1052 ½ÐÎϤ˱ƶÁ¤¹¤ë¥Ñ¥é¥á¡¼¥¿¤òÊѹ¹¤¹¤ë»þ¤Ë»ÈÍѤ¹¤ë¤Ù¤­¤Ç¤¢¤ë¡£
1053 .IP \fBTCSAFLUSH\fP
1054 .\"O the change occurs after all output written to the object referred by
1055 .\"O .I fd
1056 .\"O has been transmitted, and all input that has been received but not read
1057 .\"O will be discarded before the change is made.
1058 ¥Ñ¥é¥á¡¼¥¿¤òÊѹ¹¤¹¤ëÁ°¤Ë¡¢
1059 .I fd
1060 ¤Ø¤Î½ÐÎϤ¬¤¹¤Ù¤ÆžÁ÷¤µ¤ì¡¢¼õ¿®¤·¤¿¤¬¤Þ¤ÀÆɤ߹þ¤ó¤Ç¤¤¤Ê¤¤¤¹¤Ù¤Æ¤Î
1061 ÆþÎϤ¬ÇË´þ¤µ¤ì¤ë¡£
1062 .\"O .SS "Canonical and noncanonical mode"
1063 .SS "¥«¥Î¥Ë¥«¥ë¥â¡¼¥É¤ÈÈ󥫥Υ˥«¥ë¥â¡¼¥É"
1064 .\"O The setting of the
1065 .\"O .B ICANON
1066 .\"O canon flag in
1067 .\"O .I c_lflag
1068 .\"O determines whether the terminal is operating in canonical mode
1069 .\"O .RB ( ICANON
1070 .\"O set) or
1071 .\"O noncanonical mode
1072 .\"O .RB ( ICANON
1073 .\"O unset).
1074 .\"O By default,
1075 .\"O .B ICANON
1076 .\"O set.
1077 .I c_lflag
1078 ¤Î
1079 .B ICANON
1080 ¥Õ¥é¥°¤ÎÀßÄê¤Ë¤è¤ê¡¢Ã¼Ëö¤¬¥«¥Î¥Ë¥«¥ë¥â¡¼¥É¤ÇÆ°ºî¤¹¤ë¤«¤¬·èÄꤵ¤ì¤ë¡£
1081 .B ICANON
1082 ¤¬¥»¥Ã¥È¤µ¤ì¤¿¾ì¹ç¡¢¥«¥Î¥Ë¥«¥ë¥â¡¼¥É (canonical mode) ¤È¤Ê¤ê¡¢
1083 ¥»¥Ã¥È¤µ¤ì¤Ê¤¤¾ì¹ç¡¢È󥫥Υ˥«¥ë¥â¡¼¥É (noncanonical mode) ¤È¤Ê¤ë¡£
1084 ¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢
1085 .B ICANON
1086 ¤Ï¥»¥Ã¥È¤µ¤ì¤ë¡£
1087
1088 .\"O In canonical mode:
1089 ¥«¥Î¥Ë¥«¥ë¥â¡¼¥É¤Ç¤Ï¡¢°Ê²¼¤Î¤è¤¦¤ÊÆ°ºî¤È¤Ê¤ë¡£
1090 .IP * 2
1091 .\"O Input is made available line by line.
1092 .\"O An input line is available when one of the line delimiters
1093 .\"O is typed (NL, EOL, EOL2; or EOF at the start of line).
1094 .\"O Except in the case of EOF, the line delimiter is included
1095 .\"O in the buffer returned by
1096 .\"O .BR read (2).
1097 ÆþÎϤϹÔñ°Ì¤Ë¹Ô¤ï¤ì¤ë¡£
1098 ¹Ô¶èÀÚ¤êʸ»ú¤¬ÂǤÁ¹þ¤Þ¤ì¤¿»þÅÀ¤Ç¡¢ÆþÎϹԤ¬ÍøÍѲÄǽ¤È¤Ê¤ë¡£
1099 ¹Ô¶èÀÚ¤êʸ»ú¤Ï NL, EOL, EOL2 ¤ª¤è¤Ó¹ÔƬ¤Ç¤Î EOF ¤Ç¤¢¤ë¡£
1100 EOF °Ê³°¤Î¾ì¹ç¡¢
1101 .BR read (2)
1102 ¤¬ÊÖ¤¹¥Ð¥Ã¥Õ¥¡¤Ë¹Ô¶èÀÚ¤êʸ»ú¤â´Þ¤á¤é¤ì¤ë¡£
1103 .IP * 2
1104 .\"O Line editing is enabled (ERASE, KILL;
1105 .\"O and if the
1106 .\"O .B IEXTEN
1107 .\"O flag is set: WERASE, REPRINT, LNEXT).
1108 .\"O A
1109 .\"O .BR read (2)
1110 .\"O returns at most one line of input; if the
1111 .\"O .BR read (2)
1112 .\"O requested fewer bytes than are available in the current line of input,
1113 .\"O then only as many bytes as requested are read,
1114 .\"O and the remaining characters will be available for a future
1115 .\"O .BR read (2).
1116 ¹ÔÊÔ½¸¤¬Í­¸ú¤È¤Ê¤ë (ERASE, KILL ¤¬¸ú²Ì¤ò»ý¤Ä¡£
1117 .B IEXTEN
1118 ¥Õ¥é¥°¤¬ÀßÄꤵ¤ì¤¿¾ì¹ç¤Ï¡¢
1119 WERASE, REPRINT, LNEXT ¤â¸ú²Ì¤ò»ý¤Ä)¡£
1120 .BR read (2)
1121 ¤ÏºÇÂç¤Ç¤â 1¹Ô¤ÎÆþÎϤ·¤«ÊÖ¤µ¤Ê¤¤¡£
1122 .BR read (2)
1123 ¤¬Í׵ᤷ¤¿¥Ð¥¤¥È¿ô¤¬¸½ºß¤ÎÆþÎϹԤΥХ¤¥È¿ô¤è¤ê¤â¾¯¤Ê¤¤¾ì¹ç¡¢
1124 Í׵ᤷ¤¿¤Î¤ÈƱ¤¸¥Ð¥¤¥È¿ô¤À¤±¤¬Æɤ߹þ¤Þ¤ì¡¢
1125 »Ä¤ê¤Îʸ»ú¤Ï¼¡²ó¤Î
1126 .BR read (2)
1127 ¤ÇÆɤ߹þ¤Þ¤ì¤ë¡£
1128 .PP
1129 .\"O In noncanonical mode input is available immediately (without
1130 .\"O the user having to type a line-delimiter character),
1131 .\"O and line editing is disabled.
1132 .\"O The settings of MIN
1133 .\"O .RI ( c_cc[VMIN] )
1134 .\"O and TIME
1135 .\"O .RI ( c_cc[VTIME] )
1136 .\"O determine the circumstances in which a
1137 .\"O .BR read (2)
1138 .\"O completes; there are four distinct cases:
1139 È󥫥Υ˥«¥ë¥â¡¼¥É¤Ç¤Ï¡¢ÆþÎϤϨºÂ¤ËÍøÍѲÄǽ¤È¤Ê¤ê
1140 (¥æ¡¼¥¶¤Ï¹Ô¶èÀÚ¤êʸ»ú¤òÂǤÁ¹þ¤àɬÍפϤʤ¤)¡¢
1141 ¹ÔÊÔ½¸¤Ï̵¸ú¤È¤Ê¤ë¡£
1142 MIN
1143 .RI ( c_cc[VMIN] )
1144 ¤È TIME
1145 .RI ( c_cc[VTIME] )
1146 ¤ÎÀßÄê¤Ë¤è¤ê¡¢
1147 .BR read (2)
1148 ¤¬´°Î»¤¹¤ë¾ò·ï¤¬·èÄꤵ¤ì¤ë¡£4¼ïÎà¤Î¾ì¹ç¤¬¤¢¤ë:
1149 .IP * 2
1150 MIN == 0; TIME == 0:
1151 .\"O If data is available,
1152 .\"O .BR read (2)
1153 .\"O returns immediately, with the lesser of the number of bytes
1154 .\"O available, or the number of bytes requested.
1155 .\"O If no data is available,
1156 .\"O .BR read (2)
1157 .\"O returns 0.
1158 ¥Ç¡¼¥¿¤¬ÍøÍѲÄǽ¤Ç¤¢¤ì¤Ð¡¢
1159 .BR read (2)
1160 ¤Ï¤¹¤°¤ËÊ֤롣¤³¤Î¤È¤­¤ÎÊÖ¤êÃͤϡ¢¤½¤Î¤È¤­ÍøÍѲÄǽ¤Ê¥Ð¥¤¥È¿ô¤«
1161 .BR read (2)
1162 ¤ÎÍ×µá¥Ð¥¤¥È¿ô¤Î¤¦¤Á¾®¤µ¤¤Êý¤È¤Ê¤ë¡£
1163 ÍøÍѲÄǽ¤Ê¥Ç¡¼¥¿¤¬¤Ê¤¤¾ì¹ç
1164 .BR read (2)
1165 ¤Ï 0 ¤òÊÖ¤¹¡£
1166 .IP * 2
1167 MIN > 0; TIME == 0:
1168 .\"O .BR read (2)
1169 .\"O blocks until the lesser of MIN bytes or the number of bytes requested
1170 .\"O are available, and returns the lesser of these two values.
1171 .BR read (2)
1172 ¤Ï¡¢ÍøÍѲÄǽ¤Ê¥Ç¡¼¥¿¤¬ MIN ¥Ð¥¤¥È¤«Í×µá¥Ð¥¤¥È¿ô¤Î¤¤¤º¤ì¤«¤Ë㤹¤ë¤Þ¤Ç
1173 Ää»ß¤¹¤ë¡£ÊÖ¤êÃͤϡ¢MIN ¤«Í×µá¥Ð¥¤¥È¿ô¤Î¾®¤µ¤¤Êý¤È¤Ê¤ë¡£
1174 .IP * 2
1175 MIN == 0; TIME > 0:
1176 .\"O TIME specifies the limit for a timer in tenths of a second.
1177 .\"O The timer is started when
1178 .\"O .BR read (2)
1179 .\"O is called.
1180 .\"O .BR read (2)
1181 .\"O returns either when at least one byte of data is available,
1182 .\"O or when the timer expires.
1183 .\"O If the timer expires without any input becoming available,
1184 .\"O .BR read (2)
1185 .\"O returns 0.
1186 TIME ¤Ï¥¿¥¤¥Þ¤Î¾å¸Â¤òµ¬Äꤷ¡¢Ã±°Ì¤Ï 1/10 ÉäǤ¢¤ë¡£
1187 ¥¿¥¤¥Þ¤Ï
1188 .BR read (2)
1189 ¤¬¸Æ¤Ð¤ì¤¿»þÅÀ¤Ç³«»Ï¤µ¤ì¤ë¡£
1190 .BR read (2)
1191 ¤¬ÊÖ¤ë¤Î¤Ï¡¢¾¯¤Ê¤¯¤È¤â 1¥Ð¥¤¥È¤Î¥Ç¡¼¥¿¤¬ÍøÍѲÄǽ¤È¤Ê¤Ã¤¿»þÅÀ¡¢
1192 ¤Þ¤¿¤Ï¥¿¥¤¥Þ¤¬»þ´ÖÀÚ¤ì¤È¤Ê¤Ã¤¿»þÅÀ¤Ç¤¢¤ë¡£
1193 ÆþÎϤ¬Á´¤¯¤Ê¤¯¥¿¥¤¥Þ¤¬»þ´ÖÀÚ¤ì¤È¤Ê¤Ã¤¿¾ì¹ç¡¢
1194 .BR read (2)
1195 ¤Ï 0 ¤òÊÖ¤¹¡£
1196 .IP * 2
1197 MIN > 0; TIME > 0:
1198 .\"O TIME specifies the limit for a timer in tenths of a second.
1199 .\"O Once an initial byte of input becomes available,
1200 .\"O the timer is restarted after each further byte is received.
1201 .\"O .BR read (2)
1202 .\"O returns either when the lesser of the number of bytes requested or
1203 .\"O MIN byte have been read,
1204 .\"O or when the inter-byte timeout expires.
1205 .\"O Because the timer is only started after the initial byte
1206 .\"O becomes available, at least one byte will be read.
1207 TIME ¤Ï¥¿¥¤¥Þ¤Î¾å¸Â¤òµ¬Äꤷ¡¢Ã±°Ì¤Ï 1/10 ÉäǤ¢¤ë¡£
1208 ÆþÎϤκǽé¤Î¥Ð¥¤¥È¤¬ÍøÍѲÄǽ¤Ë¤Ê¤Ã¤¿¸å¤Ï¡¢
1209 ¿·¤¿¤Ë 1¥Ð¥¤¥È¼õ¿®¤¹¤ëÅ٤˥¿¥¤¥Þ¤¬¥ê¥»¥Ã¥È¤µ¤ì¤ë¡£
1210 .BR read (2)
1211 ¤¬ÊÖ¤ë¤Î¤Ï¡¢MIN ¥Ð¥¤¥È¤«Í×µá¥Ð¥¤¥È¿ô¤Î¤¦¤Á¾¯¤Ê¤¤Êý¤Þ¤ÇÆɤ߽Фµ¤ì¤¿»þÅÀ¤«¡¢
1212 ¥Ð¥¤¥È´Ö¥¿¥¤¥Þ¤¬»þ´ÖÀÚ¤ì¤È¤Ê¤Ã¤¿»þÅÀ¤Ç¤¢¤ë¡£
1213 ¤ÏºÇ½é¤Î¥Ð¥¤¥È¤¬ÍøÍѲÄǽ¤Ë¤Ê¤é¤Ê¤¤¤È¥¿¥¤¥Þ¤Ï³«»Ï¤µ¤ì¤Ê¤¤¤Î¤Ç¡¢
1214 ¾¯¤Ê¤¯¤È¤â 1¥Ð¥¤¥È¤ÏÆɤ߹þ¤Þ¤ì¤ë¡£
1215 .SS "Raw mode"
1216 .LP
1217 .\"O .BR cfmakeraw ()
1218 .\"O sets the terminal to something like the
1219 .\"O "raw" mode of the old Version 7 terminal driver:
1220 .\"O input is available character by character,
1221 .\"O echoing is disabled, and all special processing of
1222 .\"O terminal input and output characters is disabled.
1223 .\"O The terminal attributes are set as follows:
1224 .BR cfmakeraw ()
1225 ¤Ï¡¢Ã¼Ëö¤òÀΤΠVersion 7 Ã¼Ëö¥É¥é¥¤¥Ð¤Î
1226 "raw" ¥â¡¼¥É¤Î¤è¤¦¤ËÀßÄꤹ¤ë¡£
1227 ÆþÎϤÏʸ»úñ°Ì¤Ë²Äǽ¤Ç¤¢¤ê¡¢¥¨¥³¡¼¤¬Ìµ¸ú¤È¤Ê¤ê¡¢
1228 üËö¤ÎÆþ½ÐÎÏʸ»ú¤ËÂФ¹¤ëÆüì½èÍý¤Ï¤¹¤Ù¤Æ̵¸ú¤È¤Ê¤ë¡£
1229 üËö¤Î°À­¤Ï°Ê²¼¤Î¤è¤¦¤ËÀßÄꤵ¤ì¤ë:
1230 .nf
1231
1232     termios_p\->c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP
1233                     | INLCR | IGNCR | ICRNL | IXON);
1234     termios_p\->c_oflag &= ~OPOST;
1235     termios_p\->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
1236     termios_p\->c_cflag &= ~(CSIZE | PARENB);
1237     termios_p\->c_cflag |= CS8;
1238 .fi
1239 .\"O .SS "Line control"
1240 .SS "¥é¥¤¥óÀ©¸æ"
1241 .LP
1242 .\"O .BR tcsendbreak ()
1243 .\"O transmits a continuous stream of zero-valued bits for a specific
1244 .\"O duration, if the terminal is using asynchronous serial data
1245 .\"O transmission.
1246 .\"O If \fIduration\fP is zero, it transmits zero-valued bits
1247 .\"O for at least 0.25 seconds, and not more that 0.5 seconds.
1248 .\"O If \fIduration\fP is not zero, it sends zero-valued bits for some
1249 .\"O implementation-defined length of time.
1250 .BR tcsendbreak ()
1251 ¤ÏüËö¤¬ÈóƱ´ü¤Î¥·¥ê¥¢¥ë¥Ç¡¼¥¿Å¾Á÷¤òÍѤ¤¤Æ¤¤¤ë¾ì¹ç¤Ë¡¢
1252 Ϣ³¤·¤¿0¤Î¥Ó¥Ã¥ÈÎó¤ò°ìÄê´Ö³Ö¤ÇžÁ÷¤¹¤ë¡£
1253 \fIduration\fP ¤¬ 0 ¤Î¾ì¹ç¤Ï¡¢0 ¤Î¥Ó¥Ã¥È¤ò 0.25 Éðʾ塢
1254 0.5 Éðʲ¼¤Î´Ö³Ö¤ÇžÁ÷¤¹¤ë¡£ \fIduration\fP ¤¬ 0 ¤Ç¤Ê¤¤¾ì¹ç¤Ï¡¢
1255 0 ¤Î¥Ó¥Ã¥È¤ò¼ÂÁõ°Í¸¤Î»þ´Ö´Ö³Ö¤ÇÁ÷¤ë¡£
1256 .LP
1257 .\"O If the terminal is not using asynchronous serial data transmission,
1258 .\"O .BR tcsendbreak ()
1259 .\"O returns without taking any action.
1260 üËö¤¬ÈóƱ´ü¤Î¥·¥ê¥¢¥ë¥Ç¡¼¥¿Å¾Á÷¥â¡¼¥É¤Ç¤Ê¤¤¾ì¹ç¡¢
1261 .BR tcsendbreak ()
1262 ¤Ï²¿¤â¹Ô¤ï¤º¤ËÌá¤ë¡£
1263 .LP
1264 .\"O .BR tcdrain ()
1265 .\"O waits until all output written to the object referred to by
1266 .\"O .I fd
1267 .\"O has been transmitted.
1268 .BR tcdrain ()
1269 ¤Ï
1270 .I fd
1271 ¤¬¹Ô¤Ã¤Æ¤¤¤ë½ÐÎϤΞÁ÷¤¬´°Î»¤¹¤ë¤Þ¤ÇÂԤġ£
1272 .LP
1273 .\"O .BR tcflush ()
1274 .\"O discards data written to the object referred to by
1275 .\"O .I fd
1276 .\"O but not transmitted, or data received but not read, depending on the
1277 .\"O value of
1278 .\"O .IR queue_selector :
1279 .BR tcflush ()
1280 ¤Ï
1281 .I fd
1282 ¤¬¹Ô¤Ã¤Æ¤¤¤ë¥Ç¡¼¥¿¤Î½ÐÎϤǤޤÀžÁ÷¤µ¤ì¤Æ¤¤¤Ê¤¤¤â¤Î¡¢¤¢¤ë¤¤¤Ï¼õ¿®¤·
1283 ¤¿¤¬¤Þ¤ÀÆþÎϤ·¤Æ¤¤¤Ê¤¤¤â¤Î¤òÇË´þ¤¹¤ë¡£¤¤¤º¤ì¤ò¹Ô¤¦¤«¤Ï
1284 .I queue_selector
1285 ¤ÎÃͤÇÄê¤á¤ë:
1286 .\"??nakano flush == discard?
1287 .IP \fBTCIFLUSH\fP
1288 .\"O flushes data received but not read.
1289 ¼õ¿®¤·¤¿¤¬Æɤó¤Ç¤¤¤Ê¤¤¥Ç¡¼¥¿¤ò¥Õ¥é¥Ã¥·¥å¤¹¤ë¡£
1290 .IP \fBTCOFLUSH\fP
1291 .\"O flushes data written but not transmitted.
1292 ½ñ¤¤¤¿¤¬Á÷¿®¤·¤Æ¤¤¤Ê¤¤¥Ç¡¼¥¿¤ò¥Õ¥é¥Ã¥·¥å¤¹¤ë¡£
1293 .IP \fBTCIOFLUSH\fP
1294 .\"O flushes both data received but not read, and data written but not
1295 .\"O transmitted.
1296 ¼õ¿®¤·¤¿¤¬Æɤó¤Ç¤¤¤Ê¤¤¥Ç¡¼¥¿¡¦½ñ¤¤¤¿¤¬Á÷¿®¤·¤Æ¤¤¤Ê¤¤¥Ç¡¼¥¿Î¾Êý
1297 ¤ò¥Õ¥é¥Ã¥·¥å¤¹¤ë¡£
1298 .LP
1299 .\"O .BR tcflow ()
1300 .\"O suspends transmission or reception of data on the object referred to by
1301 .\"O .IR fd ,
1302 .\"O depending on the value of
1303 .\"O .IR action :
1304 .BR tcflow ()
1305 ¤Ï
1306 .I fd
1307 ¤Ç»ØÄꤵ¤ì¤¿¥ª¥Ö¥¸¥§¥¯¥È¤Ë¤ª¤±¤ë¥Ç¡¼¥¿¤ÎÁ÷¿®¤¢¤ë¤¤¤Ï¼õ¿®¤ò°ì»þŪ¤ËÃæÃǤ¹¤ë¡£
1308 Á÷¿®¤È¼õ¿®¤Î¤É¤Á¤é¤«¤Ï¡¢
1309 .IR action ¤Ç·è¤Þ¤ë:
1310 .IP \fBTCOOFF\fP
1311 .\"O suspends output.
1312 ½ÐÎϤÎÃæÃÇ¡£
1313 .IP \fBTCOON\fP
1314 .\"O restarts suspended output.
1315 ÃæÃǤ·¤¿½ÐÎϤκƳ«¡£
1316 .IP \fBTCIOFF\fP
1317 .\"O transmits a STOP character, which stops the terminal device from
1318 .\"O transmitting data to the system.
1319 STOP Ê¸»ú¤ÎÁ÷¿®¡£
1320 STOP Ê¸»ú¤ÏüËö¥Ç¥Ð¥¤¥¹¤«¤é¥·¥¹¥Æ¥à¤Ø¤Î¥Ç¡¼¥¿Á÷¿®¤òÄä»ß¤¹¤ë¡£
1321 .IP \fBTCION\fP
1322 .\"O transmits a START character, which starts the terminal device
1323 .\"O transmitting data to the system.
1324 START Ê¸»ú¤ÎÁ÷¿®¡£
1325 START Ê¸»ú¤ÏüËö¥Ç¥Ð¥¤¥¹¤«¤é¥·¥¹¥Æ¥à¤Ø¤Î¥Ç¡¼¥¿Á÷¿®¤ò³«»Ï¤¹¤ë¡£
1326 .LP
1327 .\"O The default on open of a terminal file is that neither its input nor its
1328 .\"O output is suspended.
1329 üËö¥Õ¥¡¥¤¥ë¤¬¥ª¡¼¥×¥ó¤µ¤ì¤¿¤È¤­¤Î¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢
1330 ÆþÎϤâ½ÐÎϤâÃæÃǤµ¤ì¤Æ¤¤¤Ê¤¤¡£
1331 .\"O .SS "Line speed"
1332 .SS "¥é¥¤¥ó®ÅÙ"
1333 .\"O The baud rate functions are provided for getting and setting the values
1334 .\"O of the input and output baud rates in the \fItermios\fP structure.
1335 .\"O The new values do not take effect
1336 .\"O until
1337 .\"O .BR tcsetattr ()
1338 .\"O is successfully called.
1339 ¥Ü¡¼¥ì¡¼¥È´Ø¿ô¤Ï \fItermios\fP ¹½Â¤ÂÎÃæ¤ÎÆþ½ÐÎϥܡ¼¥ì¡¼¥È¤ò
1340 ¼èÆÀ¡¢ÀßÄꤹ¤ë¤¿¤á¤ËÄ󶡤µ¤ì¤ë¡£
1341 ÀßÄꤵ¤ì¤¿ÃͤÏ
1342 .BR tcsetattr ()
1343 ¤Î¸Æ¤Ó½Ð¤·¤¬À®¸ù¤¹¤ë¤Þ¤Ç¤ÏÍ­¸ú¤Ç¤Ï¤Ê¤¤¡£
1344
1345 .\"O Setting the speed to \fBB0\fP instructs the modem to "hang up".
1346 .\"O The actual bit rate corresponding to \fBB38400\fP may be altered with
1347 .\"O .BR setserial (8).
1348 ®ÅÙ¤ò \fBB0\fP ¤ËÀßÄꤷ¤¿¾ì¹ç¡¢¥â¥Ç¥à¤ÏÄä»ß (hang up) ¤¹¤ë¡£
1349 \fBB38400\fP ¤Ë³ºÅö¤¹¤ë¼ÂºÝ¤Î¥Ó¥Ã¥È¥ì¡¼¥È¤Ï
1350 .BR setserial (8)
1351 ¤Ç
1352 Êѹ¹¤Ç¤­¤ë¡£
1353 .LP
1354 .\"O The input and output baud rates are stored in the \fItermios\fP
1355 .\"O structure.
1356 ÆþÎϤª¤è¤Ó½ÐÎϥܡ¼¥ì¡¼¥È¤Ï \fItermios\fP ¹½Â¤ÂΤ˳ÊǼ¤µ¤ì¤ë¡£
1357 .LP
1358 .\"O .BR cfgetospeed ()
1359 .\"O returns the output baud rate stored in the \fItermios\fP structure
1360 .\"O pointed to by
1361 .\"O .IR termios_p .
1362 .BR cfgetospeed ()
1363 ¤Ï
1364 .I termios_p
1365 ¤¬¼¨¤·¤Æ¤¤¤ë \fItermios\fP ¹½Â¤ÂΤ˳ÊǼ¤µ¤ì¤Æ¤¤¤ë
1366 ½ÐÎϥܡ¼¥ì¡¼¥È¤òÊÖ¤¹¡£
1367 .LP
1368 .\"O .BR cfsetospeed ()
1369 .\"O sets the output baud rate stored in the \fItermios\fP structure pointed
1370 .\"O to by \fItermios_p\fP to \fIspeed\fP, which must be one of these constants:
1371 .BR cfsetospeed ()
1372 ¤Ï \fItermios_p\fP ¤Ç¼¨¤µ¤ì¤Æ¤¤¤ë \fItermios\fP ¹½Â¤ÂÎÃæ¤Î½ÐÎϥܡ¼¥ì¡¼¥È¤ò
1373 \fIspeed\fP ¤ËÀßÄꤹ¤ë¡£Ãͤϰʲ¼¤Î¤¤¤º¤ì¤«¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤:
1374 .nf
1375
1376 .ft B
1377         B0
1378         B50
1379         B75
1380         B110
1381         B134
1382         B150
1383         B200
1384         B300
1385         B600
1386         B1200
1387         B1800
1388         B2400
1389         B4800
1390         B9600
1391         B19200
1392         B38400
1393         B57600
1394         B115200
1395         B230400
1396 .ft P
1397
1398 .fi
1399 .\"O The zero baud rate, \fBB0\fP,
1400 .\"O is used to terminate the connection.
1401 .\"O If B0 is specified, the modem control lines shall no longer be asserted.
1402 .\"O Normally, this will disconnect the line.
1403 .\"O \fBCBAUDEX\fP is a mask
1404 .\"O for the speeds beyond those defined in POSIX.1 (57600 and above).
1405 .\"O Thus, \fBB57600\fP & \fBCBAUDEX\fP is nonzero.
1406 0¥Ü¡¼ (\fBB0\fP) ¤ÏÀܳ¤ÎÃæÃǤËÍѤ¤¤é¤ì¤ë¡£
1407 B0¤¬»ØÄꤵ¤ì¤¿¾ì¹ç¡¢¥â¥Ç¥à¤ÎÀ©¸æÀþ¤Ï»ÈÍѤµ¤ì¤Ê¤¤¾õÂ֤ˤʤꡢ°ìÈ̤ˤϤ³¤ì¤Ç
1408 Àܳ¤¬ÀÚÃǤµ¤ì¤ë¡£
1409 \fBCBAUDEX\fP ¤ÏPOSIX.1¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ë®ÅÙ¤ÎÈϰϳ° (57600 ¤ª¤è¤Ó¤½¤ì°Ê¾å)
1410 ¤òÀßÄꤹ¤ë¡£¤¹¤Ê¤ï¤ÁÎ㤨¤Ð \fBB57600\fP & \fBCBAUDEX\fP ¤Ï 0 ¤Ç¤Ê¤¤¡£
1411 .LP
1412 .\"O .BR cfgetispeed ()
1413 .\"O returns the input baud rate stored in the \fItermios\fP structure.
1414 .BR cfgetispeed ()
1415 ¤Ï \fItermios\fP ¹½Â¤ÂÎÃæ¤ÎÆþÎϥܡ¼¥ì¡¼¥È¤òÊÖ¤¹¡£
1416 .LP
1417 .\"O .BR cfsetispeed ()
1418 .\"O sets the input baud rate stored in the \fItermios\fP structure to
1419 .\"O .IR speed ,
1420 .\"O which must be specified as one of the \fBBnnn\fP constants listed above for
1421 .\"O .BR cfsetospeed ().
1422 .\"O If the input baud rate is set to zero, the input baud rate will be
1423 .\"O equal to the output baud rate.
1424 .BR cfsetispeed ()
1425 ¤Ï \fItermios\fP ¹½Â¤ÂÎÃæ¤ÎÆþÎϥܡ¼¥ì¡¼¥È¤ò
1426 .I speed
1427 ¤ËÀßÄꤹ¤ë¡£
1428 .I speed
1429 ¤Ë¤Ï¡¢¾å½Ò¤Î
1430 .BR cfsetospeed ()
1431 ¤Î¥Ü¡¼¥ì¡¼¥ÈÄê¿ô \fBBnnn\fP ¤Î¤¤¤º¤ì¤«°ì¤Ä¤ò»ØÄꤷ¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
1432 ÆþÎϥܡ¼¥ì¡¼¥È¤¬ 0 ¤ËÀßÄꤵ¤ì¤¿¾ì¹ç¡¢ÆþÎϥܡ¼¥ì¡¼¥È¤Ï½ÐÎϥܡ¼¥ì¡¼¥È
1433 ¤ÈƱ¤¸ÃͤȤʤ롣
1434 .LP
1435 .\"O .BR cfsetspeed ()
1436 .\"O is a 4.4BSD extension.
1437 .\"O It takes the same arguments as
1438 .\"O .BR cfsetispeed (),
1439 .\"O and sets both input and output speed.
1440 .BR cfsetspeed ()
1441 ¤Ï 4.4BSD ¤Ë¤è¤ë³ÈÄ¥¤Ç¤¢¤ë¡£¤³¤Î´Ø¿ô¤Ï
1442 .BR cfsetispeed ()
1443 ¤ÈƱ¤¸°ú¤­¿ô¤ò¤È¤ê¡¢Æþ½ÐÎÏξÊý¤Î®ÅÙ¤òÀßÄꤹ¤ë¡£
1444 .\"O .SH "RETURN VALUE"
1445 .SH ÊÖ¤êÃÍ
1446 .LP
1447 .\"O .BR cfgetispeed ()
1448 .\"O returns the input baud rate stored in the
1449 .\"O \fItermios\fP
1450 .\"O structure.
1451 .BR cfgetispeed ()
1452 ¤Ï \fItermios\fP ¹½Â¤ÂÎÃæ¤ÎÆþÎϥܡ¼¥ì¡¼¥È¤òÊÖ¤¹¡£
1453 .LP
1454 .\"O .BR cfgetospeed ()
1455 .\"O returns the output baud rate stored in the \fItermios\fP structure.
1456 .BR cfgetospeed ()
1457 ¤Ï \fItermios\fP ¹½Â¤ÂÎÃæ¤Î½ÐÎϥܡ¼¥ì¡¼¥È¤òÊÖ¤¹¡£
1458 .LP
1459 .\"O All other functions return:
1460 ¾¤Î¤¹¤Ù¤Æ¤Î´Ø¿ô¤ÎÌá¤êÃÍ:
1461 .IP 0
1462 .\"O on success.
1463 ¼Â¹ÔÀ®¸ù¡£
1464 .IP \-1
1465 .\"O on failure and set
1466 .\"O .I errno
1467 .\"O to indicate the error.
1468 ¼Â¹Ô¼ºÇÔ¡£
1469 .I errno
1470 ¤¬¥¨¥é¡¼¤Î¼ïÎà¤ò¼¨¤¹¡£
1471 .LP
1472 .\"O Note that
1473 .\"O .BR tcsetattr ()
1474 .\"O returns success if \fIany\fP of the requested changes could be
1475 .\"O successfully carried out.
1476 .\"O Therefore, when making multiple changes
1477 .\"O it may be necessary to follow this call with a further call to
1478 .\"O .BR tcgetattr ()
1479 .\"O to check that all changes have been performed successfully.
1480 .BR tcsetattr ()
1481 ¤Ï \fI¤Ê¤ó¤é¤«¤Î\fP Êѹ¹Í׵᤬À®¸ù¤·¤¿¾ì¹ç¤ËÀ®¸ù¤òÊÖ¤¹¤³¤È¤ËÃí°Õ¡£
1482 ½¾¤Ã¤Æ¡¢Ê£¿ô¤ÎÊѹ¹¤ò¹Ô¤Ã¤¿¾ì¹ç¤Ë¤Ï¡¢°ú¤­Â³¤¤¤Æ
1483 .BR tcgetattr ()
1484 ¤ò¸Æ¤Ó½Ð¤·¤ÆÁ´¤Æ¤ÎÊѹ¹¤¬¼Â¹Ô¤µ¤ì¤Æ¤¤¤ë¤«¤ò³Îǧ¤¹¤ëɬÍפ¬¤¢¤ë¤«¤â¤·¤ì¤Ê¤¤¡£
1485 .\"O .SH CONFORMING TO
1486 .SH ½àµò
1487 .BR tcgetattr (),
1488 .BR tcsetattr (),
1489 .BR tcsendbreak (),
1490 .BR tcdrain (),
1491 .BR tcflush (),
1492 .BR tcflow (),
1493 .BR cfgetispeed (),
1494 .BR cfgetospeed (),
1495 .BR cfsetispeed (),
1496 .\"O and
1497 .BR cfsetospeed ()
1498 .\"O are specified in POSIX.1-2001.
1499 ¤Ï POSIX.1-2001 ¤Çµ¬Äꤵ¤ì¤Æ¤¤¤ë¡£
1500
1501 .\"O .BR cfmakeraw ()
1502 .\"O and
1503 .\"O .BR cfsetspeed ()
1504 .\"O are nonstandard, but available on the BSDs.
1505 .BR cfmakeraw ()
1506 ¤È
1507 .BR cfsetspeed ()
1508 ¤ÏÈóɸ½à¤À¤¬¡¢BSD ¤Ç¤ÏÍøÍѲÄǽ¤Ç¤¢¤ë¡£
1509 .\"O .SH NOTES
1510 .SH Ãí°Õ
1511 .\"O UNIX V7 and several later systems have a list of baud rates
1512 .\"O where after the fourteen values B0, ..., B9600 one finds the
1513 .\"O two constants EXTA, EXTB ("External A" and "External B").
1514 .\"O Many systems extend the list with much higher baud rates.
1515 UNIX V7 ¤È¤½¤Î¸å¤Î¤¤¤¯¤Ä¤«¤Î¥·¥¹¥Æ¥à¤Ç¤Ï¡¢¥Ü¡¼¥ì¡¼¥È¤Î 14 ¸Ä¤Î¥ê¥¹¥È¤Ç¤¢¤ë
1516 B0, ..., B9600 ¤Î¸å¤í¤Ë EXTA, EXTB ("External A" ¤È "External B") ¤Î 2 ¤Ä¤ò
1517 Äɲ䷤Ƥ¤¤ë¡£
1518 ¿¤¯¤Î¥·¥¹¥Æ¥à¤Ç¤Ï¤µ¤é¤Ë¹â®¤Ê¥Ü¡¼¥ì¡¼¥È¤Î¤¿¤á¤Ë¥ê¥¹¥È¤ò³ÈÄ¥¤·¤Æ¤¤¤ë¡£
1519 .LP
1520 .\"O The effect of a nonzero \fIduration\fP with
1521 .\"O .BR tcsendbreak ()
1522 .\"O varies.
1523 .BR tcsendbreak ()
1524 ¤Ç \fIduration\fP ¤Ë 0 °Ê³°¤ò»ØÄꤷ¤¿¾ì¹ç¤Î¸ú²Ì¤ÏÍÍ¡¹¤Ç¤¢¤ë¡£
1525 .\"O SunOS specifies a break of
1526 .\"O .I "duration\ *\ N"
1527 .\"O seconds, where \fIN\fP is at least 0.25, and not more than 0.5.
1528 SunOS ¤Ï
1529 .IB duration * N
1530 ÉäΥ֥졼¥¯¤òµ¬Äꤷ¤Æ¤¤¤ë¡£¤³¤³¤Ç \fIN\fP ¤Ï 0.25 °Ê¾å 0.5 Ì¤Ëþ¤Ç¤¢¤ë¡£
1531 .\"O Linux, AIX, DU, Tru64 send a break of
1532 .\"O .I duration
1533 .\"O milliseconds.
1534 Linux, AIX, DU, Tru64 ¤Ï
1535 .I duration
1536 ¥ß¥êÉäΥ֥졼¥¯¤òÁ÷¿®¤¹¤ë¡£
1537 .\"O FreeBSD and NetBSD and HP-UX and MacOS ignore the value of
1538 .\"O .IR duration .
1539 FreeBSD, NetBSD, HP-UX, MacOS ¤Ï
1540 .I duration
1541 ¤ÎÃͤò̵»ë¤¹¤ë¡£
1542 .\"O Under Solaris and UnixWare,
1543 .\"O .BR tcsendbreak ()
1544 .\"O with nonzero
1545 .\"O .I duration
1546 .\"O behaves like
1547 .\"O .BR tcdrain ().
1548 Solaris ¤È UnixWare ¤Ç¤Ï¡¢Èó¥¼¥í¤Î
1549 .I duration
1550 ¤ò»ØÄꤷ¤¿
1551 .BR tcsendbreak ()
1552 ¤Î¿¶¤ëÉñ¤¤¤Ï
1553 .BR tcdrain ()
1554 ¤ÈƱÍͤǤ¢¤ë¡£
1555 .\"O .\" libc4 until 4.7.5, glibc for sysv: EINVAL for duration > 0.
1556 .\"O .\" libc4.7.6, libc5, glibc for unix: duration in ms.
1557 .\"O .\" glibc for bsd: duration in us
1558 .\"O .\" glibc for sunos4: ignore duration
1559 .\"O .SH "SEE ALSO"
1560 .SH ´ØÏ¢¹àÌÜ
1561 .BR stty (1),
1562 .BR console_ioctl (4),
1563 .BR tty_ioctl (4),
1564 .BR setserial (8)